taylor      2003/12/26 21:35:51

  Modified:    portal/src/java/org/apache/jetspeed/services/factory
                        FactoryManagementService.java FactoryManager.java
                        FactoryManagerServiceImpl.java
  Log:
  javadocs - started documentation of known interfaces for factories and service 
providers between Pluto and portals
  
  Revision  Changes    Path
  1.4       +48 -14    
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/factory/FactoryManagementService.java
  
  Index: FactoryManagementService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/factory/FactoryManagementService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FactoryManagementService.java     20 Nov 2003 19:02:24 -0000      1.3
  +++ FactoryManagementService.java     27 Dec 2003 05:35:51 -0000      1.4
  @@ -57,9 +57,40 @@
   import org.apache.pluto.factory.Factory;
   
   /**
  - * Manages the life-time of factories registered during container startup.
  - * A service has to derive from [EMAIL PROTECTED] Factory} and implement the
  - * <CODE>init()</CODE> and <CODE>destroy()</CODE> methods as appropriate.
  + * <p>
  + * Manages the life-time of portal-to-container shared factories as defined by 
Pluto's factory interfaces.
  + * A factory must derive from [EMAIL PROTECTED] org.apache.pluto.factory.Factory} 
and implement the
  + * <CODE>init()</CODE> and <CODE>destroy()</CODE> methods to meet Pluto's factory 
contract.
  + * Factories create the shared classes between the portal and Pluto container. 
  + * Implementations are created by portal provided factories. Most of the shared
  + * classes are implementations of the Java Portlet API interfaces. 
  + * <p>
  + * Factory Managed Interfaces per Pluto requirements:
  + * <p> 
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/ActionRequest.html'>javax.portlet.ActionRequest</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/ActionResponse.html'>javax.portlet.ActionResponse</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/RenderRequest.html'>javax.portlet.RenderRequest</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/RenderResponse.html'>javax.portlet.RenderResponse</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletSession.html'>javax.portlet.PortletSession</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletConfig.html'>javax.portlet.PortletConfig</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletContext.html'>javax.portlet.PortletContext</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletPreferences.html'>javax.portlet.PortletPreferences</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/PortalContext.html'>javax.portlet.PortalContext</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletURL.html'>javax.portlet.PortletURL</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/PortletPreferences.html'>javax.portlet.PortletPreferences</a><br>
  + * <a 
href='http://www.bluesunrise.com/portlet-api/javax/portlet/PreferencesValidator.html'>javax.portlet.PreferencesValidator</a><br>
  + * <a 
href='http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html'>javax.servlet.http.HttpServletRequest</a><br>
  + * <a 
href='http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletResponse.html'>javax.servlet.http.HttpServletResponse</a><br>
  + * <a 
href='http://jakarta.apache.org/pluto/apidocs/org/apache/pluto/invoker/PortletInvoker.html'>org.apache.pluto.invoker.PortletInvoker</a><br>
  + * <a 
href='http://jakarta.apache.org/pluto/apidocs/org/apache/pluto/util/NamespaceMapper.html'>org.apache.pluto.util.NamespaceMapper</a><br>
  + * <a 
href='http://jakarta.apache.org/pluto/apidocs/org/apache/pluto/om/ControllerFactory.html'>org.apache.pluto.om.ControllerFactory</a><br>
  + * <p>
  + * Pluto Service Providers
  + * <p>
  + * <a 
href='http://jakarta.apache.org/pluto/apidocs/org/apache/pluto/services/information/StaticInformationProvider.html'>org.apache.pluto.services.information.InformationProviderService</a><br>
  + * <a 
href='http://jakarta.apache.org/pluto/apidocs/org/apache/pluto/services/information/DynamicInformationProvider.html'>org.apache.pluto.services.information.DynamicInformationProvider</a><br>
  + * <a 
href='http://jakarta.apache.org/pluto/apidocs/org/apache/pluto/services/information/PortletActionProvider.html'>org.apache.pluto.services.information.PortletActionProvider</a><br>
  + * <a 
href='http://jakarta.apache.org/pluto/apidocs/org/apache/pluto/services/information/PortalContextProvider.html'>org.apache.pluto.services.information.PortalContextProvider</a><br>
    * 
    * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
    * @version $Id$
  @@ -70,15 +101,18 @@
       public String SERVICE_NAME = "factory";
       
       /**
  -      ** Returns the service implementation for the given service class, or
  -      ** <CODE>null</CODE> if no such service is registered.
  -      **
  -      ** @param   aClass
  -      **          the service class
  -      **
  -      ** @return   the service implementation
  -      **/
  -
  -    public Factory getFactory (Class aClass);
  +     * Returns the factory implementation for the given Pluto managed interface, or
  +     * <CODE>null</CODE> if no such factory is registered for the given Pluto 
interface.
  +     * Pluto uses factories for creating portal implementations of shared classes 
(services) 
  +     * between Pluto (the container) and the portal. For example, for the Portlet 
standard's 
  +     * RenderRequest and RenderResponse interfaces, its up to the portal to create 
