Package org.alfresco.filesys.repo.rules
Class RuleEvaluatorImpl
- java.lang.Object
-
- org.alfresco.filesys.repo.rules.RuleEvaluatorImpl
-
- All Implemented Interfaces:
RuleEvaluator
public class RuleEvaluatorImpl extends java.lang.Object implements RuleEvaluator
The Rule Evaluator evaluates the operation and returns details of the commands to implement those operations.It is configured with a list of scenarios which act as factories for scenario instances.
-
-
Constructor Summary
Constructors Constructor Description RuleEvaluatorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluatorContextcreateContext(java.util.Map<java.lang.String,java.lang.Object> sessionState)Create a new evaluator context.Commandevaluate(EvaluatorContext context, Operation operation)Evaluate the scenarios against the current operationjava.util.List<Scenario>getScenarios()voidinit()voidnotifyRename(EvaluatorContext context, Operation operation, Command command)Tell the context of a renamevoidsetScenarios(java.util.List<Scenario> scenarios)
-
-
-
Method Detail
-
init
public void init()
-
evaluate
public Command evaluate(EvaluatorContext context, Operation operation)
Evaluate the scenarios against the current operation- Specified by:
evaluatein interfaceRuleEvaluator- Parameters:
operation- the operation to be evaluatedcontext- - the context to evaluate the operation- Returns:
- the command to execute that operation
-
setScenarios
public void setScenarios(java.util.List<Scenario> scenarios)
-
getScenarios
public java.util.List<Scenario> getScenarios()
-
createContext
public EvaluatorContext createContext(java.util.Map<java.lang.String,java.lang.Object> sessionState)
Description copied from interface:RuleEvaluatorCreate a new evaluator context. Typically for a particular folder. An evaluator context groups operations together.- Specified by:
createContextin interfaceRuleEvaluator- Returns:
- the new context.
-
notifyRename
public void notifyRename(EvaluatorContext context, Operation operation, Command command)
Description copied from interface:RuleEvaluatorTell the context of a rename- Specified by:
notifyRenamein interfaceRuleEvaluator
-
-