Interface FunctionVaultAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface FunctionVaultAssignmentSession extends OsidSession

This session provides methods to re-assign Functions to Vaults . A Function may map to multiple Vaults and removing the last reference to a Function 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 Function to another Vault is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignFunctions

      boolean canAssignFunctions()
      Tests if this user can alter function/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.
    • canAssignFunctionsToVault

      boolean canAssignFunctionsToVault(Id vaultId)
      Tests if this user can alter function/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 function 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.
    • getAssignableVaultIdsForFunction

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

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

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

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