Interface DispatchEnablerPublisherAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface DispatchEnablerPublisherAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignDispatchEnablers

      boolean canAssignDispatchEnablers()
      Tests if this user can alter dispatch enabler/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.
    • canAssignDispatchEnablerToPublisher

      boolean canAssignDispatchEnablerToPublisher(Id publisherId)
      Tests if this user can alter dispatch enabler/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 enabler 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.
    • getAssignablePublisherIdsForDispatchEnabler

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

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

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

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