Class PatternRDN
- java.lang.Object
-
- org.opends.server.authorization.dseecompat.PatternRDN
-
public class PatternRDN extends Object
This class is used to match RDN patterns containing wildcards in either the attribute types or the attribute values. Substring matching on the attribute types is not supported.
-
-
Constructor Summary
Constructors Constructor Description PatternRDN(String type, List<ByteString> valuePattern, String dnString)Create a new RDN pattern composed of a single attribute-value pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddValue(String type, List<ByteString> valuePattern, String dnString)Add another attribute-value pair to the pattern.intgetNumValues()Retrieves the number of attribute-value pairs contained in this RDN pattern.booleanmatchesRDN(RDN rdn)Determine whether a given RDN matches the pattern.StringtoString()
-
-
-
Constructor Detail
-
PatternRDN
public PatternRDN(String type, List<ByteString> valuePattern, String dnString) throws DirectoryException
Create a new RDN pattern composed of a single attribute-value pair.- Parameters:
type- The attribute type pattern.valuePattern- The attribute value pattern.dnString- The DN pattern containing the attribute-value pair.- Throws:
DirectoryException- If the attribute-value pair is not valid.
-
-
Method Detail
-
addValue
public boolean addValue(String type, List<ByteString> valuePattern, String dnString) throws DirectoryException
Add another attribute-value pair to the pattern.- Parameters:
type- The attribute type pattern.valuePattern- The attribute value pattern.dnString- The DN pattern containing the attribute-value pair.- Returns:
trueif the type-value pair was added to this RDN, orfalseif it was not (e.g., it was already present).- Throws:
DirectoryException- If the attribute-value pair is not valid.
-
getNumValues
public int getNumValues()
Retrieves the number of attribute-value pairs contained in this RDN pattern.- Returns:
- The number of attribute-value pairs contained in this RDN pattern.
-
matchesRDN
public boolean matchesRDN(RDN rdn)
Determine whether a given RDN matches the pattern.- Parameters:
rdn- The RDN to be matched.- Returns:
- true if the RDN matches the pattern.
-
-