public interface AccountBusinessSession extends OsidSession
This session provides methods to retrieve Account
to
Business
mappings. An Account
may appear in
multiple Business
objects. Each catalog may have its own
authorizations governing who is allowed to look at it.
This lookup session defines several views:
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupAccountBusinessMappings()
Tests if this user can perform lookups of account/business mappings.
|
IdList |
getAccountIdsByBusiness(Id businessId)
Gets the list of
Account Ids associated with a
Business. |
IdList |
getAccountIdsByBusinesses(IdList businessIds)
Gets the list of
Account Ids corresponding to a list of
Business objects. |
AccountList |
getAccountsByBusiness(Id businessId)
Gets the list of
Accounts associated with a
Business. |
AccountList |
getAccountsByBusinesses(IdList businessIds)
Gets the list of
Accounts corresponding to a list of
Business objects. |
BusinessList |
getBusinessesByAccount(Id accountId)
Gets the
Business objects mapped to an Account. |
IdList |
getBusinessIdsByAccount(Id accountId)
Gets the
Business Ids mapped to an
Account. |
void |
useComparativeAccountBusinessView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryAccountCatalogView()
A complete view of the
Account and Business
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupAccountBusinessMappings()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if looking up mappings is not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeAccountBusinessView()
mandatory
- This method is must be implemented. void usePlenaryAccountCatalogView()
Account
and Business
returns is desired. Methods will return what is requested or
result in an error. This view is used when greater precision is
desired at the expense of interoperability.mandatory
- This method is must be implemented. IdList getAccountIdsByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Account Ids
associated with a
Business.
businessId
- Id
of the Business
Ids
NotFoundException
- businessId
is not
foundNullArgumentException
- businessId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AccountList getAccountsByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Accounts
associated with a
Business.
businessId
- Id
of the Business
NotFoundException
- businessId
is not
foundNullArgumentException
- businessId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getAccountIdsByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Account Ids
corresponding to a list of
Business
objects.businessIds
- list of business Ids
Ids
NullArgumentException
- businessIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AccountList getAccountsByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Accounts
corresponding to a list of
Business
objects.businessIds
- list of business Ids
NullArgumentException
- businessIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getBusinessIdsByAccount(Id accountId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business
Ids
mapped to an
Account.
accountId
- Id
of an Account
NotFoundException
- accountId
is not
foundNullArgumentException
- accountId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BusinessList getBusinessesByAccount(Id accountId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business
objects mapped to an Account.
accountId
- Id
of an Account
NotFoundException
- accountId
is not
foundNullArgumentException
- accountId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.