Package com.verisign.epp.codec.registry
Class EPPRegistryInternalHost
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryMinMaxLength
-
- com.verisign.epp.codec.registry.EPPRegistryInternalHost
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryInternalHost extends EPPRegistryMinMaxLength
Defines the minimum and maximum number of IP addresses supported for an internal host. The <registry:internal> elements contains the following child elements:
- <registry:minIP> - Minimum number of IP addresses supported for an internal host.
- <registry:maxIP> - Maximum number of IP addresses supported for an internal host.
- <registry:sharePolicy> - The OPTIONAL policy for the sharing of
internal hosts in the server.The possible shared policy values include:
- "perZone" - The internal hosts are shared across all domains of the zone. There is a single pool of internal hosts defined for the zone.
- "perSystem" - The internal hosts are shared across all zones of the system. There is a single pool of internal hosts across all of the zones supported by the system.
- See Also:
EPPRegistryHost
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_LOCALNAME
Constant for the status local namestatic java.lang.String
ELM_NAME
Constant for the external host (prefix and local name)static java.lang.String
ELM_SHARE_POLICY
XML Element Name ofsharePolicy
attributestatic java.lang.String
TYPE_PER_SYSTEM
Constant for perSystem policystatic java.lang.String
TYPE_PER_ZONE
Constant for perZone policystatic java.util.List
VALID_POLICIES
List
of valid share policies-
Fields inherited from class com.verisign.epp.codec.registry.EPPRegistryMinMaxLength
ELM_MAX, ELM_MAX_LENGTH, ELM_MIN, ELM_MIN_LENGTH, elmMax, elmMin, max, min, rootName
-
-
Constructor Summary
Constructors Constructor Description EPPRegistryInternalHost()
Default constructorEPPRegistryInternalHost(int min, int max, java.lang.String sharePolicy)
Constructor that takesmin
,max
andsharePolicy
.EPPRegistryInternalHost(java.lang.Integer min, java.lang.Integer max, java.lang.String sharePolicy)
Constructor that takesmin
,max
andsharePolicy
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPRegistryInternalHost
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryInternalHost
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 theEPPRegistryInternalHost
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryInternalHost
compare.java.lang.String
getSharePolicy()
Gets the shared policy.void
setSharePolicy(java.lang.String sharePolicy)
Sets the shared policy.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.protected void
validateState()
Validate the state of theEPPRegistryInternalHost
instance.-
Methods inherited from class com.verisign.epp.codec.registry.EPPRegistryMinMaxLength
getElmMax, getElmMin, getMax, getMin, getNamespace, getRootName, setElmMax, setElmMin, setMax, setMin, setRootName
-
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Constant for the status local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the external host (prefix and local name)- See Also:
- Constant Field Values
-
ELM_SHARE_POLICY
public static final java.lang.String ELM_SHARE_POLICY
XML Element Name ofsharePolicy
attribute- See Also:
- Constant Field Values
-
VALID_POLICIES
public static final java.util.List VALID_POLICIES
List
of valid share policies
-
TYPE_PER_ZONE
public static final java.lang.String TYPE_PER_ZONE
Constant for perZone policy- See Also:
- Constant Field Values
-
TYPE_PER_SYSTEM
public static final java.lang.String TYPE_PER_SYSTEM
Constant for perSystem policy- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryInternalHost
public EPPRegistryInternalHost()
Default constructor
-
EPPRegistryInternalHost
public EPPRegistryInternalHost(java.lang.Integer min, java.lang.Integer max, java.lang.String sharePolicy)
Constructor that takesmin
,max
andsharePolicy
.- Parameters:
min
- minimum number of IPs supported for an internal hostmax
- maximum number of IPs supported for an internal hostsharePolicy
- "perZone" or "perSystem"
-
EPPRegistryInternalHost
public EPPRegistryInternalHost(int min, int max, java.lang.String sharePolicy)
Constructor that takesmin
,max
andsharePolicy
.- Parameters:
min
- minimum number of IPs supported for an internal hostmax
- maximum number of IPs supported for an internal hostsharePolicy
- "perZone" or "perSystem"
-
-
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 theEPPRegistryInternalHost
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Overrides:
encode
in classEPPRegistryMinMaxLength
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryInternalHost
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryInternalHost
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryInternalHost
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Overrides:
decode
in classEPPRegistryMinMaxLength
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryInternalHost
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryInternalHost
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classEPPRegistryMinMaxLength
- Returns:
- clone of
EPPRegistryInternalHost
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryInternalHost
compare.- Overrides:
equals
in classEPPRegistryMinMaxLength
- Parameters:
aObject
-EPPRegistryInternalHost
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 classEPPRegistryMinMaxLength
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getSharePolicy
public java.lang.String getSharePolicy()
Gets the shared policy.- Returns:
- shared policy
String
-
setSharePolicy
public void setSharePolicy(java.lang.String sharePolicy)
Sets the shared policy.- Parameters:
sharePolicy
- shared policyString
-
validateState
protected void validateState() throws EPPEncodeException
Validate the state of theEPPRegistryInternalHost
instance. A valid state means that all of the required attributes have been set. If validateState returns without an exception, the state is valid. If the state is not valid, the EPPCodecException will contain a description of the error. throws EPPCodecException State error. This will contain the name of the attribute that is not valid.- Overrides:
validateState
in classEPPRegistryMinMaxLength
- Throws:
EPPEncodeException
- On invalid state
-
-