public interface ActivityNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Activity
objects in this Business.
This
also includes existing activities 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
ActivityLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForActivityNotifications()
Tests if this user can register for
Activity
notifications. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
registerForChangedActivities()
Registers for notification of updated activities.
|
void |
registerForChangedActivity(Id activityId)
Registers for notification of an updated activity.
|
void |
registerForDeletedActivities()
Registers for notification of deleted activities.
|
void |
registerForDeletedActivity(Id activityId)
Registers for notification of a deleted activity.
|
void |
registerForDeletedActivityAncestors(Id activityId)
Registers for notification if an ancestor is removed from the
specified activity in the activity hierarchy.
|
void |
registerForDeletedActivityDescendants(Id activityId)
Registers for notification if a descendant is removed from fthe
specified activity in the activity hierarchy.
|
void |
registerForNewActivities()
Register for notifications of new activities.
|
void |
registerForNewActivityAncestors(Id activityId)
Registers for notification if an ancestor is added to the specified
activity in the activity hierarchy.
|
void |
registerForNewActivityDescendants(Id activityId)
Registers for notification if a descendant is added to the specified
activity in the activity hierarchy.
|
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 canRegisterForActivityNotifications()
Activity
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 registerForNewActivities() throws OperationFailedException, PermissionDeniedException
ActivityReceiver.newActivities()
is invoked when a new
Activity
appears in this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewActivityAncestors(Id activityId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.newActivityAncestor()
is invoked when the
specified activity experiences an addition in ancestry.activityId
- the Id
of the activity to monitorNullArgumentException
- activityId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewActivityDescendants(Id activityId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.newActivityDescendant()
is invoked when the
specified activity experiences an addition in descendants.activityId
- the Id
of the activity to monitorNullArgumentException
- activityId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedActivities() throws OperationFailedException, PermissionDeniedException
ActivityReceiver.changedActivities()
is invoked when an
activity in this business is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedActivity(Id activityId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.changedActivities()
is invoked when the
specified activity in this business is changed.activityId
- the Id
of the Activity
to monitorNullArgumentException
- activityId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedActivities() throws OperationFailedException, PermissionDeniedException
ActivityReceiver.deletedActivities()
is invoked when an
activity is deleted or removed from this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedActivity(Id activityId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.deletedActivities()
is invoked when the
specified activity is deleted or removed from this business.activityId
- the Id
of the Activity
to monitorNullArgumentException
- activityId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedActivityAncestors(Id activityId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.deletedActivityAncestor()
is invoked when the
specified activity experiences a removal of an ancestor.activityId
- the Id
of the activity to monitorNullArgumentException
- activityId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedActivityDescendants(Id activityId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.deletedActivityDescednant()
is invoked when
the specified activity experiences a removal of one of its
descdendents.activityId
- the Id
of the activity to monitorNullArgumentException
- activityId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.