Package com.verisign.epp.codec.registry
Class EPPRegistryExternalHost
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryMinMaxLength
-
- com.verisign.epp.codec.registry.EPPRegistryExternalHost
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPRegistryExternalHost extends EPPRegistryMinMaxLength
Defines the policies for external hosts. The <registry:external> elements contains the following child elements:
- <registry:minIP> - Minimum number of IP addresses supported for an external host.
- <registry:maxIP> - Maximum number of IP addresses supported for an external host.
- <registry:sharePolicy> - The OPTIONAL policy for the sharing of
external hosts in the server.The possible shared policy values include:
- "perRegistrar" - The external hosts are shared across domains sponsored by an individual registrar client. Each registrar client will have its own set of external hosts to manage.
- "perZone" - The external hosts are shared across all domains of the zone. There is a single pool of external hosts defined for the zone.
- "perSystem" - The external hosts are shared across all zones of the system. There is a single pool of external 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.StringELM_LOCALNAMEConstant for the status local namestatic java.lang.StringELM_NAMEConstant for the external host (prefix and local name)static java.lang.StringELM_SHARE_POLICYstatic java.lang.StringTYPE_PER_REGISTRARConstant for perRegistrar policystatic java.lang.StringTYPE_PER_SYSTEMConstant for perSystem policystatic java.lang.StringTYPE_PER_ZONEConstant for perZone policystatic java.util.ListVALID_POLICIESListof 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 EPPRegistryExternalHost()Default constructorEPPRegistryExternalHost(int min, int max, java.lang.String sharePolicy)Constructor that takesmin,maxandsharePolicy.EPPRegistryExternalHost(java.lang.Integer min, java.lang.Integer max, java.lang.String sharePolicy)Constructor that takesmin,maxandsharePolicy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPRegistryExternalHost.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryExternalHostattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryExternalHostinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryExternalHostcompare.java.lang.StringgetSharePolicy()Gets the shared policy.voidsetSharePolicy(java.lang.String sharePolicy)Sets the shared policy.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.protected voidvalidateState()Validate the state of theEPPRegistryExternalHostinstance.-
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
- See Also:
- Constant Field Values
-
VALID_POLICIES
public static final java.util.List VALID_POLICIES
Listof valid share policies
-
TYPE_PER_REGISTRAR
public static final java.lang.String TYPE_PER_REGISTRAR
Constant for perRegistrar policy- See Also:
- Constant Field Values
-
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
-
EPPRegistryExternalHost
public EPPRegistryExternalHost()
Default constructor
-
EPPRegistryExternalHost
public EPPRegistryExternalHost(java.lang.Integer min, java.lang.Integer max, java.lang.String sharePolicy)Constructor that takesmin,maxandsharePolicy.- Parameters:
min- minimum number of IPs supported for an external hostmax- maximum number of IPs supported for an external hostsharePolicy- "perRegistrar", "perZone" or "perSystem"
-
EPPRegistryExternalHost
public EPPRegistryExternalHost(int min, int max, java.lang.String sharePolicy)Constructor that takesmin,maxandsharePolicy.- Parameters:
min- minimum number of IPs supported for an external hostmax- maximum number of IPs supported for an external hostsharePolicy- "perRegistrar", "perZone" or "perSystem"
-
-
Method Detail
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPRegistryExternalHostinstance.- Specified by:
encodein interfaceEPPCodecComponent- Overrides:
encodein classEPPRegistryMinMaxLength- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryExternalHostinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryExternalHostinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPRegistryExternalHostattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Overrides:
decodein classEPPRegistryMinMaxLength- Parameters:
aElement- Root DOM Element to decodeEPPRegistryExternalHostfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryExternalHost.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPRegistryMinMaxLength- Returns:
- clone of
EPPRegistryExternalHost - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryExternalHostcompare.- Overrides:
equalsin classEPPRegistryMinMaxLength- Parameters:
aObject-EPPRegistryExternalHostinstance to compare with- Returns:
trueif this object is the same as the aObject argument;falseotherwise
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classEPPRegistryMinMaxLength- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
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 EPPEncodeExceptionValidate the state of theEPPRegistryExternalHostinstance. 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:
validateStatein classEPPRegistryMinMaxLength- Throws:
EPPEncodeException- On invalid state
-
-