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.String
ATTR_TYPE
XML attribute name for thetype
attribute.static java.lang.String
ELM_NAME
XML Element Name ofEPPRegistryDomainContact
root element.static java.lang.String
TYPE_ADMIN
"admin" contact typestatic java.lang.String
TYPE_BILLING
"billing" contact typestatic java.lang.String
TYPE_TECH
"tech" contact typestatic java.util.Set
VALID_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.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.java.lang.String
getRootName()
Return the root name of the XML element.java.lang.String
getType()
Get type of contact.void
setType(java.lang.String type)
Set type of contact.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation 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 ofEPPRegistryDomainContact
root element.- 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
-
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 EPPEncodeException
Encode a DOM Element tree from the attributes of theEPPRegistryDomainContact
instance.- Specified by:
encode
in interfaceEPPCodecComponent
- Overrides:
encode
in classEPPRegistryMinMax
- 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 classEPPRegistryMinMax
- 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 classEPPRegistryMinMax
- 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 classEPPRegistryMinMax
- Parameters:
aObject
-EPPRegistryDomainContact
instance to compare with- Returns:
true
if this object is the same as the aObject argument;false
otherwise
-
getRootName
public java.lang.String getRootName()
Return the root name of the XML element.- Overrides:
getRootName
in classEPPRegistryMinMax
- Returns:
EPPRegistryDomainContact.ELM_NAME
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classEPPRegistryMinMax
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
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
-
-