Interface InstructionApplicabilitySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to evaluate Instructions .
Instructions are OsidRuleApplicators which compose
Agendas .
Instructions are also OsidRuleApplicators for the related
Checks . OsidRuleApplicators have built-in rules to vary
by time, time period, and by a demographic Resource . One or more
of these dimenions may be required. Where they are not required, providing
these dimensions may or may not have any effect on the evaluation. For
example, an Instruction that varies with a specific demographic
may be given an anonymous resource with which to evaluate. Similarly, not
supplying a time period may only match an Instruction with no time
period that relates to a Check that fails.
An InstructionCondition is acquired using
getInstructionCondition() . The InstructionConditionRecords in
the InstructionCondition must be supplied for a successful
evaluation. Knowledge of a specific agenda Id is also an agreement
to the understanding of the required InstructionConditionRecords .
These record Types may be inspected in the
InstructionConditionRecord .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can evaluate instructions.getApplicableInstructions(Id agendaId, InstructionCondition instructionCondition) Gets a list of applicableInstructionsfor anAgenda.Gets theEngineassociated with this session.Gets theEngineIdassociated with this session.getInstructionCondition(Id agendaId) Gets anInstructionConditionfor the givenAgenda.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.
-
canEvaluateInstructions
boolean canEvaluateInstructions()Tests if this user can evaluate instructions. 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 instruction evaluation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getInstructionCondition
InstructionCondition getInstructionCondition(Id agendaId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anInstructionConditionfor the givenAgenda. The recordTypesin theInstructionConditionare required for a successful evaluation.- Parameters:
agendaId- theIdof anAgenda- Returns:
- an instruction condition
- Throws:
NotFoundException-agendaIdis not foundNullArgumentException-agendaIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure making request- Compliance:
mandatory- This method must be implemented.
-
getApplicableInstructions
InstructionList getApplicableInstructions(Id agendaId, InstructionCondition instructionCondition) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a list of applicableInstructionsfor anAgenda.- Parameters:
agendaId- theIdof anAgendainstructionCondition- an instruction condition- Returns:
- a list of applicable instructions
- Throws:
NotFoundException-instructionIdis not foundNullArgumentException-instructionIdorinstructionConditionisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-instructionConditiondid not originate fromgetInstructionCondition()- Compliance:
mandatory- This method must be implemented.
-