Interface CommitmentNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive asynchronous notifications on adds/changes to event commitments. 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
CommitmentLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeCommitmentNotification(Id notificationId) Acknowledge a commitment notification.booleanTests if this user can register forCommitmentnotifications.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.voidregisterForChangedCommitment(Id commitmentId) Registers for notification of an updated commitment.voidRegisters for notification of updated commitments.voidregisterForChangedCommitmentsByGenusType(Type commitmentGenusType) Register for notifications of changed commitments by commitment genus type.voidregisterForChangedCommitmentsForEvent(Id eventId) Register for notifications of changed commitments for the given event.voidregisterForChangedCommitmentsForResource(Id resourceId) Register for notifications of changed commitments for the given rsource.voidregisterForDeletedCommitment(Id commitmentId) Registers for notification of a deleted commitment.voidRegisters for notification of deleted commitments.voidregisterForDeletedCommitmentsByGenusType(Id commitmentGenusType) Register for notifications of deleted commitments by commitment genus type.voidregisterForDeletedCommitmentsForEvent(Id eventId) Register for notifications of deleted commitments for the given event.voidregisterForDeletedCommitmentsForResource(Id resourceId) Register for notifications of deleted commitments for the given rsource.voidRegister for notifications of new commitments.voidregisterForNewCommitmentsByGenusType(Id commitmentGenusType) Register for notifications of new commitments by commitment genus type.voidregisterForNewCommitmentsForEvent(Id eventId) Register for notifications of new commitments for the given event.voidregisterForNewCommitmentsForResource(Id resourceId) Register for notifications of new commitments for the given resource.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
-
getCalendarId
Id getCalendarId()Gets theCalendarIdassociated with this session.- Returns:
- the
Calendar Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCalendar
Gets theCalendarassociated with this session.- Returns:
- the
Calendarassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForCommitmentNotifications
boolean canRegisterForCommitmentNotifications()Tests if this user can register forCommitmentnotifications. 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.
-
useFederatedCalendarView
void useFederatedCalendarView()Federates the view for methods in this session. A federated view will include notifications for commitments in calendars which are children of this calendar in the calendar hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedCalendarView
void useIsolatedCalendarView()Isolates the view for methods in this session. An isolated view restricts notifications to this calendar only.- Compliance:
mandatory- This method is must be implemented.
-
reliableCommitmentNotifications
void reliableCommitmentNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeCommitmentNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableCommitmentNotifications
void unreliableCommitmentNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeCommitmentNotification
void acknowledgeCommitmentNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a commitment notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewCommitments
Register for notifications of new commitments.CommitmentReceiver.newCommitments()is invoked when a new commitment is created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewCommitmentsByGenusType
void registerForNewCommitmentsByGenusType(Id commitmentGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of new commitments by commitment genus type.CommitmentReceiver.newCommitments()is invoked when a new commitment is created.- Parameters:
commitmentGenusType- the commitment genus type to monitor- Throws:
NullArgumentException-commitmentGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewCommitmentsForEvent
void registerForNewCommitmentsForEvent(Id eventId) throws OperationFailedException, PermissionDeniedException Register for notifications of new commitments for the given event.CommitmentReceiver.newCommitments()is invoked when a new commitment is created.- Parameters:
eventId- theIdof theEventto monitor- Throws:
NullArgumentException-eventId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewCommitmentsForResource
void registerForNewCommitmentsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of new commitments for the given resource.CommitmentReceiver.newCommitments()is invoked when a new commitment is created.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedCommitments
Registers for notification of updated commitments.CommitmentReceiver.changedCommitments()is invoked when a commitment is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedCommitmentsByGenusType
void registerForChangedCommitmentsByGenusType(Type commitmentGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of changed commitments by commitment genus type.CommitmentReceiver.changedCommitments()is invoked when a commitment is changed.- Parameters:
commitmentGenusType- the commitment genus type to monitor- Throws:
NullArgumentException-commitmentGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedCommitmentsForEvent
void registerForChangedCommitmentsForEvent(Id eventId) throws OperationFailedException, PermissionDeniedException Register for notifications of changed commitments for the given event.CommitmentReceiver.changedCommitments()is invoked when a commitment is changed.- Parameters:
eventId- theIdof theEventto monitor- Throws:
NullArgumentException-eventId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedCommitmentsForResource
void registerForChangedCommitmentsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of changed commitments for the given rsource.CommitmentReceiver.changedCommitments()is invoked when a commitment is changed.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedCommitment
void registerForChangedCommitment(Id commitmentId) throws OperationFailedException, PermissionDeniedException Registers for notification of an updated commitment.CommitmentReceiver.changedCommitments()is invoked when the specified commitment is changed.- Parameters:
commitmentId- theIdof theCommitmentto monitor- Throws:
NullArgumentException-commitmentId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedCommitments
Registers for notification of deleted commitments.CommitmentReceiver.deletedCommitments()is invoked when a commitment is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedCommitmentsByGenusType
void registerForDeletedCommitmentsByGenusType(Id commitmentGenusType) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted commitments by commitment genus type.CommitmentReceiver.deletedCommitments()is invoked when a commitment is deleted.- Parameters:
commitmentGenusType- the commitment genus type to monitor- Throws:
NullArgumentException-commitmentGenusType is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedCommitmentsForEvent
void registerForDeletedCommitmentsForEvent(Id eventId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted commitments for the given event.CommitmentReceiver.deletedCommitments()is invoked when a commitment is deleted.- Parameters:
eventId- theIdof theEventto monitor- Throws:
NullArgumentException-eventId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedCommitmentsForResource
void registerForDeletedCommitmentsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted commitments for the given rsource.CommitmentReceiver.deletedCommitments()is invoked when a commitment is deleted.- Parameters:
resourceId- theIdof theResourceto monitor- Throws:
NullArgumentException-resourceId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedCommitment
void registerForDeletedCommitment(Id commitmentId) throws OperationFailedException, PermissionDeniedException Registers for notification of a deleted commitment.CommitmentReceiver.changedCommitments()is invoked when the specified commitment is deleted.- Parameters:
commitmentId- theIdof theCommitmentto monitor- Throws:
NullArgumentException-commitmentId is nullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-