org.opends.server.authorization.dseecompat
Enum EnumUserDNType

java.lang.Object
  extended by java.lang.Enum<EnumUserDNType>
      extended by org.opends.server.authorization.dseecompat.EnumUserDNType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<EnumUserDNType>

public enum EnumUserDNType
extends java.lang.Enum<EnumUserDNType>

Enumeration that represents the type an "userdn" keyword DN can have. The issues is the syntax allows invalid URLs such as "ldap:///anyone" and "ldap:///self". The strategy is to use this class to hold the type and another class UserDNTypeURL to hold both this type and URL. If the URL is an invalid URL, then a dummy URL is saved. For types such as URL, DN and DNPATTERN, the actual URL is saved and can be retrieved by the UserDN.evaluate() method when needed. The dummy URL is ignored in the UserDN.evaluate() method for types such as: ALL, PARENT, SELF and ANYONE.


Enum Constant Summary
ALL
          The enumeration type when the "userdn" URL has the value of: "ldap:///all".
ANYONE
          The enumeration type when the "userdn" URL has the value of: "ldap:///anyone".
DN
          The enumeration type when the "userdn" URL contains only a DN (no filter or scope) and that DN has no pattern.
DNPATTERN
          The enumeration type when the "userdn" URL contains only a DN (no filter or scope) and that DN has a substring pattern.
PARENT
          The enumeration type when the "userdn" URL has the value of: "ldap:///parent".
SELF
          The enumeration type when the "userdn" URL has the value of: "ldap:///self".
URL
          The enumeration type when the "userdn" URL is contains a DN (suffix), a scope and a filter.
 
Method Summary
static EnumUserDNType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static EnumUserDNType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DN

public static final EnumUserDNType DN
The enumeration type when the "userdn" URL contains only a DN (no filter or scope) and that DN has no pattern.


DNPATTERN

public static final EnumUserDNType DNPATTERN
The enumeration type when the "userdn" URL contains only a DN (no filter or scope) and that DN has a substring pattern.


ALL

public static final EnumUserDNType ALL
The enumeration type when the "userdn" URL has the value of: "ldap:///all".


PARENT

public static final EnumUserDNType PARENT
The enumeration type when the "userdn" URL has the value of: "ldap:///parent".


SELF

public static final EnumUserDNType SELF
The enumeration type when the "userdn" URL has the value of: "ldap:///self".


ANYONE

public static final EnumUserDNType ANYONE
The enumeration type when the "userdn" URL has the value of: "ldap:///anyone".


URL

public static final EnumUserDNType URL
The enumeration type when the "userdn" URL is contains a DN (suffix), a scope and a filter.

Method Detail

values

public static EnumUserDNType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EnumUserDNType c : EnumUserDNType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EnumUserDNType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null