org.kohsuke.jnt
Class JNMailingLists

java.lang.Object
  extended by org.kohsuke.jnt.JNMailingLists

public final class JNMailingLists
extends Object

java.net project mailing list section.

Author:
Kohsuke Kawaguchi, Bruno Souza

Method Summary
 JNMailingList create(String listName, String description, String ownerAddress, String prefix, boolean hasTrailer, boolean isPrivate, ListType type, Collection subscribers, Collection moderators)
          Creates a new mailing list.
 JNMailingList get(String name)
          Returns the mailing list of the specified name.
 List<JNMailingList> getLists()
          Returns all the mailing lists as a List of JNMailingList.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLists

public List<JNMailingList> getLists()
                             throws ProcessingException
Returns all the mailing lists as a List of JNMailingList.

This list will only contain mailing lists you can see. The JNMailingLists are returned in the order you see in the HTML page.

Returns:
can be empty but never be null. read-only.
Throws:
ProcessingException

get

public JNMailingList get(String name)
                  throws ProcessingException
Returns the mailing list of the specified name.

This method returns the JNMailingList from getLists() such that JNMailingList.getName().equals(name).

Returns:
null if no such list is found
Throws:
ProcessingException

create

public JNMailingList create(String listName,
                            String description,
                            String ownerAddress,
                            String prefix,
                            boolean hasTrailer,
                            boolean isPrivate,
                            ListType type,
                            Collection subscribers,
                            Collection moderators)
                     throws ProcessingException
Creates a new mailing list. This is an admin operation that requires a priviledge.

Parameters:
listName - The name of the new list. For example, "mylist". Must not be null.
description - A one-line description of this list. Must not be null, must not be empty. For example, "list to discuss problems of the project management".
ownerAddress - The e-mail address of the mailing list owner. This address will receive various moderation messages and etc. Must be a valid e-mail address.
prefix - This prefix will be appended to all the e-mails. Can be null if you don't want the subject to be kept unmodified.
hasTrailer - Provides instructions on how to unsubscribe as a footer in every message. Strongly recommended for lists with more than 100 members.
isPrivate - Marking a mail list as private prevents non-project members from joining the list or viewing the archives.
type - The type of the mailing list operation mode. See ListType for more details.
subscribers - The list of initial subscribers. Can be null.
moderators - The list of moderators, if you choose ListType.MODERATED. Must be null if the list type is other types, but must be non-null if the list type is ListType.MODERATED.
Returns:
return a newly created mailing list. this method never returns null.
Throws:
ProcessingException


Copyright © 2003-2010 Kohsuke Kawaguchi. All Rights Reserved.