public interface CustomerNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Customer
objects in this Business.
This
also includes existing customers that may appear or disappear due to
changes in the Business
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
CustomerLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeCustomerNotification(Id notificationId)
Acknowledge a customer notification.
|
boolean |
canRegisterForCustomerNotifications()
Tests if this user can register for
Customer
notifications. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
registerForChangedCustomer(Id customerId)
Registers for notification of an updated customer.
|
void |
registerForChangedCustomers()
Registers for notification of updated customers.
|
void |
registerForChangedCustomersForResource(Id resourceId)
Registers for notification of updated customers for the given
resource.
|
void |
registerForDeletedCustomer(Id customerId)
Registers for notification of a deleted customer.
|
void |
registerForDeletedCustomers()
Registers for notification of deleted customers.
|
void |
registerForDeletedCustomersForResource(Id resourceId)
Registers for notification of deleted customers by the given resource.
|
void |
registerForNewCustomers()
Register for notifications of new customers.
|
void |
registerForNewCustomersForResource(Id resourceId)
Register for notifications of new customers for the given resource.
|
void |
reliableCustomerNotifications()
Reliable notifications are desired.
|
void |
unreliableCustomerNotifications()
Unreliable notifications are desired.
|
void |
useFederatedBusinessView()
Federates the view for methods in this session.
|
void |
useIsolatedBusinessView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBusinessId()
Business
Id
associated with
this session. Business Id
associated with this sessionmandatory
- This method must be implemented. Business getBusiness() throws OperationFailedException, PermissionDeniedException
Business
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForCustomerNotifications()
Customer
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 useFederatedBusinessView()
mandatory
- This method is must be implemented. void useIsolatedBusinessView()
mandatory
- This method is must be implemented. void reliableCustomerNotifications()
acknowledgeCustomerNotification()
.mandatory
- This method is must be implemented. void unreliableCustomerNotifications()
mandatory
- This method is must be implemented. void acknowledgeCustomerNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCustomers() throws OperationFailedException, PermissionDeniedException
CustomerReceiver.newCustomers()
is invoked when a new
Customer
appears in this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCustomersForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
CustomerReceiver.newCustomers()
is invoked when a new
Customer
appears in this business.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCustomers() throws OperationFailedException, PermissionDeniedException
CustomerReceiver.changedCustomers()
is invoked when a customer
in this business is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCustomersForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
CustomerReceiver.changedCustomers()
is
invoked when the specified customer in this business is changed.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCustomer(Id customerId) throws OperationFailedException, PermissionDeniedException
CustomerReceiver.changedCustomers()
is invoked when the
specified customer in this business is changed.customerId
- the Id
of the Customer
to monitorNullArgumentException
- customerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCustomers() throws OperationFailedException, PermissionDeniedException
CustomerReceiver.deletedCustomer()
is invoked when a customer
is deleted or removed from this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCustomersForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
CustomerReceiver.deletedCustomers()
is invoked when the
specified customer is deleted or removed from this business.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCustomer(Id customerId) throws OperationFailedException, PermissionDeniedException
CustomerReceiver.deletedCustomers()
is invoked when the
specified customer is deleted or removed from this business.customerId
- the Id
of the Customer
to monitorNullArgumentException
- customerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.