org.apache.cocoon.mail.command
Class AbstractMailCommand

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.mail.command.AbstractMailCommand
All Implemented Interfaces:
LogEnabled, MailCommand
Direct Known Subclasses:
MailCommandManager.MailCatAttachmentMessageByIdCommand, MailCommandManager.MailCatMessageByIdCommand, MailCommandManager.MailCatMessageByUIDCommand, MailCommandManager.MailFolderCatCommand, MailCommandManager.MailListFolderCommand, MailCommandManager.MailListMessagesCommand, MailCommandManager.MailRefreshFolderCommand, MailCommandManager.MailSearchMessagesCommand, MailCommands

public abstract class AbstractMailCommand
extends AbstractLogEnabled
implements MailCommand

An abstract MailCommand template

Since:
23 October 2002
Version:
$Id: AbstractMailCommand.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Bernhard Huber

Constructor Summary
AbstractMailCommand()
          Constructor for the AbstractMailCommand object
 
Method Summary
 void addResult(Object o)
          Adds a result to the Result attribute of the AbstractMailCommand object
 void addResults(List list)
          Adds a list of results to the Results attribute of the AbstractMailCommand object
abstract  void execute()
          Execute this command
 List getResults()
          Gets the results attribute of the AbstractMailCommand object
 Iterator iterator()
          Return an iterator over the results
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMailCommand

public AbstractMailCommand()
Constructor for the AbstractMailCommand object

Method Detail

getResults

public List getResults()
Gets the results attribute of the AbstractMailCommand object

Returns:
The results value

addResult

public void addResult(Object o)
Adds a result to the Result attribute of the AbstractMailCommand object

Parameters:
o - The result to be added to the Result attribute

addResults

public void addResults(List list)
Adds a list of results to the Results attribute of the AbstractMailCommand object

Parameters:
list - The list of results to be added to the Results attribute

iterator

public Iterator iterator()
Return an iterator over the results

Returns:
result iterator

execute

public abstract void execute()
                      throws MessagingException
Execute this command

Specified by:
execute in interface MailCommand
Throws:
MessagingException - thrown if executing of this MailCommand fails


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.