com.cisco.provisioning.cpe.extensions.configuration
Interface DOCSISOptionFactory


public interface DOCSISOptionFactory

The DOCSISOptionFactory is a respository of option description instances and a factory for OptionValue creation. The DOCSISOptionFactory provides methods for creating option values backed by option descriptions or custom option descriptions (of a specific pre-defined syntax). The option description database can be queried via the getOptionDesc() method. Option values (either well-defined backed by option description validation or custom) can be created using the various createOptionValue() methods.

See Also:
OptionDesc, OptionValue

Method Summary
 OptionValue createOptionValue(OptionSyntax syntax, String optionNumStr)
          Create custom compound option value.
 OptionValue createOptionValue(OptionSyntax syntax, String optionNumStr, byte[] optionValueBytes)
          Create custom option value.
 OptionValue createOptionValue(OptionSyntax syntax, String optionNumStr, String optionValueStr)
          Create custom option value.
 OptionValue createOptionValue(OptionSyntax syntax, String optionNumStr, String[] optionValueList)
          Create custom option value.
 OptionValue createOptionValue(String optionNumStr)
          Create compound option value, or option value that has only type and no value.
 OptionValue createOptionValue(String optionNumStr, byte[] optionValueBytes)
          Create option value.
 OptionValue createOptionValue(String optionNumStr, String optionValueStr)
          Create option value.
 OptionValue createOptionValue(String optionNumStr, String[] optionValueList)
          Create option value.
 OptionValue createVendorSpecificOptionValue(String oui, String optionNumStr)
          Create compound option value, or option value that has only type and no value.
 OptionValue createVendorSpecificOptionValue(String oui, String optionNumStr, byte[] optionValueBytes)
          Create option value.
 OptionValue createVendorSpecificOptionValue(String oui, String optionNumStr, String optionValueStr)
          Create option value.
 OptionValue createVendorSpecificOptionValue(String oui, String optionNumStr, String[] optionValueList)
          Create option value.
 OptionDesc getOptionDesc(String optionNumStr, String oui)
          Query the in-memory database of option description instances.
 

Method Detail

getOptionDesc

OptionDesc getOptionDesc(String optionNumStr,
                         String oui)
Query the in-memory database of option description instances.

Parameters:
optionNumStr - fully qualified option number (e.g., "43", "43.8")
Returns:
option description instance or null if option not found

createOptionValue

OptionValue createOptionValue(String optionNumStr)
                              throws InvalidTLVException
Create compound option value, or option value that has only type and no value. The option number must be present in the option description database. If the option number is found in the option description database and it is not a compound option then an exception is generated. If the option number is NOT found in the option database then an exception is generated. Use the add() method of OptionValue() to build the hiearchy of sub-options. The option number must be a top level option (whole integer number). Options that have no length/value are supported (e.g., DOCSIS 1.X option "255").

Parameters:
optionNumStr - option number (e.g., "43")
Throws:
- name>
InvalidTLVException

createVendorSpecificOptionValue

OptionValue createVendorSpecificOptionValue(String oui,
                                            String optionNumStr)
                                            throws InvalidTLVException
Create compound option value, or option value that has only type and no value. The option number must be present in the option description database. If the option number is found in the option description database and it is not a compound option then an exception is generated. If the option number is NOT found in the option database then an exception is generated. Use the add() method of OptionValue() to build the hiearchy of sub-options. The option number must be a top level option (whole integer number). Options that have no length/value are supported (e.g., DOCSIS 1.X option "255").

Parameters:
optionNumStr - option number (e.g., "43")
Throws:
- name>
InvalidTLVException

createOptionValue

OptionValue createOptionValue(String optionNumStr,
                              String optionValueStr)
                              throws InvalidTLVException
Create option value. The option number must be present in the option description database. The option value must meet the value constraints enforced by the option description defn (data type, range validation, etc). Compound option numbers are not allowed (i.e., options that have sub-options).

Parameters:
optionNumStr - fully qualified option number (e.g., "3", "43.8")
optionValueStr - the option value specified as a string
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException

createVendorSpecificOptionValue

OptionValue createVendorSpecificOptionValue(String oui,
                                            String optionNumStr,
                                            String optionValueStr)
                                            throws InvalidTLVException
Create option value. The option number must be present in the option description database. The option value must meet the value constraints enforced by the option description defn (data type, range validation, etc). Compound option numbers are not allowed (i.e., options that have sub-options).

