org.objectledge.mail
Interface MailingList


public interface MailingList

Mailing list interface.

Version:
$Id: MailingList.java,v 1.14 2006/04/27 10:10:07 rafal Exp $
Author:
Pawel Potempski

Nested Class Summary
static class MailingList.OperationStatus
           
static class MailingList.SubscriptionPolicy
           
static class MailingList.TaskType
           
 
Method Summary
 void acceptMessage(String id)
          Accept message.
 void acceptSubscription(String id)
          Accept subscription request.
 void acceptUnsubscription(String id)
          Accept unsubscription request.
 MailingList.OperationStatus addMember(String address, String name, String password, boolean digest, boolean ignoreCreationPolicy, boolean acknowledge, boolean notifyAdmins)
          Add new member to mailing list.
 void addMemberAddress(String oldAddress, String newAddress)
          Add member address
 void changeMemberAddress(String oldAddress, String newAddress)
          Change list member address
 MailingList.OperationStatus deleteMember(String address, boolean ignoreDeletingPolicy, boolean acknowledge, boolean notifyAdmins)
          Delete list member.
 void discardMessage(String id)
          Discard message.
 URL getAdministratorInterfaceLocation()
          Returns the location of the list administrators WWW interface.
 URL getMemberInterfaceLocation()
          Returns the location of the list member's self-service WWW interface.
 List<String> getMembers()
          Get all lists members.
 String getName()
          Returns the list name.
 List<String> getNewPendingTasks()
          Get pending tasks.
 javax.mail.Message getPendingMessage(String id)
          Get pending message.
 List<String> getPendingPosts()
          Get list of messages waiting for moderation.
 List<String> getPendingSubscriptions()
          Get list of subscriptions.
 MailingList.TaskType getPendingTaskType(String id)
          Get pending message.
 List<String> getPendingUnubscriptions()
          Get list of unsubscriptions.
 String getPostingAddress()
          Returns the e-mail address used for posting to the list.
 Locale getPreferredLanguage()
          Returns the preferred language for the list.
 String getSubscriptionAddress()
          Returns the e-mail address used for subscribing to the list.
 MailingList.SubscriptionPolicy getSubscriptionPolicy()
          Get current subscription policy.
 boolean isPostingModerated()
          Get current moderation flag.
 void postMessage(javax.mail.Message message)
          Post an e-mail message to the list.
 void rejectMessage(String id, String comment)
          Reject message.
 void rejectSubscription(String id, String comment)
          Reject subscription request.
 void rejectUnsubscription(String id, String comment)
          Reject unsubscription request.
 void setPassword(String password)
          Set ml's administrator password.
 void setPostingModerated(boolean moderated)
          Set moderation flag for mailing list.
 void setSubscriptionPolicy(MailingList.SubscriptionPolicy policy)
          Set subscription policy for list.
 

Method Detail

getName

String getName()
Returns the list name.

Returns:
the list name.

addMember

MailingList.OperationStatus addMember(String address,
                                      String name,
                                      String password,
                                      boolean digest,
                                      boolean ignoreCreationPolicy,
                                      boolean acknowledge,
                                      boolean notifyAdmins)
                                      throws MailingListsException
Add new member to mailing list.

Parameters:
address - email address of new member.
name - full name of new member.
password - member's password, auto generated if null
digest - if true member will receive batched digest delivery.
ignoreCreationPolicy - force creating ignoring confirmation and approval.
acknowledge - send acknowledge message to the subscribed user.
notifyAdmins - send notification message to the list administrators.
Returns:
the state of the membership.
Throws:
MailingListsException - if anything goes wrong.

deleteMember

MailingList.OperationStatus deleteMember(String address,
                                         boolean ignoreDeletingPolicy,
                                         boolean acknowledge,
                                         boolean notifyAdmins)
                                         throws MailingListsException
Delete list member.

Parameters:
address - email address of a member.
ignoreDeletingPolicy - force deleting ignoring confirmation and approval.
acknowledge - send acknowledge message to the subscribed user.
notifyAdmins - send notification message to the list administrators.
Throws:
MailingListsException - if anything goes wrong.

changeMemberAddress

void changeMemberAddress(String oldAddress,
                         String newAddress)
                         throws MailingListsException
Change list member address

Parameters:
oldAddress - old address.
newAddress - new address.
Throws:
MailingListsException - if anything goes wrong.

addMemberAddress

void addMemberAddress(String oldAddress,
                      String newAddress)
                      throws MailingListsException
Add member address

Parameters:
oldAddress - old address.
newAddress - new address.
Throws:
MailingListsException - if anything goes wrong.

getMembers

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

Returns:
the list of members addresses.
Throws:
MailingListsException - if anything goes wrong.

setPassword

void setPassword(String password)
                 throws MailingListsException
