Package com.verisign.epp.codec.contact
Class EPPContactPostalDefinition
java.lang.Object
com.verisign.epp.codec.contact.EPPContactPostalDefinition
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
Represents a contact postal address definition that is used in
EPPContactCreateCmd,
EPPContactUpdateCmd, and EPPContactInfoResp. The child elements associated with an
EPPContactPostalDefinition include: - A <contact:name> element that contains the name of the individual or role represented by the contact. Use
getNameandsetNameto get and set the element. - An OPTIONAL <contact:org> element that contains the name of the organization with which the contact is
affiliated. Use
getOrgandsetOrgto get and set the element. - A <contact:addr> element that contains address information associated with the contact. Use
getAddressandsetAdressto get and set the element.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEPPContactPostalDefinitiondefault constructor.EPPContactPostalDefinition(String aType) EPPContactPostalDefinitionconstructor that takes the contact address type as argument.EPPContactPostalDefinition(String aType, EPPContactAddress aAddress) EPPContactPostalDefinitionconstructor that sets the required attributes with the parameters.EPPContactPostalDefinition(String aName, String aType, EPPContactAddress aAddress) EPPContactPostalDefinitionconstructor that sets the required attributes with the parameters.EPPContactPostalDefinition(String aName, String aOrg, String aType, EPPContactAddress aAddress) EPPContactPostalDefinitionconstructor that sets all of the attribute with the parameter values. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPContactPostalDefinition.voidDecode theEPPContactPostalDefinitionattributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPContactPostalDefinitioninstance.booleanimplements a deepEPPContactPostalDefinitioncompare.Gets the contact addressgetName()Gets the contact nameReturns the XML namespace associated with theEPPCodecComponent.getOrg()Gets the contact organizationGet root tag name for contact postal definition.getType()Get contact address type.booleanReturnstrueif the postal info defintion has address.booleanhasName()Returnstrueif the postal info definition has name.booleanhasOrg()Returnstrueif the postal info definition has organization.booleanReturnstrueif the postal info definition has root name.booleanhasType()Returnstrueif the postal info definition has type.booleanShow whether needs to call validateState()voidsetAddress(EPPContactAddress aAddress) Sets the contact addressvoidSets the contact name.voidSets the contact organizationvoidsetRootName(String newRootName) Set root tag name for contact postal definition.voidSet contact type.voidsetValidatedFlag(boolean newValidatedFlag) Set validated flag.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
ELM_NAME_POSTAL_INFO
XML tag name for theorgattribute.- See Also:
-
ATTR_TYPE_LOC
Value of the LOC in contact postal info type mapping- See Also:
-
ATTR_TYPE_INT
Value of the INT in contact postal info type mapping- See Also:
-
-
Constructor Details
-
EPPContactPostalDefinition
public EPPContactPostalDefinition()EPPContactPostalDefinitiondefault constructor. Must call required setter methods before invokingencode, which include:
- id -
setId - name -
setName - type -
setType - address -
setAddress - voice -
setVoice - email -
setEmail
The following optional attributes can be set:
- org -
setOrg - fax -
setFax
- id -
-
EPPContactPostalDefinition
EPPContactPostalDefinitionconstructor that takes the contact address type as argument.- Parameters:
aType- address type which should be one of theATTR_TYPEconstants.
-
EPPContactPostalDefinition
EPPContactPostalDefinitionconstructor that sets the required attributes with the parameters. The following optional attribute can be set:
- org -
setOrg - fax -
setFax - name -
setName
- Parameters:
aType- postal definition type loc or intaAddress- contact address
- org -
-
EPPContactPostalDefinition
EPPContactPostalDefinitionconstructor that sets the required attributes with the parameters. The following optional attribute can be set:
- org -
setOrg - fax -
setFax
- Parameters:
aName- contact nameaType- postal definition type loc or intaAddress- contact address
- org -
-
EPPContactPostalDefinition
public EPPContactPostalDefinition(String aName, String aOrg, String aType, EPPContactAddress aAddress) EPPContactPostalDefinitionconstructor that sets all of the attribute with the parameter values.- Parameters:
aName- contact nameaOrg- contact organization if defined;nullotherwiseaType- postal definition type loc or intaAddress- contact address
-
-
Method Details
-
getOrg
Gets the contact organization- Returns:
- Client organization if defined;
nullotherwise.
-
hasOrg
public boolean hasOrg()Returnstrueif the postal info definition has organization.- Returns:
trueif the postal info definition has organizationfalseotherwise
-
setOrg
Sets the contact organization- Parameters:
aOrg- Client organization
-
getAddress
Gets the contact address- Returns:
- Contact address if defined;
nullotherwise.
-
hasAddress
public boolean hasAddress()Returnstrueif the postal info defintion has address.- Returns:
trueif the postal info definition has addressfalseotherwise
-
setAddress
Sets the contact address- Parameters:
aAddress- Contact address
-
encode
Encode a DOM Element tree from the attributes of theEPPContactPostalDefinitioninstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Element
- Throws:
EPPEncodeException- On encoding error
-
decode
Decode theEPPContactPostalDefinitionattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPContactPostalDefinitionfrom.- Throws:
EPPDecodeException- On decoding error
-
equals
implements a deepEPPContactPostalDefinitioncompare. -
clone
CloneEPPContactPostalDefinition.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPContactPostalDefinition - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getName
Gets the contact name- Returns:
- Contact Name if defined;
nullotherwise.
-
hasName
public boolean hasName()Returnstrueif the postal info definition has name.- Returns:
trueif the postal info definition has namefalseotherwise
-
getRootName
Get root tag name for contact postal definition.- Returns:
- String root tag name
-
hasRootName
public boolean hasRootName()Returnstrueif the postal info definition has root name.- Returns:
trueif the postal info definition has root namefalseotherwise
-
setName
Sets the contact name.- Parameters:
aName- Contact Name
-
setRootName
Set root tag name for contact postal definition.- Parameters:
newRootName- String
-
isValidated
public boolean isValidated()Show whether needs to call validateState()- Returns:
- boolean
-
setValidatedFlag
public void setValidatedFlag(boolean newValidatedFlag) Set validated flag.- Parameters:
newValidatedFlag- boolean
-
getType
Get contact address type.- Returns:
- String Contact type
-
hasType
public boolean hasType()Returnstrueif the postal info definition has type.- Returns:
trueif the postal info definition has typefalseotherwise
-
setType
Set contact type.- Parameters:
newType- String
-
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-