public interface DemographicLookupSession extends OsidSession
This session provides methods for retrieving Demographics.
This session defines views that offer differing behaviors when retrieving multiple objects.
Demographics
with the DemographicAdminSession.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedDistributorView()
and
useIsolatedDistributorView()
behave as a radio group and one
should be selected before invoking the methods in this session.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupDemographics()
Tests if this user can perform
Demographics lookups. |
Bin |
getBin()
Gets the
Bin associated with this session. |
Id |
getBinId()
Gets the
Bin Id associated with this
session. |
Demographic |
getDemographic(Id demographicId)
Gets the
Demographic specified by its Id. |
DemographicList |
getDemographics()
Gets all
Demographics. |
DemographicList |
getDemographicsByGenusType(Type demographicGenusType)
Gets a
DemographicList corresponding to the given
demographic genus Type which does not include
demographic of genus types derived from the specified Type. |
DemographicList |
getDemographicsByIds(IdList demographicIds)
Gets a
DemographicList corresponding to the given
IdList. |
DemographicList |
getDemographicsByParentGenusType(Type demographicGenusType)
Gets a
DemographicList corresponding to the given
demographic genus Type and include any additional
demographic with genus types derived from the specified Type. |
DemographicList |
getDemographicsByRecordType(Type demographicRecordType)
Gets a
DemographicList containing the given demographic
record Type. |
void |
useActiveDemographicView()
Only active demographics are returned by methods in this session.
|
void |
useAnyStatusDemographicView()
All active and inactive demographics are returned by methods in this
session.
|
void |
useComparativeDemographicView()
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 |
useFederatedBinView()
Federates the view for methods in this session.
|
void |
useIsolatedBinView()
Isolates the view for methods in this session.
|
void |
usePlenaryDemographicView()
A complete view of the
Demographic returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBinId()
Bin
Id
associated with this
session. Bin Id
associated with this sessionmandatory
- This method must be implemented. Bin getBin() throws OperationFailedException, PermissionDeniedException
Bin
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupDemographics()
Demographics
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 opt not to offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeDemographicView()
mandatory
- This method is must be implemented. void usePlenaryDemographicView()
Demographic
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 useFederatedBinView()
mandatory
- This method is must be implemented. void useIsolatedBinView()
mandatory
- This method is must be implemented. void useActiveDemographicView()
mandatory
- This method is must be implemented. void useAnyStatusDemographicView()
mandatory
- This method is must be implemented. Demographic getDemographic(Id demographicId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Demographic
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Demographic
may have a different Id
than
requested, such as the case where a duplicate Id
was
assigned to a Demographic
and retained for
compatibility.
In active mode, demographic are returned that are currently active. In
any status mode, active and inactive demographic are returned.demographicId
- Id
of the Demographic
NotFoundException
- demographicId
not
foundNullArgumentException
- demographicId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. DemographicList getDemographicsByIds(IdList demographicIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
DemographicList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
demographic 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 Demographics
may be omitted from the list
and may present the elements in any order including returning a unique
set.
In active mode, demographic are returned that are currently active. In
any status mode, active and inactive demographic are returned.demographicIds
- the list of Ids
to retrieve Demographic
listNotFoundException
- an Id was
not foundNullArgumentException
- demographicIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DemographicList getDemographicsByGenusType(Type demographicGenusType) throws OperationFailedException, PermissionDeniedException
DemographicList
corresponding to the given
demographic genus Type
which does not include
demographic of genus types derived from the specified Type.
In plenary mode, the returned list contains all known
demographic or an error results. Otherwise, the returned list may
contain only those demographic that are accessible through this
session.
In active mode, demographic are returned that are currently active. In
any status mode, active and inactive demographic are returned.demographicGenusType
- a demographic genus type Demographic
listNullArgumentException
- demographicGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DemographicList getDemographicsByParentGenusType(Type demographicGenusType) throws OperationFailedException, PermissionDeniedException
DemographicList
corresponding to the given
demographic genus Type
and include any additional
demographic with genus types derived from the specified Type.
In plenary mode, the returned list contains all known
demographic or an error results. Otherwise, the returned list may
contain only those demographic that are accessible through this
session.
In active mode, demographic are returned that are currently active. In
any status mode, active and inactive demographic are returned.demographicGenusType
- a demographic genus type Demographic
listNullArgumentException
- demographicGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DemographicList getDemographicsByRecordType(Type demographicRecordType) throws OperationFailedException, PermissionDeniedException
DemographicList
containing the given demographic
record Type.
In plenary mode, the returned list contains all known
demographic or an error results. Otherwise, the returned list may
contain only those demographic that are accessible through this
session.
In active mode, demographic are returned that are currently active. In
any status mode, active and inactive demographic are returned.demographicRecordType
- a demographic record type Demographic
listNullArgumentException
- demographicRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DemographicList getDemographics() throws OperationFailedException, PermissionDeniedException
Demographics.
In plenary mode, the returned list contains all known demographic or
an error results. Otherwise, the returned list may contain only those
demographic that are accessible through this session.
In active mode, demographic are returned that are currently active. In
any status mode, active and inactive demographic are returned. Demographic
listOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.