Interface RequestLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Request
relationships.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- isolated distributor view: All request methods in this session
operate, retrieve and pertain to requests defined explicitly in the
current distributor. Using an isolated view is useful for managing
Requestswith theRequestAdminSession. - federated distributor view: All request methods in this session operate, retrieve and pertain to all requests defined in this distributor and any other requests implicitly available in this distributor through distributor inheritence.
- effective request view: All request lookup methods return requests where the current date falls in between the effective dates inclusive.
- any effective request view: Requests of any effective date are returned from methods.
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.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performRequestlookups.Gets theDistributorassociated with this session.Gets theDistributorIdassociated with this session.getRequest(Id requestId) Gets theRequestspecified by itsId.Gets allRequests.getRequestsByGenusType(Type requestGenusType) Gets aRequestListcorresponding to the given request genusTypewhich does not include requests of genus types derived from the specifiedType.getRequestsByIds(IdList requestIds) Gets aRequestListcorresponding to the givenIdList.getRequestsByParentGenusType(Type requestGenusType) Gets aRequestListcorresponding to the given request genusTypeand include any additional requests with genus types derived from the specifiedType.getRequestsByRecordType(Type requestRecordType) Gets aRequestListcontaining the given request recordType.getRequestsForQueue(Id queueId) Gets a list of requests for a queue.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.getRequestsForRequester(Id resourceId) Gets a list of requests for a requester.getRequestsForRequesterAndQueue(Id resourceId, Id queueId) Gets a list of requests for a requester and queue.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.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.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.voidAll requests of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly requests whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theRequestreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getDistributorId
Id getDistributorId()Gets theDistributorIdassociated with this session.- Returns:
- the
Distributor Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getDistributor
Gets theDistributorassociated with this session.- Returns:
- the distributor
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupRequests
boolean canLookupRequests()Tests if this user can performRequestlookups. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeRequestView
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. This view is used when greater interoperability is desired at the expense of precision.- Compliance:
mandatory- This method is must be implemented.
-
usePlenaryRequestView
void usePlenaryRequestView()A complete view of theRequestreturns 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.- Compliance:
mandatory- This method is must be implemented.
-
useFederatedDistributorView
void useFederatedDistributorView()Federates the view for methods in this session. A federated view will include requests in distributors which are children of this distributor in the distributor hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedDistributorView
void useIsolatedDistributorView()Isolates the view for methods in this session. An isolated view restricts lookups to this distributor only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveRequestView
void useEffectiveRequestView()Only requests whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveRequestView
void useAnyEffectiveRequestView()All requests of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getRequest
Request getRequest(Id requestId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theRequestspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedRequestmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aRequestand 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.- Parameters:
requestId-Idof theRequest- Returns:
- the request
- Throws:
NotFoundException-requestIdnot foundNullArgumentException-requestIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getRequestsByIds
RequestList getRequestsByIds(IdList requestIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aRequestListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the requests specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleRequestsmay 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.- Parameters:
requestIds- the list ofIdsto retrieve- Returns:
- the returned
Requestlist - Throws:
NotFoundException- anIdwas not foundNullArgumentException-requestIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsByGenusType
RequestList getRequestsByGenusType(Type requestGenusType) throws OperationFailedException, PermissionDeniedException Gets aRequestListcorresponding to the given request genusTypewhich does not include requests of genus types derived from the specifiedType. 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.- Parameters:
requestGenusType- a request genus type- Returns:
- the returned
Requestlist - Throws:
NullArgumentException-requestGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsByParentGenusType
RequestList getRequestsByParentGenusType(Type requestGenusType) throws OperationFailedException, PermissionDeniedException Gets aRequestListcorresponding to the given request genusTypeand include any additional requests with genus types derived from the specifiedType. 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.- Parameters:
requestGenusType- a request genus type- Returns:
- the returned
Requestlist - Throws:
NullArgumentException-requestGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsByRecordType
RequestList getRequestsByRecordType(Type requestRecordType) throws OperationFailedException, PermissionDeniedException Gets aRequestListcontaining the given request recordType. 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.- Parameters:
requestRecordType- a request record type- Returns:
- the returned
Requestlist - Throws:
NullArgumentException-requestRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsOnDate
RequestList getRequestsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of requests effective during the entire given date range inclusive but not confined to the date range. 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.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Requestlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsForRequester
RequestList getRequestsForRequester(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of requests for a requester. 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.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Requestlist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsForRequesterOnDate
RequestList getRequestsForRequesterOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of requests for a requester and effective during the entire given date range inclusive but not confined to the date range. 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.- Parameters:
resourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Requestlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsForQueue
RequestList getRequestsForQueue(Id queueId) throws OperationFailedException, PermissionDeniedException Gets a list of requests for a queue. 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.- Parameters:
queueId- a queueId- Returns:
- the returned
Requestlist - Throws:
NullArgumentException-queueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsForQueueOnDate
RequestList getRequestsForQueueOnDate(Id queueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of requests for a queue and effective during the entire given date range inclusive but not confined to the date range. 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.- Parameters:
queueId- a queueIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Requestlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-queueId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsForRequesterAndQueue
RequestList getRequestsForRequesterAndQueue(Id resourceId, Id queueId) throws OperationFailedException, PermissionDeniedException Gets a list of requests for a requester and queue. 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.- Parameters:
resourceId- a resourceIdqueueId- a queueId- Returns:
- the returned
Requestlist - Throws:
NullArgumentException-resourceIdorqueueIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequestsForRequesterAndQueueOnDate
RequestList getRequestsForRequesterAndQueueOnDate(Id resourceId, Id queueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException 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. 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.- Parameters:
resourceId- a resourceIdqueueId- a queueIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Requestlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, queueId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRequests
Gets allRequests. 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.- Returns:
- a list of
Requests - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-