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 includesmin
andmax
sub-elements.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
ELM_MAX
Possible XML Element Name ofmax
attribute.protected static java.lang.String
ELM_MAX_LENGTH
Possible XML Element Name ofmax
attribute.protected static java.lang.String
ELM_MIN
Possible XML Element Name ofmin
attribute.protected static java.lang.String
ELM_MIN_LENGTH
Possible XML Element Name ofmin
attribute.
-
Constructor Summary
Constructors Constructor Description EPPRegistryAbstractMinMax()
DefaultEPPRegistryAbstractMinMax
constructor.EPPRegistryAbstractMinMax(int aMin, int aMax)
EPPRegistryAbstractMinMax
that takes both the minimum and maximum values asint
's.EPPRegistryAbstractMinMax(java.lang.Integer aMin, java.lang.Integer aMax)
EPPRegistryAbstractMinMax
that 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.Object
clone()
CloneEPPRegistryAbstractMinMax
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryAbstractMinMax
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 theEPPRegistryAbstractMinMax
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryAbstractMinMax
compare.protected abstract java.lang.String
getElmMax()
Gets the maximum element local name.protected abstract java.lang.String
getElmMin()
Gets the minimum element local name.protected abstract org.slf4j.Logger
getLogger()
Gets theLogger
to use.java.lang.Integer
getMax()
Gets the maximum value.java.lang.Integer
getMin()
Gets the minimum value.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.protected abstract java.lang.String
getRootName()
Gets the root element local name.void
setMax(java.lang.Integer aMax)
Sets the maximum value.void
setMin(java.lang.Integer aMin)
Sets the minimum value.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 theEPPRegistryAbstractMinMax
instance.
-
-
-
Field Detail
-
ELM_MIN_LENGTH
protected static final java.lang.String ELM_MIN_LENGTH
Possible XML Element Name ofmin
attribute.- See Also:
- Constant Field Values
-
ELM_MAX_LENGTH
protected static final java.lang.String ELM_MAX_LENGTH
Possible XML Element Name ofmax
attribute.- See Also:
- Constant Field Values
-
ELM_MIN
protected static final java.lang.String ELM_MIN
Possible XML Element Name ofmin
attribute.- See Also:
- Constant Field Values
-
ELM_MAX
protected static final java.lang.String ELM_MAX
Possible XML Element Name ofmax
attribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryAbstractMinMax
public EPPRegistryAbstractMinMax()
DefaultEPPRegistryAbstractMinMax
constructor.
-
EPPRegistryAbstractMinMax
public EPPRegistryAbstractMinMax(java.lang.Integer aMin, java.lang.Integer aMax)
EPPRegistryAbstractMinMax
that takes both the minimum and maximum values asInteger
's.- Parameters:
aMin
- Minimum valueaMax
- Maximum value
-
EPPRegistryAbstractMinMax
public EPPRegistryAbstractMinMax(int aMin, int aMax)
EPPRegistryAbstractMinMax
that 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 theLogger
to use.- Returns:
Logger
instance to use for logging.
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPRegistryAbstractMinMax
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
EPPRegistryAbstractMinMax
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryAbstractMinMax
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryAbstractMinMax
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryAbstractMinMax
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
validateState
protected void validateState() throws EPPEncodeException
Validate the state of theEPPRegistryAbstractMinMax
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, theEPPCodecException
will contain a description of the error.- Throws:
EPPEncodeException
- Validation error
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryAbstractMinMax
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in 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 deepEPPRegistryAbstractMinMax
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRegistryAbstractMinMax
instance to compare with- Returns:
true
if this object is the same as the aObject argument;false
otherwise
-
getMin
public java.lang.Integer getMin()
Gets the minimum value.- Returns:
- Minimum value if defined;
null
otherwise.
-
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;
null
otherwise.
-
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:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
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.
-
-