public interface OrderNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Order
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.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForOrderNotifications()
Tests if this user can register for
Order
notifications. |
Store |
getStore()
Gets the
Store associated with this session. |
Id |
getStoreId()
Gets the
Store Id associated with this
session. |
void |
registerForChangedOrder(Id orderId)
Registers for notification of an updated order.
|
void |
registerForChangedOrders()
Registers for notification of updated orders.
|
void |
registerForChangedOrdersByCustomer(Id resourceId)
Register for notifications of changed orders for the given customer
Id. |
void |
registerForDeletedOrder(Id orderId)
Registers for notification of a deleted order.
|
void |
registerForDeletedOrders()
Registers for notification of deleted orders.
|
void |
registerForDeletedOrdersByCustomer(Id resourceId)
Register for notifications of deleted orders for the given customer
Id. |
void |
registerForNewOrders()
Register for notifications of new orders.
|
void |
registerForNewOrdersByCustomer(Id resourceId)
Register for notifications of new orders for the given customer
resource
Id. |
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 canRegisterForOrderNotifications()
Order
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 registerForNewOrders() throws OperationFailedException, PermissionDeniedException
OrderReceiver.newOrders()
is invoked when a new Order
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewOrdersByCustomer(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
OrderReceiver.newOrders()
is invoked when a new Order
is created.resourceId
- the Id
of the customer to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedOrders() throws OperationFailedException, PermissionDeniedException
OrderReceiver.changedOrders()
is invoked when an order is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedOrdersByCustomer(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
OrderReceiver.changedOrders()
is
invoked when an Order
for the resource is changed.resourceId
- the Id
of the customer to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedOrder(Id orderId) throws OperationFailedException, PermissionDeniedException
OrderReceiver.changedOrders()
is invoked when the specified
order is changed.orderId
- the Id
of the Order
to
monitorNullArgumentException
- orderId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedOrders() throws OperationFailedException, PermissionDeniedException
OrderReceiver.deletedOrders()
is invoked when an order is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedOrdersByCustomer(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
OrderReceiver.deletedOrders()
is
invoked when an Order
for the resource is deleted.resourceId
- the Id
of the customer to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedOrder(Id orderId) throws OperationFailedException, PermissionDeniedException
OrderReceiver.deletedOrders()
is invoked when the specified
order is deleted.orderId
- the Id
of the Order
to
monitorNullArgumentException
- orderId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.