org.opends.server.types
Enum AcceptRejectWarn

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

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=true)
public enum AcceptRejectWarn
extends java.lang.Enum<AcceptRejectWarn>

This class implements an enumeration that may be used for configuration items that may have three possible values: accept, reject, or warn.


Enum Constant Summary
ACCEPT
          Indicates that elements meeting the associated criteria should be accepted.
REJECT
          Indicates that elements meeting the associated criteria should be rejected.
WARN
          Indicates that a warning should be logged if an element meets the associated criteria.
 
Method Summary
static AcceptRejectWarn policyForName(java.lang.String policyName)
          Retrieves the accept/reject/warn policy for the specified name.
 java.lang.String toString()
          Retrieves the human-readable name for this accept/reject/warn policy.
static AcceptRejectWarn valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static AcceptRejectWarn[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ACCEPT

public static final AcceptRejectWarn ACCEPT
Indicates that elements meeting the associated criteria should be accepted.


REJECT

public static final AcceptRejectWarn REJECT
Indicates that elements meeting the associated criteria should be rejected.


WARN

public static final AcceptRejectWarn WARN
Indicates that a warning should be logged if an element meets the associated criteria. Whether it will be accepted or rejected after the log warning is dependent on the scenario in which this enumeration is used.

Method Detail

values

public static AcceptRejectWarn[] 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 (AcceptRejectWarn c : AcceptRejectWarn.values())
    System.out.println(c);

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

valueOf

public static AcceptRejectWarn 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

policyForName

public static AcceptRejectWarn policyForName(java.lang.String policyName)
Retrieves the accept/reject/warn policy for the specified name.

Parameters:
policyName - The name of the policy to retrieve.
Returns:
The requested accept/reject/warn policy, or null if the provided value is not the name of a valid policy.

toString

public java.lang.String toString()
Retrieves the human-readable name for this accept/reject/warn policy.

Overrides:
toString in class java.lang.Enum<AcceptRejectWarn>
Returns:
The human-readable name for this accept/reject/warn policy.