public interface CustomerLookupSession extends OsidSession
This session defines methods for retrieving customers. A
Customer
is a Resource
related to the billing
system.
This lookup session defines several views:
Customers
with the CustomerAdminSession.
The methods useFederatedBusinessView()
and
useIsolatedBusinessView()
behave as a radio group and one should
be selected before invoking any lookup methods.
Customers may have an additional records indicated by their respective
record types. The record may not be accessed through a cast of the
Customer.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupCustomers()
Tests if this user can perform
Customer lookups. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
Customer |
getCustomer(Id customerId)
Gets the
Customer specified by its Id. |
CustomerList |
getCustomers()
Gets all
Customers. |
CustomerList |
getCustomersByActivity(Id activityId)
Gets a
CustomerList having the given activity. |
CustomerList |
getCustomersByGenusType(Type customerGenusType)
Gets a
CustomerList corresponding to the given customer
genus Type which does not include customers of types
derived from the specified Type. |
CustomerList |
getCustomersByIds(IdList customerIds)
Gets a
CustomerList corresponding to the given
IdList. |
CustomerList |
getCustomersByNumber(java.lang.String number)
Gets a
CustomerList related to the given customer
number. |
CustomerList |
getCustomersByParentGenusType(Type customerGenusType)
Gets a
CustomerList corresponding to the given customer
genus Type and include any additional customers with
genus types derived from the specified Type. |
CustomerList |
getCustomersByRecordType(Type customerRecordType)
Gets a
CustomerList containing the given customer
record Type. |
CustomerList |
getCustomersByResource(Id resourceId)
Gets a
CustomerList related to the given resource
. |
CustomerList |
getCustomersByResourceOnDate(Id resourceId,
DateTime from,
DateTime to)
Gets a
CustomerList of the given resource and effective
during the entire given date range inclusive but not confined to the
date range. |
CustomerList |
getCustomersOnDate(DateTime from,
DateTime to)
Gets a
CustomerList effective during the entire given
date range inclusive but not confined to the date range. |
void |
useAnyEffectiveCustomerView()
All customers of any effective dates are returned by methods in this
session.
|
void |
useComparativeCustomerView()
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 |
useEffectiveCustomerView()
Only customers whose effective dates are current are returned by
methods in this session.
|
void |
useFederatedBusinessView()
Federates the view for methods in this session.
|
void |
useIsolatedBusinessView()
Isolates the view for methods in this session.
|
void |
usePlenaryCustomerView()
A complete view of the
Customer returns is desired. |
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 canLookupCustomers()
Customer
lookups. 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 not offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeCustomerView()
mandatory
- This method is must be implemented. void usePlenaryCustomerView()
Customer
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. void useFederatedBusinessView()
mandatory
- This method is must be implemented. void useIsolatedBusinessView()
mandatory
- This method is must be implemented. void useEffectiveCustomerView()
mandatory
- This method is must be implemented. void useAnyEffectiveCustomerView()
mandatory
- This method is must be implemented. Customer getCustomer(Id customerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Customer
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Customer
may have a different Id
than
requested, such as the case where a duplicate Id
was
assigned to a Customer
and retained for compatibility.
In effective mode, customers are returned that are currently
effective. In any effective mode, effective customers and those
currently expired are returned.customerId
- the Id
of the Customer
to retrieve Customer
NotFoundException
- no Customer
found
with the given Id
NullArgumentException
- customerId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersByIds(IdList customerIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
CustomerList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
customers specified in the Id
list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Customers
may be omitted from the list and
may present the elements in any order including returning a unique
set.
In effective mode, customers are returned that are currently
effective. In any effective mode, effective customers and those
currently expired are returned.customerIds
- the list of Ids
to retrieve CustomerList
listNotFoundException
- an Id was
not foundNullArgumentException
- customerIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersByGenusType(Type customerGenusType) throws OperationFailedException, PermissionDeniedException
CustomerList
corresponding to the given customer
genus Type
which does not include customers of types
derived from the specified Type.
In plenary mode, the returned list contains all known
customers or an error results. Otherwise, the returned list may
contain only those customers that are accessible through this session.
In effective mode, customers are returned that are currently
effective. In any effective mode, effective customers and those
currently expired are returned.customerGenusType
- a customer genus type CustomerList
listNullArgumentException
- customerGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersByParentGenusType(Type customerGenusType) throws OperationFailedException, PermissionDeniedException
CustomerList
corresponding to the given customer
genus Type
and include any additional customers with
genus types derived from the specified Type.
In plenary mode, the returned list contains all known
customers or an error results. Otherwise, the returned list may
contain only those customers that are accessible through this session.
In effective mode, customers are returned that are currently
effective. In any effective mode, effective customers and those
currently expired are returned.customerGenusType
- a customer genus type CustomerList
listNullArgumentException
- customerGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersByRecordType(Type customerRecordType) throws OperationFailedException, PermissionDeniedException
CustomerList
containing the given customer
record Type.
In plenary mode, the returned list contains all known customers or an
error results. Otherwise, the returned list may contain only those
customers that are accessible through this session.
In effective mode, customers are returned that are currently
effective. In any effective mode, effective customers and those
currently expired are returned.customerRecordType
- a customer record type CustomerList
listNullArgumentException
- customerRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
CustomerList
effective during the entire given
date range inclusive but not confined to the date range.
In plenary mode, the returned list contains all known customers or an
error results. Otherwise, the returned list may contain only those
customers that are accessible through this session.
In effective mode, customers are returned that are currently effective
in addition to being effective during the given date range. In any
effective mode, effective customers and those currently expired are
returned.from
- starting dateto
- ending date CustomerList
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersByNumber(java.lang.String number) throws OperationFailedException, PermissionDeniedException
CustomerList
related to the given customer
number.
In plenary mode, the returned list contains all known customers or an
error results. Otherwise, the returned list may contain only those
customers that are accessible through this session.
In effective mode, customers are returned that are currently
effective. In any effective mode, effective customers and those
currently expired are returned.number
- a customer number CustomerList
listNullArgumentException
- number
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersByResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
CustomerList
related to the given resource
.
In plenary mode, the returned list contains all known customers or an
error results. Otherwise, the returned list may contain only those
customers that are accessible through this session.
In effective mode, customers are returned that are currently
effective. In any effective mode, effective customers and those
currently expired are returned.resourceId
- a resource Id
CustomerList
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersByResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
CustomerList
of the given resource and effective
during the entire given date range inclusive but not confined to the
date range.
In plenary mode, the returned list contains all known customers or an
error results. Otherwise, the returned list may contain only those
customers that are accessible through this session.
In effective mode, customers are returned that are currently effective
in addition to being effective during the given date range. In any
effective mode, effective customers and those currently expired are
returned.resourceId
- a resource Id
from
- starting dateto
- ending date CustomerList
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, from,
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomersByActivity(Id activityId) throws OperationFailedException, PermissionDeniedException
CustomerList
having the given activity.
In plenary mode, the returned list contains all known customers or an
error results. Otherwise, the returned list may contain only those
customers that are accessible through this session.
In effective mode, customers are returned that are currently
effective. In any effective mode, effective customers and those
currently expired are returned.activityId
- an activity Id
CustomerList
listNullArgumentException
- activityId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CustomerList getCustomers() throws OperationFailedException, PermissionDeniedException
Customers.
In plenary mode, the returned list
contains all known customers or an error results. Otherwise, the
returned list may contain only those customers that are accessible
through this session. Customers
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.