Package org.opends.server.controls
Enum PersistentSearchChangeType
- java.lang.Object
-
- java.lang.Enum<PersistentSearchChangeType>
-
- org.opends.server.controls.PersistentSearchChangeType
-
- All Implemented Interfaces:
Serializable,Comparable<PersistentSearchChangeType>
public enum PersistentSearchChangeType extends 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.It is a different type from
ChangeOperationTypeto enforce type safety, despite mirroring it completely.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADDThe change type that will be used for add operations.DELETEThe change type that will be used for delete operations.MODIFYThe change type that will be used for modify operations.MODIFY_DNThe change type that will be used for modify DN operations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intchangeTypesToInt(Set<PersistentSearchChangeType> changeTypes)Retrieves the integer representation of the provided set of change types.static StringchangeTypesToString(Set<PersistentSearchChangeType> changeTypes)Retrieves a string representation of the provided set of change types.static voidchangeTypesToString(Set<PersistentSearchChangeType> changeTypes, StringBuilder buffer)Appends a string representation of the specified set of change types to the provided buffer.static 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.intintValue()Retrieves the integer value associated with this change type.StringtoString()Retrieves a string representation of this persistent search change type.static PersistentSearchChangeTypevalueOf(int intValue)Retrieves the change type associated with the provided integer value.static PersistentSearchChangeTypevalueOf(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.
-
-
-
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(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- 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 String toString()
Retrieves a string representation of this persistent search change type.- Overrides:
toStringin classEnum<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 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(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 String changeTypesToString(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(Set<PersistentSearchChangeType> changeTypes, 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.
-
-