com.cisco.provisioning.cpe.extensions.configuration
Enum CNROptionArgumentType

java.lang.Object
  extended by java.lang.Enum<CNROptionArgumentType>
      extended by com.cisco.provisioning.cpe.extensions.configuration.CNROptionArgumentType
All Implemented Interfaces:
Serializable, Comparable<CNROptionArgumentType>

public enum CNROptionArgumentType
extends Enum<CNROptionArgumentType>

This Enum represents the iType constants in the DEXv2 API. These constants are used in CNROptionArgumentArray instances to specify an specific option.


Enum Constant Summary
END
          Indicates the end of the argument array.
ENTERPRISE_ID
          Indicates the next argument is an enterprise identifier (number).
ENTERPRISE_NAME
          Indicates the next argument is an enterprise name.
HOME
           
INCOUNT
           
INDEX
           
INSTANCE
           
INSTANCE_COUNT
           
MORE
           
MOVE_TO
           
OPTION_NAME
          Indicates the next argument is an option name.
OPTION_NUMBER
          Indicates the next argument is an option number.
PARENT
           
SUBOPTION_NAME
          Indicates the next argument is a sub-option name.
SUBOPTION_NUMBER
          Indicates the next argument is a sub-option number.
VENDOR_NAME
          Indicates the next argument is a vendor name.
 
Field Summary
static int INDEX_APPEND
          Special value for the INDEX type when used in conjunction with the DHCPOper.PUT_OPTION operation.
static int INDEX_AUGMENT
          Special value for the INDEX type when used in conjunction with the DHCPOper.PUT_OPTION operation.
static int INDEX_RAW
          Special value for the INDEX type when used in conjunction with the DHCPOper.PUT_OPTION and the DHCPOper.GET_OPTION operations.
static int INDEX_REMOVE_ALL
          Special value for the INDEX type when used in conjunction with the DHCPOper.REMOVE_OPTION operation.
static int INDEX_REPLACE
          Special value for the INDEX type when used in conjunction with the DHCPOper.PUT_OPTION operation.
 
Method Summary
 int getConstant()
          Returns the DEX constant value of the type.
 boolean isValueRequired()
          Returns true if this type requires a value.
 boolean isValueValid(Object value)
          Returns true if the given object is valid for this type.
 String toStringOptionValue(Object value)
          Return a string containing the CNROptionArgumentType value in human-readable form.
static CNROptionArgumentType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CNROptionArgumentType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OPTION_NAME

public static final CNROptionArgumentType OPTION_NAME
Indicates the next argument is an option name.


OPTION_NUMBER

public static final CNROptionArgumentType OPTION_NUMBER
Indicates the next argument is an option number.


SUBOPTION_NAME

public static final CNROptionArgumentType SUBOPTION_NAME
Indicates the next argument is a sub-option name.


SUBOPTION_NUMBER

public static final CNROptionArgumentType SUBOPTION_NUMBER
Indicates the next argument is a sub-option number.


VENDOR_NAME

public static final CNROptionArgumentType VENDOR_NAME
Indicates the next argument is a vendor name.


ENTERPRISE_NAME

public static final CNROptionArgumentType ENTERPRISE_NAME
Indicates the next argument is an enterprise name.


ENTERPRISE_ID

public static final CNROptionArgumentType ENTERPRISE_ID
Indicates the next argument is an enterprise identifier (number).


INSTANCE

public static final CNROptionArgumentType INSTANCE

INSTANCE_COUNT

public static final CNROptionArgumentType INSTANCE_COUNT

INDEX

public static final CNROptionArgumentType INDEX

MORE

public static final CNROptionArgumentType MORE

MOVE_TO

public static final CNROptionArgumentType MOVE_TO

PARENT

public static final CNROptionArgumentType PARENT

HOME

public static final CNROptionArgumentType HOME

INCOUNT

public static final CNROptionArgumentType INCOUNT

END

public static final CNROptionArgumentType END
Indicates the end of the argument array. No value is required.

Field Detail

INDEX_REMOVE_ALL

public static final int INDEX_REMOVE_ALL
Special value for the INDEX type when used in conjunction with the DHCPOper.REMOVE_OPTION operation.

See Also:
Constant Field Values

INDEX_REPLACE

public static final int INDEX_REPLACE
Special value for the INDEX type when used in conjunction with the DHCPOper.PUT_OPTION operation.

See Also:
Constant Field Values

INDEX_APPEND

public static final int INDEX_APPEND
Special value for the INDEX type when used in conjunction with the DHCPOper.PUT_OPTION operation.

See Also:
Constant Field Values

INDEX_AUGMENT

public static final int INDEX_AUGMENT
Special value for the INDEX type when used in conjunction with the DHCPOper.PUT_OPTION operation.

See Also:
Constant Field Values

INDEX_RAW

public static final int INDEX_RAW
Special value for the INDEX type when used in conjunction with the DHCPOper.PUT_OPTION and the DHCPOper.GET_OPTION operations.

See Also:
Constant Field Values
Method Detail

values

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

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

valueOf

public static CNROptionArgumentType 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 name
NullPointerException - if the argument is null

isValueRequired

public boolean isValueRequired()
Returns true if this type requires a value. Otherwise returns false.

Returns:
true if this type requires a value. Otherwise returns false.

getConstant

public int getConstant()
Returns the DEX constant value of the type.

Returns:
the DEX constant value of the type.

isValueValid

public boolean isValueValid(Object value)
Returns true if the given object is valid for this type. Otherwise returns false.

Returns:
true if the given object is valid for this type. Otherwise returns false.

toStringOptionValue

public String toStringOptionValue(Object value)
Return a string containing the CNROptionArgumentType value in human-readable form. This is used for logging and tracing where a human-readable form of the option value is more desirable.

Returns:
String containing human-readable option value