Interface SubscriptionEnablerRuleApplicationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to apply SubscriptionEnablers to
Subscriptions . A Subscription with multiple
SubscriptionEnablers means any positive rule evaluation across the
enablers result in an effective Subscription .
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignSubscriptionEnablerToSubscription(Id subscriptionEnablerId, Id subscriptionId) Adds an existingSubscriptionEnablerto aSubscription.booleanTests if this user can alter subscription enabler/subscription mappings.booleanTests if this user can orderSubscriptionEnablers.Gets thePublisherassociated with this session.Gets thePublisherIdassociated with this session.voidmoveSubscriptionEnablerAhead(Id subscriptionEnablerId, Id subscriptionId, Id referenceId) Reorders subscription enablers for a subscription by moving the specified subscription enabler in front of a reference subscription enabler.voidmoveSubscriptionEnablerBehind(Id subscriptionEnablerId, Id subscriptionId, Id referenceId) Reorders subscription enablers for a subscription by moving the specified subscription enabler behind a reference subscription enabler.voidorderSubscriptionEnablers(Id[] subscriptionEnablerIds, Id subscriptionId) Reorders a set of subscription enablers for a subscription.voidunassignSubscriptionEnablerFromSubscription(Id subscriptionEnablerId, Id subscriptionId) Removes aSubscriptionEnablerfrom aSubscription.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.
-
canAssignSubscriptionEnablers
boolean canAssignSubscriptionEnablers()Tests if this user can alter subscription enabler/subscription 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
assignSubscriptionEnablerToSubscription
void assignSubscriptionEnablerToSubscription(Id subscriptionEnablerId, Id subscriptionId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingSubscriptionEnablerto aSubscription.- Parameters:
subscriptionEnablerId- theIdof theSubscriptionEnablersubscriptionId- theIdof theSubscription- Throws:
AlreadyExistsException-subscriptionEnablerIdis already applied tosubscriptionIdNotFoundException-subscriptionEnablerIdorsubscriptionIdnot foundNullArgumentException-subscriptionEnablerIdorsubscriptionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignSubscriptionEnablerFromSubscription
void unassignSubscriptionEnablerFromSubscription(Id subscriptionEnablerId, Id subscriptionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aSubscriptionEnablerfrom aSubscription.- Parameters:
subscriptionEnablerId- theIdof theSubscriptionEnablersubscriptionId- theIdof theSubscription- Throws:
NotFoundException-subscriptionEnablerIdorsubscriptionIdnot found orsubscriptionEnablerIdnot applied tosubscriptionIdNullArgumentException-subscriptionEnablerIdorsubscriptionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canSequenceSubscriptionEnablers
boolean canSequenceSubscriptionEnablers()Tests if this user can orderSubscriptionEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known sequencing operations will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer sequencing operations to an unauthorized user.- Returns:
falseifSubscriptionEnablerordering is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
moveSubscriptionEnablerAhead
void moveSubscriptionEnablerAhead(Id subscriptionEnablerId, Id subscriptionId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders subscription enablers for a subscription by moving the specified subscription enabler in front of a reference subscription enabler.- Parameters:
subscriptionEnablerId- theIdof aSubscriptionEnablersubscriptionId- theIdof aSubscriptionreferenceId- the reference subscription enablerId- Throws:
NotFoundException-subscriptionEnablerId, subscriptionId, orreferenceIdnot found or,subscriptionEnabelrIdorreferenceIdnot related tosubscriptionIdNullArgumentException-subscriptionEnablerId, subscriptionId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
moveSubscriptionEnablerBehind
void moveSubscriptionEnablerBehind(Id subscriptionEnablerId, Id subscriptionId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders subscription enablers for a subscription by moving the specified subscription enabler behind a reference subscription enabler.- Parameters:
subscriptionEnablerId- theIdof aSubscriptionEnablersubscriptionId- theIdof aSubscriptionreferenceId- the reference subscription enablerId- Throws:
NotFoundException-subscriptionEnablerId, subscriptionId, orreferenceIdnot found or,subscriptionEnabelrIdorreferenceIdnot related tosubscriptionIdNullArgumentException-subscriptionEnablerId, subscriptionId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
orderSubscriptionEnablers
void orderSubscriptionEnablers(Id[] subscriptionEnablerIds, Id subscriptionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders a set of subscription enablers for a subscription.- Parameters:
subscriptionEnablerIds- theIdsfor a set ofSubscriptionEnablerssubscriptionId- theIdof aSubscription- Throws:
NotFoundException-subscriptionIdnot found or, ansubscriptionEnabelrIdnot related tosubscriptionIdNullArgumentException-subscriptionEnablerIdsorsubscriptionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-