|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.ldap.LDAPFilter
public class LDAPFilter
Utility class to generate LDAP filters in more or less the same way as prepared statements.
The class will make it possible to specificy LDAP filters as follows:
(&((objectclass=?)(uid=?)))Set the filter parameters using the
setParameter
method and
obtain the end result using the getFilterString
method.
Constructor Summary | |
---|---|
LDAPFilter(java.lang.String filterTemplate)
Construct a new filter with the given filter template. |
Method Summary | |
---|---|
java.lang.String |
getFilterString()
Return the fitler based on the template and parameters. |
static java.lang.String |
getFilterString(java.lang.String filterTemplate,
java.lang.String[] params)
Convenience method to do everything in one go. |
void |
setParameter(int index,
java.lang.String value)
Set the value of the parameter at the given position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDAPFilter(java.lang.String filterTemplate)
filterTemplate
- String containing the filter template.Method Detail |
---|
public void setParameter(int index, java.lang.String value)
index
- int indicating the index of the parameter.value
- String containing the value of the parameter.public java.lang.String getFilterString()
public static java.lang.String getFilterString(java.lang.String filterTemplate, java.lang.String[] params)
filterTemplate
- String containing filter template.params
- String array containing parameter values.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |