public interface CustomerBusinessSession extends OsidSession
This session provides methods to retrieve Customer to
Business mappings. A Customer 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 |
canLookupCustomerBusinessMappings()
Tests if this user can perform lookups of customer/business mappings.
|
BusinessList |
getBusinessesByCustomer(Id customerId)
Gets the
Business objects mapped to a Customer. |
IdList |
getBusinessIdsByCustomer(Id customerId)
Gets the
Business Ids mapped to a
Customer. |
IdList |
getCustomerIdsByBusiness(Id businessId)
Gets the list of
Customer Ids associated with a
Business. |
IdList |
getCustomerIdsByBusinesses(IdList businessIds)
Gets the list of
Customer Ids corresponding to a list
of Business objects. |
CustomerList |
getCustomersByBusiness(Id businessId)
Gets the list of
Customers associated with a
Business. |
CustomerList |
getCustomersByBusinesses(IdList businessIds)
Gets the list of
Customers corresponding to a list of
Business objects. |
void |
useComparativeCustomerBusinessView()
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 |
usePlenaryCustomerBusinessView()
A complete view of the
Customer and Business
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canLookupCustomerBusinessMappings()
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 useComparativeCustomerBusinessView()
mandatory - This method is must be implemented. void usePlenaryCustomerBusinessView()
Customer 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 getCustomerIdsByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Customer 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. CustomerList getCustomersByBusiness(Id businessId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Customers 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 getCustomerIdsByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Customer 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. CustomerList getCustomersByBusinesses(IdList businessIds) throws OperationFailedException, PermissionDeniedException
Customers 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 getBusinessIdsByCustomer(Id customerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business Ids mapped to a
Customer. customerId - Id of a Customer Ids NotFoundException - customerId is not
foundNullArgumentException - customerId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BusinessList getBusinessesByCustomer(Id customerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Business objects mapped to a Customer.
customerId - Id of a Customer NotFoundException - customerId is not
foundNullArgumentException - customerId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.