public interface TimePeriodNotificationSession extends OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to TimePeriods.
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 two views defined in this session correspond to the views in the
TimePeriodLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeTimePeriodNotification(Id notificationId)
Acknowledge a time period notification.
|
boolean |
canRegisterForTimePeriodNotifications()
Tests if this user can register for
TimePeriod
notifications. |
Calendar |
getCalendar()
Gets the
Calendar associated with this session. |
Id |
getCalendarId()
Gets the
Calendar Id associated with
this session. |
void |
registerForChangedTimePeriod(Id timePeriodId)
Registers for notification of an updated time period.
|
void |
registerForChangedTimePeriods()
Registers for notification of updated time periods.
|
void |
registerForDeletedTimePeriod(Id timePeriodId)
Registers for notification of a deleted time period.
|
void |
registerForDeletedTimePeriods()
Registers for notification of deleted time periods.
|
void |
registerForNewTimePeriods()
Register for notifications of new time periods.
|
void |
reliableTimePeriodNotifications()
Reliable notifications are desired.
|
void |
unreliableTimePeriodNotifications()
Unreliable notifications are desired.
|
void |
useFederatedCalendarView()
Federates the view for methods in this session.
|
void |
useIsolatedCalendarView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCalendarId()
Calendar
Id
associated with
this session. Calendar Id
associated with this sessionmandatory
- This method must be implemented. Calendar getCalendar() throws OperationFailedException, PermissionDeniedException
Calendar
associated with this session. Calendar
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForTimePeriodNotifications()
TimePeriod
notifications. 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 a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer notification operations. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedCalendarView()
mandatory
- This method is must be implemented. void useIsolatedCalendarView()
mandatory
- This method is must be implemented. void reliableTimePeriodNotifications()
acknowledgeTimePeriodNotification()
.mandatory
- This method is must be implemented. void unreliableTimePeriodNotifications()
mandatory
- This method is must be implemented. void acknowledgeTimePeriodNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewTimePeriods() throws OperationFailedException, PermissionDeniedException
TimePeriodReceiver.newTimePeriods()
is invoked when a new time
period is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedTimePeriods() throws OperationFailedException, PermissionDeniedException
TimePeriodReceiver.changedTimePeriods()
is invoked when a time
period is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedTimePeriod(Id timePeriodId) throws OperationFailedException, PermissionDeniedException
TimePeriodReceiver.changedTimePeriods()
is invoked when the
specified time period is changed.timePeriodId
- the Id
of the TimePeriod
to monitorNullArgumentException
- timePeriodId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedTimePeriods() throws OperationFailedException, PermissionDeniedException
TimePeriodReceiver.deletedTimePeriods()
is invoked when a time
period is removed from this calendar.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedTimePeriod(Id timePeriodId) throws OperationFailedException, PermissionDeniedException
TimePeriodReceiver.changedTimePeriods()
is invoked when the
specified time period is removed from this calendar.timePeriodId
- the Id
of the TimePeriod
to monitorNullArgumentException
- timePeriodId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.