Interface AcknowledgementSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for evaluating and responding to inquiries for users.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreateResponseWithRecordTypes(Type[] responseRecordTypes) Tests if this user can create a singleResponseusing the desired record types.booleanTests if this user can performInquirylookups.booleanTests if this user can create responses.Gets theInquestassociated with this session.Gets theInquestIdassociated with this session.getMyInquiries(Id auditId) Gets the inquiries needing a response for the resource related to this agent.getResponseForm(Id inquiryId, Type[] responseRecordTypes) Gets the response form for creating new responses from this agent.respond(ResponseForm responseForm) Creates a newResponsefrom this agent.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.
-
canGetMyInquiries
boolean canGetMyInquiries()Tests if this user can performInquirylookups. 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.
-
getMyInquiries
Gets the inquiries needing a response for the resource related to this agent.- Parameters:
auditId- theIdof anAudit- Returns:
- the returned
InquiryList - Throws:
NullArgumentException-auditIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRespond
boolean canRespond()Tests if this user can create responses. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aResponsewill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifResponsecreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateResponseWithRecordTypes
Tests if this user can create a singleResponseusing the desired record types. WhileControlManager.getResponseRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificResponse. Providing an empty array tests if aResponsecan be created with no records.- Parameters:
responseRecordTypes- array of response record types- Returns:
trueifResponsecreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-responseRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getResponseForm
ResponseForm getResponseForm(Id inquiryId, Type[] responseRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the response form for creating new responses from this agent. A new form should be requested for each create transaction.- Parameters:
inquiryId- theIdfor the inquiryresponseRecordTypes- array of response record types- Returns:
- the response form
- Throws:
NotFoundException-inquiryIdis not foundNullArgumentException-inquiryIdorresponseRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
respond
Response respond(ResponseForm responseForm) throws OperationFailedException, PermissionDeniedException Creates a newResponsefrom this agent.- Parameters:
responseForm- the form for thisResponse- Returns:
- the new
Response - Throws:
IllegalStateException-responseFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-responseFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-responseFormdid not originate fromgetResponseFormForCreate()- Compliance:
mandatory- This method must be implemented.
-