org.apache.cocoon.mail
Class MailContext

java.lang.Object
  extended byorg.apache.avalon.framework.context.DefaultContext
      extended byorg.apache.cocoon.mail.MailContext
All Implemented Interfaces:
Context, Serializable
Direct Known Subclasses:
MailContextHttpSession

public class MailContext
extends DefaultContext

Encapsulation of context info of this webmail application

Since:
29 December 2002
Version:
$Id: MailContext.html 1304280 2012-03-23 11:18:01Z ilgrosso $
See Also:
Serialized Form

Field Summary
static String MAIL_CURRENT_WORKING_COMMAND_ENTRY
          Description of the Field
static String MAIL_CURRENT_WORKING_FOLDER_ENTRY
          Description of the Field
static String MAIL_SESSION_ENTRY
          Description of the Field
static String MAIL_STORE_ENTRY
          Description of the Field
static String SESSION_MAIL_CONTEXT
          attribute name of MailContext object in an application session, eg http-session
 
Method Summary
protected  String canoncializeFoldername(String fn)
          Description of the Method
 Object get(Object key)
          A specialization of the plain Context get method.
 Object getFolder(String folderName)
          Gets the folder attribute of the MailContext object
protected  Log getLogger()
          Gets the logger attribute of the MailContext object
protected  String getParameter(String key)
          Gets the parameter attribute of the MailContext object
protected  Integer getParameterAsInteger(String key)
          Gets the parameterAsInteger attribute of the MailContext object
 Folder getTheFolder(String entry)
          Gets the theFolder attribute of the MailContext object
 void putFolder(Folder folder)
          put a folder in this MailContext object map
 void putFolder(Folder[] folders)
          Description of the Method
 void removeAllFolders()
          remove all folders in this MailContext object
 void removeStore()
          Remove and close Store of this MailContext, implicitly remove all folders, too.
 void setRequest(org.apache.cocoon.environment.Request request)
          Sets the request attribute of the MailContext object
 
Methods inherited from class org.apache.avalon.framework.context.DefaultContext
checkWriteable, equals, getContextData, getParent, hashCode, hide, makeReadOnly, put
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_MAIL_CONTEXT

public static final String SESSION_MAIL_CONTEXT
attribute name of MailContext object in an application session, eg http-session

See Also:
Constant Field Values

MAIL_SESSION_ENTRY

public static final String MAIL_SESSION_ENTRY
Description of the Field

See Also:
Constant Field Values

MAIL_STORE_ENTRY

public static final String MAIL_STORE_ENTRY
Description of the Field

See Also:
Constant Field Values

MAIL_CURRENT_WORKING_FOLDER_ENTRY

public static final String MAIL_CURRENT_WORKING_FOLDER_ENTRY
Description of the Field

See Also:
Constant Field Values

MAIL_CURRENT_WORKING_COMMAND_ENTRY

public static final String MAIL_CURRENT_WORKING_COMMAND_ENTRY
Description of the Field

See Also:
Constant Field Values
Method Detail

setRequest

public void setRequest(org.apache.cocoon.environment.Request request)
Sets the request attribute of the MailContext object

Parameters:
request - The new request value

get

public Object get(Object key)
           throws ContextException
A specialization of the plain Context get method.

Implementing special key prefixes

Parameters:
key - Description of the Parameter
Returns:
Description of the Return Value
Throws:
ContextException - Description of the Exception

getTheFolder

public Folder getTheFolder(String entry)
                    throws ContextException
Gets the theFolder attribute of the MailContext object

Parameters:
entry - Description of the Parameter
Returns:
The theFolder value
Throws:
ContextException - Description of the Exception

getFolder

public Object getFolder(String folderName)
                 throws ContextException
Gets the folder attribute of the MailContext object

Parameters:
folderName - Description of the Parameter
Returns:
The folder value
Throws:
ContextException - Description of the Exception

removeStore

public void removeStore()
Remove and close Store of this MailContext, implicitly remove all folders, too.


removeAllFolders

public void removeAllFolders()
remove all folders in this MailContext object


putFolder

public void putFolder(Folder folder)
               throws ContextException
put a folder in this MailContext object map

Parameters:
folder - Description of the Parameter
Throws:
ContextException - Description of the Exception

putFolder

public void putFolder(Folder[] folders)
               throws ContextException
Description of the Method

Parameters:
folders - Description of the Parameter
Throws:
ContextException - Description of the Exception

getParameter

protected String getParameter(String key)
Gets the parameter attribute of the MailContext object

Parameters:
key - Description of the Parameter
Returns:
The parameter value

getParameterAsInteger

protected Integer getParameterAsInteger(String key)
Gets the parameterAsInteger attribute of the MailContext object

Parameters:
key - Description of the Parameter
Returns:
The parameterAsInteger value

getLogger

protected Log getLogger()
Gets the logger attribute of the MailContext object

Returns:
The logger value

canoncializeFoldername

protected String canoncializeFoldername(String fn)
Description of the Method

Parameters:
fn - Description of the Parameter
Returns:
Description of the Return Value


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.