org.apache.cocoon.generation
Class IMAPGenerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.IMAPGenerator
- All Implemented Interfaces:
- Poolable, Recyclable, Component, LogEnabled, Generator, SitemapModelComponent, XMLProducer
public class IMAPGenerator
- extends AbstractGenerator
Generates an XML listing of messages from an IMAP mail server.
You must configure this generator with "host", "user", and "pass" parameters
which specifies the mail server host, the user to login as, and the password to use,
respectively. Beware that these passwords will be sent cleartext since the Generator
does not use an SSL-enabled IMAP connection.
Also beware that storing sensitive data, (such as mail usernames and passwords) can
be very dangerous, so please be very careful in the method by which you send the user
and password parameters to the generator.
Instructions: get the JavaMail API jar from http://java.sun.com/products/javamail/, and
the JAF activation.jar from http://java.sun.com/beans/glasgow/jaf.html. Put mail.jar
and activation.jar in xml-cocoon2/lib/local/, and recompile. These jars could actually be
moved to lib/optional and added to jars.xml in the future.
TODO Refactor all of this to use the MailCommandManager, etc...
- Version:
- $Id: IMAPGenerator.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Tony Collen
Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
Method Summary |
void |
generate()
Generate the XML and stream it into the pipeline |
void |
recycle()
Recycle the generator by removing references |
void |
setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
Set the SourceResolver , object model Map ,
the source and sitemap Parameters used to process the request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IMAPGenerator
public IMAPGenerator()
setup
public void setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
throws ProcessingException,
SAXException,
IOException
- Description copied from class:
AbstractGenerator
- Set the
SourceResolver
, object model Map
,
the source and sitemap Parameters
used to process the request.
- Specified by:
setup
in interface SitemapModelComponent
- Overrides:
setup
in class AbstractGenerator
- Throws:
ProcessingException
SAXException
IOException
generate
public void generate()
throws SAXException,
ProcessingException
- Description copied from interface:
Generator
- Generate the XML and stream it into the pipeline
- Throws:
SAXException
ProcessingException
recycle
public void recycle()
- Recycle the generator by removing references
- Specified by:
recycle
in interface Recyclable
- Overrides:
recycle
in class AbstractGenerator
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.