Interface TodoProducerChecklistAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TodoProducerChecklistAssignmentSession extends OsidSession

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

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

  • Method Details

    • canAssignTodoProducers

      boolean canAssignTodoProducers()
      Tests if this user can alter todo producer/checklist 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 lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignTodoProducersToChecklist

      boolean canAssignTodoProducersToChecklist(Id checklistId)
      Tests if this user can alter todo producer/checklist 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 lookup operations to unauthorized users.
      Parameters:
      checklistId - the Id of the Checklist
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - checklistId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableChecklistIds

      IdList getAssignableChecklistIds(Id checklistId) throws OperationFailedException
      Gets a list of checklists including and under the given checklist node in which any todo producer can be assigned.
      Parameters:
      checklistId - the Id of the Checklist
      Returns:
      list of assignable checklist Ids
      Throws:
      NullArgumentException - checklistId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableChecklistIdsForTodoProducer

      IdList getAssignableChecklistIdsForTodoProducer(Id checklistId, Id todoProducerId) throws OperationFailedException
      Gets a list of checklists including and under the given checklist node in which a specific todo producer can be assigned.
      Parameters:
      checklistId - the Id of the Checklist
      todoProducerId - the Id of the TodoProducer
      Returns:
      list of assignable checklist Ids
      Throws:
      NullArgumentException - checklistId or todoProducerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignTodoProducerToChecklist

      void assignTodoProducerToChecklist(Id todoProducerId, Id checklistId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing TodoProducer to an Checklist .
      Parameters:
      todoProducerId - the Id of the TodoProducer
      checklistId - the Id of the Checklist
      Throws:
      AlreadyExistsException - todoProducerId is already assigned to checklistId
      NotFoundException - todoProducerId or checklistId not found
      NullArgumentException - todoProducerId or checklistId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignTodoProducerFromChecklist

      void unassignTodoProducerFromChecklist(Id todoProducerId, Id checklistId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a TodoProducer from an Checklist .
      Parameters:
      todoProducerId - the Id of the TodoProducer
      checklistId - the Id of the Checklist
      Throws:
      NotFoundException - todoProducerId or checklistId not found or todoProducerId is not assigned to checklistId
      NullArgumentException - todoProducerId or checklistId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignTodoProducerToChecklist

      void reassignTodoProducerToChecklist(Id todoProducerId, Id fromChecklistId, Id toChecklistId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a TodoProducer from one Checklist to another. Mappings to other Checklists are unaffected.
      Parameters:
      todoProducerId - the Id of the TodoProducer
      fromChecklistId - the Id of the current Checklist
      toChecklistId - the Id of the destination Checklist
      Throws:
      AlreadyExistsException - todoProducerId already assigned to toChecklistId
      NotFoundException - todoProducerId, fromChecklistId , or toChecklistId not found or todoProducerId , not mapped to fromChecklistId
      NullArgumentException - todoProducerId,, fromChecklistId , or toChecklistId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.