OSID Logo
OSID Specifications
osid package
Version 3.0.0
Release Candidate Preview
Interfaceosid.OsidRule
Implementsosid.OsidObject
osid.Operable
Description

An OsidRule identifies an explicit or implicit rule evaluation. An associated Rule may be available in cases where the behavior of the object can be explicitly modified using a defined rule. In many cases, an OsidObject may define specific methods to manage certain common behavioral aspects and delegate anything above and beyond what has been defined to a rule evaluation.

Rules are defined to be operable. In the case of a statement evaluation, an enabled rule overrides any evaluation to return true and a disabled rule overrides any evaluation to return false.

Rules are never required to consume or implement. They serve as a mechanism to offer a level of management not attainable in the immediate service definition. Each Rule implies evaluating a set of facts known to the service to produce a resulting beavior. Rule evaluations may also accept input data or conditions, however, OsidRules as they appear in throughout the services may or may not provide a means of supplying OsidConditions directly. In the services where an explicit OsidCondition is absent they may be masquerading as another interface such as a Proxy or an OsidQuery .

MethodhasRule
Description

Tests if an explicit rule is available.

Returnboolean true if an explicit rule is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRuleId
Description

Gets the explicit rule Id .

Returnosid.id.Idthe rule Id
ErrorsILLEGAL_STATE hasRule() is false
CompliancemandatoryThis method must be implemented.
MethodgetRule
Description

Gets the explicit rule.

Returnosid.rules.Rulethe rule
ErrorsILLEGAL_STATE hasRule() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.