Package com.verisign.epp.codec.registry
Class EPPRegistryDomainContact
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryMinMax
-
- com.verisign.epp.codec.registry.EPPRegistryDomainContact
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPRegistryDomainContact extends EPPRegistryMinMax
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
EPPRegistryMinMax.getMin()andEPPRegistryMinMax.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
EPPRegistryMinMax.getMax()andEPPRegistryMinMax.setMax(Integer)to get and set this element.
- See Also:
EPPRegistryDomain, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_TYPEXML attribute name for thetypeattribute.static java.lang.StringELM_NAMEXML Element Name ofEPPRegistryDomainContactroot element.static java.lang.StringTYPE_ADMIN"admin" contact typestatic java.lang.StringTYPE_BILLING"billing" contact typestatic java.lang.StringTYPE_TECH"tech" contact typestatic java.util.SetVALID_TYPES-
Fields inherited from class com.verisign.epp.codec.registry.EPPRegistryMinMax
ELM_MAX, ELM_MAX_LENGTH, ELM_MIN, ELM_MIN_LENGTH, elmMax, elmMin, max, min, rootName
-
-
Constructor Summary
Constructors Constructor Description EPPRegistryDomainContact()Default constructor of EPPRegistryDomainContact.EPPRegistryDomainContact(java.lang.String type, int min, int max)Constructor an EPPRegistryDomainContact with type, min and max.EPPRegistryDomainContact(java.lang.String type, java.lang.Integer min, java.lang.Integer max)Constructor an EPPRegistryDomainContact with type, min and max.
-
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.java.lang.StringgetRootName()Return the root name of the XML element.java.lang.StringgetType()Get type of contact.voidsetType(java.lang.String type)Set type of contact.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.-
Methods inherited from class com.verisign.epp.codec.registry.EPPRegistryMinMax
getElmMax, getElmMin, getMax, getMin, getNamespace, setElmMax, setElmMin, setMax, setMin, setRootName
-
-
-
-
Field Detail
-
ELM_NAME
public static final java.lang.String ELM_NAME
XML Element Name ofEPPRegistryDomainContactroot element.- 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
-
TYPE_ADMIN
public static final java.lang.String TYPE_ADMIN
"admin" contact type- See Also:
- Constant Field Values
-
TYPE_BILLING
public static final java.lang.String TYPE_BILLING
"billing" contact type- See Also:
- Constant Field Values
-
TYPE_TECH
public static final java.lang.String TYPE_TECH
"tech" contact type- See Also:
- Constant Field Values
-
VALID_TYPES
public static java.util.Set VALID_TYPES
-
-
Constructor Detail
-
EPPRegistryDomainContact
public EPPRegistryDomainContact()
Default constructor of EPPRegistryDomainContact. All attributes are set to null. Must callsetType(String)andEPPRegistryMinMax.setMin(Integer)before callingencode(Document).
-
EPPRegistryDomainContact
public EPPRegistryDomainContact(java.lang.String type, java.lang.Integer min, java.lang.Integer max)Constructor an EPPRegistryDomainContact with type, min and max.- Parameters:
type- type of contactmin- minimum number of contact entries.max- maximum number of contact entries.
-
EPPRegistryDomainContact
public EPPRegistryDomainContact(java.lang.String type, int min, int max)Constructor an EPPRegistryDomainContact with type, min and max.- Parameters:
type- type of contactmin- minimum number of contact entries.max- 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 classEPPRegistryMinMax- 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 classEPPRegistryMinMax- 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 classEPPRegistryMinMax- 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 classEPPRegistryMinMax- Parameters:
aObject-EPPRegistryDomainContactinstance to compare with- Returns:
trueif this object is the same as the aObject argument;falseotherwise
-
getRootName
public java.lang.String getRootName()
Return the root name of the XML element.- Overrides:
getRootNamein classEPPRegistryMinMax- Returns:
EPPRegistryDomainContact.ELM_NAME
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classEPPRegistryMinMax- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getType
public java.lang.String getType()
Get type of contact.- Returns:
- type of contact
-
setType
public void setType(java.lang.String type)
Set type of contact.- Parameters:
type- type of contact
-
-