public interface PeriodNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Period
objects in this Business.
This
also includes existing periods that may appear or disappear due to changes
in the Business
hierarchy, 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
PeriodLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgePeriodNotification(Id notificationId)
Acknowledge a period notification.
|
boolean |
canRegisterForPeriodNotifications()
Tests if this user can register for
Period
notifications. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
registerForChangedPeriod(Id periodId)
Registers for notification of an updated period.
|
void |
registerForChangedPeriods()
Registers for notification of updated customers.
|
void |
registerForDeletedPeriod(Id periodId)
Registers for notification of a deleted period.
|
void |
registerForDeletedPeriods()
Registers for notification of deleted periods.
|
void |
registerForNewPeriods()
Register for notifications of new periods.
|
void |
reliablePeriodNotifications()
Reliable notifications are desired.
|
void |
unreliablePeriodNotifications()
Unreliable notifications are desired.
|
void |
useFederatedBusinessView()
Federates the view for methods in this session.
|
void |
useIsolatedBusinessView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBusinessId()
Business
Id
associated with
this session. Business Id
associated with this sessionmandatory
- This method must be implemented. Business getBusiness() throws OperationFailedException, PermissionDeniedException
Business
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForPeriodNotifications()
Period
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 useFederatedBusinessView()
mandatory
- This method is must be implemented. void useIsolatedBusinessView()
mandatory
- This method is must be implemented. void reliablePeriodNotifications()
acknowledgePeriodNotification()
.mandatory
- This method is must be implemented. void unreliablePeriodNotifications()
mandatory
- This method is must be implemented. void acknowledgePeriodNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewPeriods() throws OperationFailedException, PermissionDeniedException
PeriodReceiver.newPeriods()
is invoked when a new
Period
appears in this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPeriods() throws OperationFailedException, PermissionDeniedException
PeriodReceiver.changedPeriods()
is invoked when a period in
this business is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPeriod(Id periodId) throws OperationFailedException, PermissionDeniedException
PeriodReceiver.changedPeriods()
is invoked when the specified
period in this business is changed.periodId
- the Id
of the Period
to
monitorNullArgumentException
- periodId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPeriods() throws OperationFailedException, PermissionDeniedException
PeriodReceiver.deletedPeriods()
is invoked when a period is
deleted or removed from this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPeriod(Id periodId) throws OperationFailedException, PermissionDeniedException
PeriodReceiver.deletedPeriods()
is invoked when the specified
period is deleted or removed from this business.periodId
- the Id
of the Period
to
monitorNullArgumentException
- periodId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.