Interface ResponseLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving responses.
This lookup session defines several views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- isolated inquest view: All response methods in this session
operate, retrieve and pertain to responses defined explicitly in the
current inquest. Using an isolated view is useful for managing
Responseswith theResponseAdminSession. - federated inquest view: All response lookup methods in this session operate, retrieve and pertain to all responses defined in this inquest and any other responses implicitly available in this inquest through inquest inheritence.
- effective response view: All response lookup methods return responses where the current date falls in between the effective dates inclusive.
- any effective response view: responses of any effective date are returned from methods.
The methods useFederatedInquestView() and
useIsolatedInquestView() behave as a radio group and one should be
selected before invoking any lookup methods.
Responses may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the responses.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performResponselookups.Gets theInquestassociated with this session.Gets theInquestIdassociated with this session.getResponse(Id responseId) Gets theResponsespecified by itsId.Gets all responses.getResponsesByGenusType(Type responseGenusType) Gets aResponseListcorresponding to the given response genusTypewhich does not include responses of types derived from the specifiedType.getResponsesByIds(IdList responseIds) Gets aResponseListcorresponding to the givenIdList.getResponsesByParentGenusType(Type responseGenusType) Gets aResponseListcorresponding to the given response genusTypeand include any additional responses with genus types derived from the specifiedType.getResponsesByRecordType(Type responseRecordType) Gets aResponseListcontaining the given response recordType.getResponsesForInquiry(Id inquiry) Gets a list of responses for an inquiry.getResponsesForInquiryAndResponder(Id inquiryId, Id resourceId) Gets a list of responses for an inquiry and responder.getResponsesForInquiryAndResponderOnDate(Id inquiryId, Id resourceId, DateTime from, DateTime to) Gets a list of responses for an inquiry and responder and effective during the entire given date range inclusive but not confined to the date range.getResponsesForInquiryOnDate(Id inquiry, DateTime from, DateTime to) Gets a list of responses for the given inquiry effective during the entire given date range inclusive but not confined to the date range.getResponsesForResponder(Id resourceId) Gets a list of responses for a resource.getResponsesForResponderOnDate(Id resourceId, DateTime from, DateTime to) Gets a list of responses for a resource and effective during the entire given date range inclusive but not confined to the date range.getResponsesOnDate(DateTime from, DateTime to) Gets a list of responses effective during the entire given date range inclusive but not confined to the date range.voidAll responses 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 responses 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 theResponsereturns 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
-
getInquestId
Id getInquestId()Gets theInquestIdassociated with this session.- Returns:
- the
Inquest Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getInquest
Gets theInquestassociated with this session.- Returns:
- the inquest
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupResponses
boolean canLookupResponses()Tests if this user can performResponselookups. 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 not offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeResponseView
void useComparativeResponseView()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.
-
usePlenaryResponseView
void usePlenaryResponseView()A complete view of theResponsereturns 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.
-
useFederatedInquestView
void useFederatedInquestView()Federates the view for methods in this session. A federated view will include responses in inquests which are children of this inquest in the inquest hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedInquestView
void useIsolatedInquestView()Isolates the view for methods in this session. An isolated view restricts retrievals to this inquest only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveResponseView
void useEffectiveResponseView()Only responses whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveResponseView
void useAnyEffectiveResponseView()All responses of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getResponse
Response getResponse(Id responseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theResponsespecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedResponsemay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aResponseand retained for compatibility. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Parameters:
responseId- theIdof theResponseto retrieve- Returns:
- the returned
Response - Throws:
NotFoundException- noResponsefound with the givenIdNullArgumentException-responseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesByIds
ResponseList getResponsesByIds(IdList responseIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aResponseListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the responses 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, inaccessibleResponsesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Parameters:
responseIds- the list ofIdsto retrieve- Returns:
- the returned
Responselist - Throws:
NotFoundException- anIdwas not foundNullArgumentException-responseIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesByGenusType
ResponseList getResponsesByGenusType(Type responseGenusType) throws OperationFailedException, PermissionDeniedException Gets aResponseListcorresponding to the given response genusTypewhich does not include responses of types derived from the specifiedType. In plenary mode, the returned list contains all known responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Parameters:
responseGenusType- a response genus type- Returns:
- the returned
Responselist - Throws:
NullArgumentException-responseGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesByParentGenusType
ResponseList getResponsesByParentGenusType(Type responseGenusType) throws OperationFailedException, PermissionDeniedException Gets aResponseListcorresponding to the given response genusTypeand include any additional responses with genus types derived from the specifiedType. In plenary mode, the returned list contains all known responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Parameters:
responseGenusType- a response genus type- Returns:
- the returned
Responselist - Throws:
NullArgumentException-responseGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesByRecordType
ResponseList getResponsesByRecordType(Type responseRecordType) throws OperationFailedException, PermissionDeniedException Gets aResponseListcontaining the given response recordType. In plenary mode, the returned list contains all known responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Parameters:
responseRecordType- a response record type- Returns:
- the returned
Responselist - Throws:
NullArgumentException-responseRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesOnDate
ResponseList getResponsesOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of responses effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective in addition to being effective in the given date range. In any effective mode, effective responses and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Responselist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesForInquiry
ResponseList getResponsesForInquiry(Id inquiry) throws OperationFailedException, PermissionDeniedException Gets a list of responses for an inquiry. In plenary mode, the returned list contains all known responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Parameters:
inquiry- an inquiryId- Returns:
- the returned
Responselist - Throws:
NullArgumentException-inquiryisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesForInquiryOnDate
ResponseList getResponsesForInquiryOnDate(Id inquiry, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of responses for the given inquiry effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective in addition to being effective in the given date range. In any effective mode, effective responses and those currently expired are returned.- Parameters:
inquiry- an inquiryIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Responselist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-inquiryId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesForResponder
ResponseList getResponsesForResponder(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of responses for a resource. In plenary mode, the returned list contains all known responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Responselist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesForResponderOnDate
ResponseList getResponsesForResponderOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of responses for a resource 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 responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective in addition to being effective in the given date range. In any effective mode, effective responses and those currently expired are returned.- Parameters:
resourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Responselist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesForInquiryAndResponder
ResponseList getResponsesForInquiryAndResponder(Id inquiryId, Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of responses for an inquiry and responder. In plenary mode, the returned list contains all known responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Parameters:
inquiryId- an inquiryIdresourceId- a resourceId- Returns:
- the returned
Responselist - Throws:
NullArgumentException-inquiryIdorresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponsesForInquiryAndResponderOnDate
ResponseList getResponsesForInquiryAndResponderOnDate(Id inquiryId, Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of responses for an inquiry and responder 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 responses or an error results. Otherwise, the returned list may contain only those responses that are accessible through this session. In effective mode, responses are returned that are currently effective in addition to being effective in the given date range. In any effective mode, effective responses and those currently expired are returned.- Parameters:
inquiryId- an inquiryIdresourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Responselist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-inquiryId, resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResponses
Gets all responses. In plenary mode, the returned list contains all of the responses including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleResponsesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, responses are returned that are currently effective. In any effective mode, effective responses and those currently expired are returned.- Returns:
- the returned
Responselist - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-