OSID Logo
OSID Specifications
rules check package
Version 3.1.0
Interfaceosid.rules.check.InstructionApplicabilitySession
Implementsosid.OsidSession
Used Byosid.rules.check.RulesCheckManager
osid.rules.check.RulesCheckProxyManager
Description

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.

MethodgetEngineId
Description

Gets the Engine Id associated with this session.

Returnosid.id.Id the Engine Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetEngine
Description

Gets the Engine associated with this session.

Returnosid.rules.Engine the engine
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanEvaluateInstructions
Description

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 a PERMISSION_DENIED. This is intended as a hint to an application that may not offer lookup operations to unauthorized users.

Returnboolean false if instruction evaluation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetInstructionCondition
Description

Gets an InstructionCondition for the given Agenda. The record Types in the InstructionCondition are required for a successful evaluation.

Parametersosid.id.IdagendaId the Id of an Agenda
Returnosid.rules.check.InstructionCondition an instruction condition
ErrorsNOT_FOUND agendaId is not found
NULL_ARGUMENT agendaId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure making request
Compliancemandatory This method must be implemented.
MethodgetApplicableInstructions
Description

Gets a list of applicable Instructions for an Agenda.

Parametersosid.id.IdagendaId the Id of an Agenda
osid.rules.check.InstructionConditioninstructionCondition an instruction condition
Returnosid.rules.check.InstructionList a list of applicable instructions
ErrorsNOT_FOUND instructionId is not found
NULL_ARGUMENT instructionId or instructionCondition is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED instructionCondition did not originate from getInstructionCondition()
Compliancemandatory This method must be implemented.