|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cisco.provisioning.cpe.extensions.configuration.TFTPFilename
public final class TFTPFilename
TFTPFilename helper class. This class provides methods to encode and decode compressed TFTP filenames. DHCP-based devices that use TFTP to request their configuration files typically specify the filename in the DHCPConfig "file" field and/or "boot-file" option. If the configuration file is stored within the TFTPConfig object in the ConfigContext it is necessary to include the device identifier, provisioning group, (optionally) the filename identifier in this filename. The DPE TFTP server uses this information to locate the ConfigContext which contains the TFTPConfig TFTPFile object that is sent to a device.
Due to limitations in the filename length and contents supported by devices it is necessary to compress the TFTP filename. This class encapsulates the TFTP filename encoding/decoding algorithm. RDU configuration extensions should use this helper class to create the file/boot-file filenames that they populate into the DHCPConfig. RDU configuration extension authors should take care to use file identifiers that do not exceed the maximum supported filename length for their devices.
DHCPConfig,
TFTPConfig,
TFTPFile| Method Summary | |
|---|---|
static TFTPFilename |
decodeFilename(String encodedFilename)
Decodes an encoded TFTP filename. |
static String |
encodeFilename(com.cisco.provisioning.cpe.api.DeviceID deviceID,
Integer provGroupNumericID)
Create an encoded TFTP filename with the given device ID. |
static String |
encodeFilename(com.cisco.provisioning.cpe.api.DeviceID deviceID,
Integer provGroupNumericID,
String filename)
Create an encoded TFTP filename with the given device ID. |
static String |
encodeOldFilename(com.cisco.provisioning.cpe.api.MACAddress deviceID,
Integer provGroupNumericID)
Create an old format encoded TFTP filename. |
static String |
encodeOldFilename(com.cisco.provisioning.cpe.api.MACAddress deviceID,
Integer provGroupNumericID,
String filename)
Create an old format encoded TFTP filename. |
com.cisco.provisioning.cpe.api.DeviceID |
getDeviceID()
Get the device ID value. |
String |
getEncodedFilename()
Get the encoded filename string. |
String |
getFilename()
Get the file ID |
Integer |
getProvGroupNumericID()
Get the prov group ID |
static boolean |
isDynamicFile(String filename)
Returns true if the given filename is a dynamic encoded filename. |
static boolean |
isPacketCableFile(String filename)
Returns true if the given filename is a PacketCable encoded filename. |
String |
toString()
Return human-readable string containing contents of TFTPFilename. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static boolean isPacketCableFile(String filename)
filename - the encoded filename.
public static boolean isDynamicFile(String filename)
filename - the encoded filename.
public static String encodeFilename(com.cisco.provisioning.cpe.api.DeviceID deviceID,
Integer provGroupNumericID)
deviceID - the device identifer for the TFTPFile.provGroupNumericID - the prov group ID for the device
IllegalArgumentException - if deviceID or
provGroupNumericID is null or invalid
public static String encodeFilename(com.cisco.provisioning.cpe.api.DeviceID deviceID,
Integer provGroupNumericID,
String filename)
deviceID - the device identifer for the TFTPFile.provGroupNumericID - the prov group ID for the devicefilename - the file ID
IllegalArgumentException - if deviceID or provGroupNumericID is
null or invalid
public static String encodeOldFilename(com.cisco.provisioning.cpe.api.MACAddress deviceID,
Integer provGroupNumericID)
deviceID - the device identifer for the TFTPFile. Must be a MAC
address.provGroupNumericID - the prov group ID for the device
IllegalArgumentException - if deviceID or
provGroupNumericID is null or invalid
public static String encodeOldFilename(com.cisco.provisioning.cpe.api.MACAddress deviceID,
Integer provGroupNumericID,
String filename)
deviceID - the device identifer for the TFTPFile. Must be a MAC
address.provGroupNumericID - the prov group ID for the devicefilename - the file ID
IllegalArgumentException - if deviceID or provGroupNumericID is
null or invalidpublic static TFTPFilename decodeFilename(String encodedFilename)
encodedFilename - The encoded file name
IllegalArgumentException - if encodedFilename is null or invalidpublic com.cisco.provisioning.cpe.api.DeviceID getDeviceID()
public Integer getProvGroupNumericID()
public String getFilename()
public String getEncodedFilename()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||