001: /*
002: * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a>
003: * @version $Id: PortletManagerService.java 6408 2008-01-25 13:38:39Z docentt $
004: */
005: package org.gridsphere.services.core.registry;
006:
007: import org.gridsphere.portlet.service.PortletService;
008: import org.gridsphere.portletcontainer.PortletDispatcherException;
009: import org.gridsphere.portletcontainer.PortletWebApplication;
010:
011: import javax.portlet.PortletException;
012: import javax.servlet.http.HttpServletRequest;
013: import javax.servlet.http.HttpServletResponse;
014: import java.util.List;
015:
016: /**
017: * The <code>PortletManagerService</code> is responsible for the initialization, installation, removal and overall
018: * management of portlet web applications.
019: */
020: public interface PortletManagerService extends PortletService {
021:
022: /**
023: * Initializes all known portlet web applications in order
024: *
025: * @param req the <code>HttpServletRequest</code>
026: * @param res the <code>HttpServletResponse</code>
027: * @throws PortletDispatcherException if a dispatching error occurs
028: * @throws PortletException if an exception occurs initializing the portlet web application
029: */
030: public void initAllPortletWebApplications(HttpServletRequest req,
031: HttpServletResponse res) throws PortletDispatcherException,
032: PortletException;
033:
034: /**
035: * Loads all known portlet web applications in order
036: *
037: * @param req the <code>HttpServletRequest</code>
038: * @param res the <code>HttpServletResponse</code>
039: * @throws PortletDispatcherException if a dispatching error occurs
040: * @throws PortletException if an exception occurs loading the portlet web application
041: */
042: public void loadAllPortletWebApplications(HttpServletRequest req,
043: HttpServletResponse res) throws PortletDispatcherException,
044: PortletException;
045:
046: /**
047: * Initializes a portlet web application
048: *
049: * @param webApplicationName the name of the portlet web application
050: * @param req the <code>HttpServletRequest</code>
051: * @param res the <code>HttpServletresponse</code>
052: * @throws PortletDispatcherException if a dispatching error occurs
053: * @throws PortletException if an exception occurs initializing the portlet web application
054: */
055: public void initPortletWebApplication(String webApplicationName,
056: HttpServletRequest req, HttpServletResponse res)
057: throws PortletDispatcherException, PortletException;
058:
059: /**
060: * Loads a portlet web application
061: *
062: * @param webApplicationName the name of the portlet web application
063: * @param req the <code>HttpServletRequest</code>
064: * @param res the <code>HttpServletresponse</code>
065: * @throws PortletDispatcherException if a dispatching error occurs
066: * @throws PortletException if an exception occurs loading the portlet web application
067: */
068: public void loadPortletWebApplication(String webApplicationName,
069: HttpServletRequest req, HttpServletResponse res)
070: throws PortletDispatcherException, PortletException;
071:
072: /**
073: * Shuts down a currently active portlet web application from the portlet container
074: *
075: * @param webApplicationName the name of the portlet web application
076: * @param req the <code>HttpServletRequest</code>
077: * @param res the <code>HttpServletResponse</code>
078: * @throws PortletDispatcherException if a dispatching error occurs
079: */
080: public void destroyPortletWebApplication(String webApplicationName,
081: HttpServletRequest req, HttpServletResponse res)
082: throws PortletDispatcherException;
083:
084: public void logoutPortletWebApplication(String webApplicationName,
085: HttpServletRequest req, HttpServletResponse res)
086: throws PortletDispatcherException;
087:
088: public void logoutAllPortletWebApplications(HttpServletRequest req,
089: HttpServletResponse res) throws PortletDispatcherException;
090:
091: /**
092: * Lists all the portlet web applications known to the portlet container
093: *
094: * @return the list of web application names as <code>String</code> elements
095: */
096: public List<String> getPortletWebApplicationNames();
097:
098: /**
099: * Returns the portlet web application description for the supplied web application name
100: *
101: * @param webApplicationName the name of the portlet web application
102: * @return the portlet web application description
103: */
104: public String getPortletWebApplicationDescription(
105: String webApplicationName);
106:
107: public void addPortletWebApplication(
108: PortletWebApplication portletWebApp);
109: }
|