}
else if (attr != null)
{
try
{
LDAPFilter ldapFilter =
new LDAPFilter(SearchFilter.createFilterFromString(
"("+attr+"="+s+")"));
returnValue = ldapFilter.toString();
}
catch (DirectoryException de)
{
// Try this alternative:
AttributeType attrType =
getInfo().getServerDescriptor().getSchema().getAttributeType(
attr.toString().toLowerCase());
LDAPFilter ldapFilter =
new LDAPFilter(SearchFilter.createEqualityFilter(
attrType, AttributeValues.create(attrType, s)));
returnValue = ldapFilter.toString();
}
}
else
{
returnValue = BrowserController.ALL_OBJECTS_FILTER;