org.opends.server.authorization.dseecompat
Class PatternDN

java.lang.Object
  extended by org.opends.server.authorization.dseecompat.PatternDN

public class PatternDN
extends java.lang.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
static PatternDN decode(java.lang.String dnString)
          Create a new DN pattern matcher from a pattern string.
static PatternDN decodeSuffix(java.lang.String pattern)
          Create a new DN pattern matcher to match a suffix.
 boolean matchesDN(DN dn)
          Determine whether a given DN matches this pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(java.lang.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(java.lang.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.