Class EPPRegistryDomainContact
- java.lang.Object
-
- com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
-
- com.verisign.epp.codec.registry.v02.EPPRegistryDomainContact
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryDomainContact extends EPPRegistryAbstractMinMax
Defines the miniumum and maximum numbers of contacts by contact type. The contact type is defined with the required "type" attribute with the possible values of "admin", "tech", and "billing". The <registry:contact> element contains the following child elements
- <registry:min> - The minimum number of contacts for the contact
type. Use
EPPRegistryAbstractMinMax.getMin()
andEPPRegistryAbstractMinMax.setMin(Integer)
to get and set this element. - <registry:max> - The OPTIONAL maximum number of contacts for the
contact type. If this element is not defined, the maximum number is
unbounded. Use
EPPRegistryAbstractMinMax.getMax()
andEPPRegistryAbstractMinMax.setMax(Integer)
to get and set this element.
- See Also:
EPPRegistryDomain
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EPPRegistryDomainContact.Type
Possible values for thesharePolicy
attribute.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_TYPE
XML attribute name for thetype
attribute.static java.lang.String
ELM_LOCALNAME
XML local name forEPPRegistryDomainContact
.static java.lang.String
ELM_NAME
XML root tag forEPPRegistryDomainContact
.-
Fields inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
ELM_MAX, ELM_MAX_LENGTH, ELM_MIN, ELM_MIN_LENGTH
-
-
Constructor Summary
Constructors Constructor Description EPPRegistryDomainContact()
Default constructor ofEPPRegistryDomainContact
.EPPRegistryDomainContact(EPPRegistryDomainContact.Type aType, int aMin, int aMax)
Creates a newEPPRegistryDomainContact
object that takes the types and both the minimum and maximum values asint
's.EPPRegistryDomainContact(EPPRegistryDomainContact.Type aType, java.lang.Integer aMin, java.lang.Integer aMax)
Creates a newEPPRegistryDomainContact
object that takes the types and both the minimum and maximum values asInteger
's.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPRegistryDomainContact
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryDomainContact
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 theEPPRegistryDomainContact
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryDomainContact
compare.protected java.lang.String
getElmMax()
Gets the maximum element local name.protected java.lang.String
getElmMin()
Gets the minimum element local name.protected org.slf4j.Logger
getLogger()
Gets theLogger
to use.protected java.lang.String
getRootName()
Gets the root element local name.EPPRegistryDomainContact.Type
getType()
Gets the type of contact.void
setType(EPPRegistryDomainContact.Type aType)
Sets the type of contact.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 theEPPRegistryDomainContact
instance.-
Methods inherited from class com.verisign.epp.codec.registry.v02.EPPRegistryAbstractMinMax
getMax, getMin, getNamespace, setMax, setMin
-
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
XML local name forEPPRegistryDomainContact
.- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML root tag forEPPRegistryDomainContact
.- See Also:
- Constant Field Values
-
ATTR_TYPE
public static final java.lang.String ATTR_TYPE
XML attribute name for thetype
attribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPRegistryDomainContact
public EPPRegistryDomainContact()
Default constructor ofEPPRegistryDomainContact
. All attributes are set to null. Must callsetType(EPPRegistryDomainContact.Type)
andEPPRegistryAbstractMinMax.setMin(Integer)
before callingencode(Document)
.
-
EPPRegistryDomainContact
public EPPRegistryDomainContact(EPPRegistryDomainContact.Type aType, java.lang.Integer aMin, java.lang.Integer aMax)
Creates a newEPPRegistryDomainContact
object that takes the types and both the minimum and maximum values asInteger
's.- Parameters:
aType
- type of contactaMin
- minimum number of contact entries.aMax
- maximum number of contact entries.
-
EPPRegistryDomainContact
public EPPRegistryDomainContact(EPPRegistryDomainContact.Type aType, int aMin, int aMax)
Creates a newEPPRegistryDomainContact
object that takes the types and both the minimum and maximum values asint
's.- Parameters:
aType
- type of contactaMin
- minimum number of contact entries.aMax
- maximum number of contact entries.
-
-
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 theEPPRegistryDomainContact
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Overrides:
encode
in classEPPRegistryAbstractMinMax
- Parameters:
aDocument
- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryDomainContact
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryDomainContact
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryDomainContact
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Overrides:
decode
in classEPPRegistryAbstractMinMax
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryDomainContact
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryDomainContact
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classEPPRegistryAbstractMinMax
- Returns:
- clone of
EPPRegistryDomainContact
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryDomainContact
compare.- Overrides:
equals
in classEPPRegistryAbstractMinMax
- Parameters:
aObject
-EPPRegistryDomainContact
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 classEPPRegistryAbstractMinMax
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getType
public EPPRegistryDomainContact.Type getType()
Gets the type of contact.- Returns:
- Type of contact if defined;
null
otherwise.
-
setType
public void setType(EPPRegistryDomainContact.Type aType)
Sets the type of contact.- Parameters:
aType
- The type of contact
-
getRootName
protected java.lang.String getRootName()
Gets the root element local name.- Specified by:
getRootName
in classEPPRegistryAbstractMinMax
- Returns:
- Root element local name.
-
getElmMin
protected java.lang.String getElmMin()
Gets the minimum element local name.- Specified by:
getElmMin
in classEPPRegistryAbstractMinMax
- Returns:
- Minimum element local name.
-
getElmMax
protected java.lang.String getElmMax()
Gets the maximum element local name.- Specified by:
getElmMax
in classEPPRegistryAbstractMinMax
- Returns:
- Maximum element local name.
-
getLogger
protected org.slf4j.Logger getLogger()
Gets theLogger
to use.- Specified by:
getLogger
in classEPPRegistryAbstractMinMax
- Returns:
Logger
instance to use for logging.
-
validateState
protected void validateState() throws EPPEncodeException
Validate the state of theEPPRegistryDomainContact
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.- Overrides:
validateState
in classEPPRegistryAbstractMinMax
- Throws:
EPPEncodeException
- Validation error
-
-