Interface WorkFoundryAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface WorkFoundryAssignmentSession extends OsidSession

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

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

  • Method Details

    • canAssignWorks

      boolean canAssignWorks()
      Tests if this user can alter work/foundry 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.
    • canAssignWorksToFoundry

      boolean canAssignWorksToFoundry(Id foundryId)
      Tests if this user can alter work/foundry 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:
      foundryId - the Id of the Foundry
      Returns:
      false if resourcing is not authorized, true otherwise
      Throws:
      NullArgumentException - foundryId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableFoundryIds

      IdList getAssignableFoundryIds(Id foundryId) throws OperationFailedException
      Gets a list of foundries including and under the given foundry node in which any work can be assigned.
      Parameters:
      foundryId - the Id of the Foundry
      Returns:
      list of assignable foundry Ids
      Throws:
      NullArgumentException - foundryId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableFoundryIdsForWork

      IdList getAssignableFoundryIdsForWork(Id foundryId, Id workId) throws OperationFailedException
      Gets a list of foundries including and under the given foundry node in which a specific work can be assigned.
      Parameters:
      foundryId - the Id of the Foundry
      workId - the Id of the Work
      Returns:
      list of assignable foundry Ids
      Throws:
      NullArgumentException - foundryId or workId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignWorkToFoundry

      void assignWorkToFoundry(Id workId, Id foundryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Work to a Foundry .
      Parameters:
      workId - the Id of the Work
      foundryId - the Id of the Foundry
      Throws:
      NotFoundException - workId or foundryId not found
      NullArgumentException - workId or foundryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignWorkFromFoundry

      void unassignWorkFromFoundry(Id workId, Id foundryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Work from a Foundry .
      Parameters:
      workId - the Id of the Work
      foundryId - the Id of the Foundry
      Throws:
      NotFoundException - workId or foundryId not found
      NullArgumentException - workId or foundryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignWorkToFoundry

      void reassignWorkToFoundry(Id workId, Id fromFoundryId, Id toFoundryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Work from one Foundry to another. Mappings to other Foundries are unaffected.
      Parameters:
      workId - the Id of the Job
      fromFoundryId - the Id of the current Foundry
      toFoundryId - the Id of the destination Foundry
      Throws:
      AlreadyExistsException - workId already assigned to toFoundryId
      NotFoundException - workId, fromFoundryId , or toFoundryId not found or workId not mapped to fromFoundryId
      NullArgumentException - workId, fromFoundryId , or toFoundryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.