Package com.verisign.epp.codec.registry
Class EPPRegistryKeyValue
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryKeyValue
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryKeyValue extends java.lang.Object implements EPPCodecComponent
Defines one key, value pair used inEPPRegistryCustomData
. The <registry:value> element contains a required "key" attribute for the value in the element. UsegetKey()
andgetKey()
to get and set the key. UsegetValue()
andsetValue(String)
to get and set the value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EPPRegistryKeyValue()
Default constructor.EPPRegistryKeyValue(java.lang.String key, java.lang.String value)
Constructs a new instance with given key and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPRegistryKeyValue
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryKeyValue
attributes from the aElement DOM Element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
Encode a DOM Element tree from the attributes of theEPPRegistryKeyValue
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryKeyValue
compare.java.lang.String
getKey()
Get the key.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getRootName()
Get the root name.java.lang.String
getValue()
Get the valuevoid
setKey(java.lang.String key)
Set the key.void
setValue(java.lang.String value)
Set the valuejava.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML Element Name ofEPPRegistryKeyValue
root element.- See Also:
- Constant Field Values
-
ATTR_KEY
public static final java.lang.String ATTR_KEY
XML attribute name for thekey
attribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryKeyValue
public EPPRegistryKeyValue()
Default constructor. All attributes are set to default values. Must callsetKey(String)
andsetValue(String)
before callingencode(Document)
.
-
EPPRegistryKeyValue
public EPPRegistryKeyValue(java.lang.String key, java.lang.String value)
Constructs a new instance with given key and value.- Parameters:
key
- Attribute keyvalue
- Attribute value
-
-
Method Detail
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPRegistryKeyValue
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryKeyValue
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryKeyValue
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryKeyValue
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryKeyValue
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryKeyValue
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPRegistryKeyValue
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryKeyValue
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRegistryKeyValue
instance to compare with- Returns:
true
if this object is the same as the aObject argument;false
otherwise
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getKey
public java.lang.String getKey()
Get the key.- Returns:
- key
-
setKey
public void setKey(java.lang.String key)
Set the key.- Parameters:
key
- Key to use
-
getValue
public java.lang.String getValue()
Get the value- Returns:
- value
-
setValue
public void setValue(java.lang.String value)
Set the value- Parameters:
value
- Value to use
-
getRootName
public java.lang.String getRootName()
Get the root name.- Returns:
- root name of the xml element. Always return
ELM_NAME
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-