Interface DispatchConstrainerPublisherAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DispatchConstrainerPublisherAssignmentSession extends OsidSession

This session provides methods to re-assign DispatchConstrainer to Publisher mappings. A DispatchConstrainer may appear in multiple Publisher catalogs and removing the last reference to a DispatchConstrainer 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 DispatchConstrainer to another Publisher is n ot a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignDispatchConstrainers

      boolean canAssignDispatchConstrainers()
      Tests if this user can alter dispatch constrainer/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. T his 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.
    • canAssignDispatchConstrainerToPublisher

      boolean canAssignDispatchConstrainerToPublisher(Id publisherId)
      Tests if this user can alter dispatch constrainer/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. T his 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 constrainer 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.
    • getAssignablePublisherIdsForDispatchConstrainer

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

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

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

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