OSID Logo
OSID Specifications
rules package
Version 3.0.0
Interfaceosid.rules.RuleEngineAssignmentSession
Implementsosid.OsidSession
Used Byosid.rules.RulesManager
osid.rules.RulesProxyManager
Description

This session provides methods to re-assign TerRulesms to Engines .A Rule may appear in multiple Engines and removing the last reference to a Rule is the equivalent of deleting it. Each Rule may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Rule to another Engine is not a copy operation (eg: does not change its Id ).

MethodcanAssignRules
Description

Tests if this user can alter rule/engine mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Returnbooleanfalse if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignRulesToEngine
Description

Tests if this user can alter rule/engine mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Parametersosid.id.IdengineIdthe Id of the Engine
Returnbooleanfalse if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENTengineId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableEngineIds
Description

Gets a list of engines including and under the given engine node in which any rule can be assigned.

Parametersosid.id.IdengineIdthe Id of the Engine
Returnosid.id.IdListlist of assignable rule Ids
ErrorsNULL_ARGUMENTengineId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableEngineIdsForRule
Description

Gets a list of engines including and under the given engine node in which a specific rule can be assigned.

Parametersosid.id.IdengineIdthe Id of the Engine
osid.id.IdruleIdthe Id of the Engine
Returnosid.id.IdListlist of assignable engine Ids
ErrorsNULL_ARGUMENTengineId or ruleId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignRuleToEngine
Description

Adds an existing Rule to an Engine .

Parametersosid.id.IdruleIdthe Id of the Rule
osid.id.IdengineIdthe Id of the Engine
ErrorsALREADY_EXISTSruleId is already assigned to engineId
NOT_FOUNDruleId or engineId not found
NULL_ARGUMENTruleId or engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignRuleFromEngine
Description

Removes a Rule from an Engine .

Parametersosid.id.IdruleIdthe Id of the Rule
osid.id.IdengineIdthe Id of the Engine
ErrorsNOT_FOUNDruleId or engineId not found or ruleId not assigned to engineId
NULL_ARGUMENTruleId or engineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignRuleToEngine
Description

Moves a Rule from one Engine to another. Mappings to other Engines are unaffected.

Parametersosid.id.IdruleIdthe Id of the Rule
osid.id.IdfromEngineIdthe Id of the current Engine
osid.id.IdtoEngineIdthe Id of the destination Engine
ErrorsALREADY_EXISTSruleId already assigned to toEngineId
NOT_FOUNDruleId, fromEngineId , or toEngineId not found or ruleId not mapped to fromEngineId
NULL_ARGUMENTruleId, fromEngineId , or toEngineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.