org.apache.james.transport.mailets
Interface ICommandListservManager

All Superinterfaces:
Mailet
All Known Implementing Classes:
CommandListservManager

public interface ICommandListservManager
extends Mailet

ICommandListservManager is the interface that describes the functionality of any command based list serv managers. In order to obtain a reference to one, you can call:

 ICommandListservManager mgr = (ICommandListservManager)mailetContext.getAttribute(ICommandListservManager.ID + listName);
 

Since:
2.2.0
Version:
CVS $Revision: 365582 $ $Date: 2006-01-03 03:51:21 -0500 (Tue, 03 Jan 2006) $

Field Summary
static String ID
           
 
Method Summary
 IListServCommand getCommand(String name)
          Get a specific command
 Map getCommands()
          Get all the available commands
 IListServCommand getCommandTarget(MailAddress mailAddress)
          Based on the to address get a valid or command or null
 String getListDomain()
          Get the domain of the list
 String getListName(boolean displayFormat)
          Get the name of this list
 String getListOwner()
          Gets the owner of this list
 String getResourcesFile()
           
 Properties getStandardProperties()
          Use this to get standard properties for future calls to XMLResources
 UsersRepository getUsersRepository()
          Get the current user repository for this list serv
 XMLResources[] initXMLResources(String[] names)
          Initializes an array of resources
 void onError(Mail mail, String subject, String errorMessage)
          An error occurred, send some sort of message to the sender
 
Methods inherited from interface org.apache.mailet.Mailet
destroy, getMailetConfig, getMailetInfo, init, service
 

Field Detail

ID

public static final String ID
Method Detail

getListName

public String getListName(boolean displayFormat)
Get the name of this list

Parameters:
displayFormat - is whether you want a display version of this or not
Returns:
the official display name of this list

getListOwner

public String getListOwner()
Gets the owner of this list

Returns:
this is an address like listOwner@localhost

getListDomain

public String getListDomain()
Get the domain of the list

Returns:
a string like localhost

getCommand

public IListServCommand getCommand(String name)
Get a specific command

Parameters:
name - case in-sensitive
Returns:
a IListServCommand if found, null otherwise

getCommands

public Map getCommands()
Get all the available commands

Returns:
a map of IListServCommands

getCommandTarget

public IListServCommand getCommandTarget(MailAddress mailAddress)
Based on the to address get a valid or command or null

Parameters:
mailAddress -
Returns:
IListServCommand or null

getUsersRepository

public UsersRepository getUsersRepository()
Get the current user repository for this list serv

Returns:
an instance of UsersRepository that is used for the member list of the list serv

onError

public void onError(Mail mail,
                    String subject,
                    String errorMessage)
             throws MessagingException
An error occurred, send some sort of message to the sender

Parameters:
subject - the subject of the message to send
mail -
errorMessage -
Throws:
MessagingException

getResourcesFile

public String getResourcesFile()
Returns:
the configuration file for the xml resources

getStandardProperties

public Properties getStandardProperties()
Use this to get standard properties for future calls to XMLResources

Returns:
properties with the "LIST_NAME" and the "DOMAIN_NAME" properties

initXMLResources

public XMLResources[] initXMLResources(String[] names)
                                throws org.apache.avalon.framework.configuration.ConfigurationException
Initializes an array of resources

Parameters:
names - such as 'header, footer' etc...
Returns:
an initialized array of XMLResources
Throws:
org.apache.avalon.framework.configuration.ConfigurationException


"Copyright © 1999-2006 Apache Jakarta Project. All Rights Reserved."