Holger's
Java API

com.antelmann.crm
Class ImmutableGlobalAddress

java.lang.Object
  extended by com.antelmann.crm.GlobalAddress
      extended by com.antelmann.crm.ImmutableGlobalAddress
All Implemented Interfaces:
XMLSerializable, GeoEncoded, DetailedString, Forgeable<GlobalAddress>, Localizable, Serializable

public class ImmutableGlobalAddress
extends GlobalAddress

represents a special address that disables all setter methods

Since:
29.09.2008, 15:15:56
Author:
Holger Antelmann
See Also:
ImmutableSnailMailAddress, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.antelmann.crm.GlobalAddress
GlobalAddress.Transport
 
Nested classes/interfaces inherited from interface com.antelmann.util.Localizable
Localizable.Adapter
 
Field Summary
 
Fields inherited from class com.antelmann.crm.GlobalAddress
GLOBAL_ADDRESS_FLAVOR
 
Constructor Summary
ImmutableGlobalAddress(GlobalAddress adr)
          initializes the address with the given one
 
Method Summary
 void clearAll()
           
 SnailMailAddress getSnailMail()
           
 Object getValuefor(GlobalAddress.Transport t)
           
 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.
 void removeAddress(GlobalAddress.Transport t)
           
 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 setIM(String im)
           
 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 setSnailMail(SnailMailAddress adr)
           
 void setTitle(String title)
          shortcut to the SnailMailAddress
 void setURL(URL url)
           
 void setValueFor(GlobalAddress.Transport t, Object address)
           
 void setVoice(PhoneNumber voice)
           
 
Methods inherited from class com.antelmann.crm.GlobalAddress
containsTransport, ensureSnailMail, equals, exportXML, getAddressDetailString, getAvailableTransports, getBankAccount, getCountry, getEmail, getFax, getGeoPoint, getIM, getLocale, getPersistenceDelegates, getSalutation, getSMS, getSnailMailAddressString, getSnailMailAddressString, getSpecifiedLocale, getTimeZone, getTitle, getURL, getVoice, hasEmail, hashCode, hasSnailMail, isEmpty, sameAs, setFax, setGeoPoint, setLocale, setSMS, setTimeZone, setVoice, supportsTransport, toDetailedString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImmutableGlobalAddress

public ImmutableGlobalAddress(GlobalAddress adr)
initializes the address with the given one

Method Detail

getValuefor

public Object getValuefor(GlobalAddress.Transport t)
Overrides:
getValuefor in class GlobalAddress

importXML

public void importXML(InputStream source)
               throws SAXException,
                      IOException
Description copied from interface: XMLSerializable
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.

Specified by:
importXML in interface XMLSerializable
Overrides:
importXML in class GlobalAddress
Throws:
SAXException
IOException
See Also:
XMLSerializable.exportXML(OutputStream)

getSnailMail

public SnailMailAddress getSnailMail()
Overrides:
getSnailMail in class GlobalAddress

clearAll

public void clearAll()
Overrides:
clearAll in class GlobalAddress

removeAddress

public void removeAddress(GlobalAddress.Transport t)
Overrides:
removeAddress in class GlobalAddress

setValueFor

public void setValueFor(GlobalAddress.Transport t,
                        Object address)
                 throws IllegalArgumentException,
                        NullPointerException
Overrides:
setValueFor in class GlobalAddress
Throws:
IllegalArgumentException - if the given transport is not supported or the if the address doesn't match the transport
NullPointerException
See Also:
GlobalAddress.supportsTransport(Transport)

setAllFrom

public void setAllFrom(GlobalAddress ga)
Description copied from class: GlobalAddress
initializes the internal map based on the content of the given address instance

Specified by:
setAllFrom in interface Forgeable<GlobalAddress>
Overrides:
setAllFrom in class GlobalAddress
Parameters:
ga - the object whose behavior is to be copied to this instance
See Also:
GlobalAddress.supportsTransport(Transport)

setEmail

public void setEmail(String email)
Description copied from class: GlobalAddress
allows to specify an email address for this instance

Overrides:
setEmail in class GlobalAddress

setFax

public void setFax(PhoneNumber fax)
Overrides:
setFax in class GlobalAddress

setIM

public void setIM(String im)
Overrides:
setIM in class GlobalAddress

setLocale

public void setLocale(Locale locale,
                      Object context)
Description copied from interface: Localizable
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.

Specified by:
setLocale in interface Localizable
Overrides:
setLocale in class GlobalAddress
Parameters:
locale - 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.
See Also:
Localizable.getLocale()

setVoice

public void setVoice(PhoneNumber voice)
Overrides:
setVoice in class GlobalAddress

setSnailMail

public void setSnailMail(SnailMailAddress adr)
Overrides:
setSnailMail in class GlobalAddress

setTitle

public void setTitle(String title)
Description copied from class: GlobalAddress
shortcut to the SnailMailAddress

Overrides:
setTitle in class GlobalAddress

setBankAccount

public void setBankAccount(BankAccount ba)
Overrides:
setBankAccount in class GlobalAddress

setSMS

public void setSMS(PhoneNumber sms)
Overrides:
setSMS in class GlobalAddress

setURL

public void setURL(URL url)
Overrides:
setURL in class GlobalAddress

setSalutation

public void setSalutation(String salutation)
Overrides:
setSalutation in class GlobalAddress


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads