public interface BrokerLookupSession extends OsidSession
This session provides methods for retrieving Broker
objects.
This session defines views that offer differing behaviors when retrieving multiple objects.
Brokers with the BrokerAdminSession.
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 any lookup methods.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupBrokers()
Tests if this user can perform
Broker lookups. |
Broker |
getBroker(Id brokerId)
Gets the
Broker specified by its Id. |
BrokerList |
getBrokers()
Gets all
Brokers. |
BrokerList |
getBrokersByGenusType(Type brokerGenusType)
Gets a
BrokerList corresponding to the given broker
genus Type which does not include brokers of genus
types derived from the specified Type. |
BrokerList |
getBrokersByIds(IdList brokerIds)
Gets a
BrokerList corresponding to the given
IdList. |
BrokerList |
getBrokersByParentGenusType(Type brokerGenusType)
Gets a
BrokerList corresponding to the given broker
genus Type and include any additional brokers with
genus types derived from the specified Type. |
BrokerList |
getBrokersByProvider(Id resourceId)
Gets a
BrokerList containing of the given provider. |
BrokerList |
getBrokersByRecordType(Type brokerRecordType)
Gets a
BrokerList containing the given broker record
Type. |
Distributor |
getDistributor()
Gets the
Distributor associated with this session. |
Id |
getDistributorId()
Gets the
Distributor Id associated with
this session. |
void |
useActiveBrokerView()
Only active brokers are returned from methods in this session.
|
void |
useAnyStatusBrokerView()
Borth active and inactive brokers are returned from methods in this
session.
|
void |
useComparativeBrokerView()
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 |
useFederatedDistributorView()
Federates the view for methods in this session.
|
void |
useIsolatedDistributorView()
Isolates the view for methods in this session.
|
void |
usePlenaryBrokerView()
A complete view of the
Broker returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getDistributorId()
Distributor Id associated with
this session. Distributor Id associated with this sessionmandatory - This method must be implemented. Distributor getDistributor() throws OperationFailedException, PermissionDeniedException
Distributor associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupBrokers()
Broker 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 useComparativeBrokerView()
mandatory - This method is must be implemented. void usePlenaryBrokerView()
Broker 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 useFederatedDistributorView()
mandatory - This method is must be implemented. void useIsolatedDistributorView()
mandatory - This method is must be implemented. void useActiveBrokerView()
mandatory - This method is must be implemented. void useAnyStatusBrokerView()
mandatory - This method is must be implemented. Broker getBroker(Id brokerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Broker specified by its Id.
In plenary mode, the exact Id is found
or a NOT_FOUND results. Otherwise, the returned
Broker may have a different Id than requested,
such as the case where a duplicate Id was assigned to a
Broker and retained for compatibility.
In active mode, brokers are returned that are currently active. In any
status mode, active and inactive brokers are returned.brokerId - Id of the Broker NotFoundException - brokerId not foundNullArgumentException - brokerId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. BrokerList getBrokersByIds(IdList brokerIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
BrokerList corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
brokers 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 Brokers may be omitted from the list and
may present the elements in any order including returning a unique
set.
In active mode, brokers are returned that are currently active. In any
status mode, active and inactive brokers are returned.brokerIds - the list of Ids to retrieve Broker listNotFoundException - an Id was not foundNullArgumentException - brokerIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BrokerList getBrokersByGenusType(Type brokerGenusType) throws OperationFailedException, PermissionDeniedException
BrokerList corresponding to the given broker
genus Type which does not include brokers of genus
types derived from the specified Type.
In plenary mode, the returned list contains all known
brokers or an error results. Otherwise, the returned list may contain
only those brokers that are accessible through this session.
In active mode, brokers are returned that are currently active. In any
status mode, active and inactive brokers are returned.brokerGenusType - a broker genus type Broker listNullArgumentException - brokerGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BrokerList getBrokersByParentGenusType(Type brokerGenusType) throws OperationFailedException, PermissionDeniedException
BrokerList corresponding to the given broker
genus Type and include any additional brokers with
genus types derived from the specified Type.
In plenary mode, the returned list contains all known
brokers or an error results. Otherwise, the returned list may contain
only those brokers that are accessible through this session.
In active mode, brokers are returned that are currently active. In any
status mode, active and inactive brokers are returned.brokerGenusType - a broker genus type Broker listNullArgumentException - brokerGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BrokerList getBrokersByRecordType(Type brokerRecordType) throws OperationFailedException, PermissionDeniedException
BrokerList containing the given broker record
Type.
In plenary mode, the returned list contains all known
brokers or an error results. Otherwise, the returned list may contain
only those brokers that are accessible through this session.
In active mode, brokers are returned that are currently active. In any
status mode, active and inactive brokers are returned.brokerRecordType - a broker record type Broker listNullArgumentException - brokerRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BrokerList getBrokersByProvider(Id resourceId) throws OperationFailedException, PermissionDeniedException
BrokerList containing of the given provider.
In plenary mode, the returned list contains all known
brokers or an error results. Otherwise, the returned list may contain
only those brokers that are accessible through this session.
In active mode, brokers are returned that are currently active. In any
status mode, active and inactive brokers are returned.resourceId - a resource Id Broker listNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BrokerList getBrokers() throws OperationFailedException, PermissionDeniedException
Brokers.
In plenary mode, the returned list contains all known brokers or an
error results. Otherwise, the returned list may contain only those
brokers that are accessible through this session.
In active mode, brokers are returned that are currently active. In any
status mode, active and inactive brokers are returned. Brokers OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.