Interface AuthorizationVaultAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AuthorizationVaultAssignmentSession extends OsidSession

This session provides methods to re-assign Authorizations to Vault . An Authorization may map to multiple Vault objects and removing the last reference to a Authorization is the equivalent of deleting it. Each Vault may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of a Authorization to another Vault is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignAuthorizations

      boolean canAssignAuthorizations()
      Tests if this user can alter authorization/vault mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignAuthorizationsToVault

      boolean canAssignAuthorizationsToVault(Id vaultId)
      Tests if this user can alter authorization/vault mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      vaultId - the Id of the Vault
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - vaultId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableVaultIds

      IdList getAssignableVaultIds(Id vaultId) throws OperationFailedException
      Gets a list of vault including and under the given vault node in which any authorization can be assigned.
      Parameters:
      vaultId - the Id of the Vault
      Returns:
      list of assignable vault Ids
      Throws:
      NullArgumentException - vaultId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableVaultIdsForAuthorization

      IdList getAssignableVaultIdsForAuthorization(Id vaultId, Id authorizationId) throws OperationFailedException
      Gets a list of vault including and under the given vault node in which a specific authorization can be assigned.
      Parameters:
      vaultId - the Id of the Vault
      authorizationId - the Id of the Authorization
      Returns:
      list of assignable vault Ids
      Throws:
      NullArgumentException - vaultId or authorizationId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignAuthorizationToVault

      void assignAuthorizationToVault(Id authorizationId, Id vaultId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Authorization to a Vault .
      Parameters:
      authorizationId - the Id of the Authorization
      vaultId - the Id of the Vault
      Throws:
      AlreadyExistsException - authorizationId is already assigned to vaultId
      NotFoundException - authorizationId or vaultId not found
      NullArgumentException - authorizationId or vaultId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignAuthorizationFromVault

      void unassignAuthorizationFromVault(Id authorizationId, Id vaultId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Authorization from a Vault .
      Parameters:
      authorizationId - the Id of the Authorization
      vaultId - the Id of the Vault
      Throws:
      NotFoundException - authorizationId or vaultId not found or authorizationId not assigned to vaultId
      NullArgumentException - authorizationId or vaultId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignAuthorizationToVault

      void reassignAuthorizationToVault(Id authorizationId, Id fromVaultId, Id toVaultId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Authorization from one Vault to another. Mappings to other Vaults are unaffected.
      Parameters:
      authorizationId - the Id of the Authorization
      fromVaultId - the Id of the current Vault
      toVaultId - the Id of the destination Vault
      Throws:
      AlreadyExistsException - authorizationId already assigned to toVaultId
      NotFoundException - authorizationId, fromVaultId , or toVaultId not found or authorizationId not mapped to fromVaultId
      NullArgumentException - authorizationId, fromVaultId , or toVaultId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.