Package org.nuxeo.ecm.directory.multi
Class MultiDirectoryExpressionEvaluator
- java.lang.Object
-
- org.nuxeo.ecm.directory.multi.MultiDirectoryExpressionEvaluator
-
public class MultiDirectoryExpressionEvaluator extends Object
Evaluator for anExpression
in the context of the various subdirectories of a MultiDirectory's source.The result is a set of entry ids.
The strategy for evaluation is to delegate as much as possible of the evaluation of expressions to subdirectories themselves.
We do a depth-first evaluation of expressions, delaying actual evaluation while an expression's references all fall into the same subdirectory.
- Since:
- 10.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiDirectoryExpressionEvaluator.IdsResult
Result is a set of entry ids.static class
MultiDirectoryExpressionEvaluator.OperandResult
Result is an operand associated to at most one subdirectory.static class
MultiDirectoryExpressionEvaluator.ReferenceRenamer
Renames the references according to a map.static interface
MultiDirectoryExpressionEvaluator.Result
The result of an evaluation of an expression.
-
Constructor Summary
Constructors Constructor Description MultiDirectoryExpressionEvaluator(MultiDirectorySession.SourceInfo sourceInfo, String idField, String dirName)
-
Method Summary
-
-
-
Field Detail
-
dirInfos
protected final List<MultiDirectorySession.SubDirectoryInfo> dirInfos
-
idField
protected final String idField
-
dirName
protected final String dirName
-
-
Constructor Detail
-
MultiDirectoryExpressionEvaluator
public MultiDirectoryExpressionEvaluator(MultiDirectorySession.SourceInfo sourceInfo, String idField, String dirName)
-
-
Method Detail
-
eval
public Set<String> eval(Expression expr)
Evaluates an expression and returns the set of matching ids.
-
evalExpression
protected MultiDirectoryExpressionEvaluator.Result evalExpression(Expression expr)
-
evalSimpleExpression
protected MultiDirectoryExpressionEvaluator.Result evalSimpleExpression(Expression expr)
-
evalOperand
protected MultiDirectoryExpressionEvaluator.Result evalOperand(Operand op)
-
evalReference
protected MultiDirectoryExpressionEvaluator.Result evalReference(Reference ref)
-
evalAndOr
protected MultiDirectoryExpressionEvaluator.Result evalAndOr(Expression expr)
-
evalMultiExpression
protected MultiDirectoryExpressionEvaluator.Result evalMultiExpression(MultiExpression expr)
-
evaluate
protected Set<String> evaluate(MultiDirectoryExpressionEvaluator.Result result)
Evaluates a result and returns the set of matching ids.
-
evaluate
protected Set<String> evaluate(MultiDirectoryExpressionEvaluator.OperandResult opr)
Evaluates an operand associated to a single directory and returns the set of matching ids.
-
-