001: /**
002: * $Id: MailApplicationHelper.java,v 1.11 2004/02/19 18:33:09 byork Exp $
003: * Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use of this
004: * product is subject to license terms. Federal Acquisitions: Commercial
005: * Software -- Government Users Subject to Standard License Terms and
006: * Conditions. Sun, Sun Microsystems, the Sun logo, and iPlanet are trademarks
007: * or registered trademarks of Sun Microsystems, Inc. in the United States and
008: * other countries.
009: */package com.sun.portal.providers.mail;
010:
011: import com.sun.ssoadapter.SSOAdapter;
012: import com.sun.portal.providers.context.Theme;
013: import java.net.URL;
014: import javax.mail.Message;
015: import javax.servlet.http.HttpServletRequest;
016: import javax.servlet.http.HttpServletResponse;
017: import com.sun.portal.providers.ProviderEditUtility;
018: import com.sun.portal.providers.context.ProviderContext;
019: import com.sun.portal.providers.ProviderException;
020:
021: /**
022: * <p> A MailApplicationHelper implementation must provide the following
023: * method(s):
024: * <ul>
025: * <li> init(..)</li>
026: * <li> getStartURL()</li>
027: * <li> getMessageURL(..)</li>
028: * </ul>
029: *
030: *
031: *@author John Saare
032: *@created December 2, 2003
033: *@version 1.0
034: *@see com.sun.ssoadapter.SSOAdapter
035: */
036:
037: public interface MailApplicationHelper {
038:
039: /**
040: * Initialize MailApplicationHelper.
041: *
042: *@param provider MailProvider
043: *@param ssoAdapter Used to identify the SSOAdapter
044: *@exception Exception
045: */
046: public void init(MailProvider provider, SSOAdapter ssoAdapter)
047: throws Exception;
048:
049: /**
050: * Returns the Application Start URL.
051: *
052: *@param provider MailProvider
053: *@param request HttpServletRequest
054: *@return url to access application
055: */
056: public String getStartURL(MailProvider provider,
057: HttpServletRequest request);
058:
059: /**
060: * Returns the contents of the MailProviders edit page
061: *
062: *@param mprov MailProvider instance
063: *@param req servlet request
064: *@param res servlet response
065: *@return The appPrefsEdit value
066: */
067: public StringBuffer getAppPrefsEdit(MailProvider mprov,
068: HttpServletRequest req, HttpServletResponse res);
069:
070: /**
071: * Processes values returned from the MailPprovider edit page
072: *
073: *@param mprov MailProvider instance
074: *@param req servlet request
075: *@param res servlet response
076: *@return URL for MailProvider.processEdit() to use
077: *@exception ProviderException
078: */
079: public URL processAppPrefsEdit(MailProvider mprov,
080: HttpServletRequest req, HttpServletResponse res)
081: throws ProviderException;
082:
083: /**
084: * Returns client aware URL for message access to service associated with a
085: * particular instance of a MailSSOHelper.
086: *
087: *@param provider MailProvider
088: *@param request HttpServletRequest
089: *@param message Mail Message
090: *@return url to a specific message in the application
091: *@exception Exception
092: */
093: public String getMessageURL(MailProvider provider,
094: HttpServletRequest request, Message message)
095: throws Exception;
096:
097: /**
098: * Gets the appHelperEditLink attribute of the MailApplicationHelper object
099: *
100: *@param req servlet request
101: *@param pc current ProviderContext
102: *@return The appHelperEditLink value
103: */
104: public String getAppHelperEditLink(HttpServletRequest req,
105: ProviderContext pc);
106:
107: /**
108: * Sets the App Helpers name
109: *
110: *@param name The new name value
111: */
112: public void setName(String name);
113:
114: /**
115: * Gets the App Helpers name
116: *
117: *@return The name value
118: */
119: public String getName();
120:
121: }
|