the implementations 
  +     * of these interfaces and provide the request or response to the container. 
With Pluto,
  +     * the implementations are created by portal provided factories. For each 
factory-managed interface,
  +     * its up to the portal to provide a factory for that interface. 
  +     *
  +     * @param    managedInterface The known interface who's factory we are 
requesting.
  +     * @return   The portal's portal factory for this interface, used to create a 
portal/container service.
  +     */
  +    public Factory getFactory (Class managedInterface);
           
   }
  
  
  
  1.3       +7 -15     
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/factory/FactoryManager.java
  
  Index: FactoryManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/factory/FactoryManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FactoryManager.java       18 Oct 2003 19:54:51 -0000      1.2
  +++ FactoryManager.java       27 Dec 2003 05:35:51 -0000      1.3
  @@ -59,12 +59,11 @@
   
   
   /**
  - * Manages the life-time of factories registered during container startup.
  - * A service has to derive from [EMAIL PROTECTED] Factory} and implement the
  - * <CODE>init()</CODE> and <CODE>destroy()</CODE> methods as appropriate.
  - *
  + * Convenience static accessor for [EMAIL PROTECTED] FactoryManagementService}
  + *  
    * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
    * @version $Id$
  + * @see FactoryManagementService
    */
   public abstract class FactoryManager
   {
  @@ -80,16 +79,9 @@
               .getInstance().getService(FactoryManagementService.SERVICE_NAME);
       }
   
  -    /**
  -     ** Returns the service implementation for the given service class, or
  -     ** <CODE>null</CODE> if no such service is registered.
  -     **
  -     ** @param   aClass
  -     **          the service class
  -     **
  -     ** @return   the service implementation
  -     **/
  -
  +    /* (non-Javadoc)
  +     * @see 
org.apache.pluto.services.factory.FactoryManagerService#getFactory(java.lang.Class)
  +     */    
       public static Factory getFactory (Class theClass)
       {
           return getServiceImpl().getFactory(theClass);
  
  
  
  1.3       +18 -21    
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/factory/FactoryManagerServiceImpl.java
  
  Index: FactoryManagerServiceImpl.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/factory/FactoryManagerServiceImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FactoryManagerServiceImpl.java    18 Oct 2003 19:54:51 -0000      1.2
  +++ FactoryManagerServiceImpl.java    27 Dec 2003 05:35:51 -0000      1.3
  @@ -73,12 +73,17 @@
   import org.apache.jetspeed.cps.CPSInitializationException;
   
   /**
  - * Manages the life-time of factories registered during container startup.
  - * A service has to derive from [EMAIL PROTECTED] Factory} and implement the
  - * <CODE>init()</CODE> and <CODE>destroy()</CODE> methods as appropriate.
  + * <p>
  + * Manages the life-time of portal-to-container shared factories as defined by 
Pluto's factory interfaces.
  + * A factory must derive from <a 
href='http://jakarta.apache.org/pluto/apidocs/org/apache/pluto/factory/Factory.html'>org.apache.pluto.factory.Factory</a>
 and implement the
  + * <CODE>init()</CODE> and <CODE>destroy()</CODE> methods to meet Pluto's factory 
contract.
  + * Factories create the shared classes between the portal and Pluto container. 
  + * Implementations are created by portal provided factories. Most of the shared
  + * classes are implementations of the Java Portlet API interfaces. 
    * 
    * @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
    * @version $Id$
  + * @see <a 
href="org.apache.jetspeed.services.factory.FactoryManagerService">FactoryManagerService</a>
    */
   public class FactoryManagerServiceImpl 
       extends BaseCommonService
  @@ -93,11 +98,10 @@
       }
   
       /**
  -     * This is the early initialization method called by the 
  -     * <code>Service</code> framework
  -     * @param conf The <code>ServletConfig</code>
  -     * @exception throws a <code>InitializationException</code> if the service
  -     * fails to initialize
  +     * This is the early initialization method called by the <code>Service</code> 
framework. 
  +     * 
  +     * @exception throws a <code>CPSInitializationException</code> if the service
  +     * fails to initialize.
        */
       public void init() 
           throws CPSInitializationException 
  @@ -271,22 +275,15 @@
       }
   
   
  -    /**
  -     ** Returns the service implementation for the given service class, or
  -     ** <CODE>null</CODE> if no such service is registered.
  -     **
  -     ** @param   aClass
  -     **          the service class
  -     **
  -     ** @return   the service implementation
  -     **/
  -
  -    public Factory getFactory (Class theClass)
  +    /* (non-Javadoc)
  +     * @see 
org.apache.pluto.services.factory.FactoryManagerService#getFactory(java.lang.Class)
  +     */
  +    public Factory getFactory (Class managedInterface)
       {
           // at this state the services map is read-only,
           // therefore we can go without synchronization
   
  -        return ((Factory) factoryMap.get (theClass));
  +        return ((Factory) factoryMap.get (managedInterface));
       }
   
       // --- PRIVATE MEMBERS --- //
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to