|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.RawFilter
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public abstract class RawFilter
This class defines the data structures and methods to use when interacting with a raw search filter, which defines a set of criteria for locating entries in a search request.
Constructor Summary | |
---|---|
RawFilter()
|
Method Summary | |
---|---|
static RawFilter |
create(SearchFilter filter)
Creates a new LDAP filter from the provided search filter. |
static RawFilter |
create(java.lang.String filterString)
Creates a new LDAP filter from the provided filter string. |
static LDAPFilter |
createANDFilter(java.util.ArrayList<RawFilter> filterComponents)
Creates a new AND search filter with the provided filter components. |
static LDAPFilter |
createApproximateFilter(java.lang.String attributeType,
ByteString assertionValue)
Creates a new approximate search filter with the provided information. |
static LDAPFilter |
createEqualityFilter(java.lang.String attributeType,
ByteString assertionValue)
Creates a new equality search filter with the provided information. |
static LDAPFilter |
createExtensibleFilter(java.lang.String matchingRuleID,
java.lang.String attributeType,
ByteString assertionValue,
boolean dnAttributes)
Creates a new extensible matching search filter with the provided information. |
static LDAPFilter |
createGreaterOrEqualFilter(java.lang.String attributeType,
ByteString assertionValue)
Creates a new greater or equal search filter with the provided information. |
static LDAPFilter |
createLessOrEqualFilter(java.lang.String attributeType,
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(java.util.ArrayList<RawFilter> filterComponents)
Creates a new OR search filter with the provided filter components. |
static LDAPFilter |
createPresenceFilter(java.lang.String attributeType)
Creates a new presence search filter with the provided attribute type. |
static LDAPFilter |
createSubstringFilter(java.lang.String attributeType,
ByteString subInitialElement,
java.util.ArrayList<ByteString> subAnyElements,
ByteString subFinalElement)
Creates a new substring search filter with the provided information. |
static LDAPFilter |
decode(ASN1Element element)
Decodes the provided ASN.1 element as a raw search filter. |
ASN1Element |
encode()
Encodes this search filter to an ASN.1 element. |
abstract ByteString |
getAssertionValue()
Retrieves the assertion value for this search filter. |
abstract java.lang.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 java.util.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 java.lang.String |
getMatchingRuleID()
Retrieves the matching rule ID for this extensible match filter. |
abstract RawFilter |
getNOTComponent()
Retrieves the subordinate filter component for NOT searches. |
abstract java.util.ArrayList<ByteString> |
getSubAnyElements()
Retrieves the set of subAny elements for this substring filter. |
abstract ByteString |
getSubFinalElement()
Retrieves the subFinal element for this substring filter. |
abstract ByteString |
getSubInitialElement()
Retrieves the subInitial component for this substring filter. |
abstract void |
setAssertionValue(ByteString assertionValue)
Specifies the assertion value for this search filter. |
abstract void |
setAttributeType(java.lang.String attributeType)
Specifies the attribute type for this search filter. |
abstract void |
setDNAttributes(boolean dnAttributes)
Specifies the value of the DN attributes flag for this extensible match filter. |
abstract void |
setFilterComponents(java.util.ArrayList<RawFilter> filterComponents)
Specifies the set of subordinate filter components for AND or OR searches. |
abstract void |
setMatchingRuleID(java.lang.String matchingRuleID)
Specifies the matching rule ID for this extensible match filter. |
abstract void |
setNOTComponent(RawFilter notComponent)
Specifies the subordinate filter component for NOT searches. |
abstract void |
setSubAnyElements(java.util.ArrayList<ByteString> subAnyElements)
Specifies the set of subAny values for this substring filter. |
abstract void |
setSubFinalElement(ByteString subFinalElement)
Specifies the subFinal element for this substring filter. |
abstract void |
setSubInitialElement(ByteString subInitialElement)
Specifies the subInitial element 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. |
java.lang.String |
toString()
Retrieves a string representation of this search filter. |
abstract void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this search filter to the provided buffer. |
static void |
valueToFilterString(java.lang.StringBuilder buffer,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RawFilter()
Method Detail |
---|
public static RawFilter create(java.lang.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(java.util.ArrayList<RawFilter> filterComponents)
filterComponents
- The filter components for this AND
filter.
public static LDAPFilter createORFilter(java.util.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(java.lang.String attributeType, ByteString assertionValue)
attributeType
- The attribute type for this equality
filter.assertionValue
- The assertion value for this equality
filter.
public static LDAPFilter createSubstringFilter(java.lang.String attributeType, ByteString subInitialElement, java.util.ArrayList<ByteString> subAnyElements, 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(java.lang.String attributeType, 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(java.lang.String attributeType, 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(java.lang.String attributeType)
attributeType
- The attribute type for this presence
filter.
public static LDAPFilter createApproximateFilter(java.lang.String attributeType, ByteString assertionValue)
attributeType
- The attribute type for this approximate
filter.assertionValue
- The assertion value for this approximate
filter.
public static LDAPFilter createExtensibleFilter(java.lang.String matchingRuleID, java.lang.String attributeType, 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 java.util.ArrayList<RawFilter> getFilterComponents()
null
if this is not an AND or OR
search.public abstract void setFilterComponents(java.util.ArrayList<RawFilter> filterComponents)
filterComponents
- The set of subordinate filter
components for AND or OR searches.public abstract RawFilter getNOTComponent()
null
if this is not a NOT search.public abstract void setNOTComponent(RawFilter notComponent)
notComponent
- The subordinate filter component for NOT
searches.public abstract java.lang.String getAttributeType()
null
if there is none.public abstract void setAttributeType(java.lang.String attributeType)
attributeType
- The attribute type for this search filter.public abstract ByteString getAssertionValue()
null
if there is none.public abstract void setAssertionValue(ByteString assertionValue)
assertionValue
- The assertion value for this search
filter.public abstract ByteString getSubInitialElement()
null
if there is none.public abstract void setSubInitialElement(ByteString subInitialElement)
subInitialElement
- The subInitial element for this
substring filter.public abstract java.util.ArrayList<ByteString> getSubAnyElements()
null
or empty for some substring filters.
null
if there are none.public abstract void setSubAnyElements(java.util.ArrayList<ByteString> subAnyElements)
subAnyElements
- The set of subAny elements for this
substring filter.public abstract ByteString getSubFinalElement()
null
if there is none.public abstract void setSubFinalElement(ByteString subFinalElement)
subFinalElement
- The subFinal element for this substring
filter.public abstract java.lang.String getMatchingRuleID()
null
if there is none.public abstract void setMatchingRuleID(java.lang.String matchingRuleID)
matchingRuleID
- The matching rule ID for this extensible
match filter.public abstract boolean getDNAttributes()
public abstract void setDNAttributes(boolean dnAttributes)
dnAttributes
- The value of the DN attributes flag for
this extensible match filter.public final ASN1Element encode()
public static LDAPFilter decode(ASN1Element element) throws LDAPException
element
- The ASN.1 element to decode.
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 java.lang.String toString()
toString
in class java.lang.Object
public abstract void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be
appended.public static void valueToFilterString(java.lang.StringBuilder buffer, 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |