Package org.opends.server.controls
Class MatchedValuesControl
- java.lang.Object
-
- org.opends.server.types.Control
-
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description static ControlDecoder<MatchedValuesControl>DECODERThe Control Decoder that can be used to decode this control.
-
Constructor Summary
Constructors Constructor Description MatchedValuesControl(boolean isCritical, List<MatchedValuesFilter> filters)Creates a new matched values control using the default OID and the provided criticality and set of filters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<MatchedValuesFilter>getFilters()Retrieves the set of filters associated with this matched values control.voidtoString(StringBuilder buffer)Appends a string representation of this control to the provided buffer.booleanvalueMatches(AttributeType type, ByteString value)Indicates whether any of the filters associated with this matched values control matches the provided attribute type/value.voidwriteValue(ASN1Writer writer)Writes this control's value to an ASN.1 writer.-
Methods inherited from class org.opends.server.types.Control
getOID, isCritical, toString, write
-
-
-
-
Field Detail
-
DECODER
public static final ControlDecoder<MatchedValuesControl> DECODER
The Control Decoder that can be used to decode this control.
-
-
Constructor Detail
-
MatchedValuesControl
public MatchedValuesControl(boolean isCritical, List<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.
-
-
Method Detail
-
writeValue
public void writeValue(ASN1Writer writer) throws IOException
Description copied from class:ControlWrites this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.- Specified by:
writeValuein classControl- Parameters:
writer- The ASN.1 writer to use.- Throws:
IOException- If a problem occurs while writing to the stream.
-
getFilters
public List<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, ByteString 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:
trueif at least one of the filters associated with this matched values control does match the provided attribute value, orfalseif none of the filters match.
-
toString
public void toString(StringBuilder buffer)
Description copied from class:ControlAppends a string representation of this control to the provided buffer.
-
-