com.verisign.epp.codec.reseller
Class EPPResellerAddress

java.lang.Object
  extended by com.verisign.epp.codec.reseller.EPPResellerAddress
All Implemented Interfaces:
EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

public class EPPResellerAddress
extends java.lang.Object
implements EPPCodecComponent

Represents a reseller address. Every reseller 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 reseller address is defined as the following:

A <reseller:addr> element that contains address information associated with the reseller. A <reseller:addr> element contains the following child elements:

See Also:
Serialized Form

Field Summary
static java.lang.String ELM_LOCALNAME
          XML local name for EPPResellerDisclose.
static java.lang.String ELM_NAME
          XML root tag for EPPResellerPostalDefinition.
 
Constructor Summary
EPPResellerAddress()
          Default constructor for EPPResellerAddress.
EPPResellerAddress(java.util.List<java.lang.String> aStreets, java.lang.String aCity, java.lang.String aStateProvince, java.lang.String aPostalCode, java.lang.String aCountry)
          Constructor for EPPResellerAddress all of the attributes as parameters.
EPPResellerAddress(java.lang.String aCity, java.lang.String aCountry)
          Constructor for EPPResellerAddress all of the required attributes as parameters.
 
Method Summary
 void addStreet(java.lang.String aStreetLine)
          Add a street line to the street.
 java.lang.Object clone()
          Clone EPPResellerAddress.
 void decode(org.w3c.dom.Element aElement)
          Decode the EPPResellerAddress 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 EPPResellerAddress instance.
 boolean equals(java.lang.Object aObject)
          implements a deep EPPResellerAddress compare.
 java.lang.String getCity()
          Gets the reseller city.
 java.lang.String getCountry()
          Gets the reseller country.
 java.lang.String getPostalCode()
          Gets the reseller postal code
 java.lang.String getStateProvince()
          Gets the reseller state/province.
 java.util.List<java.lang.String> getStreets()
          Gets the reseller street(s).
 boolean hasStreets()
          Is there any street lines set?
 void setCity(java.lang.String aCity)
          Sets the reseller city.
 void setCountry(java.lang.String aCountry)
          Sets the reseller country.
 void setPostalCode(java.lang.String aPostalCode)
          Sets the reseller postal code
 void setStateProvince(java.lang.String aStateProvince)
          Sets the reseller state/province.
 void setStreet(java.lang.String aStreet)
          Sets the reseller streets with only one line.
 void setStreets(java.util.List<java.lang.String> aStreets)
          Sets the reseller streets attribute with a List>String>, where each element represents a line of the street address.
 void setStreets(java.lang.String aStreet1, java.lang.String aStreet2)
          Sets the reseller street with two street lines.
 void setStreets(java.lang.String aStreet1, java.lang.String aStreet2, java.lang.String aStreet3)
          Sets the reseller street with three street lines.
 java.lang.String toString()
          Implementation of Object.toString, 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
 

Field Detail

ELM_LOCALNAME

public static final java.lang.String ELM_LOCALNAME
XML local name for EPPResellerDisclose.

See Also:
Constant Field Values

ELM_NAME

public static final java.lang.String ELM_NAME
XML root tag for EPPResellerPostalDefinition.

See Also:
Constant Field Values
Constructor Detail

EPPResellerAddress

public EPPResellerAddress()
Default constructor for EPPResellerAddress. All the the attributes default to null. Must call required setter methods before invoking encode(Document), which include:


EPPResellerAddress

public EPPResellerAddress(java.lang.String aCity,
                          java.lang.String aCountry)
Constructor for EPPResellerAddress all of the required attributes as parameters.

Parameters:
aCity - Reseller street
aCountry - Reseller country

EPPResellerAddress

public EPPResellerAddress(java.util.List<java.lang.String> aStreets,
                          java.lang.String aCity,
                          java.lang.String aStateProvince,
                          java.lang.String aPostalCode,
                          java.lang.String aCountry)
Constructor for EPPResellerAddress all of the attributes as parameters.

