Class EPPValidateKeyValue
- java.lang.Object
-
- com.verisign.epp.codec.validate.v02.EPPValidateKeyValue
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPValidateKeyValue extends java.lang.Object implements EPPCodecComponent
EPPValidateKeyValue
is used to hold key, value pairs along with an optional "contactType" attribute for use inEPPValidateCheckCmd
andEPPValidateKeyValue
.EPPValidateKeyValue
consists of a required "key" and "value" attribute.- See Also:
EPPValidateCheckCmd
,EPPValidateKeyValue
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
Constant for the key value local namestatic java.lang.String
ELM_NAME
Constant for the key value tag
-
Constructor Summary
Constructors Constructor Description EPPValidateKeyValue()
Default constructor forEPPValidateKeyValue
.EPPValidateKeyValue(java.lang.String aKey, java.lang.String aValue)
Constructor forEPPValidateKeyValue
that includes the required attributes of the key and the value.EPPValidateKeyValue(java.lang.String aKey, java.lang.String aValue, java.lang.String aContactType)
Constructor forEPPValidateKeyValue
that includes all of the attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPValidateKeyValue
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPValidateKeyValue
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 theEPPValidateKeyValue
instance.boolean
equals(java.lang.Object aObject)
Compare an instance ofEPPValidateKeyValue
with this instance.java.lang.String
getContactType()
Gets the contact type.java.lang.String
getKey()
Gets the key.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.lang.String
getValue()
Gets the value.boolean
hasContactType()
Is the contact type defined?void
setContactType(java.lang.String aType)
Sets the contact type.void
setKey(java.lang.String aKey)
Sets the key.void
setValue(java.lang.String aValue)
Sets the value.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Constant for the key value local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the key value tag- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPValidateKeyValue
public EPPValidateKeyValue()
Default constructor forEPPValidateKeyValue
.
-
EPPValidateKeyValue
public EPPValidateKeyValue(java.lang.String aKey, java.lang.String aValue)
Constructor forEPPValidateKeyValue
that includes the required attributes of the key and the value.- Parameters:
aKey
- Key associated with the valueaValue
- Value associated with the key
-
EPPValidateKeyValue
public EPPValidateKeyValue(java.lang.String aKey, java.lang.String aValue, java.lang.String aContactType)
Constructor forEPPValidateKeyValue
that includes all of the attributes.- Parameters:
aKey
- Key associated with the valueaValue
- Value associated with the keyaContactType
- Contact type associated with this key value pair.
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Gets the key.- Returns:
- The key if defined;
null
otherwise.
-
setKey
public void setKey(java.lang.String aKey)
Sets the key.- Parameters:
aKey
- The key
-
getValue
public java.lang.String getValue()
Gets the value.- Returns:
- The value if defined;
null
otherwise.
-
setValue
public void setValue(java.lang.String aValue)
Sets the value.- Parameters:
aValue
- The value
-
hasContactType
public boolean hasContactType()
Is the contact type defined?- Returns:
true
if the contact type is defined;false
otherwise.
-
getContactType
public java.lang.String getContactType()
Gets the contact type.- Returns:
- The contact type if defined;
null
otherwise.
-
setContactType
public void setContactType(java.lang.String aType)
Sets the contact type.- Parameters:
aType
- The contact type
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPValidateKeyValue
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
EPPValidateKeyValue
instance. - Throws:
EPPEncodeException
- Unable to encodeEPPValidateKeyValue
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPValidateKeyValue
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPValidateKeyValue
from.- Throws:
EPPDecodeException
- Unable to decode aElement.
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPValidateKeyValue
with this instance.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
- Object to compare with.- Returns:
true
if equal;false
otherwise.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPValidateKeyValue
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPValidateKeyValue
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
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.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-