Class EPPRegistryAbstractMinMax
- java.lang.Object
-
- com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
EPPRegistryContactCity,EPPRegistryContactName,EPPRegistryContactOrg,EPPRegistryContactPostalCode,EPPRegistryContactStateProvince,EPPRegistryContactStreet,EPPRegistryDomainContact,EPPRegistryDomainHostLimit,EPPRegistryDomainNSLimit,EPPRegistryDS,EPPRegistryExternalHost,EPPRegistryInternalHost,EPPRegistryKey,EPPRegistryMinMaxLength
public abstract class EPPRegistryAbstractMinMax extends java.lang.Object implements EPPCodecComponent
Abstract base class for defining a complex element that includesminandmaxsub-elements.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringELM_MAXPossible XML Element Name ofmaxattribute.protected static java.lang.StringELM_MAX_LENGTHPossible XML Element Name ofmaxattribute.protected static java.lang.StringELM_MINPossible XML Element Name ofminattribute.protected static java.lang.StringELM_MIN_LENGTHPossible XML Element Name ofminattribute.
-
Constructor Summary
Constructors Constructor Description EPPRegistryAbstractMinMax()DefaultEPPRegistryAbstractMinMaxconstructor.EPPRegistryAbstractMinMax(int aMin, int aMax)EPPRegistryAbstractMinMaxthat takes both the minimum and maximum values asint's.EPPRegistryAbstractMinMax(java.lang.Integer aMin, java.lang.Integer aMax)EPPRegistryAbstractMinMaxthat takes both the minimum and maximum values asInteger's.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPRegistryAbstractMinMax.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryAbstractMinMaxattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryAbstractMinMaxinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryAbstractMinMaxcompare.protected abstract java.lang.StringgetElmMax()Gets the maximum element local name.protected abstract java.lang.StringgetElmMin()Gets the minimum element local name.protected abstract org.slf4j.LoggergetLogger()Gets theLoggerto use.java.lang.IntegergetMax()Gets the maximum value.java.lang.IntegergetMin()Gets the minimum value.java.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.protected abstract java.lang.StringgetRootName()Gets the root element local name.voidsetMax(java.lang.Integer aMax)Sets the maximum value.voidsetMin(java.lang.Integer aMin)Sets the minimum value.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.protected voidvalidateState()Validate the state of theEPPRegistryAbstractMinMaxinstance.
-
-
-
Field Detail
-
ELM_MIN_LENGTH
protected static final java.lang.String ELM_MIN_LENGTH
Possible XML Element Name ofminattribute.- See Also:
- Constant Field Values
-
ELM_MAX_LENGTH
protected static final java.lang.String ELM_MAX_LENGTH
Possible XML Element Name ofmaxattribute.- See Also:
- Constant Field Values
-
ELM_MIN
protected static final java.lang.String ELM_MIN
Possible XML Element Name ofminattribute.- See Also:
- Constant Field Values
-
ELM_MAX
protected static final java.lang.String ELM_MAX
Possible XML Element Name ofmaxattribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryAbstractMinMax
public EPPRegistryAbstractMinMax()
DefaultEPPRegistryAbstractMinMaxconstructor.
-
EPPRegistryAbstractMinMax
public EPPRegistryAbstractMinMax(java.lang.Integer aMin, java.lang.Integer aMax)EPPRegistryAbstractMinMaxthat takes both the minimum and maximum values asInteger's.- Parameters:
aMin- Minimum valueaMax- Maximum value
-
EPPRegistryAbstractMinMax
public EPPRegistryAbstractMinMax(int aMin, int aMax)EPPRegistryAbstractMinMaxthat takes both the minimum and maximum values asint's.- Parameters:
aMin- Minimum valueaMax- Maximum value
-
-
Method Detail
-
getRootName
protected abstract java.lang.String getRootName()
Gets the root element local name.- Returns:
- Root element local name.
-
getElmMin
protected abstract java.lang.String getElmMin()
Gets the minimum element local name.- Returns:
- Minimum element local name.
-
getElmMax
protected abstract java.lang.String getElmMax()
Gets the maximum element local name.- Returns:
- Maximum element local name.
-
getLogger
protected abstract org.slf4j.Logger getLogger()
Gets theLoggerto use.- Returns:
Loggerinstance to use for logging.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPRegistryAbstractMinMaxinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryAbstractMinMaxinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryAbstractMinMaxinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPRegistryAbstractMinMaxattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPRegistryAbstractMinMaxfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
validateState
protected void validateState() throws EPPEncodeExceptionValidate the state of theEPPRegistryAbstractMinMaxinstance. 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, theEPPCodecExceptionwill contain a description of the error.- Throws:
EPPEncodeException- Validation error
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryAbstractMinMax.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPRegistryAbstractMinMax - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryAbstractMinMaxcompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPRegistryAbstractMinMaxinstance to compare with- Returns:
trueif this object is the same as the aObject argument;falseotherwise
-
getMin
public java.lang.Integer getMin()
Gets the minimum value.- Returns:
- Minimum value if defined;
nullotherwise.
-
setMin
public void setMin(java.lang.Integer aMin)
Sets the minimum value.- Parameters:
aMin- Minimum value
-
getMax
public java.lang.Integer getMax()
Gets the maximum value.- Returns:
- Maximum value if defined;
nullotherwise.
-
setMax
public void setMax(java.lang.Integer aMax)
Sets the maximum value.- Parameters:
aMax- Maximum value
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
-