public interface InventoryNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Inventory
objects in this Warehouse.
This
also includes existing inventories 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
InventoryLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForInventoryNotifications()
Tests if this user can register for
Inventory
notifications. |
Warehouse |
getWarehouse()
Gets the
Warehouse associated with this session. |
Id |
getWarehouseId()
Gets the
Warehouse Id associated with
this session. |
void |
registerForChangedInventories()
Registers for notification of updated inventories.
|
void |
registerForChangedInventoriesForStock(Id stockId)
Registers for notification of updated inventories for the given stock.
|
void |
registerForChangedInventory(Id inventoryId)
Registers for notification of an updated inventory.
|
void |
registerForDeletedInventories()
Registers for notification of deleted inventories.
|
void |
registerForDeletedInventoriesForStock(Id stockId)
Registers for notification of deleted inventories for the given stock.
|
void |
registerForDeletedInventory(Id inventoryId)
Registers for notification of a deleted inventory.
|
void |
registerForNewInventories()
Register for notifications of new inventories.
|
void |
registerForNewInventoriesForStock(Id stockId)
Register for notifications of new inventories for the given stock.
|
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 canRegisterForInventoryNotifications()
Inventory
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 registerForNewInventories() throws OperationFailedException, PermissionDeniedException
InventoryReceiver.newInventories()
is invoked when a new
Inventory
appears in this warehouse.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewInventoriesForStock(Id stockId) throws OperationFailedException, PermissionDeniedException
InventoryReceiver.newInventories()
is invoked when a
new Inventory
appears in this warehouse.stockId
- the Id
of the Stock
to
monitorNullArgumentException
- stock
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedInventories() throws OperationFailedException, PermissionDeniedException
InventoryReceiver.changedInventories()
is invoked when an
inventory in this warehouse is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedInventoriesForStock(Id stockId) throws OperationFailedException, PermissionDeniedException
InventoryReceiver.changedInventories()
is invoked when
an inventory in this warehouse is changed.stockId
- the Id
of the Stock
to
monitorNullArgumentException
- stock
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedInventory(Id inventoryId) throws OperationFailedException, PermissionDeniedException
InventoryReceiver.changedInventories()
is invoked when the
specified inventory in this warehouse is changed.inventoryId
- the Id
of the Inventory
to monitorNullArgumentException
- inventoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedInventories() throws OperationFailedException, PermissionDeniedException
InventoryReceiver.deletedInventories()
is invoked when an
inventory is deleted or removed from this warehouse.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedInventoriesForStock(Id stockId) throws OperationFailedException, PermissionDeniedException
InventoryReceiver.deletedInventories()
is invoked when
an inventory is deleted or removed from this warehouse.stockId
- the Id
of the Stock
to
monitorNullArgumentException
- stock
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedInventory(Id inventoryId) throws OperationFailedException, PermissionDeniedException
InventoryReceiver.deletedInventories()
is invoked when the
specified inventory is deleted or removed from this warehouse.inventoryId
- the Id
of the Inventory
to monitorNullArgumentException
- inventoryId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.