public class SearchFilter
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchFilter.LogicalOp
Logical operator joining multiple SearchFilter objects
|
static class |
SearchFilter.Operator
Compare operator type in the simple search filter
|
Constructor and Description |
---|
SearchFilter(SearchFilter.LogicalOp op, SearchFilter... searchFilters)
Complex SearchFilter
|
SearchFilter(java.lang.String propertyName, SearchFilter.Operator op, java.lang.String propertyVal)
Simple SearchFilter
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLdapFilter()
Converts the SearchFilter object to LDAP filter
|
SearchFilter.LogicalOp |
getLogicalOperator()
Returns the logical operator in complex SearchFilter
|
SearchFilter.Operator |
getOperator()
Returns the compare operator
|
java.lang.String |
getPropertyName()
Returns the name of the property in simple SearchFilter
|
java.lang.String |
getPropertyVal()
Returns the property value in simple SearchFilter
|
static SearchFilter |
getSearchFilter(java.lang.String ldapFilter, java.lang.Object... args)
Converts LDAP filter string to SearchFilter object
|
java.util.List<SearchFilter> |
getSubFilters()
Returns the list of subfilters in complex SearchFilter
|
boolean |
isNegated()
Returns the current NOT state of SearchFilter
|
boolean |
isSimpleFilter()
Test if this is simple SearchFilter
|
void |
negate()
Toggles the NOT state of the filter
|
java.lang.String |
toString()
Converts the SearchFilter object to string
|
public SearchFilter(java.lang.String propertyName, SearchFilter.Operator op, java.lang.String propertyVal)
propertyName
- Name of the propertyop
- Compare operatorpropertyVal
- Property value. In case of LDAP, * is the wildcard char, so when a value contains "*", that needs to be escaped to \2a in the search filter. If propertyVal contains char "*" and that is not a wildcard char, then it must be escaped to \2a by the caller.public SearchFilter(SearchFilter.LogicalOp op, SearchFilter... searchFilters)
op
- Logical operator joining multiple SearchFilter objectssearchFilters
- Array of SearchFilter objectspublic void negate()
public boolean isNegated()
public SearchFilter.Operator getOperator()
public java.lang.String getPropertyName()
public java.lang.String getPropertyVal()
public SearchFilter.LogicalOp getLogicalOperator()
public java.util.List<SearchFilter> getSubFilters()
public boolean isSimpleFilter()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getLdapFilter()
public static SearchFilter getSearchFilter(java.lang.String ldapFilter, java.lang.Object... args) throws IDSException
ldapFilter
- LDAP filter stringargs
- Array of values for the positional parameters to be substituted with in ldap filter stringIDSException