Set ml's administrator password.

Parameters:
password - new password.
Throws:
MailingListsException

setPostingModerated

void setPostingModerated(boolean moderated)
                         throws MailingListsException
Set moderation flag for mailing list.

Parameters:
moderated - moderated if true
Throws:
MailingListsException

isPostingModerated

boolean isPostingModerated()
                           throws MailingListsException
Get current moderation flag.

Returns:
whether posting on this list is moderated
Throws:
MailingListsException

setSubscriptionPolicy

void setSubscriptionPolicy(MailingList.SubscriptionPolicy policy)
                           throws MailingListsException
Set subscription policy for list.

Parameters:
policy - the policy.
Throws:
MailingListsException

getSubscriptionPolicy

MailingList.SubscriptionPolicy getSubscriptionPolicy()
                                                     throws MailingListsException
Get current subscription policy.

Returns:
subscription policy.
Throws:
MailingListsException

getPendingPosts

List<String> getPendingPosts()
                             throws MailingListsException
Get list of messages waiting for moderation.

Returns:
the list of message ids.
Throws:
MailingListsException

getPendingSubscriptions

List<String> getPendingSubscriptions()
                                     throws MailingListsException
Get list of subscriptions.

Returns:
the list of ids of subscriptions waiting for moderation.
Throws:
MailingListsException

getPendingUnubscriptions

List<String> getPendingUnubscriptions()
                                      throws MailingListsException
Get list of unsubscriptions.

Returns:
the list of ids of unsubscriptions waiting for moderation.
Throws:
MailingListsException

getPendingMessage

javax.mail.Message getPendingMessage(String id)
                                     throws MailingListsException
Get pending message.

Parameters:
id - message identifier.
Returns:
the message.
Throws:
MailingListsException

getNewPendingTasks

List<String> getNewPendingTasks()
                                throws MailingListsException
Get pending tasks.

Returns:
the list of tasks identifiers
Throws:
MailingListsException

getPendingTaskType

MailingList.TaskType getPendingTaskType(String id)
                                        throws MailingListsException
Get pending message.

Parameters:
id - message identifier.
Returns:
the message.
Throws:
MailingListsException

acceptMessage

void acceptMessage(String id)
                   throws MailingListsException
Accept message.

Parameters:
id - message identifier.
Throws:
MailingListsException

rejectMessage

void rejectMessage(String id,
                   String comment)
                   throws MailingListsException
Reject message.

Parameters:
id - message identifier.
comment - comment on reasons of rejection (may be null).
Throws:
MailingListsException

discardMessage

void discardMessage(String id)
                    throws MailingListsException
Discard message.

Parameters:
id - message identifier.
Throws:
MailingListsException

rejectSubscription

void rejectSubscription(String id,
                        String comment)
                        throws MailingListsException
Reject subscription request.

Parameters:
id - message identifier.
comment - comment on reasons of rejection (may be null).
Throws:
MailingListsException

acceptSubscription

void acceptSubscription(String id)
                        throws MailingListsException
Accept subscription request.

Parameters:
id - message identifier.
Throws:
MailingListsException

rejectUnsubscription

void rejectUnsubscription(String id,
                          String comment)
                          throws MailingListsException
Reject unsubscription request.

Parameters:
id - message identifier.
comment - comment on reasons of rejection (may be null).
Throws:
MailingListsException

acceptUnsubscription

void acceptUnsubscription(String id)
                          throws MailingListsException
Accept unsubscription request.

Parameters:
id - message identifier.
Throws:
MailingListsException

postMessage

void postMessage(javax.mail.Message message)
                 throws MailingListsException
Post an e-mail message to the list.

Parameters:
message - the message.
Throws:
MailingListsException

getSubscriptionAddress

String getSubscriptionAddress()
                              throws MailingListsException
Returns the e-mail address used for subscribing to the list.

Returns:
the e-mail address used for subscribing to the list.
Throws:
MailingListsException

getPostingAddress

String getPostingAddress()
                         throws MailingListsException
Returns the e-mail address used for posting to the list.

Returns:
the e-mail address used for posting to the list.
Throws:
MailingListsException

getMemberInterfaceLocation

URL getMemberInterfaceLocation()
                               throws MailingListsException
Returns the location of the list member's self-service WWW interface.

Returns:
the location of the list member's self-service WWW interface.
Throws:
MailingListsException

getAdministratorInterfaceLocation

URL getAdministratorInterfaceLocation()
                                      throws MailingListsException
Returns the location of the list administrators WWW interface.

Returns:
the location of the list administrators WWW interface.
Throws:
MailingListsException

getPreferredLanguage

Locale getPreferredLanguage()
                            throws MailingListsException
Returns the preferred language for the list.

Returns:
the preferred language for the list.
Throws:
MailingListsException


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