Package com.verisign.epp.codec.registry
Class EPPRegistryPostal
- java.lang.Object
-
- com.verisign.epp.codec.registry.EPPRegistryPostal
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPRegistryPostal extends java.lang.Object implements EPPCodecComponent
Represents the postal-address information policy information. The <registry:postalInfo> element contains the following child elements:
- <registry:name> - The minimum and maximum length of <contact:name> element defined RFC 5733 using the <registry:minLength> and <registry:maxLength> child elements, respectively.
- <registry:org> - The minimum and maximum length of the <contact:org> element defined in RFC 5733 using the <registry:minLength> and <registry:maxLength> child elements, respectively.
- <registry:address> - The address information policy information.
- <registry:voiceRequired> - An OPTIONAL boolean flag indicating whether the server requires the <contact:voice> element to be defined, with a default value of "false".
- <registry:voiceExt> - The OPTIONAL minimum and maximum length of the <contact:voice> extension "x" attribute defined in RFC 5733 using the <registry:minLength> and <registry:maxLength> child elements, respectively.
- <registry:faxExt> - The OPTIONAL minimum and maximum length of the <contact:fax> extension "x" attribute defined in RFC 5733 [RFC5733] using the <registry:minLength> and <registry:maxLength> child elements, respectively.
- <registry:emailRegex> - Zero or more <registry:emailRegex> elements that define the regular expressions used to validate the <contact:email> element defined in RFC 5733
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ELM_EMAIL_REGEX
static java.lang.String
ELM_FAX_EXT
Constant for the faxExt local namestatic java.lang.String
ELM_LOCALNAME
Constant for the local namestatic java.lang.String
ELM_NAME
Constant for the prefix and local namestatic java.lang.String
ELM_VOICE_EXT
Constant for the voiceExt local namestatic java.lang.String
ELM_VOICE_REQUIRED
-
Constructor Summary
Constructors Constructor Description EPPRegistryPostal()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEmailRegex(EPPRegistryRegex re)
Adds one email regular expression to an existing list.java.lang.Object
clone()
CloneEPPRegistryPostal
.void
decode(org.w3c.dom.Element aElement)
Decode theEPPRegistryPostal
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 theEPPRegistryPostal
instance.boolean
equals(java.lang.Object aObject)
implements a deepEPPRegistryPostal
compare.EPPRegistryContactAddress
getAddress()
Gets address.java.util.List
getEmailRegex()
Gets email regular expression.EPPRegistryMinMaxLength
getFaxExt()
Gets the optional fax extension minimum and maximum length.EPPRegistryContactName
getName()
Gets the minimum and maximum length of name.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.EPPRegistryContactOrg
getOrg()
Gets the minimum and maximum length of organization.EPPRegistryMinMaxLength
getVoiceExt()
Gets the optional voice extension minimum and maximum length.java.lang.Boolean
getVoiceRequired()
Gets voice required flag.void
setAddress(EPPRegistryContactAddress address)
Sets address.void
setEmailRegex(java.util.List emailRegex)
Sets email regular expression.void
setFaxExt(EPPRegistryMinMaxLength aFaxExt)
Sets the optional fax extension minimum and maximum length.void
setName(EPPRegistryContactName name)
Sets the minimum and maximum length of name.void
setOrg(EPPRegistryContactOrg org)
Sets the minimum and maximum length of organization.void
setVoiceExt(EPPRegistryMinMaxLength aVoiceExt)
Sets the optional voice extension minimum and maximum length.void
setVoiceRequired(java.lang.Boolean voiceRequired)
Sets voice required flag.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
ELM_LOCALNAME
public static final java.lang.String ELM_LOCALNAME
Constant for the local name- See Also:
- Constant Field Values
-
ELM_NAME
public static final java.lang.String ELM_NAME
Constant for the prefix and local name- See Also:
- Constant Field Values
-
ELM_VOICE_REQUIRED
public static final java.lang.String ELM_VOICE_REQUIRED
- See Also:
- Constant Field Values
-
ELM_EMAIL_REGEX
public static final java.lang.String ELM_EMAIL_REGEX
- See Also:
- Constant Field Values
-
ELM_VOICE_EXT
public static final java.lang.String ELM_VOICE_EXT
Constant for the voiceExt local name- See Also:
- Constant Field Values
-
ELM_FAX_EXT
public static final java.lang.String ELM_FAX_EXT
Constant for the faxExt local name- See Also:
- Constant Field Values
-
-
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 theEPPRegistryPostal
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
EPPRegistryPostal
instance. - Throws:
EPPEncodeException
- - Unable to encodeEPPRegistryPostal
instance.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
Decode theEPPRegistryPostal
attributes from the aElement DOM Element tree.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- Root DOM Element to decodeEPPRegistryPostal
from.- Throws:
EPPDecodeException
- Unable to decode aElement
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPRegistryPostal
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- clone of
EPPRegistryPostal
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPRegistryPostal
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPRegistryPostal
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 classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getName
public EPPRegistryContactName getName()
Gets the minimum and maximum length of name.- Returns:
EPPRegistryContactName
instance that contains min/max length of contact name
-
setName
public void setName(EPPRegistryContactName name)
Sets the minimum and maximum length of name.- Parameters:
name
-EPPRegistryContactName
instance that contains min/max length of contact name
-
getOrg
public EPPRegistryContactOrg getOrg()
Gets the minimum and maximum length of organization.- Returns:
EPPRegistryContactOrg
instance that contains min/max length of contact organization
-
setOrg
public void setOrg(EPPRegistryContactOrg org)
Sets the minimum and maximum length of organization.- Parameters:
org
-EPPRegistryContactOrg
instance that contains min/max length of contact organization
-
getAddress
public EPPRegistryContactAddress getAddress()
Gets address.- Returns:
EPPRegistryContactAddress
instance that contains contact address attributes
-
setAddress
public void setAddress(EPPRegistryContactAddress address)
Sets address.- Parameters:
address
-EPPRegistryContactAddress
instance that contains contact address attributes
-
getVoiceRequired
public java.lang.Boolean getVoiceRequired()
Gets voice required flag.- Returns:
true
if voice is required.false
otherwise.
-
setVoiceRequired
public void setVoiceRequired(java.lang.Boolean voiceRequired)
Sets voice required flag.- Parameters:
voiceRequired
-true
if voice is required.false
otherwise.
-
getVoiceExt
public EPPRegistryMinMaxLength getVoiceExt()
Gets the optional voice extension minimum and maximum length.- Returns:
EPPRegistryMinMaxLength
instance containing the minimum and maximum length if defined;null
otherise.
-
setVoiceExt
public void setVoiceExt(EPPRegistryMinMaxLength aVoiceExt)
Sets the optional voice extension minimum and maximum length.- Parameters:
aVoiceExt
-EPPRegistryMinMaxLength
instance containing the minimum and maximum length.
-
getFaxExt
public EPPRegistryMinMaxLength getFaxExt()
Gets the optional fax extension minimum and maximum length.- Returns:
EPPRegistryMinMaxLength
instance containing the minimum and maximum length if defined;null
otherise.
-
setFaxExt
public void setFaxExt(EPPRegistryMinMaxLength aFaxExt)
Sets the optional fax extension minimum and maximum length.- Parameters:
aFaxExt
-EPPRegistryMinMaxLength
instance containing the minimum and maximum length.
-
getEmailRegex
public java.util.List getEmailRegex()
Gets email regular expression.- Returns:
- regular expression used to validate <contact:email> element defined in RFC 5733
-
addEmailRegex
public void addEmailRegex(EPPRegistryRegex re)
Adds one email regular expression to an existing list.- Parameters:
re
- regular expression used to validate <contact:email> element defined in RFC 5733
-
setEmailRegex
public void setEmailRegex(java.util.List emailRegex)
Sets email regular expression.- Parameters:
emailRegex
- regular expression used to validate <contact:email> element defined in RFC 5733
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-