Interface QualifierVaultAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface QualifierVaultAssignmentSession extends OsidSession

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

Adding a reference of a Qualifier to another Vault is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignQualifiers

      boolean canAssignQualifiers()
      Tests if this user can alter qualifier/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.
    • canAssignQualifiersToVault

      boolean canAssignQualifiersToVault(Id vaultId)
      Tests if this user can alter qualifier/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 qualifier 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.
    • getAssignableVaultIdsForQualifier

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

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

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

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