public interface RequestLookupSession extends OsidSession
This session provides methods for retrieving Request
relationships.
This session defines views that offer differing behaviors when retrieving multiple objects.
Requests
with the RequestAdminSession.
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 |
canLookupRequests()
Tests if this user can perform
Request lookups. |
Distributor |
getDistributor()
Gets the
Distributor associated with this session. |
Id |
getDistributorId()
Gets the
Distributor Id associated with
this session. |
Request |
getRequest(Id requestId)
Gets the
Request specified by its Id. |
RequestList |
getRequests()
Gets all
Requests. |
RequestList |
getRequestsByGenusType(Type requestGenusType)
Gets a
RequestList corresponding to the given request
genus Type which does not include requests of genus
types derived from the specified Type. |
RequestList |
getRequestsByIds(IdList requestIds)
Gets a
RequestList corresponding to the given
IdList. |
RequestList |
getRequestsByParentGenusType(Type requestGenusType)
Gets a
RequestList corresponding to the given request
genus Type and include any additional requests with
genus types derived from the specified Type. |
RequestList |
getRequestsByRecordType(Type requestRecordType)
Gets a
RequestList containing the given request record
Type. |
RequestList |
getRequestsForQueue(Id queueId)
Gets a list of requests for a queue.
|
RequestList |
getRequestsForQueueOnDate(Id queueId,
DateTime from,
DateTime to)
Gets a list of requests for a queue and effective during the entire
given date range inclusive but not confined to the date range.
|
RequestList |
getRequestsForRequester(Id resourceId)
Gets a list of requests for a requester.
|
RequestList |
getRequestsForRequesterAndQueue(Id resourceId,
Id queueId)
Gets a list of requests for a requester and queue.
|
RequestList |
getRequestsForRequesterAndQueueOnDate(Id resourceId,
Id queueId,
DateTime from,
DateTime to)
Gets a list of requests for a requester and queue and effective during
the entire given date range inclusive but not confined to the date
range.
|
RequestList |
getRequestsForRequesterOnDate(Id resourceId,
DateTime from,
DateTime to)
Gets a list of requests for a requester and effective during the
entire given date range inclusive but not confined to the date range.
|
RequestList |
getRequestsOnDate(DateTime from,
DateTime to)
Gets a list of requests effective during the entire given date range
inclusive but not confined to the date range.
|
void |
useAnyEffectiveRequestView()
All requests of any effective dates are returned by methods in this
session.
|
void |
useComparativeRequestView()
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 |
useEffectiveRequestView()
Only requests whose effective dates are current are returned by
methods in this session.
|
void |
useFederatedDistributorView()
Federates the view for methods in this session.
|
void |
useIsolatedDistributorView()
Isolates the view for methods in this session.
|
void |
usePlenaryRequestView()
A complete view of the
Request returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id 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 canLookupRequests()
Request
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 useComparativeRequestView()
mandatory
- This method is must be implemented. void usePlenaryRequestView()
Request
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 useEffectiveRequestView()
mandatory
- This method is must be implemented. void useAnyEffectiveRequestView()
mandatory
- This method is must be implemented. Request getRequest(Id requestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Request
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Request
may have a different Id
than requested,
such as the case where a duplicate Id
was assigned to a
Request
and retained for compatibility.
In effective mode, requests are returned that are currently effective.
In any effective mode, effective requests and those currently expired
are returned.requestId
- Id
of the Request
NotFoundException
- requestId
not foundNullArgumentException
- requestId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. RequestList getRequestsByIds(IdList requestIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
RequestList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
requests 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 Requests
may be omitted from the list and
may present the elements in any order including returning a unique
set.
In effective mode, requests are returned that are currently effective.
In any effective mode, effective requests and those currently expired
are returned.requestIds
- the list of Ids
to retrieve Request
listNotFoundException
- an Id
was not foundNullArgumentException
- requestIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsByGenusType(Type requestGenusType) throws OperationFailedException, PermissionDeniedException
RequestList
corresponding to the given request
genus Type
which does not include requests of genus
types derived from the specified Type.
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective.
In any effective mode, effective requests and those currently expired
are returned.requestGenusType
- a request genus type Request
listNullArgumentException
- requestGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsByParentGenusType(Type requestGenusType) throws OperationFailedException, PermissionDeniedException
RequestList
corresponding to the given request
genus Type
and include any additional requests with
genus types derived from the specified Type.
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective.
In any effective mode, effective requests and those currently expired
are returned.requestGenusType
- a request genus type Request
listNullArgumentException
- requestGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsByRecordType(Type requestRecordType) throws OperationFailedException, PermissionDeniedException
RequestList
containing the given request record
Type.
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective.
In any effective mode, effective requests and those currently expired
are returned.requestRecordType
- a request record type Request
listNullArgumentException
- requestRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective
in addition to being effective during the given date range. In any
effective mode, effective requests and those currently expired are
returned.from
- start of date rangeto
- end of date range Request
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsForRequester(Id resourceId) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective.
In any effective mode, effective requests and those currently expired
are returned.resourceId
- a resource Id
Request
listNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsForRequesterOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective
in addition to being effective during the given date range. In any
effective mode, effective requests and those currently expired are
returned.resourceId
- a resource Id
from
- start of date rangeto
- end of date range Request
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. RequestList getRequestsForQueue(Id queueId) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective.
In any effective mode, effective requests and those currently expired
are returned.queueId
- a queue Id
Request
listNullArgumentException
- queueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsForQueueOnDate(Id queueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective
in addition to being effective during the given date range. In any
effective mode, effective requests and those currently expired are
returned.queueId
- a queue Id
from
- start of date rangeto
- end of date range Request
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- queueId, from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsForRequesterAndQueue(Id resourceId, Id queueId) throws OperationFailedException, PermissionDeniedException
resourceId
- a resource Id
queueId
- a queue Id
Request
listNullArgumentException
- resourceId
or
queueId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequestsForRequesterAndQueueOnDate(Id resourceId, Id queueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
requests or an error results. Otherwise, the returned list may contain
only those requests that are accessible through this session.
In effective mode, requests are returned that are currently effective
in addition to being effective during the given date range. In any
effective mode, effective requests and those currently expired are
returned.resourceId
- a resource Id
queueId
- a queue Id
from
- start of date rangeto
- end of date range Request
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, queueId,
from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. RequestList getRequests() throws OperationFailedException, PermissionDeniedException
Requests.
In plenary mode, the returned list contains all known requests or an
error results. Otherwise, the returned list may contain only those
requests that are accessible through this session.
In effective mode, requests are returned that are currently effective.
In any effective mode, effective requests and those currently expired
are returned. Requests
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.