Class PatternDN
- java.lang.Object
-
- org.opends.server.authorization.dseecompat.PatternDN
-
public class PatternDN extends Object
This class is used to encapsulate DN pattern matching using wildcards. The following wildcard uses are supported. Value substring: Any number of wildcards may appear in RDN attribute values where they match zero or more characters, just like substring filters: uid=b*jensen* Whole-Type: A single wildcard may also be used to match any RDN attribute type, and the wildcard in this case may be omitted as a shorthand: *=bjensen bjensen Whole-RDN. A single wildcard may be used to match exactly one RDN component (which may be single or multi-valued): *,dc=example,dc=com Multiple-Whole-RDN: A double wildcard may be used to match one or more RDN components: uid=bjensen,**,dc=example,dc=com
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PatternDNdecode(String dnString)Create a new DN pattern matcher from a pattern string.static PatternDNdecodeSuffix(String pattern)Create a new DN pattern matcher to match a suffix.booleanmatchesDN(DN dn)Determine whether a given DN matches this pattern.StringtoString()
-
-
-
Method Detail
-
matchesDN
public boolean matchesDN(DN dn)
Determine whether a given DN matches this pattern.- Parameters:
dn- The DN to be matched.- Returns:
- true if the DN matches the pattern.
-
decodeSuffix
public static PatternDN decodeSuffix(String pattern) throws DirectoryException
Create a new DN pattern matcher to match a suffix.- Parameters:
pattern- The suffix pattern string.- Returns:
- A new DN pattern matcher.
- Throws:
DirectoryException- If the pattern string is not valid.
-
decode
public static PatternDN decode(String dnString) throws DirectoryException
Create a new DN pattern matcher from a pattern string.- Parameters:
dnString- The DN pattern string.- Returns:
- A new DN pattern matcher.
- Throws:
DirectoryException- If the pattern string is not valid.
-
-