Interface CheckEvaluationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to evaluate Checks .
Checks are OsidRules that may require additional input in the
form of a CheckCondition to be evaluated.
A CheckCondition is acquired using getCheckCondition()
. The CheckConditionRecords in the CheckCondition must be
supplied for a successful evaluation. Knowledge of a specific check
Id is also an agreement to the understanding of the required
CheckConditionRecords as well as what is expected as a result. These
record Types may be inspected in the CheckConditionRecord
and CheckResultRecord respectively.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can evaluate checks.booleanevaluateCheckOnCondition(Id checkId, CheckCondition checkCondition) Evaluates a check based on an input condition.getCheckCondition(Id checkId) Gets aCheckConditionfor the givenCheck.Gets theEngineassociated with this session.Gets theEngineIdassociated with this session.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
-
getEngineId
Id getEngineId()Gets theEngineIdassociated with this session.- Returns:
- the
Engine Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getEngine
Gets theEngineassociated with this session.- Returns:
- the engine
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canEvaluateChecks
boolean canEvaluateChecks()Tests if this user can evaluate checks. 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 check evaluation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getCheckCondition
CheckCondition getCheckCondition(Id checkId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aCheckConditionfor the givenCheck. The recordTypesin theCheckConditionare required for a successful evaluation.- Parameters:
checkId- theIdof aCheck- Returns:
- a check condition
- Throws:
NotFoundException-checkIdis not foundNullArgumentException-checkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure making request- Compliance:
mandatory- This method must be implemented.
-
evaluateCheckOnCondition
boolean evaluateCheckOnCondition(Id checkId, CheckCondition checkCondition) throws NotFoundException, OperationFailedException, PermissionDeniedException Evaluates a check based on an input condition.- Parameters:
checkId- theIdof aCheckcheckCondition- a check condition- Returns:
- result of the evaluation
- Throws:
NotFoundException-checkIdis not foundNullArgumentException-checkIdorcheckConditionisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-checkConditiondid not otiginate fromgetCheckCondition()- Compliance:
mandatory- This method must be implemented.
-