|
Spring LDAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.ldap.filter.AbstractFilter
org.springframework.ldap.filter.HardcodedFilter
public class HardcodedFilter
Allows hard coded parts to be included in a search filter. Particularly useful if some filters are specified in configuration files and these should be combined with other ones.
Filter filter = new HardcodedFilter("(&(objectClass=user)(!(objectClass=computer)))");
System.out.println(filter.toString());
would result in:
(&(objectClass=user)(!(objectClass=computer)))
Note 1: If the definition is in XML you will need to properly encode any special characters so that they are valid in an XML file, e.g. "&" needs to be encoded as "&", e.g.
<bean class="MyClass"> <property name="filter" value="(&(objectClass=user)(!(objectClass=computer)))" /> </bean>
Note 2: There will be no validation to ensure that the supplied filter is valid. Using this implementation to build filters from user input is strongly discouraged.
| Constructor Summary | |
|---|---|
HardcodedFilter(String filter)
The hardcoded string to be used for this filter. |
|
| Method Summary | |
|---|---|
StringBuffer |
encode(StringBuffer buff)
Encodes the filter to a StringBuffer. |
boolean |
equals(Object o)
All filters must implement equals. |
int |
hashCode()
All filters must implement hashCode. |
| Methods inherited from class org.springframework.ldap.filter.AbstractFilter |
|---|
encode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HardcodedFilter(String filter)
filter - the hardcoded filter string.| Method Detail |
|---|
public StringBuffer encode(StringBuffer buff)
Filter
encode in interface Filterencode in class AbstractFilterbuff - The StringBuffer to encode the filter to
public boolean equals(Object o)
Filter
equals in interface Filterequals in class Objecttrue if the objects are equal.public int hashCode()
Filter
hashCode in interface FilterhashCode in class ObjectObject.hashCode()
|
Spring LDAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||