Package org.nuxeo.ecm.directory.ldap
Class LDAPFilterBuilder
- java.lang.Object
-
- org.nuxeo.ecm.directory.ldap.LDAPFilterBuilder
-
public class LDAPFilterBuilder extends Object
Creates an LDAP query filter from a Nuxeo Expression.- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
DATE_CAST
protected LDAPDirectory
directory
StringBuilder
filter
int
paramIndex
List<Serializable>
params
-
Constructor Summary
Constructors Constructor Description LDAPFilterBuilder(LDAPDirectory directory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addFilterParam(Serializable value)
protected void
checkDateLiteralForCast(Operand value, String name)
protected void
checkDateLiteralForCast(Operator op, Operand value, String name)
protected Operand
makeBoolean(Operand rvalue)
void
walk(Expression expression)
void
walkAnd(Expression expr)
void
walkAndMultiExpression(MultiExpression expr)
void
walkBetween(Operand lvalue, Operand rvalue, boolean positive)
protected void
walkBinOp(String op, Operand lvalue, Operand rvalue)
void
walkBooleanLiteral(BooleanLiteral lit)
void
walkDateLiteral(DateLiteral lit)
void
walkDoubleLiteral(DoubleLiteral lit)
void
walkEq(Operand lvalue, Operand rvalue)
void
walkExpression(Expression expr)
Object
walkFunction(Function func)
void
walkGt(Operand lvalue, Operand rvalue)
void
walkGtEq(Operand lvalue, Operand rvalue)
void
walkIn(Operand lvalue, Operand rvalue, boolean positive)
void
walkIntegerLiteral(IntegerLiteral lit)
void
walkIsNotNull(Operand value)
void
walkIsNull(Operand value)
void
walkLike(Operand lvalue, Operand rvalue, boolean positive, boolean caseInsensitive)
void
walkLikeWildcard(String like)
Turns a NXQL LIKE pattern into an LDAP wildcard.void
walkLiteral(Operand operand)
void
walkLt(Operand lvalue, Operand rvalue)
void
walkLtEq(Operand lvalue, Operand rvalue)
protected void
walkMulti(String op, List<? extends Operand> values)
void
walkNot(Operand value)
void
walkNotEq(Operand lvalue, Operand rvalue)
void
walkOperand(Operand operand)
void
walkOr(Expression expr)
void
walkOrMultiExpression(MultiExpression expr)
Field
walkReference(Operand value)
void
walkStringLiteral(StringLiteral lit)
-
-
-
Field Detail
-
DATE_CAST
protected static final String DATE_CAST
- See Also:
- Constant Field Values
-
directory
protected final LDAPDirectory directory
-
filter
public StringBuilder filter
-
paramIndex
public int paramIndex
-
params
public final List<Serializable> params
-
-
Constructor Detail
-
LDAPFilterBuilder
public LDAPFilterBuilder(LDAPDirectory directory)
-
-
Method Detail
-
walk
public void walk(Expression expression)
-
walkExpression
public void walkExpression(Expression expr)
-
checkDateLiteralForCast
protected void checkDateLiteralForCast(Operator op, Operand value, String name)
-
walkNot
public void walkNot(Operand value)
-
walkIsNull
public void walkIsNull(Operand value)
-
walkIsNotNull
public void walkIsNotNull(Operand value)
-
walkAndMultiExpression
public void walkAndMultiExpression(MultiExpression expr)
-
walkAnd
public void walkAnd(Expression expr)
-
walkOrMultiExpression
public void walkOrMultiExpression(MultiExpression expr)
-
walkOr
public void walkOr(Expression expr)
-
walkLike
public void walkLike(Operand lvalue, Operand rvalue, boolean positive, boolean caseInsensitive)
-
walkLikeWildcard
public void walkLikeWildcard(String like)
Turns a NXQL LIKE pattern into an LDAP wildcard.% and _ are standard wildcards, and \ escapes them.
-
walkOperand
public void walkOperand(Operand operand)
-
walkLiteral
public void walkLiteral(Operand operand)
-
walkBooleanLiteral
public void walkBooleanLiteral(BooleanLiteral lit)
-
walkDateLiteral
public void walkDateLiteral(DateLiteral lit)
-
walkDoubleLiteral
public void walkDoubleLiteral(DoubleLiteral lit)
-
walkIntegerLiteral
public void walkIntegerLiteral(IntegerLiteral lit)
-
walkStringLiteral
public void walkStringLiteral(StringLiteral lit)
-
addFilterParam
protected void addFilterParam(Serializable value)
-
-