public interface AccountNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Account
objects in this Business.
This
also includes existing accounts 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
AccountLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForAccountNotifications()
Tests if this user can register for
Account
notifications. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
registerForChangedAccount(Id accountId)
Registers for notification of an updated account.
|
void |
registerForChangedAccounts()
Registers for notification of updated accounts.
|
void |
registerForDeletedAccount(Id accountId)
Registers for notification of a deleted account.
|
void |
registerForDeletedAccountAncestors(Id accountId)
Registers for notification if an ancestor is removed from the
specified account in the account hierarchy.
|
void |
registerForDeletedAccountDescendants(Id accountId)
Registers for notification if a descendant is removed from fthe
specified account in the account hierarchy.
|
void |
registerForDeletedAccounts()
Registers for notification of deleted accounts.
|
void |
registerForNewAccountAncestors(Id accountId)
Registers for notification if an ancestor is added to the specified
account in the account hierarchy.
|
void |
registerForNewAccountDescendants(Id accountId)
Registers for notification if a descendant is added to the specified
account in the account hierarchy.
|
void |
registerForNewAccounts()
Register for notifications of new accounts.
|
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 canRegisterForAccountNotifications()
Account
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 registerForNewAccounts() throws OperationFailedException, PermissionDeniedException
AccountReceiver.newAccounts()
is invoked when a new
Account
appears in this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewAccountAncestors(Id accountId) throws OperationFailedException, PermissionDeniedException
AccountReceiver.newAccountAncestor()
is invoked when the
specified account experiences an addition in ancestry.accountId
- the Id
of the account to monitorNullArgumentException
- accountId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewAccountDescendants(Id accountId) throws OperationFailedException, PermissionDeniedException
AccountReceiver.newAccountDescendant()
is invoked when the
specified account experiences an addition in descendants.accountId
- the Id
of the account to monitorNullArgumentException
- accountId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAccounts() throws OperationFailedException, PermissionDeniedException
AccountReceiver.changedAccounts()
is invoked when an account
in this business is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedAccount(Id accountId) throws OperationFailedException, PermissionDeniedException
AccountReceiver.changedAccounts()
is invoked when the
specified account in this business is changed.accountId
- the Id
of the Account
to monitorNullArgumentException
- accountId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAccounts() throws OperationFailedException, PermissionDeniedException
AccountReceiver.deletedAccounts()
is invoked when an account
is deleted or removed from this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAccount(Id accountId) throws OperationFailedException, PermissionDeniedException
AccountReceiver.deletedAccounts()
is invoked when the
specified account is deleted or removed from this business.accountId
- the Id
of the Account
to monitorNullArgumentException
- accountId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAccountAncestors(Id accountId) throws OperationFailedException, PermissionDeniedException
AccountReceiver.deletedAccountAncestor()
is invoked when the
specified account experiences a removal of an ancestor.accountId
- the Id
of the account to monitorNullArgumentException
- accountId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedAccountDescendants(Id accountId) throws OperationFailedException, PermissionDeniedException
AccountReceiver.deletedAccountDescednant()
is invoked when the
specified account experiences a removal of one of its descdendents.accountId
- the Id
of the account to monitorNullArgumentException
- accountId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.