Package com.verisign.epp.codec.contact
Class EPPContactPostalDefinition
- java.lang.Object
-
- com.verisign.epp.codec.contact.EPPContactPostalDefinition
-
- All Implemented Interfaces:
EPPCodecComponent,java.io.Serializable,java.lang.Cloneable
public class EPPContactPostalDefinition extends java.lang.Object implements EPPCodecComponent
Represents a contact postal address definition that is used inEPPContactCreateCmd,EPPContactUpdateCmd, andEPPContactInfoResp. The child elements associated with anEPPContactPostalDefinitioninclude:
- 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_TYPE_INTValue of the INT in contact postal info type mappingstatic java.lang.StringATTR_TYPE_LOCValue of the LOC in contact postal info type mappingstatic java.lang.StringELM_NAME_POSTAL_INFOXML tag name for theorgattribute.
-
Constructor Summary
Constructors Constructor Description EPPContactPostalDefinition()EPPContactPostalDefinitiondefault constructor.EPPContactPostalDefinition(java.lang.String aType)EPPContactPostalDefinitionconstructor that takes the contact address type as argument.EPPContactPostalDefinition(java.lang.String aType, EPPContactAddress aAddress)EPPContactPostalDefinitionconstructor that sets the required attributes with the parameters.EPPContactPostalDefinition(java.lang.String aName, java.lang.String aType, EPPContactAddress aAddress)EPPContactPostalDefinitionconstructor that sets the required attributes with the parameters.EPPContactPostalDefinition(java.lang.String aName, java.lang.String aOrg, java.lang.String aType, EPPContactAddress aAddress)EPPContactPostalDefinitionconstructor that sets all of the attribute with the parameter values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()CloneEPPContactPostalDefinition.voiddecode(org.w3c.dom.Element aElement)Decode theEPPContactPostalDefinitionattributes from the aElement DOM Element tree.org.w3c.dom.Elementencode(org.w3c.dom.Document aDocument)Encode a DOM Element tree from the attributes of theEPPContactPostalDefinitioninstance.booleanequals(java.lang.Object aObject)implements a deepEPPContactPostalDefinitioncompare.EPPContactAddressgetAddress()Gets the contact addressjava.lang.StringgetName()Gets the contact namejava.lang.StringgetNamespace()Returns the XML namespace associated with theEPPCodecComponent.java.lang.StringgetOrg()Gets the contact organizationjava.lang.StringgetRootName()Get root tag name for contact postal definition.java.lang.StringgetType()Get contact address type.booleanhasAddress()Returnstrueif the postal info defintion has address.booleanhasName()Returnstrueif the postal info definition has name.booleanhasOrg()Returnstrueif the postal info definition has organization.booleanhasRootName()Returnstrueif the postal info definition has root name.booleanhasType()Returnstrueif the postal info definition has type.booleanisValidated()Show whether needs to call validateState()voidsetAddress(EPPContactAddress aAddress)Sets the contact addressvoidsetName(java.lang.String aName)Sets the contact name.voidsetOrg(java.lang.String aOrg)Sets the contact organizationvoidsetRootName(java.lang.String newRootName)Set root tag name for contact postal definition.voidsetType(java.lang.String newType)Set contact type.voidsetValidatedFlag(boolean newValidatedFlag)Set validated flag.java.lang.StringtoString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
-
-
Field Detail
-
ELM_NAME_POSTAL_INFO
public static final java.lang.String ELM_NAME_POSTAL_INFO
XML tag name for theorgattribute.- See Also:
- Constant Field Values
-
ATTR_TYPE_LOC
public static final java.lang.String ATTR_TYPE_LOC
Value of the LOC in contact postal info type mapping- See Also:
- Constant Field Values
-
ATTR_TYPE_INT
public static final java.lang.String ATTR_TYPE_INT
Value of the INT in contact postal info type mapping- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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
public EPPContactPostalDefinition(java.lang.String aType)
EPPContactPostalDefinitionconstructor that takes the contact address type as argument.- Parameters:
aType- address type which should be one of theATTR_TYPEconstants.
-
EPPContactPostalDefinition
public EPPContactPostalDefinition(java.lang.String aType, EPPContactAddress aAddress)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
public EPPContactPostalDefinition(java.lang.String aName, java.lang.String aType, EPPContactAddress aAddress)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(java.lang.String aName, java.lang.String aOrg, java.lang.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 Detail
-
getOrg
public java.lang.String 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
public void setOrg(java.lang.String aOrg)
Sets the contact organization- Parameters:
aOrg- Client organization
-
getAddress
public EPPContactAddress 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
public void setAddress(EPPContactAddress aAddress)
Sets the contact address- Parameters:
aAddress- Contact address
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeExceptionEncode 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
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeExceptionDecode theEPPContactPostalDefinitionattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPContactPostalDefinitionfrom.- Throws:
EPPDecodeException- On decoding error
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPContactPostalDefinitioncompare.- Overrides:
equalsin classjava.lang.Object- Parameters:
aObject-EPPContactPostalDefinitioninstance to compare with- Returns:
trueif objects are equal otherwisefalse
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCloneEPPContactPostalDefinition.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classjava.lang.Object- Returns:
- clone of
EPPContactPostalDefinition - Throws:
java.lang.CloneNotSupportedException- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.- Overrides:
toStringin classjava.lang.Object- Returns:
- Indented XML
Stringif successful;ERRORotherwise.
-
getName
public java.lang.String 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
public java.lang.String 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
public void setName(java.lang.String aName)
Sets the contact name.- Parameters:
aName- Contact Name
-
setRootName
public void setRootName(java.lang.String newRootName)
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
public java.lang.String 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
public void setType(java.lang.String newType)
Set contact type.- Parameters:
newType- String
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-
-