Class AuthorizationRestUtil
java.lang.Object
org.dspace.app.rest.authorization.AuthorizationRestUtil
Utility class to manipulate the AuthorizationRest object
- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEperson(Context context, String id) Get the eperson in the authorization extracting its uuid from the authorization business ID (Authorization.getID()) and retrieving the corresponding eperson object with theEPersonService.getFeatureName(String id) Extract the feature name from the Authorization business ID.Get the object addressed in the authorization extracting its type and primary key from the authorization business ID (Authorization.getID()) and using the appropriate service
-
Constructor Details
-
AuthorizationRestUtil
public AuthorizationRestUtil()
-
-
Method Details
-
getFeatureName
Extract the feature name from the Authorization business ID. SeeAuthorization.getID()- Parameters:
id- the Authorization business ID- Returns:
- the feature name
-
getObject
Get the object addressed in the authorization extracting its type and primary key from the authorization business ID (Authorization.getID()) and using the appropriate service- Parameters:
context- the DSpace contextid- the Authorization business ID. SeeAuthorization.getID()- Returns:
- the object addressed in the authorization
- Throws:
SQLException- if an error occur retrieving the data from the databaseIllegalArgumentException- if the specified id doesn't contain syntactically valid object information
-
getEperson
Get the eperson in the authorization extracting its uuid from the authorization business ID (Authorization.getID()) and retrieving the corresponding eperson object with theEPersonService. Please note that reference to deleted eperson will result in an IllegalArgumentException- Parameters:
context- the DSpace contextid- the Authorization business ID. SeeAuthorization.getID()- Returns:
- the eperson addressed in the authorization or null if not specified.
- Throws:
SQLException- if an error occur retrieving the data from the databaseIllegalArgumentException- if the specified id doesn't contain syntactically valid object information
-