public interface RuleEngineAssignmentSession extends OsidSession
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
).
Modifier and Type | Method and Description |
---|---|
void |
assignRuleToEngine(Id ruleId,
Id engineId)
Adds an existing
Rule to an Engine. |
boolean |
canAssignRules()
Tests if this user can alter rule/engine mappings.
|
boolean |
canAssignRulesToEngine(Id engineId)
Tests if this user can alter rule/engine mappings.
|
IdList |
getAssignableEngineIds(Id engineId)
Gets a list of engines including and under the given engine node in
which any rule can be assigned.
|
IdList |
getAssignableEngineIdsForRule(Id engineId,
Id ruleId)
Gets a list of engines including and under the given engine node in
which a specific rule can be assigned.
|
void |
reassignRuleToEngine(Id ruleId,
Id fromEngineId,
Id toEngineId)
Moves a
Rule from one Engine to another. |
void |
unassignRuleFromEngine(Id ruleId,
Id engineId)
Removes a
Rule from an Engine. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignRules()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignRulesToEngine(Id engineId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.engineId
- the Id
of the Engine
false
if mapping is not authorized, true
otherwiseNullArgumentException
- engineId
is
null
mandatory
- This method must be implemented. IdList getAssignableEngineIds(Id engineId) throws OperationFailedException
engineId
- the Id
of the Engine
Ids
NullArgumentException
- engineId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableEngineIdsForRule(Id engineId, Id ruleId) throws OperationFailedException
engineId
- the Id
of the Engine
ruleId
- the Id
of the Engine
Ids
NullArgumentException
- engineId
or
ruleId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignRuleToEngine(Id ruleId, Id engineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Rule
to an Engine.
ruleId
- the Id
of the Rule
engineId
- the Id
of the Engine
AlreadyExistsException
- ruleId
is
already assigned to engineId
NotFoundException
- ruleId
or
engineId
not foundNullArgumentException
- ruleId
or
engineId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignRuleFromEngine(Id ruleId, Id engineId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Rule
from an Engine.
ruleId
- the Id
of the Rule
engineId
- the Id
of the Engine
NotFoundException
- ruleId
or
engineId
not found or ruleId
not
assigned to engineId
NullArgumentException
- ruleId
or
engineId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignRuleToEngine(Id ruleId, Id fromEngineId, Id toEngineId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Rule
from one Engine
to another.
Mappings to other Engines
are unaffected.ruleId
- the Id
of the Rule
fromEngineId
- the Id
of the current
Engine
toEngineId
- the Id
of the destination
Engine
NotFoundException
- ruleId, fromEngineId,
or toEngineId
not found or
ruleId
not mapped to fromEngineId
NullArgumentException
- ruleId, fromEngineId,
or toEngineId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.