001: /**
002: * $Id: CalendarApplicationHelper.java,v 1.9 2003/08/04 14:38:20 byork Exp $
003: * Copyright 2002 Sun Microsystems, Inc. All
004: * rights reserved. Use of this product is subject
005: * to license terms. Federal Acquisitions:
006: * Commercial Software -- Government Users
007: * Subject to Standard License Terms and
008: * Conditions.
009: *
010: * Sun, Sun Microsystems, the Sun logo, and iPlanet
011: * are trademarks or registered trademarks of Sun Microsystems,
012: * Inc. in the United States and other countries.
013: */package com.sun.portal.providers.calendar;
014:
015: import java.net.URL;
016: import javax.servlet.http.HttpServletRequest;
017: import javax.servlet.http.HttpServletResponse;
018: import com.sun.comclient.calendar.VEvent;
019: import com.sun.comclient.calendar.VTodo;
020: import com.sun.ssoadapter.SSOAdapter;
021: import com.sun.portal.providers.context.ProviderContext;
022: import com.sun.portal.providers.ProviderException;
023:
024: /**
025: * <p A CalendarApplicationHelper implementation must provide the following method(s):
026: * <ul>
027: * <li>init(...)</li>
028: * <li>getStartURL(...)</li>
029: * <li>getEventURL(...)</li>
030: * <li>getTaskURL(...)</li>
031: * </ul>
032: *
033: * @author John Saare
034: * @version 1.0
035: * @see com.sun.ssoadapter.SSOAdapter
036: *
037: */
038:
039: public interface CalendarApplicationHelper {
040:
041: /**
042: * Initialize CalendarApplicationHelper.
043: *
044: * @param provider CalendarProvider
045: * @param ssoAdapter Used to identify the SSOAdapter
046: */
047: public void init(CalendarProvider provider, SSOAdapter ssoAdapter)
048: throws Exception;
049:
050: /**
051: * Returns the contents of the AddressBookProviders edit page
052: */
053: public StringBuffer getAppPrefsEdit(CalendarProvider aprov,
054: HttpServletRequest req, HttpServletResponse res);
055:
056: /**
057: * Processes values returned from the AddressBookProvider edit page
058: */
059: public URL processAppPrefsEdit(CalendarProvider aprov,
060: HttpServletRequest req, HttpServletResponse res)
061: throws ProviderException;
062:
063: /**
064: * Returns the Application Start URL.
065: *
066: * @param provider CalendarProvider
067: * @param request HttpServletRequest
068: * @return url to access application
069: */
070: public String getStartURL(CalendarProvider provider,
071: HttpServletRequest request);
072:
073: /**
074: * Returns client aware URL for event access
075: * to service associated with a particular instance
076: * of a CalendarSSOHelper.
077: *
078: * @param provider CalendarProvider
079: * @param request HttpServletRequest
080: * @param event VEvent
081: */
082: public String getEventURL(CalendarProvider provider,
083: HttpServletRequest request, VEvent event) throws Exception;
084:
085: /**
086: * Returns client aware URL for task access
087: * to service associated with a particular instance
088: * of a CalendarSSOHelper.
089: *
090: * @param provider CalendarProvider
091: * @param request HttpServletRequest
092: * @param task VTodo
093: */
094: public String getTaskURL(CalendarProvider provider,
095: HttpServletRequest request, VTodo task) throws Exception;
096:
097: public String getAppHelperEditLink(HttpServletRequest req,
098: ProviderContext pc);
099:
100: /**
101: * Sets the App Helpers name
102: */
103: public void setName(String name);
104:
105: /**
106: * Gets the App Helpers name
107: */
108: public String getName();
109:
110: }
|