|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.verisign.epp.codec.contact.EPPContactAddress
public class EPPContactAddress
Represents a contact address specified in EPPContactCreateCmd
, EPPContactUpdateCmd
, or
EPPContactInfoResp
. Every contact has associated postal address information. A postal address contains
OPTIONAL street information, city information, OPTIONAL state/province information, an OPTIONAL postal code, and a
country identifier as described in [ISO11180]. Address information MAY be provided in both a subset of UTF-8
[RFC2279] that can be represented in 7-bit ASCII [US-ASCII] and unrestricted UTF-8. A contact address is defined as
the following in the EPP Contact Mapping Specification:
A <contact:addr> element that contains address information associated with the contact. A <contact:addr>
element contains the following child elements:
getStreets
and setStreets
to get and set the elements.getCity
and
setCity
to get and set the element.getStateProvince
and
setStateProvince
to get and set the element.getPostalCode
and setPostalCode
to get and set the element.getCountry
and setCountry
to get and set the element.
EPPContactCreateCmd
,
EPPContactUpdateCmd
,
EPPContactInfoResp
,
Serialized FormConstructor Summary | |
---|---|
EPPContactAddress()
Default constructor for EPPContactAddress . |
|
EPPContactAddress(java.lang.String aCity,
java.lang.String aCountry)
Constructor for EPPContactAddress all of the required attributes as parameters. |
|
EPPContactAddress(java.util.Vector someStreets,
java.lang.String aCity,
java.lang.String aStateProvince,
java.lang.String aPostalCode,
java.lang.String aCountry)
Constructor for EPPContactAddress all of the required attributes as parameters. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clone EPPContactAddress . |
void |
decode(org.w3c.dom.Element aElement)
Decode the EPPContactAddress 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 the EPPContactAddress instance. |
boolean |
equals(java.lang.Object aObject)
implements a deep EPPContactAddress compare. |
java.lang.String |
getCity()
Gets the contact city. |
java.lang.String |
getCountry()
Gets the contact country. |
java.lang.String |
getPostalCode()
Gets the contact postal code |
java.lang.String |
getStateProvince()
Gets the contact state/province. |
java.util.Vector |
getStreets()
Gets the contact street(s). |
boolean |
hasCity()
Returns true if the address has city. |
boolean |
hasCountry()
Returns true if the address has country. |
boolean |
hasPostalCode()
Returns true if the address has postal code. |
boolean |
hasStateProvince()
Returns true if the address has state. |
boolean |
hasStreets()
Returns true if the address has at least one street. |
void |
setCity(java.lang.String aCity)
Sets the contact city. |
void |
setCountry(java.lang.String aCountry)
Sets the contact country. |
void |
setPostalCode(java.lang.String aPostalCode)
Sets the contact postal code |
void |
setStateProvince(java.lang.String aStateProvince)
Sets the contact state/province. |
void |
setStreet(java.lang.String aStreet)
Sets the contact street with only one String parameter. |
void |
setStreets(java.lang.String aStreet1,
java.lang.String aStreet2)
Sets the contact street with two sub-street String 's. |
void |
setStreets(java.lang.String aStreet1,
java.lang.String aStreet2,
java.lang.String aStreet3)
Sets the contact street with three sub-street String 's. |
void |
setStreets(java.util.Vector someStreets)
Sets the contact street attribute with a Vector of String 's. |
java.lang.String |
toString()
Implementation of , which will result in an indented XML String representation
of the concrete EPPCodecComponent . |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EPPContactAddress()
EPPContactAddress
. All the the attributes default to null
. Must
call required setter methods before invoking encode
, which include:setCity
setCountry
public EPPContactAddress(java.lang.String aCity, java.lang.String aCountry)
EPPContactAddress
all of the required attributes as parameters.
aCity
- contact streetaCountry
- contract countrypublic EPPContactAddress(java.util.Vector someStreets, java.lang.String aCity, java.lang.String aStateProvince, java.lang.String aPostalCode, java.lang.String aCountry)
EPPContactAddress
all of the required attributes as parameters.
someStreets
- Vector
of street (up to maximum three) String
'saCity
- contact streetaStateProvince
- contact state/provinceaPostalCode
- contact postal codeaCountry
- contract countryMethod Detail |
---|
public java.util.Vector getStreets()
Vector
of street (up to maximum three) String
if defined;
null
otherwise.public boolean hasStreets()
true
if the address has at least one street.
true
if the address at least one street false
otherwisepublic void setStreet(java.lang.String aStreet)
String
parameter. Only a one element Vector
will be
returned on a call to getStreets
when originally set with this method.
aStreet
- contact street.public void setStreets(java.util.Vector someStreets)
Vector
of String
's.
someStreets
- Vector
of one or two street String
's.public void setStreets(java.lang.String aStreet1, java.lang.String aStreet2)
String
's.
aStreet1
- First part/line of contact streetaStreet2
- Second part/line of contact streetpublic void setStreets(java.lang.String aStreet1, java.lang.String aStreet2, java.lang.String aStreet3)
String
's.
aStreet1
- First part/line of contact streetaStreet2
- Second part/line of contact streetaStreet3
- Third part/line of contact streetpublic java.lang.String getCity()
String
if defined; null
otherwise.public boolean hasCity()
true
if the address has city.
true
if the address has city false
otherwisepublic void setCity(java.lang.String aCity)
aCity
- contact citypublic java.lang.String getStateProvince()
String
if defined; null
otherwise.public boolean hasStateProvince()
true
if the address has state.
true
if the address has state false
otherwisepublic void setStateProvince(java.lang.String aStateProvince)
aStateProvince
- contact state/provincepublic java.lang.String getPostalCode()
String
if defined; null
otherwise.public boolean hasPostalCode()
true
if the address has postal code.
true
if the address has postal code false
otherwisepublic void setPostalCode(java.lang.String aPostalCode)
aPostalCode
- contact postal codepublic java.lang.String getCountry()
String
if defined; null
otherwise.public boolean hasCountry()
true
if the address has country.
true
if the address has country false
otherwisepublic void setCountry(java.lang.String aCountry)
aCountry
- contact countrypublic org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
EPPContactAddress
instance.
encode
in interface EPPCodecComponent
aDocument
- DOM Document that is being built. Used as an Element factory.
EPPContactAddress
instance.
EPPEncodeException
- Unable to encode EPPContactAddress
instance.public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
EPPContactAddress
attributes from the aElement DOM Element tree.
decode
in interface EPPCodecComponent
aElement
- Root DOM Element to decode EPPContactAddress
from.
EPPDecodeException
- Unable to decode aElement.public boolean equals(java.lang.Object aObject)
EPPContactAddress
compare.
equals
in class java.lang.Object
aObject
- EPPContactAddress
instance to compare with
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
EPPContactAddress
.
clone
in interface EPPCodecComponent
clone
in class java.lang.Object
EPPContactAddress
java.lang.CloneNotSupportedException
- standard Object.clone exceptionpublic java.lang.String toString()
String
representation
of the concrete EPPCodecComponent
.
toString
in class java.lang.Object
String
if successful; ERROR
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |