SK.gnome.dwarf.mail.store
Interface MailStore

All Known Implementing Classes:
FileMailStore

public interface MailStore

This class provides interface for mail store.

The mail store serves mainly for storing mail folders and messages.


Method Summary
 void addMailEventListener(MailEventListener listener)
          Adds the given mail event listener to this store.
 void create(java.lang.String user)
          Creates a mail store for the given user.
 void dispatchMailEvent(MailEvent event)
          Dispatches the given mail event to the registered listeners.
 boolean exists(java.lang.String user)
          Whether the given user's mail store exists.
 MailFolder getDefaultFolder(java.lang.String user)
          Returns a default folder for the given user.
 java.lang.String[] listUsers()
          Returns a list of all users present in this mail store.
 void remove(java.lang.String user)
          Removes the given user's mail store.
 void removeMailEventListener(MailEventListener listener)
          Removes the given mail event listener from this store.
 

Method Detail

create

public void create(java.lang.String user)
            throws MailException
Creates a mail store for the given user.

Parameters:
user - the user identification
Throws:
MailException - if an error occured

exists

public boolean exists(java.lang.String user)
               throws MailException
Whether the given user's mail store exists.

Parameters:
user - the user identification
Returns:
true if the store exists, false otherwise
Throws:
MailException - if an error occured

remove

public void remove(java.lang.String user)
            throws MailException
Removes the given user's mail store.

Parameters:
user - the user identification
Throws:
MailException - if an error occured

getDefaultFolder

public MailFolder getDefaultFolder(java.lang.String user)
                            throws MailException
Returns a default folder for the given user.

Parameters:
user - the user identification
Returns:
the user's default folder
Throws:
MailException - if an error occured

listUsers

public java.lang.String[] listUsers()
                             throws MailException
Returns a list of all users present in this mail store.

Returns:
the array of user identifications
Throws:
MailException - if an error occured

addMailEventListener

public void addMailEventListener(MailEventListener listener)
Adds the given mail event listener to this store.

Parameters:
listener - the mail event listener

removeMailEventListener

public void removeMailEventListener(MailEventListener listener)
Removes the given mail event listener from this store.

Parameters:
listener - the mail event listener

dispatchMailEvent

public void dispatchMailEvent(MailEvent event)
Dispatches the given mail event to the registered listeners.

Parameters:
event - the mail event


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.