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.Objectclone()CloneEPPRegistryKeyValue.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryKeyValueattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryKeyValueinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryKeyValuecompare.java.lang.StringgetKey()Get the key.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.StringgetRootName()Get the root name.java.lang.StringgetValue()Get the valuevoidsetKey(java.lang.String key)Set the key.voidsetValue(java.lang.String value)Set the valuejava.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML Element Name ofEPPRegistryKeyValueroot element.- See Also:
- Constant Field Values
-
ATTR_KEY
public static final java.lang.String ATTR_KEY
XML attribute name for thekeyattribute.- 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 EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPRegistryKeyValueinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryKeyValueinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryKeyValueinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPRegistryKeyValueattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPRegistryKeyValuefrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryKeyValue.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein 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 deepEPPRegistryKeyValuecompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPRegistryKeyValueinstance to compare with- Returns:
trueif this object is the same as the aObject argument;falseotherwise
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
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:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-