Interface MySubscriptionSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface MySubscriptionSession extends OsidSession

This session defines methods for retrieving subscriptions.

This lookup session defines several views:

  • effective subscription view: All subscription lookup methods return subscriptions where the current date falls in between the effective dates inclusive.
  • any effective subscription view: Subscriptions of any effective date are returned from methods.
  • Method Details

    • getPublisherId

      Id getPublisherId()
      Gets the Publisher Id associated with this session.
      Returns:
      the Publisher Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getPublisher

      Gets the Publisher associated with this session.
      Returns:
      the publisher
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canLookupMySubscriptions

      boolean canLookupMySubscriptions()
      Tests if this user can lookup subscriptions. A return of true does not guarantee successful authorization. A return of false indicates that it is known all 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 these operations.
      Returns:
      false if subscription lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useEffectiveSubscriptionView

      void useEffectiveSubscriptionView()
      Only subscriptions whose effective dates are current are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • useAnyEffectiveSubscriptionView

      void useAnyEffectiveSubscriptionView()
      All subscriptions of any effective dates are returned by methods in this session.
      Compliance:
      mandatory - This method is must be implemented.
    • getSubscriptionsForDispatch

      SubscriptionList getSubscriptionsForDispatch(Id dispatchId) throws OperationFailedException, PermissionDeniedException
      Gets a list of all subscriptions corresponding to a dispatch Id for the subscriber related to the current agent.
      Parameters:
      dispatchId - the Id of the dispatch
      Returns:
      the returned SubscriptionList
      Throws:
      NullArgumentException - dispatchId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getSubscriptionsByDateForDispatch

      SubscriptionList getSubscriptionsByDateForDispatch(Id dispatchId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
      Gets a list of all subscriptions corresponding to a dispatch Id and date rang for the subscriber related to the current agent.e. Entries are returned with effective dates that fall between the requested dates inclusive.
      Parameters:
      dispatchId - a dispatch Id
      from - from date
      to - to date
      Returns:
      the returned SubscriptionList
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - dispatchId, from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getSubscriptions

      Gets all subscriptions for the subscriber related to the current agent.
      Returns:
      a list of subscriptions
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.