Interface AuthorizationFeature
- All Known Implementing Classes:
AdministratorOfFeature,CanChangePasswordFeature,CanClaimItemFeature,CanCreateVersionFeature,CanDeleteVersionFeature,CanEditVersionFeature,CanManageBitstreamBundlesFeature,CanManageMappingsFeature,CanManageRelationshipsFeature,CanManageVersionsFeature,CanRegisterDOIFeature,CanSeeVersionsFeature,CanSendFeedbackFeature,CanSubscribeFeature,CanSynchronizeWithORCID,CanViewUsageStatisticsFeature,CCLicenseFeature,CoarNotifyEnabled,CollectionAdminFeature,ComColAdminFeature,CommunityAdminFeature,CreateBitstreamFeature,CreateBundleFeature,CreateCollectionFeature,CreateCommunityFeature,DeleteFeature,DownloadFeature,EditItemFeature,EditMetadataFeature,EPersonForgotPasswordFeature,EPersonRegistrationFeature,LoginOnBehalfOfFeature,MakeDiscoverableFeature,MakePrivateFeature,ManageAdminGroupFeature,ManageGroupFeature,ManageGroupsFeature,ManageSubmitterGroupFeature,ManageTemplateItemFeature,ManageWorkflowGroupFeature,MoveFeature,PolicyFeature,QAAuthorizationFeature,ReinstateFeature,ReorderBitstreamFeature,RequestCopyFeature,SubmitFeature,ViewSearchStatisticsFeature,ViewWorkflowStatisticsFeature,WithdrawFeature
public interface AuthorizationFeature
A feature is the representation of a business goal used in the Authorization endpoint to declare what an user can do
on a specific object.
- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturn the description of the featuredefault StringgetName()Return the name of the featureString[]Return the supported object type according to theRestAddressableModel.getUniqueType()booleanisAuthorized(Context context, BaseObjectRest object) Check if the eperson in the provided context, or the anonymous user if not loggedin, has access to the feature for the requested object
-
Method Details
-
isAuthorized
boolean isAuthorized(Context context, BaseObjectRest object) throws SQLException, SearchServiceException Check if the eperson in the provided context, or the anonymous user if not loggedin, has access to the feature for the requested object- Parameters:
context- the DSpace Contextobject- the object target by the feature (MUST be NOT null). Use theSiteRestobject for repository wide feature- Returns:
- true if the user associated with the context has access to the feature for the specified object
- Throws:
SQLExceptionSearchServiceException
-
getName
Return the name of the feature- Returns:
- the name of the feature
-
getDescription
Return the description of the feature- Returns:
- the description of the feature
-
getSupportedTypes
String[] getSupportedTypes()Return the supported object type according to theRestAddressableModel.getUniqueType()- Returns:
- the supported object type, required to be not null
-