Interface RelevancyNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive asynchronous notifications on adds/changes to subject relevancies. This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this session is closed.
The views defined in this session correspond to the views in the
RelevancyLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeRelevancyNotification(Id notificationId) Acknowledge a relevancy notification.booleanTests if this user can register forRelevancynotifications.Gets theOntologyassociated with this session.Gets theOntologyIdassociated with this session.voidRegisters for notification of updated relevancies.voidregisterForChangedRelevanciesByGenusType(Type relevancyGenusType) Register for notifications of changed relevancies of the given genus type.voidRegister for notifications of changed relevancies for the givenId.voidregisterForChangedRelevanciesForSubject(Id subjectId) Register for notifications of changed relevancies for the given subject.voidregisterForChangedRelevancy(Id relevancyId) Registers for notification of an updated relevancy.voidRegisters for notification of deleted relevancies.voidregisterForDeletedRelevanciesByGenusType(Type relevancyGenusType) Register for notifications of deleted relevancies of the given genus type.voidRegister for notifications of deleted relevancies for the givenId.voidregisterForDeletedRelevanciesForSubject(Id subjectId) Register for notifications of deleted relevancies for the given subject.voidregisterForDeletedRelevancy(Id relevancyId) Registers for notification of a deleted relevancy.voidRegister for notifications of new relevancies.voidregisterForNewRelevanciesByGenusType(Type relevancyGenusType) Register for notifications of new relevancies by the given genus type.voidRegister for notifications of new relevancies for the given mappedId.voidregisterForNewRelevanciesForSubject(Id subjectId) Register for notifications of new relevancies for the given subject.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for 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
-
getOntologyId
Id getOntologyId()Gets theOntologyIdassociated with this session.- Returns:
- the
Ontology Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOntology
Gets theOntologyassociated with this session.- Returns:
- the
Ontologyassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForRelevancyNotifications
boolean canRegisterForRelevancyNotifications()Tests if this user can register forRelevancynotifications. 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 notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useFederatedOntologyView
void useFederatedOntologyView()Federates the view for methods in this session. A federated view will include notifications for relevancies in ontologies which are children of this ontology in the ontology hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedOntologyView
void useIsolatedOntologyView()Isolates the view for methods in this session. An isolated view restricts notifications to this ontology only.- Compliance:
mandatory- This method is must be implemented.
-
reliableRelevancyNotifications
void reliableRelevancyNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeRelevancyNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableRelevancyNotifications
void unreliableRelevancyNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeRelevancyNotification
void acknowledgeRelevancyNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a relevancy notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewRelevancies
Register for notifications of new relevancies.RelevancyReceiver.newRelevancies()is invoked when a new relevancy is created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewRelevanciesByGenusType
void registerForNewRelevanciesByGenusType(Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of new relevancies by the given genus type.RelevancyReceiver.newRelevancies()is invoked when a new relevancy is created.- Parameters:
relevancyGenusType- the relevancy genus type- Throws:
NullArgumentException-relevancyGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewRelevanciesForSubject
void registerForNewRelevanciesForSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException Register for notifications of new relevancies for the given subject.RelevancyReceiver.newRelevancies()is invoked when a new relevancy is created.- Parameters:
subjectId- theIdof theSubjectto monitor- Throws:
NullArgumentException-subjectId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewRelevanciesForId
void registerForNewRelevanciesForId(Id id) throws OperationFailedException, PermissionDeniedException Register for notifications of new relevancies for the given mappedId.RelevancyReceiver.newRelevancies()is invoked when a new relevancy is created.- Parameters:
id- theIdto monitor- Throws:
NullArgumentException-id is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedRelevancies
Registers for notification of updated relevancies.RelevancyReceiver.changedRelevancies()is invoked when a relevancy is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedRelevanciesByGenusType
void registerForChangedRelevanciesByGenusType(Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of changed relevancies of the given genus type.RelevancyReceiver.changedRelevancies()is invoked when a relevancy is changed.- Parameters:
relevancyGenusType- the relevancy genus type- Throws:
NullArgumentException-relevancyGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedRelevanciesForSubject
void registerForChangedRelevanciesForSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException Register for notifications of changed relevancies for the given subject.RelevancyReceiver.changedRelevancies()is invoked when a relevancy is changed.- Parameters:
subjectId- theIdof theSubjectto monitor- Throws:
NullArgumentException-subjectId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedRelevanciesForId
void registerForChangedRelevanciesForId(Id id) throws OperationFailedException, PermissionDeniedException Register for notifications of changed relevancies for the givenId.RelevancyReceiver.changedRelevancies()is invoked when a relevancy is changed.- Parameters:
id- theIdto monitor- Throws:
NullArgumentException-id is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedRelevancy
void registerForChangedRelevancy(Id relevancyId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated relevancy.RelevancyReceiver.changedRelevancies()is invoked when the specified relevancy is changed.- Parameters:
relevancyId- theIdof theRelevancyto monitor- Throws:
NullArgumentException-relevancyId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedRelevancies
Registers for notification of deleted relevancies.RelevancyReceiver.deletedRelevancies()is invoked when a relevancy is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedRelevanciesByGenusType
void registerForDeletedRelevanciesByGenusType(Type relevancyGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted relevancies of the given genus type.RelevancyReceiver.deletedRelevancies()is invoked when a relevancy is deleted.- Parameters:
relevancyGenusType- the relevancy genus type- Throws:
NullArgumentException-relevancyGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedRelevanciesForSubject
void registerForDeletedRelevanciesForSubject(Id subjectId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted relevancies for the given subject.RelevancyReceiver.deletedRelevancies()is invoked when a relevancy is deleted.- Parameters:
subjectId- theIdof theSubjectto monitor- Throws:
NullArgumentException-subjectId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedRelevanciesForId
void registerForDeletedRelevanciesForId(Id id) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted relevancies for the givenId.RelevancyReceiver.deletedRelevancies()is invoked when a relevancy is deleted.- Parameters:
id- theIdto monitor- Throws:
NullArgumentException-id is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedRelevancy
void registerForDeletedRelevancy(Id relevancyId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted relevancy.RelevancyReceiver.changedRelevancies()is invoked when the specified relevancy is deleted.- Parameters:
relevancyId- theIdof theRelevancyto monitor- Throws:
NullArgumentException-relevancyId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-