public interface ProductNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Product
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.
Notifications are triggered with changes to the Product
object itself. Adding and removing orders result in notifications
available from the notification session for orders.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForProductNotifications()
Tests if this user can register for
Product
notifications. |
Store |
getStore()
Gets the
Store associated with this session. |
Id |
getStoreId()
Gets the
Store Id associated with this
session. |
void |
registerForChangedProduct(Id productId)
Registers for notification of an updated product.
|
void |
registerForChangedProducts()
Registers for notification of updated products.
|
void |
registerForDeletedProduct(Id productId)
Registers for notification of a deleted product.
|
void |
registerForDeletedProducts()
Registers for notification of deleted products.
|
void |
registerForNewProducts()
Register for notifications of new products.
|
void |
useFederatedStoreView()
Federates the view for methods in this session.
|
void |
useIsolatedStoreView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getStoreId()
Store
Id
associated with this
session. Store Id
associated with this sessionmandatory
- This method must be implemented. Store getStore() throws OperationFailedException, PermissionDeniedException
Store
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForProductNotifications()
Product
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 useFederatedStoreView()
mandatory
- This method is must be implemented. void useIsolatedStoreView()
mandatory
- This method is must be implemented. void registerForNewProducts() throws OperationFailedException, PermissionDeniedException
ProductReceiver.newProducts()
is invoked when a new
Product
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedProducts() throws OperationFailedException, PermissionDeniedException
ProductReceiver.changedProducts()
is invoked when a product is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedProduct(Id productId) throws OperationFailedException, PermissionDeniedException
ProductReceiver.changedProducts()
is invoked when the
specified product is changed.productId
- the Id
of the Product
to monitorNullArgumentException
- productId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedProducts() throws OperationFailedException, PermissionDeniedException
ProductReceiver.deletedProducts()
is invoked when a product is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedProduct(Id productId) throws OperationFailedException, PermissionDeniedException
ProductReceiver.deletedProducts()
is invoked when the
specified product is deleted.productId
- the Id
of the Product
to monitorNullArgumentException
- productId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.