|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface modeling contact based on the types and information of the vCard Mime directory profile standard specification.
For reference see RFC 2426:
3.6 EXPLANATORY TYPES
3.6.1 CATEGORIES Type Definition
3.6.2 NOTE Type Definition
3.6.4 REV Type Definition
3.6.7 UID Type Definition
3.6.8 URL Type Definition
3.7.1 CLASS Type Definition
3.7.2 KEY Type Definition
Note that a flag for frequently used
contacts has been added, which represents
an extension to the standard.
PersonalIdentity
,
OrganizationalIdentity
,
Address
,
Communications
,
GeographicalInformation
,
Key
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 |
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 ac)
Sets the access classification of this Contact. |
java.lang.String |
setCategory(int index,
java.lang.String category)
Sets the category at the given index, returning the replaced one. |
void |
setCommunications(Communications comm)
Sets the Communications instance associated with this Contact. |
void |
setCurrentRevisionDate(java.util.Date date)
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 interface net.wimpi.pim.util.Identifiable |
getUID |
Method Detail |
public PersonalIdentity getPersonalIdentity()
public void setPersonalIdentity(PersonalIdentity identity)
identity
- a PersonalIdentity instance.public boolean hasPersonalIdentity()
public OrganizationalIdentity getOrganizationalIdentity()
public void setOrganizationalIdentity(OrganizationalIdentity identity)
identity
- an OrganizationalIdentity instance.public boolean hasOrganizationalIdentity()
public java.util.Iterator getAddresses()
public Address[] listAddresses()
public Address getAddress(java.lang.String uid)
uid
- the unique identifier as String.
public Address getLastAddedAddress()
public void addAddress(Address addr)
addr
- the Address to be added.public void removeAddress(Address addr)
addr
- the Address instance to be removed.public Address getPreferredAddress()
public void setPreferredAddress(Address address)
address
- the preferred address as Address.public boolean isPreferredAddress(Address address)
address
- the address to be tested as Address.
public Address[] listAddressesByType(int TYPE)
Address
public int getAddressCount()
public Communications getCommunications()
public void setCommunications(Communications comm)
comm
- the Communications instance.public boolean hasCommunications()
public GeographicalInformation getGeographicalInformation()
public void setGeographicalInformation(GeographicalInformation geoinfo)
geoinfo
- the GeographicalInformation instance.public boolean hasGeographicalInformation()
public java.lang.String[] listCategories()
public java.lang.String getCategory(int index) throws java.lang.IndexOutOfBoundsException
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 category) throws java.lang.IndexOutOfBoundsException
index
- the index as int.category
- the category as String.
java.lang.IndexOutOfBoundsException
- if the index is
out of bounds.public void addCategory(java.lang.String category)
category
- the category as String.public java.lang.String removeCategory(int index) throws java.lang.IndexOutOfBoundsException
index
- the index as int.
java.lang.IndexOutOfBoundsException
- if the index is
out of bounds.public void removeAllCategories()
public int getCategoryCount()
public java.lang.String getURL()
public void setURL(java.lang.String url)
url
- the URL as String.public boolean isFrequent()
public void setFrequent(boolean b)
b
- true if frequent, false otherwise.public java.lang.String getNote()
public void setNote(java.lang.String note)
note
- the note as String.public java.util.Date getCurrentRevisionDate()
public void setCurrentRevisionDate(java.util.Date date)
date
- the revision date as Date.public java.lang.String getAccessClassification()
public void setAccessClassification(java.lang.String ac)
ac
- the access classification as String.public Key getPublicKey()
public void setPublicKey(Key key)
key
- the public key as Key.public boolean hasPublicKey()
public Sound getSound()
public void setSound(Sound sound)
sound
- the sound as Sound.public boolean hasSound()
public Extensions getExtensions()
public void setExtensions(Extensions extensions)
extensions
- the extensions as Extensions instance.public boolean hasExtensions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |