OSID Logo
OSID Specifications
rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.rules.RulesSession
Implementsosid.OsidSession
Description

This session provides methods to evaluate and execute rules.

MethodgetEngineId
Description

Gets the Engine Id associated with this session.

Returnosid.id.Idthe Engine Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetEngine
Description

Gets the Engine associated with this session.

Returnosid.rules.Enginethe engine
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanEvaluateRules
Description

Tests if this user can evaluate rules. 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 opt not to offer these operations.

Returnboolean false if evaluation methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetConditionForRule
Description

Gets a condition for the given rule.

Parametersosid.id.IdruleIdthe Id of a Rule
Returnosid.rules.Conditionthe returned Condition
ErrorsNOT_FOUNDno Rule found with the given Id
NULL_ARGUMENT ruleId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodevaluateRule
Description

Evaluates a rule based on an input condition.

Parametersosid.id.IdruleIda rule Id
osid.rules.Conditionconditioninput conditions
Returnbooleanresult of the evaluation
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT ruleId or condition is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED condition not of this service
CompliancemandatoryThis method must be implemented.
MethodexecuteRule
Description

Executes a rule based on an input condition and returns a result.

Parametersosid.id.IdruleIda rule Id
osid.rules.Conditionconditioninput conditions
Returnosid.rules.Resultresult of the execution
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT ruleId or condition is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED condition not of this service
CompliancemandatoryThis method must be implemented.