OSID Logo
OSID Specifications
rules package
Version 3.1.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.

Returnboolean false if mapping is not authorized, true otherwise
Compliancemandatory This 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.IdengineId the Id of the Engine
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT engineId is null
Compliancemandatory This 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.IdengineId the Id of the Engine
Returnosid.id.IdList list of assignable rule Ids
ErrorsNULL_ARGUMENT engineId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This 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.IdengineId the Id of the Engine
osid.id.IdruleId the Id of the Engine
Returnosid.id.IdList list of assignable engine Ids
ErrorsNULL_ARGUMENT engineId or ruleId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignRuleToEngine
Description

Adds an existing Rule to an Engine.

Parametersosid.id.IdruleId the Id of the Rule
osid.id.IdengineId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignRuleFromEngine
Description

Removes a Rule from an Engine.

Parametersosid.id.IdruleId the Id of the Rule
osid.id.IdengineId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignRuleToEngine
Description

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

Parametersosid.id.IdruleId the Id of the Rule
osid.id.IdfromEngineId the Id of the current Engine
osid.id.IdtoEngineId the Id of the destination Engine
ErrorsALREADY_EXISTS ruleId already assigned to toEngineId
NOT_FOUND ruleId, fromEngineId, or toEngineId not found or ruleId not mapped to fromEngineId
NULL_ARGUMENT ruleId, fromEngineId, or toEngineId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.