Interface BusinessNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Businesses . This session is intended for consumers needing to
synchronize their state with this service without the use of polling.
Notifications are cancelled when this sess
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeBusinessNotification(Id notificationId) Acknowledge a business notification.booleanTests if this user can register forBusinessnotifications.voidregisterForChangedBusiness(Id businessId) Registers for notification of an updated business.voidRegisters for notification of updated businesses.voidRegisters for notification of an updated business hierarchy structure.voidregisterForChangedBusinessHierarchyForAncestors(Id businessId) Registers for notification of an updated business hierarchy structure.voidregisterForChangedBusinessHierarchyForDescendants(Id businessId) Registers for notification of an updated business hierarchy structure.voidregisterForDeletedBusiness(Id businessId) Registers for notification of a deleted business.voidRegisters for notification of deleted businesses.voidRegister for notifications of new businesses.voidReliable notifications are desired.voidUnreliable notifications are desired.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
-
canRegisterForBusinessNotifications
boolean canRegisterForBusinessNotifications()Tests if this user can register forBusinessnotifications. 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.
-
reliableBusinessNotifications
void reliableBusinessNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeBusinessNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableBusinessNotifications
void unreliableBusinessNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeBusinessNotification
void acknowledgeBusinessNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a business notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewBusinesses
Register for notifications of new businesses.BusinessReceiver.newBusinesses()is invoked when a newBusinessis created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedBusinesses
Registers for notification of updated businesses.BusinessReceiver.changedBusinesses()is invoked when a business is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedBusiness
void registerForChangedBusiness(Id businessId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated business.BusinessReceiver.changedBusinesses()is invoked when the specified business is changed.- Parameters:
businessId- the Id of theBusinessto monitor- Throws:
NullArgumentException-businessId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedBusinesses
Registers for notification of deleted businesses.BusinessReceiver.deletedBusinesses()is invoked when a business is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedBusiness
void registerForDeletedBusiness(Id businessId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted business.BusinessReceiver.deletedBusinesses()is invoked when the specified business is deleted.- Parameters:
businessId- the Id of theBusinessto monitor- Throws:
NullArgumentException-businessId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedBusinessHierarchy
void registerForChangedBusinessHierarchy() throws OperationFailedException, PermissionDeniedExceptionRegisters for notification of an updated business hierarchy structure.BusinessReceiver.changedChildOfBusinesses()is invoked when a node experiences a change in its children.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedBusinessHierarchyForAncestors
void registerForChangedBusinessHierarchyForAncestors(Id businessId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated business hierarchy structure.BusinessReceiver.changedChildOfBusinesses()is invoked when the specified node or any of its ancestors experiences a change in its children.- Parameters:
businessId- theIdof theBusinessnode to monitor- Throws:
NullArgumentException-businessIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedBusinessHierarchyForDescendants
void registerForChangedBusinessHierarchyForDescendants(Id businessId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated business hierarchy structure.BusinessesReceiver.changedChildOfBusinesses()is invoked when the specified node or any of its descendants experiences a change in its children.- Parameters:
businessId- theIdof theBusinessnode to monitor- Throws:
NullArgumentException-businessIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-