org.apache.james.transport.mailets.listservcommands
Class Info

java.lang.Object
  extended by org.apache.james.transport.mailets.listservcommands.BaseCommand
      extended by org.apache.james.transport.mailets.listservcommands.Info
All Implemented Interfaces:
IListServCommand

public class Info
extends BaseCommand

Info handles the info command. It is configured by:

<command name="info" class="Info"/>


It uses the formatted text-based resources for its return mail body:

After formatting the text, the message is delivered with BaseCommand.sendStandardReply(org.apache.mailet.Mail, java.lang.String, java.lang.String, java.lang.String) Todo: make displaying the current member list optional

Since:
2.2.0
Version:
CVS $Revision: 494012 $ $Date: 2007-01-08 10:23:58 +0000 (Mon, 08 Jan 2007) $

Field Summary
protected static int ADMIN_COMMANDS
           
protected static int HEADER
           
protected static int INFO
           
protected  XMLResources[] xmlResources
           
 
Fields inherited from class org.apache.james.transport.mailets.listservcommands.BaseCommand
commandListservManager, commandName, configuration, mailetContext
 
Constructor Summary
Info()
           
 
Method Summary
protected  java.lang.String getMemberList()
          Retrieve the current member list
 void init(ICommandListservManager commandListservManager, org.apache.avalon.framework.configuration.Configuration configuration)
          Perform any required initialization
 void onCommand(Mail mail)
          Process the info command using the following text resources: HEADER INFO ADMIN_COMMANDS
 
Methods inherited from class org.apache.james.transport.mailets.listservcommands.BaseCommand
generateMail, getCommandListservManager, getCommandName, getConfiguration, getMailetContext, getStandardProperties, getUsersRepository, initXMLResources, log, log, sendStandardReply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlResources

protected XMLResources[] xmlResources

HEADER

protected static final int HEADER
See Also:
Constant Field Values

INFO

protected static final int INFO
See Also:
Constant Field Values

ADMIN_COMMANDS

protected static final int ADMIN_COMMANDS
See Also:
Constant Field Values
Constructor Detail

Info

public Info()
Method Detail

init

public void init(ICommandListservManager commandListservManager,
                 org.apache.avalon.framework.configuration.Configuration configuration)
          throws org.apache.avalon.framework.configuration.ConfigurationException
Description copied from class: BaseCommand
Perform any required initialization

Specified by:
init in interface IListServCommand
Overrides:
init in class BaseCommand
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

onCommand

public void onCommand(Mail mail)
               throws javax.mail.MessagingException
Process the info command using the following text resources:

Parameters:
mail -
Throws:
javax.mail.MessagingException

getMemberList

protected java.lang.String getMemberList()
Retrieve the current member list

Returns:
the formatted member list
See Also:
BaseCommand.getUsersRepository()


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.