public interface ItemNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Item
objects in this Warehouse.
This also
includes existing items that may appear or disappear due to changes in the
Warehouse
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
ItemLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForItemNotifications()
Tests if this user can register for
Item notifications. |
Warehouse |
getWarehouse()
Gets the
Warehouse associated with this session. |
Id |
getWarehouseId()
Gets the
Warehouse Id associated with
this session. |
void |
registerForChangedItem(Id itemId)
Registers for notification of an updated item.
|
void |
registerForChangedItems()
Registers for notification of updated items.
|
void |
registerForDeletedItem(Id itemId)
Registers for notification of a deleted item.
|
void |
registerForDeletedItems()
Registers for notification of deleted items.
|
void |
registerForNewItems()
Register for notifications of new items.
|
void |
useFederatedWarehouseView()
Federates the view for methods in this session.
|
void |
useIsolatedWarehouseView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getWarehouseId()
Warehouse
Id
associated with
this session. Warehouse Id
associated with this sessionmandatory
- This method must be implemented. Warehouse getWarehouse() throws OperationFailedException, PermissionDeniedException
Warehouse
associated with this session.OperationFailedException
- 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 useFederatedWarehouseView()
mandatory
- This method is must be implemented. void useIsolatedWarehouseView()
mandatory
- This method is must be implemented. void registerForNewItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.newItems()
is invoked when a new Item
appears in this warehouse.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.changedItems()
is invoked when an item in this
warehouse is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedItem(Id itemId) throws OperationFailedException, PermissionDeniedException
ItemReceiver.changedItems()
is invoked when the specified item
in this warehouse is changed.itemId
- the Id
of the Item
to
monitorNullArgumentException
- itemId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.deletedItems()
is invoked when an item is deleted
or removed from this warehouse.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedItem(Id itemId) throws OperationFailedException, PermissionDeniedException
ItemReceiver.deletedItems()
is invoked when the specified item
is deleted or removed from this warehouse.itemId
- the Id
of the Item
to
monitorNullArgumentException
- itemId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.