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

This session provides methods to re-assign TerRulesms to Engine objects A Rule may appear in multiple Engine objects 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.

Returnboolean false 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
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT engineId 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_ARGUMENT engineId 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_ARGUMENT engineId 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_EXISTS ruleId is already assigned to engineId
NOT_FOUND ruleId or engineId not found
NULL_ARGUMENT ruleId 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_FOUND ruleId or engineId not found or ruleId not assigned to engineId
NULL_ARGUMENT ruleId 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
ErrorsNOT_FOUND ruleId, fromEngineId, or toEngineId not found or ruleId not mapped to fromEngineId
NULL_ARGUMENT ruleId, fromEngineId, or toEngineId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.