Interface SubscriptionEnablerPublisherAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SubscriptionEnablerPublisherAssignmentSession extends OsidSession

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

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

  • Method Details

    • canAssignSubscriptionEnablers

      boolean canAssignSubscriptionEnablers()
      Tests if this user can alter subscription 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 . 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.
    • canAssignSubscriptionEnablersToPublisher

      boolean canAssignSubscriptionEnablersToPublisher(Id publisherId)
      Tests if this user can alter subscription 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 . This is intended as a hint to an application that may opt not to offer lookup 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 publisher enabler can be assigned.
      Parameters:
      publisherId - the Id of the Publisher
      Returns:
      list of assignable subscription Ids
      Throws:
      NullArgumentException - publisherId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignablePublisherIdsForSubscriptionEnabler

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

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

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

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