Parameters:
optionNumStr - fully qualified option number (e.g., "3", "43.8")
optionValueStr - the option value specified as a string
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException

createOptionValue

OptionValue createOptionValue(String optionNumStr,
                              String[] optionValueList)
                              throws InvalidTLVException
Create option value. The option number must be present in the option description database. The option value must meet the value constraints enforced by the option description defn (data type, range validation, etc). Use this method when the option value consists of multiple values (e.g., SNMP option: OID, Type, Value). Compound option numbers are not allowed (i.e., options that have sub-options).

Parameters:
optionNumStr - fully qualified option number (e.g., "3", "43.8")
optionValueList - the option value specified as a string array
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException

createVendorSpecificOptionValue

OptionValue createVendorSpecificOptionValue(String oui,
                                            String optionNumStr,
                                            String[] optionValueList)
                                            throws InvalidTLVException
Create option value. The option number must be present in the option description database. The option value must meet the value constraints enforced by the option description defn (data type, range validation, etc). Use this method when the option value consists of multiple values (e.g., SNMP option: OID, Type, Value). Compound option numbers are not allowed (i.e., options that have sub-options).

Parameters:
optionNumStr - fully qualified option number (e.g., "3", "43.8")
optionValueList - the option value specified as a string array
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException

createOptionValue

OptionValue createOptionValue(String optionNumStr,
                              byte[] optionValueBytes)
                              throws InvalidTLVException
Create option value. The option number must be present in the option description database. The option value must meet the value constraints enforced by the option description defn (data type, range validation, etc). Use this method when the "value" portion of the OptionValue TLV has been pre-encoded. Compound option numbers are not allowed (i.e., options that have sub-options).

Parameters:
optionNumStr - fully qualified option number (e.g., "3", "43.8")
optionValueBytes - the option value specified as a pre-encoded value
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException

createVendorSpecificOptionValue

OptionValue createVendorSpecificOptionValue(String oui,
                                            String optionNumStr,
                                            byte[] optionValueBytes)
                                            throws InvalidTLVException
Create option value. The option number must be present in the option description database. The option value must meet the value constraints enforced by the option description defn (data type, range validation, etc). Use this method when the "value" portion of the OptionValue TLV has been pre-encoded. Compound option numbers are not allowed (i.e., options that have sub-options).

Parameters:
optionNumStr - fully qualified option number (e.g., "3", "43.8")
optionValueBytes - the option value specified as a pre-encoded value
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException

createOptionValue

OptionValue createOptionValue(OptionSyntax syntax,
                              String optionNumStr)
Create custom compound option value. It is assumed the option corresponds to a custom option that has sub-options. Use the add() method of OptionValue() to build the hiearchy of sub-options. The option number must be a top level option (whole integer number).

Parameters:
optionNumStr - option number (e.g., "43")
syntax - custom option syntax type (assumed to be COMPOUND)
Throws:
- name>

createOptionValue

OptionValue createOptionValue(OptionSyntax syntax,
                              String optionNumStr,
                              String optionValueStr)
                              throws InvalidTLVException
Create custom option value. The option value must meet the value constraints enforced by the option syntax specified.

Parameters:
syntax - custom option syntax type (e.g., HEX, IPADDRESS, etc)
optionNumStr - fully qualified option number (e.g., "43", "43.8")
optionValueStr - the option value specified as a string
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException

createOptionValue

OptionValue createOptionValue(OptionSyntax syntax,
                              String optionNumStr,
                              String[] optionValueList)
                              throws InvalidTLVException
Create custom option value. The option value must meet the value constraints enforced by the option syntax specified.

Parameters:
syntax - custom option syntax type (e.g., SNMP)
optionNumStr - fully qualified option number (e.g., "43", "43.8")
optionValueList - the option value specified as a string array
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException

createOptionValue

OptionValue createOptionValue(OptionSyntax syntax,
                              String optionNumStr,
                              byte[] optionValueBytes)
                              throws InvalidTLVException
Create custom option value. The option value must meet the value constraints enforced by the option syntax specified. Use this method when the "value" portion of the OptionValue TLV has been pre-encoded.

Parameters:
syntax - custom option syntax type (e.g., HEX, IPADDRESS, etc)
optionNumStr - fully qualified option number (e.g., "43", "43.8")
optionValueBytes - the option value specified as a pre-encoded value
Returns:
OptionValue instance
Throws:
- name>
InvalidTLVException