|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.portal.wireless.taglibs.base.Context
com.sun.portal.wireless.taglibs.mail.MailContext
Context class for tracking user state across multiple mail requests.
ContextCache| Field Summary | |
static java.lang.String |
CONTEXT_CACHE_CLASS_NAME
The mail context cache class name. |
static java.lang.String |
CONTEXT_CLASS_NAME
The mail context class name. |
static java.lang.String |
CONTEXT_TYPE
The type of context represented by this class. |
static java.lang.String |
SSO_CONFIG_TYPE
The SSO configuration type. |
| Fields inherited from class com.sun.portal.wireless.taglibs.base.Context |
charSetString, errorCode, parentContext, session, ssoAdapter, timezone |
| Constructor Summary | |
MailContext()
|
|
| Method Summary | |
boolean |
doPresetMessagesFetch()
Gets the preset messages from the user's profile, and encapsulates them in PresetMsg beans. |
java.lang.String |
getCharset()
Gets the charset. |
java.util.Vector |
getConfigsCollection()
Gets a Vector that lists the names of SSOAdapter Configurations
that canbe used for the purpose of POP mail collection. |
static MailContext |
getContext(PageContext pageContext)
Gets the MailContext for this session. |
FolderBean |
getCurrentFolder()
Gets the current folder. |
ViewBean |
getCurrentViewBean()
Gets the current view from this context. |
FolderBean[] |
getFoldersCollection()
Gets the folders collection. |
java.lang.String |
getFrom()
Gets the user's "from address". |
Folder |
getInbox()
Gets the Inbox. |
int |
getInboxNumMsgs()
Gets the total number of messages in the Inbox. |
int |
getInboxNumNewMsgs()
Gets the number of new messages in the Inbox. |
int |
getInboxNumUnreadMsgs()
Gets the number of unread messages in the Inbox. |
int |
getLineLength()
Gets the line length. |
LineBean[] |
getLinesCollection()
Gets the lines collection. |
javax.mail.Session |
getMailSession()
Gets the mail session from this context. |
Store |
getMailStore()
Gets the mail store from this context. |
MsgBean |
getMsg()
Gets the current message. |
int |
getMsgIdx()
Gets the index of the current message. |
MsgBean[] |
getMsgsCollection()
Gets the messages collection. |
int |
getNextmsgidx()
Gets the index of the next message. |
int |
getNumMsgs()
Gets the total number of messages in the current folder. |
int |
getNumNewMsgs()
Gets the number of new messages in the current folder. |
int |
getNumOfViews()
Gets the number of views from this context. |
int |
getNumUnreadMsgs()
Gets the number of unread messages in the current folder. |
java.util.Vector |
getPresetMessages()
Gets the preset messages vector. |
int |
getPrevmsgidx()
Gets the index of the previous message. |
java.lang.String |
getSignature()
Gets the signature from this context. |
ViewBean[] |
getViewCollection()
Gets the views collection from this context. |
boolean |
includeMsg()
Indicates whether or not the original message will be included in a reply. |
boolean |
includeSig()
Indicates whether or not the user's signature will be included in outgoing messages. |
void |
init(HttpServletRequest request,
SSOToken session,
SSOAdapter ssoAdapter)
Initializes a context with the specified session. |
boolean |
isAtmsgend()
Indicates whether or not this is the last message. |
boolean |
isAtmsgstart()
Indicates whether or not this is the first message. |
boolean |
isPopEmpty()
Indicates whether or not the POP3 configuration list is empty. |
boolean |
isPresetEmpty()
Indicates whether or not the preset messages list is empty. |
boolean |
saveSentMail()
Indicates whether or not sent mail will be saved. |
void |
setCurrentFolder(FolderBean folder)
Sets the current folder. |
void |
setCurrentView(java.lang.String idx)
Sets the current view for this context. |
void |
setDefaultView(java.lang.String str)
Sets the default view. |
void |
setDoMsgInclude(java.lang.String flag)
Sets message inclusion on or off. |
void |
setFoldersCollection(FolderBean[] folders)
Sets the folders collection. |
void |
setIncludeSig(java.lang.String flag)
Sets signature inclusion on or off. |
void |
setLinesCollection(LineBean[] vlines)
Sets the lines collection. |
void |
setMsg(MsgBean m)
Sets the current message. |
void |
setMsgIdx(int idx)
Sets the index of the current message. |
void |
setMsgsCollection(MsgBean[] msgs)
Sets the collection of messages for this context. |
void |
ssoTokenChanged(SSOTokenEvent evt)
Handles events from the Portal Session, and cleans up the context when the session goes invalid. |
| Methods inherited from class com.sun.portal.wireless.taglibs.base.Context |
getAttributeSet, getAttributeString, getAttributeString, getClientType, getConfigName, getContentType, getContext, getErrorCode, getLocale, getParentContext, getSession, getSessionID, getSSOAdapter, getTimeZone, getUserLocale, getUserLocaleString, init, setErrorCode, setParentContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String CONTEXT_CLASS_NAME
com.sun.portal.wireless.taglibs.mail.MailContext
public static final java.lang.String CONTEXT_CACHE_CLASS_NAME
com.sun.portal.wireless.taglibs.mail.MailContextCache
public static final java.lang.String CONTEXT_TYPE
mailcontext
public static final java.lang.String SSO_CONFIG_TYPE
MAIL-TYPE.
| Constructor Detail |
public MailContext()
| Method Detail |
public void init(HttpServletRequest request,
SSOToken session,
SSOAdapter ssoAdapter)
throws java.lang.Exception
The user's "from address" is computed in the following fashion:
init in class Contextrequest - the HTTP servlet requestsession - the user's sessionssoAdapter -
java.lang.Exception
public static MailContext getContext(PageContext pageContext)
throws java.lang.Exception
MailContext for this session.
pageContext - the page context
java.lang.Exceptionpublic int getLineLength()
int.
public int getInboxNumMsgs()
throws MessagingException
int.
MessagingException -
public int getInboxNumUnreadMsgs()
throws MessagingException
int
MessagingException -
public int getInboxNumNewMsgs()
throws MessagingException
int.
MessagingException
public int getNumMsgs()
throws MessagingException
int.
MessagingException -
public int getNumUnreadMsgs()
throws MessagingException
int.
MessagingException -
public int getNumNewMsgs()
throws MessagingException
int
MessagingException public Folder getInbox()
Folder object.public FolderBean getCurrentFolder()
FolderBean object.setCurrentFolder(FolderBean)public void setCurrentFolder(FolderBean folder)
folder - the folder to set as current.getCurrentFolder()public MsgBean getMsg()
MessageBean object.#setMsg(MessageBean)public void setMsg(MsgBean m)
m - the message to set as the current message.getMsg()public int getMsgIdx()
intsetMsgIdx(int)public void setMsgIdx(int idx)
idx - the index to setgetMsgIdx()public java.lang.String getFrom()
Stringpublic java.lang.String getCharset()
getCharset in class Contextpublic Store getMailStore()
Store object.public javax.mail.Session getMailSession()
Session object.public java.lang.String getSignature()
StringsetIncludeSig(String)public boolean saveSentMail()
true is saved, false if notpublic boolean includeMsg()
true if included, false if not.setDoMsgInclude(String)public void setDoMsgInclude(java.lang.String flag)
flag - a String indicating "true" for inclusion,
or "false" for exclusion.includeMsg()public boolean includeSig()
true if included, false if notsetIncludeSig(String)public void setIncludeSig(java.lang.String flag)
flag - a String indicating "true" for inclusion,
or "false" for exclusion.includeSig()public boolean isAtmsgend()
true if this is the last message, false if notpublic boolean isAtmsgstart()
true if this is the first message, false if notpublic int getNextmsgidx()
intpublic int getPrevmsgidx()
intpublic boolean isPresetEmpty()
true if empty, false if notpublic java.util.Vector getPresetMessages()
Vector of preset messages.public boolean doPresetMessagesFetch()
PresetMsg beans.
true if the fetch succeeded, false if it failedpublic boolean isPopEmpty()
true if empty, false if notpublic java.util.Vector getConfigsCollection()
Vector that lists the names of SSOAdapter Configurations
that canbe used for the purpose of POP mail collection.
Vectorpublic int getNumOfViews()
intpublic ViewBean[] getViewCollection()
ViewBean objects.public ViewBean getCurrentViewBean()
ViewBean objectpublic void setCurrentView(java.lang.String idx)
idx - the index to set, such as "1", "2", etc.public void setDefaultView(java.lang.String str)
str parameter must be set
to one of the following:
str - the default view name to setpublic FolderBean[] getFoldersCollection()
FolderBean objects.setFoldersCollection(FolderBean[])public void setFoldersCollection(FolderBean[] folders)
folders - the array of FolderBean objects to setgetFoldersCollection()public MsgBean[] getMsgsCollection()
MsgBean objects.setMsgsCollection(MsgBean[] msgs)public void setMsgsCollection(MsgBean[] msgs)
msgs - the message bean collectionpublic LineBean[] getLinesCollection()
LineBean objects.setLinesCollection(LineBean[] vlines)public void setLinesCollection(LineBean[] vlines)
vlines - the lines collection to setgetLinesCollection()public void ssoTokenChanged(SSOTokenEvent evt)
ssoTokenChanged in class Contextevt - the session event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||