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,Serializable,Cloneable
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for the status local namestatic final StringConstant for the external host (prefix and local name)static final Stringstatic final StringConstant for perRegistrar policystatic final StringConstant for perSystem policystatic final StringConstant for perZone policystatic final ListListof valid share policiesFields 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
ConstructorsConstructorDescriptionDefault constructorEPPRegistryExternalHost(int min, int max, String sharePolicy) Constructor that takesmin,maxandsharePolicy.EPPRegistryExternalHost(Integer min, Integer max, String sharePolicy) Constructor that takesmin,maxandsharePolicy. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPRegistryExternalHost.voidDecode theEPPRegistryExternalHostattributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPRegistryExternalHostinstance.booleanimplements a deepEPPRegistryExternalHostcompare.Gets the shared policy.voidsetSharePolicy(String sharePolicy) Sets the shared policy.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.protected voidValidate 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 Details
-
ELM_LOCALNAME
Constant for the status local name- See Also:
-
ELM_NAME
Constant for the external host (prefix and local name)- See Also:
-
ELM_SHARE_POLICY
- See Also:
-
VALID_POLICIES
Listof valid share policies -
TYPE_PER_REGISTRAR
Constant for perRegistrar policy- See Also:
-
TYPE_PER_ZONE
Constant for perZone policy- See Also:
-
TYPE_PER_SYSTEM
Constant for perSystem policy- See Also:
-
-
Constructor Details
-
EPPRegistryExternalHost
public EPPRegistryExternalHost()Default constructor -
EPPRegistryExternalHost
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
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 Details
-
encode
Encode 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
Decode 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
CloneEPPRegistryExternalHost.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPRegistryMinMaxLength- Returns:
- clone of
EPPRegistryExternalHost - Throws:
CloneNotSupportedException- standard Object.clone exception
-
equals
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
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classEPPRegistryMinMaxLength- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
validateState
Validate 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
-