Interface DispatchPublisherAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DispatchPublisherAssignmentSession extends OsidSession

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

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

  • Method Details

    • canAssignDispatches

      boolean canAssignDispatches()
      Tests if this user can alter dispatch/publisher 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.
    • canAssignDispatchesToPublisher

      boolean canAssignDispatchesToPublisher(Id publisherId)
      Tests if this user can alter dispatch/publisher 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:
      publisherId - the Id of the Publisher
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - publisherId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignablePublisherIds

      IdList getAssignablePublisherIds(Id publisherId) throws OperationFailedException
      Gets a list of publishers including and under the given publisher node in which any dispatch can be assigned.
      Parameters:
      publisherId - the Id of the Publisher
      Returns:
      list of assignable publisher Ids
      Throws:
      NullArgumentException - publisherId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignablePublisherIdsForDispatch

      IdList getAssignablePublisherIdsForDispatch(Id publisherId, Id dispatchId) throws OperationFailedException
      Gets a list of publishers including and under the given publisher node in which a specific dispatch can be assigned.
      Parameters:
      publisherId - the Id of the Publisher
      dispatchId - the Id of the Dispatch
      Returns:
      list of assignable publisher Ids
      Throws:
      NullArgumentException - publisherId or dispatchId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignDispatchToPublisher

      void assignDispatchToPublisher(Id dispatchId, Id publisherId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Dispatch to a Publisher .
      Parameters:
      dispatchId - the Id of the Dispatch
      publisherId - the Id of the Publisher
      Throws:
      AlreadyExistsException - dispatchId is already assigned to publisherId
      NotFoundException - dispatchId or publisherId not found
      NullArgumentException - dispatchId or publisherId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignDispatchFromPublisher

      void unassignDispatchFromPublisher(Id dispatchId, Id publisherId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Dispatch from a Publisher .
      Parameters:
      dispatchId - the Id of the Dispatch
      publisherId - the Id of the Publisher
      Throws:
      NotFoundException - dispatchId or publisherId not found or dispatchId not assigned to publisherId
      NullArgumentException - dispatchId or publisherId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignDispatchToPublisher

      void reassignDispatchToPublisher(Id dispatchId, Id fromPublisherId, Id toPublisherId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Dispatch from one Publisher to another. Mappings to other Publishers are unaffected.
      Parameters:
      dispatchId - the Id of the Dispatch
      fromPublisherId - the Id of the current Publisher
      toPublisherId - the Id of the destination Publisher
      Throws:
      AlreadyExistsException - dispatchId already assigned to toPublisherId
      NotFoundException - dispatchId, fromPublisherId , or toPublisherId not found or dispatchId , not mapped to fromPublisherId
      NullArgumentException - dispatchId, fromPublisherId , or toPublisherId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.