org.objectledge.mail
Interface MailingListsManager

All Known Implementing Classes:
DummyMailingListsManager

public interface MailingListsManager

Mailing manager component.

Version:
$Id: MailingListsManager.java,v 1.12 2006/04/26 10:36:43 rafal Exp $
Author:
Pawel Potempski

Nested Class Summary
static class MailingListsManager.Status
           
 
Method Summary
 String createList(String name, String domain, String[] administrators, String password, boolean notify, Locale locale, boolean moderated)
          Create new mailing list.
 void deleteList(String name, boolean deleteArchived)
          Delete mailing list.
 List<String> getAvailableDomains()
          Get all e-mail domains configured in the system.
 List<Locale> getAvailableLocales()
          Get all available locales.
 MailingList getList(javax.mail.Message message)
          Returns the mailing list that that the given message belongs to, if any.
 MailingList getList(String name)
          Get mailing list, using system administrator's credantials.
 MailingList getList(String name, String password)
          Get mailing list.
 List<String> getLists()
          Get all lists.
 javax.mail.Store getMessageStore()
          Open a connection to the incoming message store.
 List<String> getPublicLists()
          Get all advertised lists.
 MailingListsManager.Status getStatus()
          Checks the manager's status.
 

Method Detail

getStatus

MailingListsManager.Status getStatus()
Checks the manager's status.

When UNOPERATIONAL status is returned, all relevant information should be written to the server logs.

When UNOPERATIONAL or UNAVAILABLE status is returned, all methods except this one are free to throw any exceptions as will, with unspecified side effects. In short - don't call them.

Returns:
the manager status.

createList

String createList(String name,
                  String domain,
                  String[] administrators,
                  String password,
                  boolean notify,
                  Locale locale,
                  boolean moderated)
                  throws MailingListsException
Create new mailing list.

Parameters:
name - the name of the list.
domain - the email domain.
administrators - list of administrators's email addresses
password - the administrator password, auto generated if null
notify - if true send notification about list creation.
locale - mailing list locale.
moderated - should member postings be moderated.
Throws:
MailingListsException - if ml creation failed.

deleteList

void deleteList(String name,
                boolean deleteArchived)
                throws MailingListsException
Delete mailing list.

Parameters:
name - name of the list to delete.
deleteArchived - delete if true
Throws:
MailingListsException - if ml deletion failed.

getList

MailingList getList(String name,
                    String password)
                    throws MailingListsException
Get mailing list.

Parameters:
name - name of the list.
password - the password.
Throws:
MailingListsException

getList

MailingList getList(String name)
                    throws MailingListsException
Get mailing list, using system administrator's credantials.

Parameters:
name - name of the list.
Throws:
MailingListsException

getPublicLists

List<String> getPublicLists()
                            throws MailingListsException
Get all advertised lists.

Returns:
the list of public lists.
Throws:
MailingListsException - if something goes wrong.

getLists

List<String> getLists()
                      throws MailingListsException
Get all lists.

Returns:
the list of all lists.
Throws:
MailingListsException - if something goes wrong;

getAvailableLocales

List<Locale> getAvailableLocales()
                                 throws MailingListsException
Get all available locales.

Returns:
the list of locales.
Throws:
MailingListsException

getAvailableDomains

List<String> getAvailableDomains()
                                 throws MailingListsException
Get all e-mail domains configured in the system.

Returns:
e-mail domains configured in the system.
Throws:
MailingListsException

getMessageStore

javax.mail.Store getMessageStore()
                                 throws MailingListsException
Open a connection to the incoming message store.

Returns:
message store.
Throws:
MailingListsException

getList

MailingList getList(javax.mail.Message message)
                    throws MailingListsException
Returns the mailing list that that the given message belongs to, if any. All operations on a list acquire with this method will be performed using site administrators credentials.

Parameters:
a - mail message.
Returns:
MailingList object, or null if the message does not belong to a mailing list.
Throws:
MailingListsException


Copyright © 2003-2006 objectledge.org. All Rights Reserved.