|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.wimpi.pim.util.AbstractIdentifiable | +--net.wimpi.pim.contact.basicimpl.ContactImpl
A basic and simple implementation of a
Contact
.
Field Summary | |
protected java.util.List |
m_Addresses
|
protected java.util.List |
m_Categories
|
protected java.lang.String |
m_Classification
|
protected Communications |
m_Communications
|
protected Extensions |
m_Extensions
|
protected boolean |
m_Frequent
|
protected GeographicalInformation |
m_GeoInfo
|
protected Key |
m_Key
|
protected Address |
m_LastAddedAddress
|
protected java.lang.String |
m_Note
|
protected OrganizationalIdentity |
m_OrganizationalIdentity
|
protected PersonalIdentity |
m_PersonalIdentity
|
protected Address |
m_PreferredAddress
|
protected java.util.Date |
m_Revision
|
protected Sound |
m_Sound
|
protected java.lang.String |
m_Url
|
Constructor Summary | |
ContactImpl()
|
Method Summary | |
void |
addAddress(Address addr)
Adds an address to this Contact. |
void |
addCategory(java.lang.String category)
Adds a category to this Contact. |
java.lang.String |
getAccessClassification()
Returns the access classification of this Contact. |
Address |
getAddress(java.lang.String uid)
Returns the address at the given index. |
int |
getAddressCount()
Returns the number of addresses associated with this Contact. |
java.util.Iterator |
getAddresses()
Returns all addresses associated with this Contact. |
java.lang.String |
getCategoriesList()
|
java.lang.String |
getCategory(int index)
Returns the category at the given index. |
int |
getCategoryCount()
Returns the number of categories associated with this Contact. |
Communications |
getCommunications()
Returns the Communications instance associated with this Contact. |
java.util.Date |
getCurrentRevisionDate()
Returns the current revision date of this Contact. |
Extensions |
getExtensions()
Returns the extensions associated with this Contact. |
GeographicalInformation |
getGeographicalInformation()
Returns the GeographicalInformation instance associated with this Contact. |
Address |
getLastAddedAddress()
Returns the last added address. |
java.lang.String |
getNote()
Returns the note associated with this Contact. |
OrganizationalIdentity |
getOrganizationalIdentity()
Returns the OrganizationalIdentity of this Contact. |
PersonalIdentity |
getPersonalIdentity()
Returns the PersonalIdentity of this Contact. |
Address |
getPreferredAddress()
Returns the preferred address of this Contact instance. |
Key |
getPublicKey()
Returns the public key associated with this Contact. |
Sound |
getSound()
Returns the sound associated with this Contact. |
java.lang.String |
getURL()
Returns an URL associated with this Contact. |
boolean |
hasCommunications()
Tests if this Contact has a Communications instance. |
boolean |
hasExtensions()
Tests if this Contact has extensions. |
boolean |
hasGeographicalInformation()
Tests if this Contact has a GeographicalInformation instance. |
boolean |
hasOrganizationalIdentity()
Tests if this Contact has a OrganizationalIdentity. |
boolean |
hasPersonalIdentity()
Tests if this Contact has a PersonalIdentity. |
boolean |
hasPublicKey()
Tests if this Contact has a public key. |
boolean |
hasSound()
Tests if this Contact has a sound associated with it. |
boolean |
isFrequent()
Tests if this Contact is frequently used. |
boolean |
isPreferredAddress(Address address)
Tests if the given address is the preferred one of this Contact. |
Address[] |
listAddresses()
Returns all addresses associated with this Contact. |
Address[] |
listAddressesByType(int TYPE)
Returns the addresses of a given type of this Contact instance. |
java.lang.String[] |
listCategories()
Returns all categories of this this Contact. |
void |
removeAddress(Address addr)
Removes and returns the Address at the given index. |
void |
removeAllCategories()
Removes all categories. |
java.lang.String |
removeCategory(int index)
Removes and returns the category at the given index. |
void |
setAccessClassification(java.lang.String classification)
Sets the access classification of this Contact. |
void |
setCategoriesList(java.lang.String list)
|
java.lang.String |
setCategory(int index,
java.lang.String cat)
Sets the category at the given index, returning the replaced one. |
void |
setCommunications(Communications communications)
Sets the Communications instance associated with this Contact. |
void |
setCurrentRevisionDate(java.util.Date revision)
Sets the current revision date of this Contact. |
void |
setExtensions(Extensions extensions)
Sets the extensions associated with this Contact. |
void |
setFrequent(boolean b)
Sets the frequent flag of this Contact. |
void |
setGeographicalInformation(GeographicalInformation geoinfo)
Sets the GeographicalInformation instance associated with this Contact. |
void |
setNote(java.lang.String note)
Sets the note associated with this Contact. |
void |
setOrganizationalIdentity(OrganizationalIdentity identity)
Sets the OrganizationalIdentity of this Contact. |
void |
setPersonalIdentity(PersonalIdentity identity)
Sets the PersonalIdentity of this Contact. |
void |
setPreferredAddress(Address address)
Sets the preferred address of this Contact instance. |
void |
setPublicKey(Key key)
Sets the public key associated with this Contact. |
void |
setSound(Sound sound)
Sets the sound associated with this Contact. |
void |
setURL(java.lang.String url)
Sets the URL associated with this Contact. |
Methods inherited from class net.wimpi.pim.util.AbstractIdentifiable |
equals, getUID, setUID |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.wimpi.pim.util.Identifiable |
getUID |
Field Detail |
protected java.lang.String m_Url
protected boolean m_Frequent
protected java.lang.String m_Note
protected java.util.Date m_Revision
protected java.lang.String m_Classification
protected java.util.List m_Addresses
protected java.util.List m_Categories
protected Address m_PreferredAddress
protected Address m_LastAddedAddress
protected PersonalIdentity m_PersonalIdentity
protected OrganizationalIdentity m_OrganizationalIdentity
protected Communications m_Communications
protected GeographicalInformation m_GeoInfo
protected Key m_Key
protected Sound m_Sound
protected Extensions m_Extensions
Constructor Detail |
public ContactImpl()
Method Detail |
public PersonalIdentity getPersonalIdentity()
Contact
getPersonalIdentity
in interface Contact
public void setPersonalIdentity(PersonalIdentity identity)
Contact
setPersonalIdentity
in interface Contact
identity
- a PersonalIdentity instance.public boolean hasPersonalIdentity()
Contact
hasPersonalIdentity
in interface Contact
public OrganizationalIdentity getOrganizationalIdentity()
Contact
getOrganizationalIdentity
in interface Contact
public void setOrganizationalIdentity(OrganizationalIdentity identity)
Contact
setOrganizationalIdentity
in interface Contact
identity
- an OrganizationalIdentity instance.public boolean hasOrganizationalIdentity()
Contact
hasOrganizationalIdentity
in interface Contact
public java.util.Iterator getAddresses()
Contact
getAddresses
in interface Contact
public Address[] listAddresses()
Contact
listAddresses
in interface Contact
public Address getAddress(java.lang.String uid)
Contact
getAddress
in interface Contact
uid
- the unique identifier as String.
public Address getLastAddedAddress()
Contact
getLastAddedAddress
in interface Contact
public void addAddress(Address addr)
Contact
addAddress
in interface Contact
addr
- the Address to be added.public void removeAddress(Address addr) throws java.lang.IndexOutOfBoundsException
Contact
removeAddress
in interface Contact
addr
- the Address instance to be removed.
java.lang.IndexOutOfBoundsException
public Address getPreferredAddress()
Contact
getPreferredAddress
in interface Contact
public void setPreferredAddress(Address address)
Contact
setPreferredAddress
in interface Contact
address
- the preferred address as Address.public boolean isPreferredAddress(Address address)
Contact
isPreferredAddress
in interface Contact
address
- the address to be tested as Address.
public int getAddressCount()
Contact
getAddressCount
in interface Contact
public Address[] listAddressesByType(int TYPE)
Contact
listAddressesByType
in interface Contact
Address
public Communications getCommunications()
Contact
getCommunications
in interface Contact
public void setCommunications(Communications communications)
Contact
setCommunications
in interface Contact
communications
- the Communications instance.public boolean hasCommunications()
Contact
hasCommunications
in interface Contact
public GeographicalInformation getGeographicalInformation()
Contact
getGeographicalInformation
in interface Contact
public void setGeographicalInformation(GeographicalInformation geoinfo)
Contact
setGeographicalInformation
in interface Contact
geoinfo
- the GeographicalInformation instance.public boolean hasGeographicalInformation()
Contact
hasGeographicalInformation
in interface Contact
public java.lang.String getCategoriesList()
public void setCategoriesList(java.lang.String list)
public java.lang.String[] listCategories()
Contact
listCategories
in interface Contact
public java.lang.String getCategory(int index) throws java.lang.IndexOutOfBoundsException
Contact
getCategory
in interface Contact
index
- the index as int.
java.lang.IndexOutOfBoundsException
- if the index is
out of bounds.public java.lang.String setCategory(int index, java.lang.String cat)
Contact
setCategory
in interface Contact
index
- the index as int.cat
- the category as String.
public void addCategory(java.lang.String category)
Contact
addCategory
in interface Contact
category
- the category as String.public java.lang.String removeCategory(int index) throws java.lang.IndexOutOfBoundsException
Contact
removeCategory
in interface Contact
index
- the index as int.
java.lang.IndexOutOfBoundsException
- if the index is
out of bounds.public void removeAllCategories()
Contact
removeAllCategories
in interface Contact
public int getCategoryCount()
Contact
getCategoryCount
in interface Contact
public java.lang.String getURL()
Contact
getURL
in interface Contact
public void setURL(java.lang.String url)
Contact
setURL
in interface Contact
url
- the URL as String.public boolean isFrequent()
Contact
isFrequent
in interface Contact
public void setFrequent(boolean b)
Contact
setFrequent
in interface Contact
b
- true if frequent, false otherwise.public java.lang.String getNote()
Contact
getNote
in interface Contact
public void setNote(java.lang.String note)
Contact
setNote
in interface Contact
note
- the note as String.public java.util.Date getCurrentRevisionDate()
Contact
getCurrentRevisionDate
in interface Contact
public void setCurrentRevisionDate(java.util.Date revision)
Contact
setCurrentRevisionDate
in interface Contact
revision
- the revision date as Date.public java.lang.String getAccessClassification()
Contact
getAccessClassification
in interface Contact
public void setAccessClassification(java.lang.String classification)
Contact
setAccessClassification
in interface Contact
classification
- the access classification as String.public Key getPublicKey()
Contact
getPublicKey
in interface Contact
public void setPublicKey(Key key)
Contact
setPublicKey
in interface Contact
key
- the public key as Key.public boolean hasPublicKey()
Contact
hasPublicKey
in interface Contact
public Sound getSound()
Contact
getSound
in interface Contact
public void setSound(Sound sound)
Contact
setSound
in interface Contact
sound
- the sound as Sound.public boolean hasSound()
Contact
hasSound
in interface Contact
public Extensions getExtensions()
Contact
getExtensions
in interface Contact
public void setExtensions(Extensions extensions)
Contact
setExtensions
in interface Contact
extensions
- the extensions as Extensions instance.public boolean hasExtensions()
Contact
hasExtensions
in interface Contact
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |