1 /* 2 * Copyright 2003,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.apache.pluto.factory; 17 18 /** 19 * <p> 20 * This interface defines portal/container factories and their life-cycle. 21 * A Pluto defines the interfaces for the factories, and the portal implements the factory. 22 * A portal's factory implementation must be a derivative from this interface and implement the 23 * <CODE>init()</CODE> and <CODE>destroy()</CODE> methods to meet Pluto's factory contract. 24 * Factories create the shared classes between the portal and Pluto container. 25 * Implementations are created by portal provided factories. Many of the classes created by the factories 26 * are the implementations of the Java Portlet API interfaces. 27 * <p> 28 * Factory Managed Interfaces per Pluto requirements: 29 * <p> 30 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/ActionRequest.html'>javax.portlet.ActionRequest</a><br> 31 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/ActionResponse.html'>javax.portlet.ActionResponse</a><br> 32 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/RenderRequest.html'>javax.portlet.RenderRequest</a><br> 33 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/RenderResponse.html'>javax.portlet.RenderResponse</a><br> 34 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletSession.html'>javax.portlet.PortletSession</a><br> 35 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletConfig.html'>javax.portlet.PortletConfig</a><br> 36 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletContext.html'>javax.portlet.PortletContext</a><br> 37 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletPreferences.html'>javax.portlet.PortletPreferences</a><br> 38 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/PortalContext.html'>javax.portlet.PortalContext</a><br> 39 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletURL.html'>javax.portlet.PortletURL</a><br> 40 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletPreferences.html'>javax.portlet.PortletPreferences</a><br> 41 * <a HREF='http://www.bluesunrise.com/portlet-api/javax/portlet/PreferencesValidator.html'>javax.portlet.PreferencesValidator</a><br> 42 * <a HREF='http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html'>javax.servlet.http.HttpServletRequest</a><br> 43 * <a HREF='http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletResponse.html'>javax.servlet.http.HttpServletResponse</a><br> 44 * <a HREF='hhttp://portals.apache.org/pluto/multiproject/pluto/apidocs/org/apache/pluto/invoker/PortletInvoker.html'>org.apache.pluto.invoker.PortletInvoker</a><br> 45 * <a HREF='http://portals.apache.org/pluto/multiproject/pluto/apidocs/org/apache/pluto/util/NamespaceMapper.html'>org.apache.pluto.util.NamespaceMapper</a><br> 46 * <a HREF='http://portals.apache.org/pluto/multiproject/pluto/apidocs/org/apache/pluto/om/ControllerFactory.html'>org.apache.pluto.om.ControllerFactory</a><br> 47 * <p> 48 * Pluto Service Providers 49 * <p> 50 * <a HREF='http://portals.apache.org/pluto/multiproject/pluto/apidocs/org/apache/pluto/services/information/StaticInformationProvider.html'>org.apache.pluto.services.information.InformationProviderService</a><br> 51 * <a HREF='http://portals.apache.org/pluto/multiproject/pluto/apidocs/org/apache/pluto/services/information/DynamicInformationProvider.html'>org.apache.pluto.services.information.DynamicInformationProvider</a><br> 52 * <a HREF='http://portals.apache.org/pluto/multiproject/pluto/apidocs/org/apache/pluto/services/information/PortletActionProvider.html'>org.apache.pluto.services.information.PortletActionProvider</a><br> 53 * <a HREF='http://portals.apache.org/pluto/multiproject/pluto/apidocs/org/apache/pluto/services/information/PortalContextProvider.html'>org.apache.pluto.services.information.PortalContextProvider</a><br> 54 * 55 * @version $Id: Factory.java 106381 2004-11-24 04:59:16Z nlothian $ 56 */ 57 public interface Factory 58 { 59 60 61 /** 62 * Initializes the factory using the servlet configuration 63 * and the factory properties. 64 * 65 * @param config 66 * the servlet configuration 67 * @param properties 68 * the factory properties 69 * 70 * @throws Exception 71 * if the initialization fails 72 */ 73 public void init(javax.servlet.ServletConfig config, 74 java.util.Map properties) throws Exception; 75 76 /** 77 * Destroys the factory. This method allows the service 78 * to cleanup any resources. 79 * 80 * @throws Exception 81 * if the destruction fails 82 */ 83 public void destroy() throws Exception; 84 85 } 86