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: 494012 $ $Date: 2007-01-08 10:23:58 +0000 (lun, 08 gen 2007) $

Field Summary
static java.lang.String ID
           
 
Method Summary
 IListServCommand getCommand(java.lang.String name)
          Get a specific command
 java.util.Map getCommands()
          Get all the available commands
 IListServCommand getCommandTarget(MailAddress mailAddress)
          Based on the to address get a valid or command or null
 java.lang.String getListDomain()
          Get the domain of the list
 java.lang.String getListName(boolean displayFormat)
          Get the name of this list
 java.lang.String getListOwner()
          Gets the owner of this list
 java.lang.String getResourcesFile()
           
 java.util.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(java.lang.String[] names)
          Initializes an array of resources
 void onError(Mail mail, java.lang.String subject, java.lang.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

static final java.lang.String ID
Method Detail

getListName

java.lang.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

java.lang.String getListOwner()
Gets the owner of this list

Returns:
this is an address like listOwner@localhost

getListDomain

java.lang.String getListDomain()
Get the domain of the list

Returns:
a string like localhost

getCommand

IListServCommand getCommand(java.lang.String name)
Get a specific command

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

getCommands

java.util.Map getCommands()
Get all the available commands

Returns:
a map of IListServCommands

getCommandTarget

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

Parameters:
mailAddress -
Returns:
IListServCommand or null

getUsersRepository

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

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

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

getResourcesFile

java.lang.String getResourcesFile()
Returns:
the configuration file for the xml resources

getStandardProperties

java.util.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

XMLResources[] initXMLResources(java.lang.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 © 2002-2007 The Apache Software Foundation. All Rights Reserved.