Class EPPRegistryHost
- java.lang.Object
-
- com.verisign.epp.codec.registry.v02.EPPRegistryHost
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryHost extends java.lang.Object implements EPPCodecComponent
Represents the host object policy information per RFC 5732. The <registry:host> element contains the following child elements:
- <registry:internal> - Defines the minimum and maximum number of IP
addresses supported for an internal host. Use
getInternal()
andsetInternal(EPPRegistryInternalHost)
to get and set the element. - <registry:external> - Defines the policies for external hosts. Use
getExternal()
andsetExternal(EPPRegistryExternalHost)
to get and set the element. - <registry:nameRegex> - The OPTIONAL regular expression used to
validate the host name value. Use
getNameRegex()
andsetNameRegex(EPPRegistryRegex)
to get and set the element. - <registry:maxCheckHost> - The OPTIONAL maximum number of host names
(<domain:name> elements) that can be included in a host check command
defined in RFC 5732. Use
getMaxCheckHost()
andsetMaxCheckHost(Integer)
to get and set the element. - <registry:supportedStatus> - The OPTIONAL set of supported host
statuses defined in RFC 5732. Use
getSupportedStatus()
andsetSupportedStatus(EPPRegistrySupportedStatus)
to get and set the element. - <registry:invalidIP> - Zero or more <registry:invalidIP>
elements that defines the URI of an externally defined list of invalid IP
addresses. The IP addresses referenced by the list of
<registry:invalidIP> elements should be combined and normalized by the
client to define the complete set of invalid IP addresses. Use
getInvalidIPs()
andsetInvalidIPs(List)
to get and set these elements.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_AUTH_INFO_REGEX
XML Element Name ofauthInfoRegex
attribute.static java.lang.String
ELM_INVALID_IP
XML Element Name ofinvalidIPs
attribute.static java.lang.String
ELM_LOCALNAME
XML local name forEPPRegistryHost
.static java.lang.String
ELM_MAX_CHECK
XML Element Name ofmaxCheckHost
attribute.static java.lang.String
ELM_NAME
XML root tag forEPPRegistryHost
.static java.lang.String
ELM_NAME_REGEX
XML Element Name ofnameRegex
attribute.
-
Constructor Summary
Constructors Constructor Description EPPRegistryHost()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInvalidIP(java.lang.String aInvalidIP)
Adds one invalid IP address URI to the list.java.lang.Object
clone()
CloneEPPRegistryHost
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryHost
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 theEPPRegistryHost
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryHost
compare.EPPRegistryExternalHost
getExternal()
Gets the external host attributes.EPPRegistryInternalHost
getInternal()
Gets the internal host attributes.java.util.List<java.lang.String>
getInvalidIPs()
Gets the invalid IP address URIs.java.lang.Integer
getMaxCheckHost()
Gets maximum number of host names that can be included in a host check command.EPPRegistryRegex
getNameRegex()
Get the regular expression that host name must follow.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.EPPRegistrySupportedStatus
getSupportedStatus()
Gets a set of supported host statuses defined in RFC 5732.boolean
hasInvalidIPs()
Is the invalid IPs defined?boolean
hasMaxCheckHost()
Is the maximum number of host names defined?boolean
hasNameRegex()
Is the host name regular expression defined?void
setExternal(EPPRegistryExternalHost aExternal)
Sets the external host attributes.void
setInternal(EPPRegistryInternalHost aInternal)
Sets the internal host attributes.void
setInvalidIPs(java.util.List<java.lang.String> aInvalidIPs)
Sets the invalid IP address URIs.void
setMaxCheckHost(java.lang.Integer aMaxCheckHost)
Sets maximum number of host names that can be included in a host check command.void
setNameRegex(EPPRegistryRegex aNameRegex)
Set the regular expression that host name must follow.void
setSupportedStatus(EPPRegistrySupportedStatus aSupportedStatus)
Sets a set of supported host statuses defined in RFC 5732.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 forEPPRegistryHost
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPRegistryHost
.- See Also:
- Constant Field Values
-
ELM_NAME_REGEX
public static final java.lang.String ELM_NAME_REGEX
XML Element Name ofnameRegex
attribute.- See Also:
- Constant Field Values
-
ELM_MAX_CHECK
public static final java.lang.String ELM_MAX_CHECK
XML Element Name ofmaxCheckHost
attribute.- See Also:
- Constant Field Values
-
ELM_AUTH_INFO_REGEX
public static final java.lang.String ELM_AUTH_INFO_REGEX
XML Element Name ofauthInfoRegex
attribute.- See Also:
- Constant Field Values
-
ELM_INVALID_IP
public static final java.lang.String ELM_INVALID_IP
XML Element Name ofinvalidIPs
attribute.- See Also:
- Constant Field Values
-
-
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 theEPPRegistryHost
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
EPPRegistryHost
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryHost
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryHost
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryHost
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryHost
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPRegistryHost
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryHost
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRegistryHost
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.
-
getInternal
public EPPRegistryInternalHost getInternal()
Gets the internal host attributes.- Returns:
- the internal host attributes
-
setInternal
public void setInternal(EPPRegistryInternalHost aInternal)
Sets the internal host attributes.- Parameters:
aInternal
- the internal host attributes
-
getExternal
public EPPRegistryExternalHost getExternal()
Gets the external host attributes.- Returns:
- the external host attributes
-
setExternal
public void setExternal(EPPRegistryExternalHost aExternal)
Sets the external host attributes.- Parameters:
aExternal
- the external host attributes
-
hasNameRegex
public boolean hasNameRegex()
Is the host name regular expression defined?- Returns:
true
if the host name regular expression is defined;false
otherwise.
-
getNameRegex
public EPPRegistryRegex getNameRegex()
Get the regular expression that host name must follow.- Returns:
- Regular expression if defined;
null
otherwise.
-
setNameRegex
public void setNameRegex(EPPRegistryRegex aNameRegex)
Set the regular expression that host name must follow.- Parameters:
aNameRegex
- Regular expression for the host name. Set tonull
to unset it.
-
hasMaxCheckHost
public boolean hasMaxCheckHost()
Is the maximum number of host names defined?- Returns:
true
if the maximum number of host names is defined;false
otherwise.
-
getMaxCheckHost
public java.lang.Integer getMaxCheckHost()
Gets maximum number of host names that can be included in a host check command.- Returns:
- maximum number of host names that can be included in a host check
command if defined;
null
otherwise.
-
setMaxCheckHost
public void setMaxCheckHost(java.lang.Integer aMaxCheckHost)
Sets maximum number of host names that can be included in a host check command.- Parameters:
aMaxCheckHost
- maximum number of host names that can be included in a host check command. Set tonull
to unset the value.
-
getSupportedStatus
public EPPRegistrySupportedStatus getSupportedStatus()
Gets a set of supported host statuses defined in RFC 5732.- Returns:
- set of supported host statuses defined in RFC 5732
-
setSupportedStatus
public void setSupportedStatus(EPPRegistrySupportedStatus aSupportedStatus)
Sets a set of supported host statuses defined in RFC 5732.- Parameters:
aSupportedStatus
- set of supported host statuses defined in RFC 5732
-
hasInvalidIPs
public boolean hasInvalidIPs()
Is the invalid IPs defined?- Returns:
true
if the invalid IPs is defined;false
otherwise.
-
getInvalidIPs
public java.util.List<java.lang.String> getInvalidIPs()
Gets the invalid IP address URIs.- Returns:
List
of invalid IP address URIs
-
setInvalidIPs
public void setInvalidIPs(java.util.List<java.lang.String> aInvalidIPs)
Sets the invalid IP address URIs.- Parameters:
aInvalidIPs
-List
of invaild IP address URIString
values.
-
addInvalidIP
public void addInvalidIP(java.lang.String aInvalidIP)
Adds one invalid IP address URI to the list.- Parameters:
aInvalidIP
- supported algorithm as described in section 2.1.3 of RFC 4034
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-