org.opends.server.controls
Class MatchedValuesControl

java.lang.Object
  extended by org.opends.server.types.Control
      extended by org.opends.server.controls.MatchedValuesControl

public class MatchedValuesControl
extends Control

This class implements the matched values control as defined in RFC 3876. It may be included in a search request to indicate that only attribute values matching one or more filters contained in the matched values control should be returned to the client.


Constructor Summary
MatchedValuesControl(boolean isCritical, java.util.ArrayList<MatchedValuesFilter> filters)
          Creates a new matched values control using the default OID and the provided criticality and set of filters.
MatchedValuesControl(java.lang.String oid, boolean isCritical, java.util.ArrayList<MatchedValuesFilter> filters)
          Creates a new matched values control using the default OID and the provided criticality and set of filters.
 
Method Summary
static MatchedValuesControl decodeControl(Control control)
          Creates a new matched values control from the contents of the provided control.
 java.util.ArrayList<MatchedValuesFilter> getFilters()
          Retrieves the set of filters associated with this matched values control.
 java.lang.String toString()
          Retrieves a string representation of this authorization identity response control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this authorization identity response control to the provided buffer.
 boolean valueMatches(AttributeType type, AttributeValue value)
          Indicates whether any of the filters associated with this matched values control matches the provided attribute type/value.
 
Methods inherited from class org.opends.server.types.Control
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MatchedValuesControl

public MatchedValuesControl(boolean isCritical,
                            java.util.ArrayList<MatchedValuesFilter> filters)
Creates a new matched values control using the default OID and the provided criticality and set of filters.

Parameters:
isCritical - Indicates whether this control should be considered critical to the operation processing.
filters - The set of filters to use to determine which values to return.

MatchedValuesControl

public MatchedValuesControl(java.lang.String oid,
                            boolean isCritical,
                            java.util.ArrayList<MatchedValuesFilter> filters)
Creates a new matched values control using the default OID and the provided criticality and set of filters.

Parameters:
oid - The OID for this matched values control.
isCritical - Indicates whether this control should be considered critical to the operation processing.
filters - The set of filters to use to determine which values to return.
Method Detail

decodeControl

public static MatchedValuesControl decodeControl(Control control)
                                          throws LDAPException
Creates a new matched values control from the contents of the provided control.

Parameters:
control - The generic control containing the information to use to create this matched values control.
Returns:
The matched values control decoded from the provided control.
Throws:
LDAPException - If this control cannot be decoded as a valid matched values control.

getFilters

public java.util.ArrayList<MatchedValuesFilter> getFilters()
Retrieves the set of filters associated with this matched values control.

Returns:
The set of filters associated with this matched values control.

valueMatches

public boolean valueMatches(AttributeType type,
                            AttributeValue value)
Indicates whether any of the filters associated with this matched values control matches the provided attribute type/value.

Parameters:
type - The attribute type with which the value is associated.
value - The attribute value for which to make the determination.
Returns:
true if at least one of the filters associated with this matched values control does match the provided attribute value, or false if none of the filters match.

toString

public java.lang.String toString()
Retrieves a string representation of this authorization identity response control.

Overrides:
toString in class Control
Returns:
A string representation of this authorization identity response control.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this authorization identity response control to the provided buffer.

Overrides:
toString in class Control
Parameters:
buffer - The buffer to which the information should be appended.