Package com.verisign.epp.codec.domain
Class EPPHostAttr
- java.lang.Object
-
- com.verisign.epp.codec.domain.EPPHostAttr
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPHostAttr extends java.lang.Object implements EPPCodecComponent
EPPHostAttr
is used to support the host attribute model.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
XML local name forEPPHostAttr
.static java.lang.String
ELM_NAME
XML Element Name ofEPPHostAttr
root element.
-
Constructor Summary
Constructors Constructor Description EPPHostAttr()
EPPHostAttr
default constructor.EPPHostAttr(java.lang.String aName)
EPPHostAttr
constructor the takes the host name.EPPHostAttr(java.lang.String aName, java.util.Vector<EPPHostAddress> aAddresses)
EPPHostAttr
constructor the takes the host name and aVector
of host addresses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAddress(EPPHostAddress aAddress)
Add a address to the list of addresses.java.lang.Object
clone()
CloneEPPHostAttr
.void
decode(org.w3c.dom.Element aElement)
Decode the EPPHostAttr 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 the EPPHostAttr instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPHostAttr
compare.java.util.Vector<EPPHostAddress>
getAddresses()
Gets the host addresses.java.lang.String
getName()
Get the host name.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.boolean
hasAddresses()
Are addresses set?void
setAddresses(java.util.Vector<EPPHostAddress> aAddresses)
Sets the host addresses.void
setName(java.lang.String aName)
Set the host name.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
XML local name forEPPHostAttr
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML Element Name ofEPPHostAttr
root element.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPHostAttr
public EPPHostAttr()
EPPHostAttr
default constructor.
-
EPPHostAttr
public EPPHostAttr(java.lang.String aName)
EPPHostAttr
constructor the takes the host name.- Parameters:
aName
- the fully qualified name of a host
-
EPPHostAttr
public EPPHostAttr(java.lang.String aName, java.util.Vector<EPPHostAddress> aAddresses)
EPPHostAttr
constructor the takes the host name and aVector
of host addresses.- Parameters:
aName
- the fully qualified name of a hostaAddresses
-Vector
ofEPPHostAddress
instances
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the host name.- Returns:
- Host Name
-
setName
public void setName(java.lang.String aName)
Set the host name.- Parameters:
aName
- Host Name
-
hasAddresses
public boolean hasAddresses()
Are addresses set?- Returns:
true
if addresses are set;false
otherwise.
-
addAddress
public void addAddress(EPPHostAddress aAddress)
Add a address to the list of addresses.- Parameters:
aAddress
- Address to add
-
getAddresses
public java.util.Vector<EPPHostAddress> getAddresses()
Gets the host addresses.- Returns:
- Vector of
EPPHostAddress
instances if defined;null
otherwise.
-
setAddresses
public void setAddresses(java.util.Vector<EPPHostAddress> aAddresses)
Sets the host addresses.- Parameters:
aAddresses
- Vector ofEPPHostAddress
instances.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPHostAttr
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPHostAttr
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode the EPPHostAttr attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- - Root DOM Element to decode EPPHostAttr from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of the EPPHostAttr 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 EPPHostAttr instance.
- Throws:
EPPEncodeException
- - Unable to encode EPPHostAttr instance.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPHostAttr
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPHostAttr
instance to compare with- Returns:
true
if equal;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.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-