org.opends.server.controls
Enum PersistentSearchChangeType

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

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

This enumeration defines the set of possible change types that may be used in conjunction with the persistent search control, as defined in draft-ietf-ldapext-psearch.


Enum Constant Summary
ADD
          The change type that will be used for add operations.
DELETE
          The change type that will be used for delete operations.
MODIFY
          The change type that will be used for modify operations.
MODIFY_DN
          The change type that will be used for modify DN operations.
 
Method Summary
static int changeTypesToInt(java.util.Set<PersistentSearchChangeType> changeTypes)
          Retrieves the integer representation of the provided set of change types.
static java.lang.String changeTypesToString(java.util.Set<PersistentSearchChangeType> changeTypes)
          Retrieves a string representation of the provided set of change types.
static void changeTypesToString(java.util.Set<PersistentSearchChangeType> changeTypes, java.lang.StringBuilder buffer)
          Appends a string representation of the specified set of change types to the provided buffer.
static java.util.Set<PersistentSearchChangeType> intToTypes(int intValue)
          Decodes the provided int value into a set of change types as per the specification in draft-ietf-ldapext-psearch.
 int intValue()
          Retrieves the integer value associated with this change type.
 java.lang.String toString()
          Retrieves a string representation of this persistent search change type.
static PersistentSearchChangeType valueOf(int intValue)
          Retrieves the change type associated with the provided integer value.
static PersistentSearchChangeType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PersistentSearchChangeType[] 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

ADD

public static final PersistentSearchChangeType ADD
The change type that will be used for add operations.


DELETE

public static final PersistentSearchChangeType DELETE
The change type that will be used for delete operations.


MODIFY

public static final PersistentSearchChangeType MODIFY
The change type that will be used for modify operations.


MODIFY_DN

public static final PersistentSearchChangeType MODIFY_DN
The change type that will be used for modify DN operations.

Method Detail

values

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

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

valueOf

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

intValue

public int intValue()
Retrieves the integer value associated with this change type.

Returns:
The integer value associated with this change type.

toString

public java.lang.String toString()
Retrieves a string representation of this persistent search change type.

Overrides:
toString in class java.lang.Enum<PersistentSearchChangeType>
Returns:
A string representation of this persistent search change type, or "unknown" if it has an unknown type.

valueOf

public static PersistentSearchChangeType valueOf(int intValue)
                                          throws LDAPException
Retrieves the change type associated with the provided integer value.

Parameters:
intValue - The integer value to decode as a change type.
Returns:
The change type corresponding to the provided integer value.
Throws:
LDAPException - If the provided integer value is not associated with a valid change type.

intToTypes

public static java.util.Set<PersistentSearchChangeType> intToTypes(int intValue)
                                                            throws LDAPException
Decodes the provided int value into a set of change types as per the specification in draft-ietf-ldapext-psearch.

Parameters:
intValue - The integer value representing the encoded change types.
Returns:
The set of change types decoded from the provided integer value.
Throws:
LDAPException - If the provided integer value does not represent a valid encoded set of change types.

changeTypesToInt

public static int changeTypesToInt(java.util.Set<PersistentSearchChangeType> changeTypes)
Retrieves the integer representation of the provided set of change types.

Parameters:
changeTypes - The set of change types to be encoded.
Returns:
The integer representation of the provided set of change types.

changeTypesToString

public static java.lang.String changeTypesToString(java.util.Set<PersistentSearchChangeType> changeTypes)
Retrieves a string representation of the provided set of change types.

Parameters:
changeTypes - The set of change types to encode.
Returns:
A string representation of the provided set of change types.

changeTypesToString

public static void changeTypesToString(java.util.Set<PersistentSearchChangeType> changeTypes,
                                       java.lang.StringBuilder buffer)
Appends a string representation of the specified set of change types to the provided buffer.

Parameters:
changeTypes - The set of change types to encode.
buffer - The buffer to which the information should be written.