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 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 Context
      object - the object target by the feature (MUST be NOT null). Use the SiteRest object for repository wide feature
      Returns:
      true if the user associated with the context has access to the feature for the specified object
      Throws:
      SQLException
      SearchServiceException
    • getName

      default String getName()
      Return the name of the feature
      Returns:
      the name of the feature
    • getDescription

      default String getDescription()
      Return the description of the feature
      Returns:
      the description of the feature
    • getSupportedTypes

      String[] getSupportedTypes()
      Return the supported object type according to the RestAddressableModel.getUniqueType()
      Returns:
      the supported object type, required to be not null