public interface ItemNotificationSession extends OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Item
objects. 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
ItemLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForItemNotifications()
Tests if this user can register for
Item notifications. |
Bank |
getBank()
Gets the
Bank associated with this session. |
Id |
getBankId()
Gets the
Bank Id associated with this
session. |
void |
registerForChangedItem(Id itemId)
Registers for notification of an updated assessment item.
|
void |
registerForChangedItems()
Registers for notification of updated assessment items.
|
void |
registerForDeletedItem(Id itemId)
Registers for notification of a deleted assessment item.
|
void |
registerForDeletedItems()
Registers for notification of deleted assessment items.
|
void |
registerForNewItems()
Register for notifications of new assessment items.
|
void |
useFederatedBankView()
Federates the view for methods in this session.
|
void |
useIsolatedBankView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBankId()
Bank
Id
associated with this
session. Bank Id
associated with this sessionmandatory
- This method must be implemented. Bank getBank() throws OperationFailedException, PermissionDeniedException
Bank
associated with this session. Bank
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForItemNotifications()
Item
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 useFederatedBankView()
mandatory
- This method is must be implemented. void useIsolatedBankView()
mandatory
- This method is must be implemented. void registerForNewItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.newItem()
is invoked when a new Item
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. void registerForChangedItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.changedItem()
is invoked when an assessment item
is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. void registerForChangedItem(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ItemReceiver.changedItem()
is invoked when the specified
assessment item is changed.itemId
- the Id
of the Assessment
to monitorNotFoundException
- an item
was not
found identified by the given Id
NullArgumentException
- itemId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. void registerForDeletedItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.deletedItem()
is invoked when an assessment item
is removed from the assessment bank.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. void registerForDeletedItem(Id itemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ItemReceiver.changedItem()
is invoked when the specified
assessment item is removed from the assessment bank.itemId
- the Id
of the Item
to
monitorNotFoundException
- an Item
was not
found identified by the given Id
NullArgumentException
- itemId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented.