Interface SubscriptionSmartPublisherSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session manages queries and sequencing to create "smart" dynamic
catalogs. A SubscriptionQuery can be retrieved from this session
and mapped to this Publisher to create a virtual collection of
Subscriptions. The subscriptions may be sequenced using the
SubscriptionSearchOrder from this session.
This Publisher has a default query that matches any
subscription and a default search order that specifies no sequencing. The
queries may be examined using a SubscriptionQueryInspector. The
query may be modified by converting the inspector back to a
SubscriptionQuery.
Like all OsidSessions,
SubscriptionSmartPublisherSessions are dedicated to single processing
threads and a single authenticated user.
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplySubscriptionQuery(SubscriptionQuery subscriptionQuery) Applies a subscription query to this publisher.voidapplySubscriptionSequencing(SubscriptionSearchOrder subscriptionSearchOrder) Applies a subscription search order to this publisher.booleanTests if this user can manage smart publishers.Gets thePublisherassociated with this session.Gets thePublisherIdassociated with this session.Gets a subscription query.getSubscriptionQueryFromInspector(SubscriptionQueryInspector subscriptionQueryInspector) Gets a subscription query from an inspector.Gets a subscription search order.Gets a subscription query inspector for this publisher.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatTypes, getLocales, isAuthenticated, startTransaction, supportsTransactions
-
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
Publisherassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageSmartPublishers
boolean canManageSmartPublishers()Tests if this user can manage smart publishers. A return of true does not guarantee successful authorization. A return of false indicates that it is known methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer operations to unauthorized users.- Returns:
falseif smart publisher management is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getSubscriptionQuery
SubscriptionQuery getSubscriptionQuery()Gets a subscription query.- Returns:
- the subscription query
- Compliance:
mandatory- This method must be implemented.
-
getSubscriptionSearchOrder
SubscriptionSearchOrder getSubscriptionSearchOrder()Gets a subscription search order.- Returns:
- the subscription search order
- Compliance:
mandatory- This method must be implemented.
-
applySubscriptionQuery
void applySubscriptionQuery(SubscriptionQuery subscriptionQuery) throws OperationFailedException, PermissionDeniedException Applies a subscription query to this publisher.- Parameters:
subscriptionQuery- the subscription query- Throws:
NullArgumentException-subscriptionQueryisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-subscriptionQuerynot of this service- Compliance:
mandatory- This method must be implemented.
-
inspectSubscriptionQuery
SubscriptionQueryInspector inspectSubscriptionQuery() throws OperationFailedException, PermissionDeniedExceptionGets a subscription query inspector for this publisher.- Returns:
- the subscriptions query inspector
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurred- Compliance:
mandatory- This method must be implemented.
-
applySubscriptionSequencing
void applySubscriptionSequencing(SubscriptionSearchOrder subscriptionSearchOrder) throws OperationFailedException, PermissionDeniedException Applies a subscription search order to this publisher.- Parameters:
subscriptionSearchOrder- the subscription search order- Throws:
NullArgumentException-subscriptionSearchOrderisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure occurredUnsupportedException-subscriptionSearchOrdernot of this service- Compliance:
mandatory- This method must be implemented.
-
getSubscriptionQueryFromInspector
SubscriptionQuery getSubscriptionQueryFromInspector(SubscriptionQueryInspector subscriptionQueryInspector) Gets a subscription query from an inspector.- Parameters:
subscriptionQueryInspector- a query inspector- Returns:
- the subscription query
- Throws:
NullArgumentException-subscriptionQueryInspectorisnullUnsupportedException-subscriptionQueryInspectoris not of this service- Compliance:
mandatory- This method must be implemented.
-