public interface DistributorLookupSession extends OsidSession
This session provides methods for retrieving Distributor
objects.
This session defines views that offer differing behaviors when retrieving multiple objects.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. For
example, a browsing application may only need to examine the
Distributors it can access, without breaking execution. However,
an assessment may only be useful if all Distributors
referenced by it are available, and a test-taking application may
sacrifice some interoperability for the sake of precision.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupDistributors()
Tests if this user can perform
Distributor lookups. |
Distributor |
getDistributor(Id distributorId)
Gets the
Distributor specified by its Id. |
DistributorList |
getDistributors()
Gets all
Distributors. |
DistributorList |
getDistributorsByGenusType(Type distributorGenusType)
Gets a
DistributorList corresponding to the given
distributor genus Type which does not include
distributors of types derived from the specified Type. |
DistributorList |
getDistributorsByIds(IdList distributorIds)
Gets a
DistributorList corresponding to the given
IdList. |
DistributorList |
getDistributorsByParentGenusType(Type distributorGenusType)
Gets a
DistributorList corresponding to the given
distributor genus Type and include any additional
distributors with genus types derived from the specified Type. |
DistributorList |
getDistributorsByProvider(Id resourceId)
Gets a
DistributorList for the given provider. |
DistributorList |
getDistributorsByRecordType(Type distributorRecordType)
Gets a
DistributorList containing the given distributor
record Type. |
void |
useComparativeDistributorView()
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 |
usePlenaryDistributorView()
A complete view of the
Distributor returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canLookupDistributors()
Distributor 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 useComparativeDistributorView()
mandatory - This method is must be implemented. void usePlenaryDistributorView()
Distributor 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. Distributor getDistributor(Id distributorId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Distributor specified by its Id.
In plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned
Distributor may have a different Id than
requested, such as the case where a duplicate Id was
assigned to a Distributor and retained for
compatibility.distributorId - Id of the Distributor
NotFoundException - distributorId not
foundNullArgumentException - distributorId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. DistributorList getDistributorsByIds(IdList distributorIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
DistributorList corresponding to the given
IdList. In plenary mode, the returned list contains all
of the distributors 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 Distributors may be omitted
from the list and may present the elements in any order including
returning a unique set.distributorIds - the list of Ids to retrieve Distributor listNotFoundException - an Id was not foundNullArgumentException - distributorIds
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DistributorList getDistributorsByGenusType(Type distributorGenusType) throws OperationFailedException, PermissionDeniedException
DistributorList corresponding to the given
distributor genus Type which does not include
distributors of types derived from the specified Type.
In plenary mode, the returned list contains all known distributors or
an error results. Otherwise, the returned list may contain only those
distributors that are accessible through this session.distributorGenusType - a distributor genus type Distributor listNullArgumentException - distributorGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DistributorList getDistributorsByParentGenusType(Type distributorGenusType) throws OperationFailedException, PermissionDeniedException
DistributorList corresponding to the given
distributor genus Type and include any additional
distributors with genus types derived from the specified Type.
In plenary mode, the returned list contains all known
distributors or an error results. Otherwise, the returned list may
contain only those distributors that are accessible through this
session.distributorGenusType - a distributor genus type Distributor listNullArgumentException - distributorGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DistributorList getDistributorsByRecordType(Type distributorRecordType) throws OperationFailedException, PermissionDeniedException
DistributorList containing the given distributor
record Type. In plenary mode, the returned list
contains all known distributors or an error results. Otherwise, the
returned list may contain only those distributors that are accessible
through this session.distributorRecordType - a distributor record type Distributor listNullArgumentException - distributorRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DistributorList getDistributorsByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
DistributorList for the given provider. In
plenary mode, the returned list contains all known distributors or an
error results. Otherwise, the returned list may contain only those
distributors that are accessible through this session.resourceId - a resource Id Distributor listNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DistributorList getDistributors() throws OperationFailedException, PermissionDeniedException
Distributors. In plenary mode, the returned
list contains all known distributors or an error results. Otherwise,
the returned list may contain only those distributors that are
accessible through this session. Distributors OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.