public interface WorkNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Work objects in this Foundry. This also
includes existing works that may appear or disappear due to changes in the
Foundry 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
WorkLookupSession.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRegisterForWorkNotifications()
Tests if this user can register for
Work notifications. |
Foundry |
getFoundry()
Gets the
Foundry associated with this session. |
Id |
getFoundryId()
Gets the
Foundry Id associated with this
session. |
void |
registerForChangedWork(Id workId)
Registers for notification of an updated work.
|
void |
registerForChangedWorks()
Registers for notification of updated works.
|
void |
registerForChangedWorksForJob(Id jobId)
Register for notifications of updated works for the given job.
|
void |
registerForDeletedWork(Id workId)
Registers for notification of a deleted work.
|
void |
registerForDeletedWorks()
Registers for notification of deleted works.
|
void |
registerForDeletedWorksForJob(Id jobId)
Register for notifications of deleted works for the given job.
|
void |
registerForNewWorks()
Register for notifications of new works.
|
void |
registerForNewWorksForJob(Id jobId)
Register for notifications of new works for the given job.
|
void |
useFederatedFoundryView()
Federates the view for methods in this session.
|
void |
useIsolatedFoundryView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getFoundryId()
Foundry Id associated with this
session. Foundry Id associated with this sessionmandatory - This method must be implemented. Foundry getFoundry() throws OperationFailedException, PermissionDeniedException
Foundry associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canRegisterForWorkNotifications()
Work 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 useFederatedFoundryView()
mandatory - This method is must be implemented. void useIsolatedFoundryView()
mandatory - This method is must be implemented. void registerForNewWorks()
throws OperationFailedException,
PermissionDeniedException
WorkReceiver.newWorks() is invoked when a new Work
appears in this foundry.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForNewWorksForJob(Id jobId) throws OperationFailedException, PermissionDeniedException
WorkReceiver.newWorks() is invoked when a new Work
appears in this foundry.jobId - the Id of the Job to
monitorNullArgumentException - jobId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedWorks()
throws OperationFailedException,
PermissionDeniedException
WorkReceiver.changedWorks() is invoked when a work in this
foundry is changed.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedWorksForJob(Id jobId) throws OperationFailedException, PermissionDeniedException
WorkReceiver.changedWorks() is invoked when a new Work
appears in this foundry.jobId - the Id of the Job to
monitorNullArgumentException - jobId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForChangedWork(Id workId) throws OperationFailedException, PermissionDeniedException
WorkReceiver.changedWorks() is invoked when the specified work
in this foundry is changed.workId - the Id of the Work to
monitorNullArgumentException - workId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedWorks()
throws OperationFailedException,
PermissionDeniedException
WorkReceiver.deletedWorks() is invoked when a work is deleted
or removed from this foundry.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedWorksForJob(Id jobId) throws OperationFailedException, PermissionDeniedException
WorkReceiver.deletedWorks() is invoked when a new Work
appears in this foundry.jobId - the Id of the Job to
monitorNullArgumentException - jobId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void registerForDeletedWork(Id workId) throws OperationFailedException, PermissionDeniedException
WorkReceiver.deletedWorks() is invoked when the specified work
is deleted or removed from this foundry.workId - the Id of the Work to
monitorNullArgumentException - workId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.