|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.crm.GlobalAddress
public class GlobalAddress
represents means to store addresses based on their way of transport;
in addition, it also provides a Locale and a salutation.
| Nested Class Summary | |
|---|---|
static class |
GlobalAddress.Transport
|
| Nested classes/interfaces inherited from interface com.antelmann.util.Localizable |
|---|
Localizable.Adapter |
| Field Summary | |
|---|---|
static DataFlavor |
GLOBAL_ADDRESS_FLAVOR
|
| Constructor Summary | |
|---|---|
GlobalAddress()
|
|
GlobalAddress(GlobalAddress adr)
|
|
| Method Summary | |
|---|---|
void |
clearAll()
|
boolean |
containsTransport(GlobalAddress.Transport t)
|
boolean |
ensureSnailMail()
ensures that a SnailMailAddress exists. |
boolean |
equals(Object obj)
|
void |
exportXML(OutputStream out)
exports the entire object as XML and writes it to the given Writer, so that the object can be reconstructed with importXML(InputSource). |
String |
getAddressDetailString()
provides a (multi-line) String that displays all relevant address data |
GlobalAddress.Transport[] |
getAvailableTransports()
|
BankAccount |
getBankAccount()
|
String |
getCountry()
shortcut to the SnailMailAddress |
String |
getEmail()
returns the email address set for this instance (if any) |
PhoneNumber |
getFax()
|
GeoPoint |
getGeoPoint()
|
String |
getIM()
returns the address-String for instant messaging |
Locale |
getLocale()
if a Locale is explicitly set to a non-null value, it is returned; otherwise, the locale is constructed using the country code. |
static Hashtable<Class<?>,PersistenceDelegate> |
getPersistenceDelegates()
|
String |
getSalutation()
provides a suitable String to address the person/company/entity in a letter header |
PhoneNumber |
getSMS()
|
SnailMailAddress |
getSnailMail()
|
String |
getSnailMailAddressString()
|
String |
getSnailMailAddressString(Locale l)
|
Locale |
getSpecifiedLocale()
returns the locale that was explicitly set by setLocale(Locale), if any |
TimeZone |
getTimeZone()
|
String |
getTitle()
shortcut to the SnailMailAddress |
URL |
getURL()
|
Object |
getValuefor(GlobalAddress.Transport t)
|
PhoneNumber |
getVoice()
|
boolean |
hasEmail()
|
int |
hashCode()
|
boolean |
hasSnailMail()
|
void |
importXML(InputStream source)
The object is fully reinitialized with the XML data contained in the given ImputSource, so that the object has the same state as it had during export. |
boolean |
isEmpty()
|
void |
removeAddress(GlobalAddress.Transport t)
|
boolean |
sameAs(GlobalAddress adr)
|
void |
setAllFrom(GlobalAddress ga)
initializes the internal map based on the content of the given address instance |
void |
setBankAccount(BankAccount ba)
|
void |
setEmail(String email)
allows to specify an email address for this instance |
void |
setFax(PhoneNumber fax)
|
void |
setFax(String number)
|
void |
setGeoPoint(GeoPoint gp)
|
void |
setIM(String im)
|
void |
setLocale(Locale locale)
|
void |
setLocale(Locale locale,
Object context)
sets the Locale for this object so that all subsequent return values of method calls to this instance can be localized accordingly until a different Locale is set. |
void |
setSalutation(String salutation)
|
void |
setSMS(PhoneNumber sms)
|
void |
setSMS(String number)
|
void |
setSnailMail(SnailMailAddress adr)
|
void |
setTimeZone(TimeZone tz)
|
void |
setTitle(String title)
shortcut to the SnailMailAddress |
void |
setURL(URL url)
|
void |
setValueFor(GlobalAddress.Transport t,
Object address)
|
void |
setVoice(PhoneNumber phone)
|
void |
setVoice(String phone)
|
boolean |
supportsTransport(GlobalAddress.Transport t)
determines if the given transport type is supported; returns true by default |
String |
toDetailedString()
provides full details of this instance in a String. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final DataFlavor GLOBAL_ADDRESS_FLAVOR
| Constructor Detail |
|---|
public GlobalAddress()
public GlobalAddress(GlobalAddress adr)
| Method Detail |
|---|
public void clearAll()
public boolean isEmpty()
public boolean ensureSnailMail()
SnailMailAddress exists.
public static Hashtable<Class<?>,PersistenceDelegate> getPersistenceDelegates()
public void exportXML(OutputStream out)
throws IOException
XMLSerializableimportXML(InputSource).
The given stream is neither flushed nor closed, so that other data may be
effectively written to the InputSource after the method returned.
exportXML in interface XMLSerializableIOExceptionXMLSerializable.importXML(InputStream)
public void importXML(InputStream source)
throws SAXException,
IOException
XMLSerializable
importXML in interface XMLSerializableSAXException
IOExceptionXMLSerializable.exportXML(OutputStream)public String toDetailedString()
DetailedString
toDetailedString in interface DetailedString@Localized public String getAddressDetailString()
public void setAllFrom(GlobalAddress ga)
throws NullPointerException,
IllegalArgumentException
setAllFrom in interface Forgeable<GlobalAddress>ga - the object whose behavior is to be copied to this instance
NullPointerException - if the given object parameter is null
IllegalArgumentException - if the given object contains properties that
for some reason cannot be copied to this instancesupportsTransport(Transport)public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic boolean sameAs(GlobalAddress adr)
public Object getValuefor(GlobalAddress.Transport t)
public boolean containsTransport(GlobalAddress.Transport t)
public GlobalAddress.Transport[] getAvailableTransports()
public void removeAddress(GlobalAddress.Transport t)
public boolean supportsTransport(GlobalAddress.Transport t)
public void setValueFor(GlobalAddress.Transport t,
Object address)
throws IllegalArgumentException,
NullPointerException
IllegalArgumentException - if the given transport is not supported or the if the address doesn't match the transport
NullPointerExceptionsupportsTransport(Transport)public GeoPoint getGeoPoint()
getGeoPoint in interface GeoEncodedpublic void setGeoPoint(GeoPoint gp)
public boolean hasSnailMail()
public SnailMailAddress getSnailMail()
public void setSnailMail(SnailMailAddress adr)
public String getSnailMailAddressString()
public String getSnailMailAddressString(Locale l)
public boolean hasEmail()
public String getEmail()
public void setEmail(String email)
public PhoneNumber getVoice()
public void setVoice(String phone)
public void setVoice(PhoneNumber phone)
public PhoneNumber getFax()
public void setFax(String number)
public void setFax(PhoneNumber fax)
public String getIM()
public void setIM(String im)
public URL getURL()
public void setURL(URL url)
public PhoneNumber getSMS()
public void setSMS(String number)
public void setSMS(PhoneNumber sms)
public BankAccount getBankAccount()
public void setBankAccount(BankAccount ba)
public TimeZone getTimeZone()
public void setTimeZone(TimeZone tz)
public void setSalutation(String salutation)
public String getSalutation()
public void setLocale(Locale locale,
Object context)
Localizable
setLocale in interface Localizablelocale - the Locale that is to be used to determine return values for all methods
of this instance; if set to null, the default locale is to be used.context - a context that may be required for this instance to load the resources for the given locale;
this context may be null for objects that do not require an external context.
Examples of a context may be a database, a resource file, some map or no context at all.Localizable.getLocale()public void setLocale(Locale locale)
public Locale getSpecifiedLocale()
setLocale(Locale), if any
public Locale getLocale()
getLocale in interface LocalizablegetSpecifiedLocale(),
setLocale(Locale, Object),
SnailMailAddress.getCountry(),
I18n.localeFor(String)public String getCountry()
public String getTitle()
public void setTitle(String title)
public String toString()
toString in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||