|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.acting.AbstractAction org.apache.cocoon.acting.ServiceableAction org.apache.cocoon.mail.MailAction
public class MailAction
This action creates javamail objects, and puts XMLizable object wrappers of these objects into the request attribute map.
This action enables javamail access as action. It creates an http sesion, and puts the MailContext object into the session attributes.
MailContext
Field Summary | |
---|---|
static String |
REQUEST_ATTRIBUTE_FOLDER
Request attribute name of a XMLizable folder |
static String |
REQUEST_ATTRIBUTE_FOLDERS
Request attribute name of a XMLizable folders object |
static String |
REQUEST_ATTRIBUTE_MESSAGE
Request attribute name of a XMLizable message object |
static String |
REQUEST_ATTRIBUTE_MESSAGES
Request attribute name of a XMLizable messages object |
Fields inherited from class org.apache.cocoon.acting.ServiceableAction |
---|
manager |
Fields inherited from class org.apache.cocoon.acting.AbstractAction |
---|
EMPTY_MAP |
Fields inherited from interface org.apache.cocoon.acting.Action |
---|
ROLE |
Constructor Summary | |
---|---|
MailAction()
|
Method Summary | |
---|---|
Map |
act(Redirector redirector,
SourceResolver resolver,
Map objectModel,
String source,
Parameters par)
Execute mail commands. |
protected void |
checkProviders(Session session)
Check that the provider need is available |
protected String |
filter(String tokenStart,
String tokenEnd,
String s,
Properties tokens)
Replace occurences of TOKEN_STARTxxxTOKEN_END by value of entry xxx in tokens table. |
protected String |
getURLNameExpanded(String storeURLNameTemplate,
String userid,
String password)
Gets the uRLNameExpanded attribute of the MailGenerator object |
protected void |
populateRequestAttribute(Request request,
MailContext mailContext)
Populate request attribute map. |
protected void |
putXMLizerToRequestAttribute(Request request,
Iterator resultIterator)
Put XMLizable javamail objects into request attribute map |
protected List |
retrieveJavaMailObjects(MailContext mailContext)
Retrieve javamail objects |
Methods inherited from class org.apache.cocoon.acting.ServiceableAction |
---|
service |
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 |
Field Detail |
---|
public static final String REQUEST_ATTRIBUTE_FOLDER
public static final String REQUEST_ATTRIBUTE_FOLDERS
public static final String REQUEST_ATTRIBUTE_MESSAGE
public static final String REQUEST_ATTRIBUTE_MESSAGES
Constructor Detail |
---|
public MailAction()
Method Detail |
---|
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters par) throws Exception
act
in interface Action
redirector
- Cocoon's redirectorresolver
- Cocoon's source resolver, used for testing if a source is resolvablesource
- the source, e.g.: index.htmlobjectModel
- Description of the Parameterpar
- Description of the Parameter
Map
object with
sitemap substitution values which can be used
in subsequent elements attributes like src=
using a xpath like expression: src="mydir/{myval}/foo"
If the return value is null the processing inside
the Exception
- Description of the Exceptionprotected String getURLNameExpanded(String storeURLNameTemplate, String userid, String password)
storeURLNameTemplate
- Description of the Parameteruserid
- Description of the Parameterpassword
- Description of the Parameter
protected String filter(String tokenStart, String tokenEnd, String s, Properties tokens)
TOKEN_STARTxxxTOKEN_END
by value of entry xxx in tokens table.
tokenStart
- token start markertokenEnd
- token end markers
- the string examinedtokens
- Description of the Parameter
protected void checkProviders(Session session)
session
- The javamail Session used for checking its providers.protected void populateRequestAttribute(Request request, MailContext mailContext) throws Exception
Execute mail command, and populate request attribute map with XMLizable javamail objects, created by the mail command
request
- triggering the creation of javamail objectsmailContext
- javamail context, store, session, folders
Exception
- Description of the Exceptionprotected void putXMLizerToRequestAttribute(Request request, Iterator resultIterator)
request
- holding the destination attribute mapresultIterator
- Iterator ofprotected List retrieveJavaMailObjects(MailContext mailContext) throws ProcessingException
mailContext
- Description of the Parameter
ProcessingException
- thrown iff retrieval fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |