public abstract class ExpressionEvaluator extends Object
Expression
.Modifier and Type | Class and Description |
---|---|
static interface |
ExpressionEvaluator.PathResolver
Interface for a class that knows how to resolve a path into an id.
|
Modifier and Type | Field and Description |
---|---|
protected static String |
DATE_CAST |
boolean |
fulltextSearchDisabled |
boolean |
hasFulltext |
protected static String |
NEG_PHRASE_QUOTE |
static String |
NXQL_ECM_ANCESTOR_IDS
pseudo NXQL to resolve ancestor ids.
|
static String |
NXQL_ECM_FULLTEXT_BINARY |
static String |
NXQL_ECM_FULLTEXT_SIMPLE |
static String |
NXQL_ECM_PATH
pseudo NXQL to resolve internal path.
|
static String |
NXQL_ECM_READ_ACL
pseudo NXQL to resolve read acls.
|
protected static String |
OR |
ExpressionEvaluator.PathResolver |
pathResolver |
protected static String |
PHRASE_QUOTE |
Set<String> |
principals |
Constructor and Description |
---|
ExpressionEvaluator(ExpressionEvaluator.PathResolver pathResolver,
String[] principals,
boolean fulltextSearchDisabled) |
public static final String NXQL_ECM_ANCESTOR_IDS
public static final String NXQL_ECM_PATH
public static final String NXQL_ECM_READ_ACL
public static final String NXQL_ECM_FULLTEXT_SIMPLE
public static final String NXQL_ECM_FULLTEXT_BINARY
protected static final String DATE_CAST
protected static final String PHRASE_QUOTE
protected static final String NEG_PHRASE_QUOTE
protected static final String OR
public final ExpressionEvaluator.PathResolver pathResolver
public final Set<String> principals
public final boolean fulltextSearchDisabled
public boolean hasFulltext
public ExpressionEvaluator(ExpressionEvaluator.PathResolver pathResolver, String[] principals, boolean fulltextSearchDisabled)
public Object walkExpression(Expression expr)
protected void checkDateLiteralForCast(Operand value, String name)
protected Boolean walkEcmPath(Operator op, Operand rvalue)
protected Boolean walkAncestorId(Operator op, Operand rvalue)
protected Boolean walkEcmFulltext(String name, Operator op, Operand rvalue)
public Boolean walkIsNull(Operand value)
public Boolean walkIsNotNull(Operand value)
public Boolean walkMultiExpression(MultiExpression expr)
public Object walkBetween(Operand lvalue, Operand rvalue, boolean positive)
public Object walkOperand(Operand op)
public Object walkLiteral(Literal lit)
public Boolean walkBooleanLiteral(BooleanLiteral lit)
public Calendar walkDateLiteral(DateLiteral lit)
public Double walkDoubleLiteral(DoubleLiteral lit)
public Long walkIntegerLiteral(IntegerLiteral lit)
public String walkStringLiteral(StringLiteral lit)
public List<Object> walkLiteralList(LiteralList litList)
public Boolean walkLike(Operand lvalue, Operand rvalue, boolean positive, boolean caseInsensitive)
public Object walkFunction(Function func)
public Boolean walkStartsWith(Operand lvalue, Operand rvalue)
protected Boolean walkStartsWithPath(String path)
protected Boolean walkStartsWithNonPath(Operand lvalue, String path)
public abstract Object walkReference(Reference ref)
ref
- the referenceprotected boolean isMixinTypes(Operand op)
public static String likeToRegex(String like)
% and _ are standard wildcards, and \ escapes them.
protected Boolean eqMaybeList(Object left, Object right)
protected Boolean inMaybeList(Object left, List<Object> right)
protected Boolean likeMaybeList(Object left, String right, boolean positive, boolean caseInsensitive)
public abstract Boolean walkMixinTypes(List<String> mixins, boolean include)
Used for:
mixins
- the mixin(s) to matchinclude
- true
for = and INprotected static Boolean fulltext(String string1, String string2, String queryString)
Copyright © 2018 Nuxeo. All rights reserved.