Interface MySubscriptionSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can lookup subscriptions.Gets thePublisherassociated with this session.Gets thePublisherIdassociated with this session.Gets all subscriptions for the subscriber related to the current agent.getSubscriptionsByDateForDispatch(Id dispatchId, DateTime from, DateTime to) Gets a list of all subscriptions corresponding to a dispatchIdand date rang for the subscriber related to the current agent.e.getSubscriptionsForDispatch(Id dispatchId) Gets a list of all subscriptions corresponding to a dispatchIdfor the subscriber related to the current agent.voidAll subscriptions of any effective dates are returned by methods in this session.voidOnly subscriptions whose effective dates are current are returned by methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getPublisherId
Id getPublisherId()Gets thePublisherIdassociated with this session.- Returns:
- the
Publisher Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getPublisher
Gets thePublisherassociated with this session.- Returns:
- the publisher
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer these operations.- Returns:
falseif subscription lookup methods are not authorized,trueotherwise- 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 dispatchIdfor the subscriber related to the current agent.- Parameters:
dispatchId- theIdof the dispatch- Returns:
- the returned
SubscriptionList - Throws:
NullArgumentException-dispatchIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 dispatchIdand 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 dispatchIdfrom- from dateto- to date- Returns:
- the returned
SubscriptionList - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-dispatchId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-