Interface ChainAntimatroidAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ChainAntimatroidAssignmentSession extends OsidSession

This session provides methods to re-assign Chains to Antimatroid mappings. A Chain may appear in multiple Antimatroid objects and removing the last reference to a Chain is the equivalent of deleting it. Each Antimatroid may have its own authorizations governing who is allowed to operate on it.

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

  • Method Details

    • canAssignChains

      boolean canAssignChains()
      Tests if this user can alter chain/antimatroid 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 chain is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignChainsToAntimatroid

      boolean canAssignChainsToAntimatroid(Id antimatroidId)
      Tests if this user can alter chain/antimatroid 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:
      antimatroidId - the Id of the Antimatroid
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - antimatroidId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableAntimatroidIds

      IdList getAssignableAntimatroidIds(Id antimatroidId) throws OperationFailedException
      Gets a list of antimatroids including and under the given antimatroid node in which any chain can be assigned.
      Parameters:
      antimatroidId - the Id of the Antimatroid
      Returns:
      list of assignable antimatroid Ids
      Throws:
      NullArgumentException - antimatroidId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableAntimatroidIdsForChain

      IdList getAssignableAntimatroidIdsForChain(Id antimatroidId, Id chainId) throws OperationFailedException
      Gets a list of antimatroids including and under the given antimatroid node in which a specific chain can be assigned.
      Parameters:
      antimatroidId - the Id of the Antimatroid
      chainId - the Id of the Chain
      Returns:
      list of assignable antimatroid Ids
      Throws:
      NullArgumentException - antimatroidId or chainId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignChainToAntimatroid

      void assignChainToAntimatroid(Id chainId, Id antimatroidId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Chain to a Antimatroid .
      Parameters:
      chainId - the Id of the Chain
      antimatroidId - the Id of the Antimatroid
      Throws:
      AlreadyExistsException - chainId is already assigned to antimatroidId
      NotFoundException - chainId or antimatroidId not found
      NullArgumentException - chainId or antimatroidId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignChainFromAntimatroid

      void unassignChainFromAntimatroid(Id chainId, Id antimatroidId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Chain from a Antimatroid .
      Parameters:
      chainId - the Id of the Chain
      antimatroidId - the Id of the Antimatroid
      Throws:
      NotFoundException - chainId or antimatroidId not found or chainId not assigned to antimatroidId
      NullArgumentException - chainId or antimatroidId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignChainToAntimatroid

      void reassignChainToAntimatroid(Id chainId, Id fromAntimatroidId, Id toAntimatroidId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Chain from one Antimatroid to another. Mappings to other Antimatroids are unaffected.
      Parameters:
      chainId - the Id of the Chain
      fromAntimatroidId - the Id of the current Antimatroid
      toAntimatroidId - the Id of the destination Antimatroid
      Throws:
      AlreadyExistsException - chainId already assigned to toAntimatroidId
      NotFoundException - chainId, fromAntimatroidId , or toAntimatroidId not found or chainId not mapped to fromAntimatroidId
      NullArgumentException - chainId, fromAntimatroidId , or toAntimatroidId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.