Interface AuthorizationEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AuthorizationEnablerAdminSession extends OsidSession

This session creates and removes authorization enablers. The data for create and update is provided via the AuthorizationEnablerForm .

  • Method Details

    • getVaultId

      Id getVaultId()
      Gets the Vault Id associated with this session.
      Returns:
      the Vault Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getVault

      Gets the Vault associated with this session.
      Returns:
      the vault
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateAuthorizationEnabler

      boolean canCreateAuthorizationEnabler()
      Tests if this user can create authorization enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an AuthorizationEnabler will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
      Returns:
      false if AuthorizationEnabler creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateAuthorizationEnablerWithRecordTypes

      boolean canCreateAuthorizationEnablerWithRecordTypes(Type[] authorizationEnablerRecordTypes)
      Tests if this user can create a single AuthorizationEnabler using the desired record types. While AuthorizationRulesManager.getAuthorizationEnablerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific AuthorizationEnabler . Providing an empty array tests if an AuthorizationEnabler can be created with no records.
      Parameters:
      authorizationEnablerRecordTypes - array of authorization enabler record types
      Returns:
      true if AuthorizationEnabler creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - authorizationEnablerRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getAuthorizationEnablerFormForCreate

      AuthorizationEnablerForm getAuthorizationEnablerFormForCreate(Type[] authorizationEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the authorization enabler form for creating new authorization enablers. A new form should be requested for each create transaction.
      Parameters:
      authorizationEnablerRecordTypes - array of authorization enabler record types
      Returns:
      the authorization enabler form
      Throws:
      NullArgumentException - authorizationEnablerRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createAuthorizationEnabler

      AuthorizationEnabler createAuthorizationEnabler(AuthorizationEnablerForm authorizationEnablerForm) throws OperationFailedException, PermissionDeniedException
      Creates a new AuthorizationEnabler .
      Parameters:
      authorizationEnablerForm - the form for this AuthorizationEnabler
      Returns:
      the new AuthorizationEnabler
      Throws:
      IllegalStateException - authorizationEnablerForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - authorizationEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - authorizationEnablerForm did not originate from getAuthorizationEnablerFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateAuthorizationEnablers

      boolean canUpdateAuthorizationEnablers()
      Tests if this user can update authorization enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an AuthorizationEnabler will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
      Returns:
      false if AuthorizationEnabler modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAuthorizationEnablerFormForUpdate

      AuthorizationEnablerForm getAuthorizationEnablerFormForUpdate(Id authorizationEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the authorization enabler form for updating an existing authorization enabler. A new authorization enabler form should be requested for each update transaction.
      Parameters:
      authorizationEnablerId - the Id of the AuthorizationEnabler
      Returns:
      the authorization enabler form
      Throws:
      NotFoundException - authorizationEnablerId is not found
      NullArgumentException - authorizationEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateAuthorizationEnabler

      void updateAuthorizationEnabler(AuthorizationEnablerForm authorizationEnablerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing authorization enabler.
      Parameters:
      authorizationEnablerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - authorizationEnablerForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - authorizationEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - authorizationEnablerForm did not originate from getAuthorizationEnablerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteAuthorizationEnablers

      boolean canDeleteAuthorizationEnablers()
      Tests if this user can delete authorization enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an AuthorizationEnabler will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
      Returns:
      false if AuthorizationEnabler deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteAuthorizationEnabler

      void deleteAuthorizationEnabler(Id authorizationEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes an AuthorizationEnabler .
      Parameters:
      authorizationEnablerId - the Id of the AuthorizationEnabler to remove
      Throws:
      NotFoundException - authorizationEnablerId not found
      NullArgumentException - authorizationEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageAuthorizationEnablerAliases

      boolean canManageAuthorizationEnablerAliases()
      Tests if this user can manage Id aliases for authorization enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
      Returns:
      false if AuthorizationEnabler aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasAuthorizationEnabler

      void aliasAuthorizationEnabler(Id authorizationEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to an AuthorizationEnabler for the purpose of creating compatibility. The primary Id of the AuthorizationEnabler is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another authorization enabler. it is reassigned to the given authorization enabler Id .
      Parameters:
      authorizationEnablerId - the Id of an AuthorizationEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - authorizationEnablerId not found
      NullArgumentException - authorizationEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.