Jwma

dtw.webmail.model
Interface JwmaContactsImpl

All Superinterfaces:
JwmaContacts
All Known Implementing Classes:
CastorContacts

public interface JwmaContactsImpl
extends JwmaContacts

Interface for JwmaContacts implementations. This is the interface any specialized implementation has to expose internal to controllers and models.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger

Method Summary
 void addContact(JwmaContactImpl contact)
          Adds a JwmaContactImpl instance to this contact database.
 void addContactCategory(java.lang.String category)
          Adds a contact category to the cached list of categories.
 void addContactGroup(JwmaContactGroupImpl group)
          Adds a JwmaContactGroupImpl instance to this contact database.
 void addFrequentRecipient(JwmaContactImpl contact)
          Adds a frequent recipient JwmaContactImpl instance to this contact database.
 boolean containsContact(java.lang.String uid)
          Tests if this JwmaContactsImpl contains a contact with the given unique identifier.
 boolean containsContactGroup(java.lang.String uid)
          Tests if this JwmaContactsImpl contains a contact group with the given unique identifier.
 boolean containsContactGroupName(java.lang.String name)
          Tests if this JwmaContactsImpl contains a contact group with the given name.
 boolean containsContactWithNickname(java.lang.String nick)
          Tests if the contact database contains a contact with the given nickname.
 JwmaContactImpl createContact()
          Creates and returns a new JwmaContactImpl.
 JwmaContactGroupImpl createContactGroup(java.lang.String name)
          Creates a new JwmaContactGroupImpl with the given name.
 boolean existsContactCategory(java.lang.String category)
          Tests if a given category exists in this JwmaContactsImpl.
 java.lang.String getCategoryFilter()
          Returns the name of the category which is not filtered at the moment.
 JwmaContact getContactByNickname(java.lang.String nick)
          Returns contact with given nickname.
 ContactFilter getContactFilter()
          Returns the arbitrary contact filter, which is set for filtering contacts on listing.
 JwmaContactGroup getContactGroupByName(java.lang.String name)
          Returns an JwmaContactGroupByName representing the contact group with the given name.
 java.util.Iterator getLastnameStarts()
          Returns an iterator of non-duplicate strings with the first characters of the lastnames of all contacts in this contact database.
 void removeContact(JwmaContactImpl contact)
          Removes a JwmaContactImpl instance from this contact database.
 void removeContactGroup(JwmaContactGroupImpl group)
          Removes a JwmaContactGroupImpl instance from this contact database.
 void removeFrequentRecipient(JwmaContactImpl contact)
          Removes a frequent recipient JwmaContactImpl instance from this contact database.
 void setCategoryFilter(java.lang.String category)
          Sets a category based contact filter, which will be filtering contacts which are not of the given category on listing.
 void setContactFilter(ContactFilter filter)
          Sets an arbitrary contact filter, which will be filtering contacts on listing.
 
Methods inherited from interface dtw.webmail.model.JwmaContacts
getContact, getContactGroup, getUID, listContactCategories, listContactGroups, listContacts, listFrequentRecipients
 

Method Detail

containsContact

public boolean containsContact(java.lang.String uid)
Tests if this JwmaContactsImpl contains a contact with the given unique identifier.

Parameters:
uid - a unique identifier of a contact.
Returns:
true if contained, false otherwise.

getContactByNickname

public JwmaContact getContactByNickname(java.lang.String nick)
Returns contact with given nickname.

Parameters:
nick - the nickname as String.
Returns:
the contact.

containsContactWithNickname

public boolean containsContactWithNickname(java.lang.String nick)
Tests if the contact database contains a contact with the given nickname.

Parameters:
nick - the nickname as String.
Returns:
true if contained, false otherwise.

addContact

public void addContact(JwmaContactImpl contact)
Adds a JwmaContactImpl instance to this contact database.

Parameters:
contact - the JwmaContactImpl to be added.

removeContact

public void removeContact(JwmaContactImpl contact)
Removes a JwmaContactImpl instance from this contact database.

Parameters:
contact - the JwmaContactImpl to be removed.

addFrequentRecipient

public void addFrequentRecipient(JwmaContactImpl contact)
Adds a frequent recipient JwmaContactImpl instance to this contact database.

Parameters:
contact - the frequent recipient JwmaContactImpl to be added.

removeFrequentRecipient

public void removeFrequentRecipient(JwmaContactImpl contact)
Removes a frequent recipient JwmaContactImpl instance from this contact database.

Parameters:
contact - the frequent recipient JwmaContactImpl to be removed.

existsContactCategory

public boolean existsContactCategory(java.lang.String category)
Tests if a given category exists in this JwmaContactsImpl.

Parameters:
category - a category to be looked up.
Returns:
true if the category exists, false otherwise.

addContactCategory

public void addContactCategory(java.lang.String category)
Adds a contact category to the cached list of categories.

If the category already exists, the method returns immediately.

Parameters:
category - the category as String.

containsContactGroup

public boolean containsContactGroup(java.lang.String uid)
Tests if this JwmaContactsImpl contains a contact group with the given unique identifier.

Parameters:
uid - a unique identifier of a contact group.
Returns:
true if contained, false otherwise.

containsContactGroupName

public boolean containsContactGroupName(java.lang.String name)
Tests if this JwmaContactsImpl contains a contact group with the given name.

Parameters:
name - the name for a contact group.
Returns:
true if contained, false otherwise.

getContactGroupByName

public JwmaContactGroup getContactGroupByName(java.lang.String name)
Returns an JwmaContactGroupByName representing the contact group with the given name.

If the contact database does not contain any contact group with the given name, it returns null. Otherwise it returns the associated contact group.

Returns:
the contact group associated with the given name, or null.

addContactGroup

public void addContactGroup(JwmaContactGroupImpl group)
Adds a JwmaContactGroupImpl instance to this contact database.


removeContactGroup

public void removeContactGroup(JwmaContactGroupImpl group)
Removes a JwmaContactGroupImpl instance from this contact database.


createContactGroup

public JwmaContactGroupImpl createContactGroup(java.lang.String name)
                                        throws JwmaException
Creates a new JwmaContactGroupImpl with the given name.

Parameters:
name - the name of the new group as String.
Returns:
the newly created JwmaContactGroupImpl instance.
Throws:
JwmaException - if a group with the same name exists already.

createContact

public JwmaContactImpl createContact()
Creates and returns a new JwmaContactImpl.

Returns:
the newly created JwmaContactImpl instance.

setContactFilter

public void setContactFilter(ContactFilter filter)
Sets an arbitrary contact filter, which will be filtering contacts on listing. Note that this filter is independent from the category filter, filtering proceeds additive (i.e. a contact has to pass both, AND).

Parameters:
filter - an arbitrary ContactFilter.

getContactFilter

public ContactFilter getContactFilter()
Returns the arbitrary contact filter, which is set for filtering contacts on listing.

Returns:
the contact filter instance.

getLastnameStarts

public java.util.Iterator getLastnameStarts()
Returns an iterator of non-duplicate strings with the first characters of the lastnames of all contacts in this contact database.


setCategoryFilter

public void setCategoryFilter(java.lang.String category)
Sets a category based contact filter, which will be filtering contacts which are not of the given category on listing. Note that this filter is independent from the arbitrary set filter, filtering proceeds additive (i.e. a contact has to pass both, AND).

Parameters:
category - the category which should be listed .

getCategoryFilter

public java.lang.String getCategoryFilter()
Returns the name of the category which is not filtered at the moment.

Returns:
the category name which is not filtered as String.

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)