|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pfsw.text.LdapMatchRuleVisitor
public class LdapMatchRuleVisitor
Walks over a MatchRule to create a LDAP filter string out of it.
| Constructor Summary | |
|---|---|
LdapMatchRuleVisitor()
Initialize the new instance with default values. |
|
| Method Summary | |
|---|---|
protected void |
addElementToCurrentGroup(org.pfsw.text.LdapMatchRuleVisitor.ElementInfo element,
boolean andOperator)
|
protected void |
appendAttribute(org.pfsw.text.LdapMatchRuleVisitor.AttributeInfo element)
|
protected void |
appendAttribute(java.lang.String name,
MatchRuleCompareOperator operator,
java.lang.String value)
|
protected void |
appendAttribute(java.lang.String name,
MatchRuleCompareOperator operator,
java.lang.String[] values,
boolean notOperator)
|
void |
appendGroup(org.pfsw.text.LdapMatchRuleVisitor.GroupInfo group)
|
protected void |
appendGroupElement(org.pfsw.text.LdapMatchRuleVisitor.ElementInfo element)
|
protected void |
appendGroupElements(java.util.List<org.pfsw.text.LdapMatchRuleVisitor.ElementInfo> elements,
boolean andOperator)
|
java.lang.String |
asSearchString(MatchRule matchRule)
Converts the given match rule into a LDAP search string compliant to RFC 1558. |
void |
attribute(java.lang.String name,
MatchRuleCompareOperator compareOperator,
java.lang.String[] values,
boolean andOperator,
boolean notOperator)
This method will be called for each attribute. |
protected org.pfsw.text.LdapMatchRuleVisitor.GroupInfo |
createGroup()
|
protected org.pfsw.text.LdapMatchRuleVisitor.GroupInfo |
currentGroup()
|
void |
endGroup()
This method will be called for each group end occurrence. |
protected java.lang.StringBuffer |
getBuffer()
|
protected org.pfsw.text.LdapMatchRuleVisitor.GroupInfo |
getRootGroup()
|
protected java.util.Stack<org.pfsw.text.LdapMatchRuleVisitor.GroupInfo> |
getStack()
|
protected boolean |
isFirstGroup()
|
protected org.pfsw.text.LdapMatchRuleVisitor.GroupInfo |
pop()
|
protected void |
push(org.pfsw.text.LdapMatchRuleVisitor.GroupInfo obj)
|
protected void |
setBuffer(java.lang.StringBuffer newValue)
|
protected void |
setRootGroup(org.pfsw.text.LdapMatchRuleVisitor.GroupInfo newValue)
|
protected void |
setStack(java.util.Stack<org.pfsw.text.LdapMatchRuleVisitor.GroupInfo> newValue)
|
void |
startGroup(boolean andOperator,
boolean notOperator)
This method will be called for each start of a new group. |
void |
walkThroughFinished()
This method will be called when the MatchRule has finished to walk through its elements. |
void |
walkThroughInit()
This method will be called right before the MatchRule walks through its elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LdapMatchRuleVisitor()
| Method Detail |
|---|
public void walkThroughInit()
walkThroughInit in interface MatchRuleVisitorpublic void walkThroughFinished()
walkThroughFinished in interface MatchRuleVisitor
public void startGroup(boolean andOperator,
boolean notOperator)
startGroup in interface MatchRuleVisitorandOperator - If true it is an AND combination otherwise it is ORnotOperator - Is only true for a NOT operationpublic void endGroup()
endGroup in interface MatchRuleVisitor
public void attribute(java.lang.String name,
MatchRuleCompareOperator compareOperator,
java.lang.String[] values,
boolean andOperator,
boolean notOperator)
attribute in interface MatchRuleVisitorname - The attribute's namecompareOperator - The operator used to compare valuesvalues - All values the attribute my match (implicit OR combination !)andOperator - If true it is an AND combination otherwise it is ORnotOperator - Is only true for a NOT operationpublic java.lang.String asSearchString(MatchRule matchRule)
matchRule - The rule to be convertedpublic void appendGroup(org.pfsw.text.LdapMatchRuleVisitor.GroupInfo group)
protected void appendGroupElement(org.pfsw.text.LdapMatchRuleVisitor.ElementInfo element)
protected void appendGroupElements(java.util.List<org.pfsw.text.LdapMatchRuleVisitor.ElementInfo> elements,
boolean andOperator)
protected void appendAttribute(org.pfsw.text.LdapMatchRuleVisitor.AttributeInfo element)
protected void appendAttribute(java.lang.String name,
MatchRuleCompareOperator operator,
java.lang.String[] values,
boolean notOperator)
protected void appendAttribute(java.lang.String name,
MatchRuleCompareOperator operator,
java.lang.String value)
protected void addElementToCurrentGroup(org.pfsw.text.LdapMatchRuleVisitor.ElementInfo element,
boolean andOperator)
protected org.pfsw.text.LdapMatchRuleVisitor.GroupInfo createGroup()
protected org.pfsw.text.LdapMatchRuleVisitor.GroupInfo pop()
protected void push(org.pfsw.text.LdapMatchRuleVisitor.GroupInfo obj)
protected org.pfsw.text.LdapMatchRuleVisitor.GroupInfo currentGroup()
protected boolean isFirstGroup()
protected java.lang.StringBuffer getBuffer()
protected void setBuffer(java.lang.StringBuffer newValue)
protected org.pfsw.text.LdapMatchRuleVisitor.GroupInfo getRootGroup()
protected void setRootGroup(org.pfsw.text.LdapMatchRuleVisitor.GroupInfo newValue)
protected java.util.Stack<org.pfsw.text.LdapMatchRuleVisitor.GroupInfo> getStack()
protected void setStack(java.util.Stack<org.pfsw.text.LdapMatchRuleVisitor.GroupInfo> newValue)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||