com.cisco.provisioning.cpe.api
Class DeviceID

java.lang.Object
  extended by com.cisco.provisioning.cpe.api.Key
      extended by com.cisco.provisioning.cpe.api.DeviceID
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DeviceOid, DUID, FQDN, MACAddress

public abstract class DeviceID
extends Key

Base abstract class for all the device identifier subclasses

See Also:
Serialized Form

Field Summary
static long serialVersionUID
          Serialization version UID constant for this class
 
Method Summary
 boolean equals(Object obj)
          Determines if this IPDeviceID object is equal to the specified object.
 String getDeviceId()
          Returns the device identifier as String.
static DeviceID getInstance(String deviceID, KeyType keyType)
          Create an instance of the device ID based on the KeyType value
 int hashCode()
          The hash code of this object.
 String toString()
          Returns a string representation of this device identifier.
abstract  boolean validate()
          Validate the id string for correct format.
 
Methods inherited from class com.cisco.provisioning.cpe.api.Key
getKeyType
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Serialization version UID constant for this class

See Also:
Constant Field Values
Method Detail

getInstance

public static DeviceID getInstance(String deviceID,
                                   KeyType keyType)
Create an instance of the device ID based on the KeyType value

Parameters:
deviceID - The string containing the device identifier. If this value is null, the runtime exception APIArgumentException will be thrown.
keyType - The enumaration of the device identifier type. If this value is null, the runtime exception APIArgumentException will be thrown.
Returns:
DeviceID subclass.

equals

public boolean equals(Object obj)
Determines if this IPDeviceID object is equal to the specified object.

Overrides:
equals in class Object
Returns:
true if the specified object is equal to this object. false if the objects are not equal.

getDeviceId

public String getDeviceId()
Returns the device identifier as String.

Returns:
the device identifier String

hashCode

public int hashCode()
The hash code of this object. See Object.hashCode for more information

Overrides:
hashCode in class Object
Returns:
The hashcode of this object

toString

public String toString()
Returns a string representation of this device identifier.

Overrides:
toString in class Object
Returns:
a string representation of this device identifier.

validate

public abstract boolean validate()
Validate the id string for correct format.

Returns:
true if format is valid. false if format is invalid.