public interface RulesSession extends OsidSession
This session provides methods to evaluate and execute rules.
Modifier and Type | Method and Description |
---|---|
boolean |
canEvaluateRules()
Tests if this user can evaluate rules.
|
boolean |
evaluateRule(Id ruleId,
Condition condition)
Evaluates a rule based on an input condition.
|
Result |
executeRule(Id ruleId,
Condition condition)
Executes a rule based on an input condition and returns a result.
|
Condition |
getConditionForRule(Id ruleId)
Gets a condition for the given rule.
|
Engine |
getEngine()
Gets the
Engine associated with this session. |
Id |
getEngineId()
Gets the
Engine Id associated with this
session. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getEngineId()
Engine
Id
associated with this
session. Engine Id
associated with this sessionmandatory
- This method must be implemented. Engine getEngine() throws OperationFailedException, PermissionDeniedException
Engine
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canEvaluateRules()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations. false
if evaluation methods are not authorized,
true
otherwisemandatory
- This method must be implemented. Condition getConditionForRule(Id ruleId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ruleId
- the Id
of a Rule
Condition
NotFoundException
- no Rule
found with
the given Id
NullArgumentException
- ruleId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean evaluateRule(Id ruleId, Condition condition) throws NotFoundException, OperationFailedException, PermissionDeniedException
ruleId
- a rule Id
condition
- input conditionsNotFoundException
- an Id
was not foundNullArgumentException
- ruleId
or
condition
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- condition
not of
this servicemandatory
- This method must be implemented. Result executeRule(Id ruleId, Condition condition) throws NotFoundException, OperationFailedException, PermissionDeniedException
ruleId
- a rule Id
condition
- input conditionsNotFoundException
- an Id
was not foundNullArgumentException
- ruleId
or
condition
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- condition
not of
this servicemandatory
- This method must be implemented.