public interface DemographicBinSession extends OsidSession
This session provides methods to retrieve Demographic
to
Bin
mappings. A Demographic
may appear in
multiple Bin
objects. Each bin 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 |
canLookupDemographicBinMappings()
Tests if this user can perform lookups of demographic/bin mappings.
|
IdList |
getBinIdsByDemographic(Id demographicId)
Gets the
Bin Ids mapped to a
Demographic. |
BinList |
getBinsByDemographic(Id demographicId)
Gets the
Bins mapped to a Demographic. |
IdList |
getDemographicIdsByBin(Id binId)
Gets the list of
DemographicIds associated with an
Bin. |
IdList |
getDemographicIdsByBins(IdList binIds)
Gets the list of
Demographic Ids corresponding to a
list of Bins. |
DemographicList |
getDemographicsByBin(Id binId)
Gets the list of demographics associated with an
Bin. |
DemographicList |
getDemographicsByBins(IdList binIds)
Gets the list of demographic corresponding to a list of
Bins. |
void |
useComparativeDemographicBinView()
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 |
usePlenaryDemographicBinView()
A complete view of the
Demographic and Bin
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canLookupDemographicBinMappings()
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 useComparativeDemographicBinView()
mandatory
- This method is must be implemented. void usePlenaryDemographicBinView()
Demographic
and Bin
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 getDemographicIdsByBin(Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
DemographicIds
associated with an
Bin.
binId
- Id
of the Bin
Ids
NotFoundException
- binId
is not foundNullArgumentException
- binId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DemographicList getDemographicsByBin(Id binId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Bin.
binId
- Id
of the Bin
NotFoundException
- binId
is not foundNullArgumentException
- binId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getDemographicIdsByBins(IdList binIds) throws OperationFailedException, PermissionDeniedException
Demographic Ids
corresponding to a
list of Bins.
binIds
- list of bin Ids
Ids
NullArgumentException
- binIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. DemographicList getDemographicsByBins(IdList binIds) throws OperationFailedException, PermissionDeniedException
Bins.
binIds
- list of bin Ids
NullArgumentException
- binIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. IdList getBinIdsByDemographic(Id demographicId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Bin
Ids
mapped to a
Demographic.
demographicId
- Id
of a Demographic
NotFoundException
- demographicId
is not
foundNullArgumentException
- demographicId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. BinList getBinsByDemographic(Id demographicId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Bins
mapped to a Demographic.
demographicId
- Id
of a Demographic
NotFoundException
- demographicId
is not
foundNullArgumentException
- demographicId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.