Parameters:
aStreets - List<String> collection of streets (up to maximum three)
aCity - Reseller street
aStateProvince - Reseller state/province
aPostalCode - Reseller postal code
aCountry - Reseller country
Method Detail

hasStreets

public boolean hasStreets()
Is there any street lines set?

Returns:
true if there is at least one street line set.

addStreet

public void addStreet(java.lang.String aStreetLine)
Add a street line to the street. This will add aStreetLine to the list of street lines.

Parameters:
aStreetLine - Street line to add to the street

getStreets

public java.util.List<java.lang.String> getStreets()
Gets the reseller street(s).

Returns:
street(s) as a List<String> of streets (up to maximum three).

setStreets

public void setStreets(java.util.List<java.lang.String> aStreets)
Sets the reseller streets attribute with a List>String>, where each element represents a line of the street address.

Parameters:
aStreets - Up to 3 street elements

setStreet

public void setStreet(java.lang.String aStreet)
Sets the reseller streets with only one line. Only a one element List<String> will be returned on a call to getStreets() after calling this method.

Parameters:
aStreet - Reseller street.

setStreets

public void setStreets(java.lang.String aStreet1,
                       java.lang.String aStreet2)
Sets the reseller street with two street lines.

Parameters:
aStreet1 - First street line
aStreet2 - Second street line

setStreets

public void setStreets(java.lang.String aStreet1,
                       java.lang.String aStreet2,
                       java.lang.String aStreet3)
Sets the reseller street with three street lines.

Parameters:
aStreet1 - First street line
aStreet2 - Second street line
aStreet3 - Third street line

getCity

public java.lang.String getCity()
Gets the reseller city.

Returns:
city. String if defined; null otherwise.

setCity

public void setCity(java.lang.String aCity)
Sets the reseller city.

Parameters:
aCity - reseller city

getStateProvince

public java.lang.String getStateProvince()
Gets the reseller state/province.

Returns:
state/province. String if defined; null otherwise.

setStateProvince

public void setStateProvince(java.lang.String aStateProvince)
Sets the reseller state/province.

Parameters:
aStateProvince - reseller state/province

getPostalCode

public java.lang.String getPostalCode()
Gets the reseller postal code

Returns:
postal code String if defined; null otherwise.

setPostalCode

public void setPostalCode(java.lang.String aPostalCode)
Sets the reseller postal code

Parameters:
aPostalCode - reseller postal code

getCountry

public java.lang.String getCountry()
Gets the reseller country.

Returns:
reseller country String if defined; null otherwise.

setCountry

public void setCountry(java.lang.String aCountry)
Sets the reseller country.

Parameters:
aCountry - reseller country

encode

public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
                           throws EPPEncodeException
Encode a DOM Element tree from the attributes of the EPPResellerAddress instance.

Specified by:
encode in interface EPPCodecComponent
Parameters:
aDocument - DOM Document that is being built. Used as an Element factory.
Returns:
Root DOM Element representing the EPPResellerAddress instance.
Throws:
EPPEncodeException - Unable to encode EPPResellerAddress instance.

decode

public void decode(org.w3c.dom.Element aElement)
            throws EPPDecodeException
Decode the EPPResellerAddress attributes from the aElement DOM Element tree.

Specified by:
decode in interface EPPCodecComponent
Parameters:
aElement - Root DOM Element to decode EPPResellerAddress from.
Throws:
EPPDecodeException - Unable to decode aElement.

equals

public boolean equals(java.lang.Object aObject)
implements a deep EPPResellerAddress compare.

Overrides:
equals in class java.lang.Object
Parameters:
aObject - EPPResellerAddress instance to compare with
Returns:
true of aObject is equal to instance; false otherwise.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone EPPResellerAddress.

Specified by:
clone in interface EPPCodecComponent
Overrides:
clone in class java.lang.Object
Returns:
clone of EPPResellerAddress
Throws:
java.lang.CloneNotSupportedException - standard Object.clone exception

toString

public java.lang.String toString()
Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.

Overrides:
toString in class java.lang.Object
Returns:
Indented XML String if successful; ERROR otherwise.


Copyright © VeriSign Inc. All Rights Reserved.