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 classEPPRegistryDomainContact.TypePossible values for thesharePolicyattribute.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_TYPEXML attribute name for thetypeattribute.static java.lang.StringELM_LOCALNAMEXML local name forEPPRegistryDomainContact.static java.lang.StringELM_NAMEXML 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 newEPPRegistryDomainContactobject 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 newEPPRegistryDomainContactobject 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.Objectclone()CloneEPPRegistryDomainContact.voiddecode(org.w3c.dom.Element aElement)Decode theEPPRegistryDomainContactattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPRegistryDomainContactinstance.booleanequals(java.lang.Object aObject)implements a deepEPPRegistryDomainContactcompare.protected java.lang.StringgetElmMax()Gets the maximum element local name.protected java.lang.StringgetElmMin()Gets the minimum element local name.protected org.slf4j.LoggergetLogger()Gets theLoggerto use.protected java.lang.StringgetRootName()Gets the root element local name.EPPRegistryDomainContact.TypegetType()Gets the type of contact.voidsetType(EPPRegistryDomainContact.Type aType)Sets the type of contact.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.protected voidvalidateState()Validate the state of theEPPRegistryDomainContactinstance.-
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 thetypeattribute.- 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 newEPPRegistryDomainContactobject 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 newEPPRegistryDomainContactobject 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 EPPEncodeExceptionEncode a DOM Element tree from the attributes of theEPPRegistryDomainContactinstance.- Specified by:
encodein interfaceEPPCodecComponent- Overrides:
encodein classEPPRegistryAbstractMinMax- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element Root DOM Element representing the
EPPRegistryDomainContactinstance. - Throws:
EPPEncodeException- - Unable to encodeEPPRegistryDomainContactinstance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPRegistryDomainContactattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Overrides:
decodein classEPPRegistryAbstractMinMax- Parameters:
aElement- Root DOM Element to decodeEPPRegistryDomainContactfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPRegistryDomainContact.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPRegistryAbstractMinMax- Returns:
- clone of
EPPRegistryDomainContact - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryDomainContactcompare.- Overrides:
equalsin classEPPRegistryAbstractMinMax- Parameters:
aObject-EPPRegistryDomainContactinstance 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 classEPPRegistryAbstractMinMax- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getType
public EPPRegistryDomainContact.Type getType()
Gets the type of contact.- Returns:
- Type of contact if defined;
nullotherwise.
-
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:
getRootNamein classEPPRegistryAbstractMinMax- Returns:
- Root element local name.
-
getElmMin
protected java.lang.String getElmMin()
Gets the minimum element local name.- Specified by:
getElmMinin classEPPRegistryAbstractMinMax- Returns:
- Minimum element local name.
-
getElmMax
protected java.lang.String getElmMax()
Gets the maximum element local name.- Specified by:
getElmMaxin classEPPRegistryAbstractMinMax- Returns:
- Maximum element local name.
-
getLogger
protected org.slf4j.Logger getLogger()
Gets theLoggerto use.- Specified by:
getLoggerin classEPPRegistryAbstractMinMax- Returns:
Loggerinstance to use for logging.
-
validateState
protected void validateState() throws EPPEncodeExceptionValidate the state of theEPPRegistryDomainContactinstance. 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.- Overrides:
validateStatein classEPPRegistryAbstractMinMax- Throws:
EPPEncodeException- Validation error
-
-