@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public abstract class RawFilter extends Object
Constructor and Description |
---|
RawFilter() |
Modifier and Type | Method and Description |
---|---|
static RawFilter |
create(SearchFilter filter)
Creates a new LDAP filter from the provided search filter.
|
static RawFilter |
create(String filterString)
Creates a new LDAP filter from the provided filter string.
|
static LDAPFilter |
createANDFilter(ArrayList<RawFilter> filterComponents)
Creates a new AND search filter with the provided filter
components.
|
static LDAPFilter |
createApproximateFilter(String attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new approximate search filter with the provided
information.
|
static LDAPFilter |
createEqualityFilter(String attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new equality search filter with the provided
information.
|
static LDAPFilter |
createExtensibleFilter(String matchingRuleID,
String attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue,
boolean dnAttributes)
Creates a new extensible matching search filter with the provided
information.
|
static LDAPFilter |
createGreaterOrEqualFilter(String attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new greater or equal search filter with the provided
information.
|
static LDAPFilter |
createLessOrEqualFilter(String attributeType,
org.forgerock.opendj.ldap.ByteString assertionValue)
Creates a new less or equal search filter with the provided
information.
|
static LDAPFilter |
createNOTFilter(RawFilter notComponent)
Creates a new NOT search filter with the provided filter
component.
|
static LDAPFilter |
createORFilter(ArrayList<RawFilter> filterComponents)
Creates a new OR search filter with the provided filter
components.
|
static LDAPFilter |
createPresenceFilter(String attributeType)
Creates a new presence search filter with the provided attribute
type.
|
static LDAPFilter |
createSubstringFilter(String attributeType,
org.forgerock.opendj.ldap.ByteString subInitialElement,
ArrayList<org.forgerock.opendj.ldap.ByteString> subAnyElements,
org.forgerock.opendj.ldap.ByteString subFinalElement)
Creates a new substring search filter with the provided
information.
|
static LDAPFilter |
decode(org.forgerock.opendj.io.Asn1Reader reader)
Decodes the elements from the provided ASN.1 reader as a
raw search filter.
|
abstract org.forgerock.opendj.ldap.ByteString |
getAssertionValue()
Retrieves the assertion value for this search filter.
|
abstract String |
getAttributeType()
Retrieves the attribute type for this search filter.
|
abstract boolean |
getDNAttributes()
Retrieves the value of the DN attributes flag for this extensible
match filter, which indicates whether to perform matching on the
components of the DN.
|
abstract ArrayList<RawFilter> |
getFilterComponents()
Retrieves the set of subordinate filter components for AND or OR
searches.
|
abstract FilterType |
getFilterType()
Retrieves the filter type for this search filter.
|
abstract String |
getMatchingRuleID()
Retrieves the matching rule ID for this extensible match filter.
|
abstract RawFilter |
getNOTComponent()
Retrieves the subordinate filter component for NOT searches.
|
abstract ArrayList<org.forgerock.opendj.ldap.ByteString> |
getSubAnyElements()
Retrieves the set of subAny elements for this substring filter.
|
abstract org.forgerock.opendj.ldap.ByteString |
getSubFinalElement()
Retrieves the subFinal element for this substring filter.
|
abstract org.forgerock.opendj.ldap.ByteString |
getSubInitialElement()
Retrieves the subInitial component for this substring filter.
|
abstract SearchFilter |
toSearchFilter()
Converts this raw filter to a search filter that may be used by
the Directory Server's core processing.
|
String |
toString()
Retrieves a string representation of this search filter.
|
abstract void |
toString(StringBuilder buffer)
Appends a string representation of this search filter to the
provided buffer.
|
static void |
valueToFilterString(StringBuilder buffer,
org.forgerock.opendj.ldap.ByteString value)
Appends a properly-cleaned version of the provided value to the
given buffer so that it can be safely used in string
representations of this search filter.
|
void |
write(org.forgerock.opendj.io.Asn1Writer stream)
Writes this protocol op to an ASN.1 output stream.
|
public RawFilter()
public static RawFilter create(String filterString) throws LDAPException
filterString
- The filter string to use to create this raw
filter.LDAPException
- If the provied filter string could not be
decoded as a raw filter.public static RawFilter create(SearchFilter filter)
filter
- The search filter to use to create this raw
filter.public static LDAPFilter createANDFilter(ArrayList<RawFilter> filterComponents)
filterComponents
- The filter components for this AND
filter.public static LDAPFilter createORFilter(ArrayList<RawFilter> filterComponents)
filterComponents
- The filter components for this OR
filter.public static LDAPFilter createNOTFilter(RawFilter notComponent)
notComponent
- The filter component for this NOT filter.public static LDAPFilter createEqualityFilter(String attributeType, org.forgerock.opendj.ldap.ByteString assertionValue)
attributeType
- The attribute type for this equality
filter.assertionValue
- The assertion value for this equality
filter.public static LDAPFilter createSubstringFilter(String attributeType, org.forgerock.opendj.ldap.ByteString subInitialElement, ArrayList<org.forgerock.opendj.ldap.ByteString> subAnyElements, org.forgerock.opendj.ldap.ByteString subFinalElement)
attributeType
- The attribute type for this substring
filter.subInitialElement
- The subInitial element for this
substring filter.subAnyElements
- The subAny elements for this substring
filter.subFinalElement
- The subFinal element for this
substring filter.public static LDAPFilter createGreaterOrEqualFilter(String attributeType, org.forgerock.opendj.ldap.ByteString assertionValue)
attributeType
- The attribute type for this greater or
equal filter.assertionValue
- The assertion value for this greater or
equal filter.public static LDAPFilter createLessOrEqualFilter(String attributeType, org.forgerock.opendj.ldap.ByteString assertionValue)
attributeType
- The attribute type for this less or equal
filter.assertionValue
- The assertion value for this less or
equal filter.public static LDAPFilter createPresenceFilter(String attributeType)
attributeType
- The attribute type for this presence
filter.public static LDAPFilter createApproximateFilter(String attributeType, org.forgerock.opendj.ldap.ByteString assertionValue)
attributeType
- The attribute type for this approximate
filter.assertionValue
- The assertion value for this approximate
filter.public static LDAPFilter createExtensibleFilter(String matchingRuleID, String attributeType, org.forgerock.opendj.ldap.ByteString assertionValue, boolean dnAttributes)
matchingRuleID
- The matching rule ID for this extensible
filter.attributeType
- The attribute type for this extensible
filter.assertionValue
- The assertion value for this extensible
filter.dnAttributes
- The dnAttributes flag for this extensible
filter.public abstract FilterType getFilterType()
public abstract ArrayList<RawFilter> getFilterComponents()
null
if this is not an AND or OR
search.public abstract RawFilter getNOTComponent()
null
if this is not a NOT search.public abstract String getAttributeType()
null
if there is none.public abstract org.forgerock.opendj.ldap.ByteString getAssertionValue()
null
if there is none.public abstract org.forgerock.opendj.ldap.ByteString getSubInitialElement()
null
if there is none.public abstract ArrayList<org.forgerock.opendj.ldap.ByteString> getSubAnyElements()
null
or empty for some substring filters.null
if there are none.public abstract org.forgerock.opendj.ldap.ByteString getSubFinalElement()
null
if there is none.public abstract String getMatchingRuleID()
null
if there is none.public abstract boolean getDNAttributes()
public void write(org.forgerock.opendj.io.Asn1Writer stream) throws IOException
stream
- The ASN.1 output stream to write to.IOException
- If a problem occurs while writing to the
stream.public static LDAPFilter decode(org.forgerock.opendj.io.Asn1Reader reader) throws LDAPException
reader
- The ASN.1 reader.LDAPException
- If the provided ASN.1 element cannot be
decoded as a raw search filter.public abstract SearchFilter toSearchFilter() throws DirectoryException
DirectoryException
- If a problem occurs while attempting
to construct the search filter.public abstract void toString(StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.public static void valueToFilterString(StringBuilder buffer, org.forgerock.opendj.ldap.ByteString value)
buffer
- The buffer to which the "safe" version of the
value will be appended.value
- The value to be appended to the buffer.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.