Package com.verisign.epp.codec.idntable
Class EPPIdnTableInfoDomain
- java.lang.Object
-
- com.verisign.epp.codec.idntable.EPPIdnTableInfoDomain
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPIdnTableInfoDomain extends java.lang.Object implements EPPCodecComponent
EPPIdnTableInfoDomain
is used to represent the Internationalized Domain Name (IDN) information for a domain in a IDN table response to a <info> command. The domain information includes whether the domain is a valid IDN domain name, whether or not the use of the IDN mapping extension is needed, and the matching list of valid IDN table identifiers.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
XML local name forEPPIdnTableInfoDomain
.static java.lang.String
ELM_NAME
XML root tag forEPPIdnTableInfoDomain
.
-
Constructor Summary
Constructors Constructor Description EPPIdnTableInfoDomain()
Default constructor forEPPIdnTableInfoDomain
.EPPIdnTableInfoDomain(java.lang.String aName, boolean aValid)
Constructor forEPPIdnTableInfoDomain
that takes the domain name and whether the domain name is a valid IDN domain name.EPPIdnTableInfoDomain(java.lang.String aName, boolean aValid, boolean aIdnmap)
Constructor forEPPIdnTableInfoDomain
that takes the domain name, whether the domain name is a valid IDN domain name, and whether the server requires the IDN mapping extension with a domain create of the domain name.EPPIdnTableInfoDomain(java.lang.String aName, java.util.List<EPPIdnTableInfoDomainTable> aTables)
Constructor forEPPIdnTableInfoDomain
that is used for valid IDN domain names by providing the list of IDN table identifiers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTable(EPPIdnTableInfoDomainTable aTable)
Append a table to the list of tables.java.lang.Object
clone()
clone anEPPCodecComponent
.void
decode(org.w3c.dom.Element aElement)
decode a DOM element tree to initialize the instance attributes.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encode instance into a DOM element tree.boolean
equals(java.lang.Object aObject)
Compare an instance ofEPPIdnTableInfoDomain
with this instance.java.lang.String
getAname()
Returns the OPTIONAL A-label domain name.java.lang.String
getName()
Returns the domain name.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.util.List<EPPIdnTableInfoDomainTable>
getTables()
Get the list of tables.java.lang.String
getUname()
Returns the OPTIONAL U-label domain name.boolean
hasAname()
Is the A-label domain name defined?boolean
hasTables()
Are any table identifiers defined in the list of table identifiers?boolean
hasUname()
Is the U-label domain name defined?boolean
isIdnmap()
Is the IDN mapping extension required on a domain create of the domain name?boolean
isValid()
Is the domain name a valid IDN domain name?void
setAname(java.lang.String aDomain)
Sets the A-label domain name.void
setIdnmap(boolean aIdnmap)
Set whether the IDN mapping extension is required on a domain create of the domain name.void
setName(java.lang.String aDomain)
Sets the domain name.void
setTable(EPPIdnTableInfoDomainTable aTable)
Set an individual table.void
setTables(java.util.List<EPPIdnTableInfoDomainTable> aTables)
Set the list of tables.void
setUname(java.lang.String aDomain)
Sets the U-label domain name.void
setValid(boolean aValid)
Sets whether the domain name is a valid IDN domain 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 forEPPIdnTableInfoDomain
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPIdnTableInfoDomain
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPIdnTableInfoDomain
public EPPIdnTableInfoDomain()
Default constructor forEPPIdnTableInfoDomain
.
-
EPPIdnTableInfoDomain
public EPPIdnTableInfoDomain(java.lang.String aName, boolean aValid)
Constructor forEPPIdnTableInfoDomain
that takes the domain name and whether the domain name is a valid IDN domain name.- Parameters:
aName
- Domain nameaValid
- Is the domain name a valid IDN domain name?
-
EPPIdnTableInfoDomain
public EPPIdnTableInfoDomain(java.lang.String aName, boolean aValid, boolean aIdnmap)
Constructor forEPPIdnTableInfoDomain
that takes the domain name, whether the domain name is a valid IDN domain name, and whether the server requires the IDN mapping extension with a domain create of the domain name.- Parameters:
aName
- Domain nameaValid
- Is the domain name a valid IDN domain name?aIdnmap
-true
if the IDN mapping extension is required on a domain create of the domain name;false
otherwise.
-
EPPIdnTableInfoDomain
public EPPIdnTableInfoDomain(java.lang.String aName, java.util.List<EPPIdnTableInfoDomainTable> aTables)
Constructor forEPPIdnTableInfoDomain
that is used for valid IDN domain names by providing the list of IDN table identifiers.- Parameters:
aName
- Domain nameaTables
- List of matching IDN tables.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the domain name.- Returns:
- Domain name if defined:
null
otherwise.
-
setName
public void setName(java.lang.String aDomain)
Sets the domain name.- Parameters:
aDomain
- Domain name
-
isValid
public boolean isValid()
Is the domain name a valid IDN domain name?- Returns:
true
if it is a valid IDN domain name;false
otherwise.
-
setValid
public void setValid(boolean aValid)
Sets whether the domain name is a valid IDN domain name.- Parameters:
aValid
-true
if the domain name is a valid IDN domain name;false
otherwise.
-
isIdnmap
public boolean isIdnmap()
Is the IDN mapping extension required on a domain create of the domain name?- Returns:
true
if the IDN mapping extension is required on a domain create of the domain name;false
otherwise.
-
setIdnmap
public void setIdnmap(boolean aIdnmap)
Set whether the IDN mapping extension is required on a domain create of the domain name.- Parameters:
aIdnmap
-true
if the IDN mapping extension is required on a domain create of the domain name;false
otherwise.
-
hasAname
public boolean hasAname()
Is the A-label domain name defined?- Returns:
true
if the A-label domain name is defined;false
otherwise.
-
getAname
public java.lang.String getAname()
Returns the OPTIONAL A-label domain name.- Returns:
- A-label domain name if defined:
null
otherwise.
-
setAname
public void setAname(java.lang.String aDomain)
Sets the A-label domain name.- Parameters:
aDomain
- A-label Domain name
-
hasUname
public boolean hasUname()
Is the U-label domain name defined?- Returns:
true
if the U-label domain name is defined;false
otherwise.
-
getUname
public java.lang.String getUname()
Returns the OPTIONAL U-label domain name.- Returns:
- U-label domain name if defined:
null
otherwise.
-
setUname
public void setUname(java.lang.String aDomain)
Sets the U-label domain name.- Parameters:
aDomain
- U-label Domain name
-
hasTables
public boolean hasTables()
Are any table identifiers defined in the list of table identifiers?- Returns:
true
if there is at least one table identifier defined;false
otherwise.
-
getTables
public java.util.List<EPPIdnTableInfoDomainTable> getTables()
Get the list of tables.- Returns:
List
of tables
-
setTables
public void setTables(java.util.List<EPPIdnTableInfoDomainTable> aTables)
Set the list of tables.- Parameters:
aTables
-List
of tables
-
setTable
public void setTable(EPPIdnTableInfoDomainTable aTable)
Set an individual table. This method clears the existing list of tables.- Parameters:
aTable
- Table to set
-
addTable
public void addTable(EPPIdnTableInfoDomainTable aTable)
Append a table to the list of tables. This method does NOT clear the existing list of tables.- Parameters:
aTable
- Table to append
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attribute is appended as a child node.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- DOM Document, which acts is an Element factory- Returns:
- Element Root element associated with the object
- Throws:
EPPEncodeException
- Error encodingEPPIdnTableInfoDomain
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
decode a DOM element tree to initialize the instance attributes. TheaElement
argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
-Element
to decode- Throws:
EPPDecodeException
- Error decodingElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone anEPPCodecComponent
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of concrete
EPPIdnTableInfoDomain
- 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.
-
equals
public boolean equals(java.lang.Object aObject)
Compare an instance ofEPPIdnTableInfoDomain
with this instance.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
- Object to compare with.- Returns:
true
if equal;false
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
.
-
-