portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raph...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/util/customization PSMLDocument.java
Date Mon, 04 Jun 2001 17:47:16 GMT
raphael     01/06/04 10:47:16

  Modified:    src/java/org/apache/jetspeed/daemon/impl
                        DiskCacheDaemon.java FeedDaemon.java
               src/java/org/apache/jetspeed/daemon/impl/util/diskcachedaemon
                        PortletRefresher.java URLRefresher.java
               src/java/org/apache/jetspeed/daemon/impl/util/feeddaemon
                        EntryInstantiator.java Instantiator.java
               src/java/org/apache/jetspeed/modules/actions
                        SavePageConfig.java
               src/java/org/apache/jetspeed/modules/actions/controls
                        Close.java Maximize.java Minimize.java Restore.java
               src/java/org/apache/jetspeed/om/newregistry Registry.java
               src/java/org/apache/jetspeed/om/newregistry/base
                        BaseRegistry.java
               src/java/org/apache/jetspeed/portal PortletController.java
                        PortletURIManager.java
               src/java/org/apache/jetspeed/portal/controls
                        AbstractPortletControl.java
                        VelocityPortletControl.java
               src/java/org/apache/jetspeed/portal/portlets
                        AbstractPortlet.java ApplicationsPortlet.java
                        PortletInfoPortlet.java TurbineScreenPortlet.java
               src/java/org/apache/jetspeed/portal/portlets/admin
                        DaemonAdminPortlet.java GlobalAdminPortlet.java
                        JavaRuntimePortlet.java JetspeedContentAdmin.java
               src/java/org/apache/jetspeed/portal/portlets/customize
                        CustomizePortlet.java
               src/java/org/apache/jetspeed/util PSMLManager.java
               src/java/org/apache/jetspeed/util/customization
                        PSMLDocument.java
  Log:
  update the classes to use the new PortalToolkit servce wherever necessary
  
  Revision  Changes    Path
  1.15      +1 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/DiskCacheDaemon.java
  
  Index: DiskCacheDaemon.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/DiskCacheDaemon.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DiskCacheDaemon.java	2001/03/07 06:43:07	1.14
  +++ DiskCacheDaemon.java	2001/06/04 17:46:31	1.15
  @@ -57,7 +57,6 @@
   //jetspeed stuff
   import org.apache.jetspeed.daemon.*;
   import org.apache.jetspeed.daemon.impl.util.diskcachedaemon.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.cache.disk.*;
   import org.apache.jetspeed.util.*;
   import org.apache.jetspeed.services.threadpool.ThreadPool;
  @@ -76,7 +75,7 @@
   
   
   @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
  -@version $Id: DiskCacheDaemon.java,v 1.14 2001/03/07 06:43:07 taylor Exp $
  +@version $Id: DiskCacheDaemon.java,v 1.15 2001/06/04 17:46:31 raphael Exp $
   */
   public class DiskCacheDaemon implements Daemon, Initable {
   
  
  
  
  1.33      +1 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/FeedDaemon.java
  
  Index: FeedDaemon.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/FeedDaemon.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- FeedDaemon.java	2001/05/04 15:51:33	1.32
  +++ FeedDaemon.java	2001/06/04 17:46:32	1.33
  @@ -61,7 +61,6 @@
   import org.apache.jetspeed.daemon.impl.util.feeddaemon.*;
   import org.apache.jetspeed.cache.disk.*;
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.util.*;
   import org.apache.jetspeed.services.resources.JetspeedResources;
   import org.apache.jetspeed.services.registry.FileRegistry;
  @@ -100,7 +99,7 @@
   </p>
   
   @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
  -@version $Id: FeedDaemon.java,v 1.32 2001/05/04 15:51:33 sgala Exp $
  +@version $Id: FeedDaemon.java,v 1.33 2001/06/04 17:46:32 raphael Exp $
   */
   public class FeedDaemon implements Daemon, Initable {
   
  
  
  
  1.13      +3 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/util/diskcachedaemon/PortletRefresher.java
  
  Index: PortletRefresher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/util/diskcachedaemon/PortletRefresher.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- PortletRefresher.java	2001/05/02 10:45:45	1.12
  +++ PortletRefresher.java	2001/06/04 17:46:34	1.13
  @@ -55,9 +55,9 @@
   package org.apache.jetspeed.daemon.impl.util.diskcachedaemon;
   
   //jetspeed stuff
  -import org.apache.jetspeed.portal.factory.PortletFactory;
   import org.apache.jetspeed.om.newregistry.PortletEntry;
   import org.apache.jetspeed.services.Registry;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.urlmanager.URLManager;
   
   //turbine stuff
  @@ -71,7 +71,7 @@
   </p>
   
   @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
  -@version $Id: PortletRefresher.java,v 1.12 2001/05/02 10:45:45 raphael Exp $
  +@version $Id: PortletRefresher.java,v 1.13 2001/06/04 17:46:34 raphael Exp $
   */
   public class PortletRefresher implements Runnable {
      
  @@ -92,7 +92,7 @@
           try {
               if ( JetspeedResources.getBoolean( JetspeedResources.AUTOCREATE_PORTLETS_KEY ) ) {
          
  -                PortletFactory.getPortlet( this.entry, false );
  +                PortletFactory.getPortlet( this.entry.getName() );
    
               } 
               
  
  
  
  1.10      +1 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/util/diskcachedaemon/URLRefresher.java
  
  Index: URLRefresher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/util/diskcachedaemon/URLRefresher.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- URLRefresher.java	2001/05/02 10:45:47	1.9
  +++ URLRefresher.java	2001/06/04 17:46:35	1.10
  @@ -58,7 +58,6 @@
   import org.apache.jetspeed.util.*;
   import org.apache.jetspeed.cache.disk.*;
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.om.newregistry.PortletEntry;
   import org.apache.jetspeed.services.Registry;
   import org.apache.jetspeed.services.urlmanager.URLFetcher;
  @@ -80,7 +79,7 @@
   </p>
   
   @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
  -@version $Id: URLRefresher.java,v 1.9 2001/05/02 10:45:47 raphael Exp $
  +@version $Id: URLRefresher.java,v 1.10 2001/06/04 17:46:35 raphael Exp $
   */
   public class URLRefresher implements Runnable {
   
  
  
  
  1.10      +1 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/util/feeddaemon/EntryInstantiator.java
  
  Index: EntryInstantiator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/util/feeddaemon/EntryInstantiator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- EntryInstantiator.java	2001/05/02 10:45:56	1.9
  +++ EntryInstantiator.java	2001/06/04 17:46:37	1.10
  @@ -56,7 +56,6 @@
   
   //jetspeed stuff
   import org.apache.jetspeed.daemon.impl.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.portal.*;
   import org.apache.jetspeed.services.threadpool.ThreadPool;
   import org.apache.jetspeed.services.Registry;
  @@ -74,7 +73,7 @@
   everything is in memory.
   
   @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
  -@version $Id: EntryInstantiator.java,v 1.9 2001/05/02 10:45:56 raphael Exp $
  +@version $Id: EntryInstantiator.java,v 1.10 2001/06/04 17:46:37 raphael Exp $
   */
   public class EntryInstantiator {
   
  
  
  
  1.18      +3 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/util/feeddaemon/Instantiator.java
  
  Index: Instantiator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/daemon/impl/util/feeddaemon/Instantiator.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Instantiator.java	2001/05/02 10:45:58	1.17
  +++ Instantiator.java	2001/06/04 17:46:38	1.18
  @@ -58,9 +58,9 @@
   import org.apache.jetspeed.util.*;
   import org.apache.jetspeed.cache.disk.*;
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.om.newregistry.PortletEntry;
   import org.apache.jetspeed.services.Registry;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.urlmanager.URLManager;
   import org.apache.jetspeed.services.urlmanager.URLManagerService;
   import org.apache.jetspeed.services.urlmanager.URLFetcher;
  @@ -84,7 +84,7 @@
   </p>
   
   @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
  -@version $Id: Instantiator.java,v 1.17 2001/05/02 10:45:58 raphael Exp $
  +@version $Id: Instantiator.java,v 1.18 2001/06/04 17:46:38 raphael Exp $
   */
   public class Instantiator implements Runnable {
   
  @@ -208,7 +208,7 @@
                       if ( JetspeedResources.getBoolean( JetspeedResources.AUTOCREATE_PORTLETS_KEY ) )
                           {
                     
  -                            PortletFactory.getPortlet( this.entry );
  +                            PortletFactory.getPortlet( this.entry.getName() );
   
                           }
   
  
  
  
  1.4       +1 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/SavePageConfig.java
  
  Index: SavePageConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/SavePageConfig.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SavePageConfig.java	2001/03/07 06:43:39	1.3
  +++ SavePageConfig.java	2001/06/04 17:46:41	1.4
  @@ -58,7 +58,7 @@
   import org.apache.jetspeed.util.URILookup;
   import org.apache.jetspeed.portal.Portlet;
   import org.apache.jetspeed.portal.PortletException;
  -import org.apache.jetspeed.portal.factory.PortletFactory;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.portal.portlets.customize.CustomizePortlet;
   
   // Turbine Modules
  
  
  
  1.2       +2 -10     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Close.java
  
  Index: Close.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Close.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Close.java	2001/05/29 23:15:38	1.1
  +++ Close.java	2001/06/04 17:46:44	1.2
  @@ -62,10 +62,8 @@
   import org.apache.jetspeed.portal.Portlet;
   import org.apache.jetspeed.portal.PortalState;
   import org.apache.jetspeed.portal.PortletState;
  -import org.apache.jetspeed.portal.PortletException;
  -import org.apache.jetspeed.portal.factory.PortletFactory;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.Registry;
  -import org.apache.jetspeed.om.newregistry.PortletEntry;
   
   /**
    * Change the internal state of a portlet from normal to closed
  @@ -89,13 +87,7 @@
               return;
           }
   
  -        PortletEntry entry = (PortletEntry)Registry.getEntry(Registry.PORTLET, name );
  -        if ( entry == null )
  -        {
  -            return;
  -        }
  -
  -        Portlet portlet = PortletFactory.getPortlet( entry );
  +        Portlet portlet = PortletFactory.getPortlet( name );
           if (( portlet != null )&&( portlet instanceof PortletState ))
           {
               ((PortletState)portlet).setClosed( true, rundata );
  
  
  
  1.3       +0 -6      jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Maximize.java
  
  Index: Maximize.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Maximize.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Maximize.java	2001/05/29 23:15:39	1.2
  +++ Maximize.java	2001/06/04 17:46:44	1.3
  @@ -59,13 +59,7 @@
   import org.apache.turbine.util.RunData;
   
   // Jetspeed stuff
  -import org.apache.jetspeed.portal.Portlet;
  -import org.apache.jetspeed.portal.PortletState;
   import org.apache.jetspeed.portal.PortalState;
  -import org.apache.jetspeed.portal.PortletException;
  -import org.apache.jetspeed.portal.factory.PortletFactory;
  -import org.apache.jetspeed.services.Registry;
  -import org.apache.jetspeed.om.newregistry.PortletEntry;
   
   
   /**
  
  
  
  1.2       +4 -11     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Minimize.java
  
  Index: Minimize.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Minimize.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Minimize.java	2001/05/28 15:16:31	1.1
  +++ Minimize.java	2001/06/04 17:46:45	1.2
  @@ -61,10 +61,8 @@
   // Jetspeed stuff
   import org.apache.jetspeed.portal.Portlet;
   import org.apache.jetspeed.portal.PortletState;
  -import org.apache.jetspeed.portal.PortletException;
  -import org.apache.jetspeed.portal.factory.PortletFactory;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.Registry;
  -import org.apache.jetspeed.om.newregistry.PortletEntry;
   
   
   /**
  @@ -87,14 +85,9 @@
           {
               return;
           }
  -
  -        PortletEntry entry = (PortletEntry)Registry.getEntry(Registry.PORTLET, name );
  -        if ( entry == null )
  -        {
  -            return;
  -        }
  -
  -        Portlet portlet = PortletFactory.getPortlet( entry );
  +        
  +        Portlet portlet = PortletFactory.getPortlet( name );
  +        
           if (( portlet != null )&&( portlet instanceof PortletState ))
           {
               ((PortletState)portlet).setMinimized( true, rundata );
  
  
  
  1.3       +2 -11     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Restore.java
  
  Index: Restore.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/controls/Restore.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Restore.java	2001/05/29 23:15:39	1.2
  +++ Restore.java	2001/06/04 17:46:45	1.3
  @@ -62,12 +62,9 @@
   import org.apache.jetspeed.portal.Portlet;
   import org.apache.jetspeed.portal.PortletState;
   import org.apache.jetspeed.portal.PortalState;
  -import org.apache.jetspeed.portal.PortletException;
  -import org.apache.jetspeed.portal.factory.PortletFactory;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.Registry;
  -import org.apache.jetspeed.om.newregistry.PortletEntry;
   
  -
   /**
   Change the internal state of a portlet from minimized to normal
   
  @@ -88,14 +85,8 @@
           {
               return;
           }
  -
  -        PortletEntry entry = (PortletEntry)Registry.getEntry(Registry.PORTLET, name );
  -        if ( entry == null )
  -        {
  -            return;
  -        }
   
  -        Portlet portlet = PortletFactory.getPortlet( entry );
  +        Portlet portlet = PortletFactory.getPortlet( name );
           if (( portlet != null )&&( portlet instanceof PortletState ))
           {
               ((PortletState)portlet).setMinimized( false, rundata );
  
  
  
  1.2       +7 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/om/newregistry/Registry.java
  
  Index: Registry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/newregistry/Registry.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Registry.java	2001/05/02 10:46:16	1.1
  +++ Registry.java	2001/06/04 17:46:49	1.2
  @@ -55,12 +55,13 @@
   package org.apache.jetspeed.om.newregistry;
   
   import java.util.Enumeration;
  +import java.util.Iterator;
   
   /**
   Represents all items within Jetspeed that hold configuration information.
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: Registry.java,v 1.1 2001/05/02 10:46:16 raphael Exp $
  +@version $Id: Registry.java,v 1.2 2001/06/04 17:46:49 raphael Exp $
   */
   public interface Registry
   {
  @@ -113,6 +114,11 @@
          Get all entries within this Registry
        */
       public Enumeration getEntries();
  +
  +    /**
  +       List all the entry names within this Registry
  +     */
  +    public Iterator listEntryNames();
   
       /**
          Get all entries within this Registry as an array
  
  
  
  1.3       +48 -16    jakarta-jetspeed/src/java/org/apache/jetspeed/om/newregistry/base/BaseRegistry.java
  
  Index: BaseRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/newregistry/base/BaseRegistry.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BaseRegistry.java	2001/05/17 19:31:22	1.2
  +++ BaseRegistry.java	2001/06/04 17:46:51	1.3
  @@ -55,7 +55,9 @@
   package org.apache.jetspeed.om.newregistry.base;
   
   import org.apache.jetspeed.om.newregistry.*;
  -import java.util.Hashtable;
  +import java.util.Map;
  +import java.util.TreeMap;
  +import java.util.Iterator;
   import java.util.Enumeration;
   import java.util.Vector;
   
  @@ -64,12 +66,12 @@
    *
    * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: BaseRegistry.java,v 1.2 2001/05/17 19:31:22 raphael Exp $
  + * @version $Id: BaseRegistry.java,v 1.3 2001/06/04 17:46:51 raphael Exp $
    */
   public class BaseRegistry implements Registry
   {
           
  -    private Hashtable entries = new Hashtable();
  +    private Map entries = new TreeMap();
   
       /** @see Registry.getEntryCount */
       public int getEntryCount()
  @@ -83,7 +85,10 @@
   
           RegistryEntry entry = null;
           
  -        if (name != null) entry = (RegistryEntry)this.entries.get( name ) ;
  +        if (name != null)
  +        {
  +            entry = (RegistryEntry)this.entries.get( name ) ;
  +        }
   
           if ( entry == null )
           {
  @@ -98,12 +103,15 @@
       */
       public void setEntry( RegistryEntry entry ) throws InvalidEntryException
       {
  +        synchronized (this)
  +        {
   
  -        if ( this.hasEntry( entry.getName() ) == false ) {
  -            throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+entry.getName());
  -        }
  +            if ( this.hasEntry( entry.getName() ) == false ) {
  +                throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+entry.getName());
  +            }
   
  -        this.entries.put( entry.getName(), entry );
  +            this.entries.put( entry.getName(), entry );
  +        }
       }
   
       /**
  @@ -112,12 +120,14 @@
       public void addEntry( RegistryEntry entry ) throws InvalidEntryException
       {
           
  -        if ( this.hasEntry( entry.getName() ) ) {
  -            throw new InvalidEntryException( InvalidEntryException.ENTRY_ALREADY_PRESENT );
  -        }
  -        
  -        this.entries.put( entry.getName(), entry );
  +        synchronized (this)
  +        {
  +            if ( this.hasEntry( entry.getName() ) ) {
  +                throw new InvalidEntryException( InvalidEntryException.ENTRY_ALREADY_PRESENT );
  +            }
           
  +            this.entries.put( entry.getName(), entry );
  +        }
       }
   
       /**
  @@ -133,7 +143,10 @@
       */
       public void removeEntry( String name )
       {
  -        this.entries.remove( name );
  +        synchronized(this)
  +        {
  +            this.entries.remove( name );
  +        }
       }
   
       /**
  @@ -142,15 +155,34 @@
   
       public void removeEntry( RegistryEntry entry )
       {
  -        this.entries.remove( entry.getName() );
  +        synchronized(this)
  +        {
  +            this.entries.remove( entry.getName() );
  +        }
       }
   
       /**
          @see Registry.getEntries
        */
       public Enumeration getEntries()
  +    {
  +        Vector v = null;
  +        
  +        synchronized (this)
  +        {
  +            // this is ne
  +            v = new Vector(this.entries.values());
  +        }
  +        
  +        return v.elements();
  +    }
  +
  +    /**
  +       @see Registry.listEntryNames
  +     */
  +    public Iterator listEntryNames()
       {
  -        return this.entries.elements();
  +        return entries.keySet().iterator();
       }
   
       /**
  
  
  
  1.52      +60 -34    jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletController.java
  
  Index: PortletController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletController.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- PortletController.java	2001/05/29 23:08:24	1.51
  +++ PortletController.java	2001/06/04 17:46:53	1.52
  @@ -57,58 +57,84 @@
   import org.apache.jetspeed.util.MimeType;
   import org.apache.turbine.util.RunData;
   import org.apache.ecs.ConcreteElement;
  +import java.util.Map;
   
   /**
  -
  -   A PortletController renders a set of user Portlets within an HTML docuument.
  -   This allows the application to think of Portlets as a large block of content
  -   and not its presentation.
  -   
  -   In the future this could be abstracted to provide portlets for other types of
  -   presentation such as Palm devices.
  -   
  -   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -   @version $Id: PortletController.java,v 1.51 2001/05/29 23:08:24 raphael Exp $
  -*/
  + * A PortletController is responsible for laying out and rendering the content of 
  + * a PortletSet. 
  + * <p>As such, it also provides 2 additionnal services :
  + * <ul>
  + *   <li>factory for the creating appropriate PortletSet;Constraints
  + *   <li>customization facilities for handling the addition of a new portlet
  + *       within the set and moving entries around within the set
  + * </ul>
  + *
  + * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  + * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  + * @version $Id: PortletController.java,v 1.52 2001/06/04 17:46:53 raphael Exp $
  + */
   public interface PortletController
   {
   
  -    /**
  -       Default padding to be displayed between portlets
  -    */
  -    public int DEFAULT_PADDING = 3;
  -
       /**
  -       Allows the user to override the default set of portlets...
  -    */
  -    public void setPortlets(PortletSet portlets);
  +     * Initialize this PortletController. This method must be called after
  +     * the Config object has been set and whenever it is changed
  +     */
  +    public void init();
   
       /**
  -    */
  -    public PortletSet getPortlets();
  +     * Sets the configuration object for this controller instance
  +     *
  +     * @param conf the controller configuration
  +     */
  +    public void setConfig(PortletControllerConfig conf);
   
       /**
  -       Required by all PortletControllers getContent() returns the HTML content
  -       needed to render a set of portlets.
  -    */
  -    public ConcreteElement getContent( RunData rundata );
  +     * Returns the configuration object for this object
  +     *
  +     * @return a configuration object
  +     */
  +    public PortletControllerConfig getConfig();
   
       /**
  -       Initialize this PortletController
  -    */
  -    public void init();
  +     * Sets the PotletSet to render by this controller
  +     *
  +     * @param portlets the portlet set to render
  +     */
  +    public void setPortlets(PortletSet portlets);
   
       /**
  -    */
  -    public void setConfig(PortletControllerConfig conf);
  +     * Returns the PortletSet to render by this controller
  +     *
  +     * @return the portlet set that should currently be rendered by this
  +     * controller
  +     */
  +    public PortletSet getPortlets();
   
       /**
  -    */
  -    public PortletControllerConfig getConfig();
  +     * Renders the content of the PortletSet for the current request
  +     * 
  +     * @param rundata the RunData for the request
  +     * @return the rendered content for this set or null if the content
  +     * was written directly on the writer available in RunData
  +     */
  +    public ConcreteElement getContent( RunData rundata );
   
       /**
  -       Returns true portlet is able to output content for given mimetype
  -    */
  +     * Tests whether the controller supports outputting content for 
  +     * a specific mime type
  +     *
  +     * @param mimeType the requested mime type
  +     * @return true if the requested mime type is supported by this controller
  +     */
       public boolean supportsType( MimeType mimeType );
  +        
  +    /**
  +     * Creates a constraint object based on an original source.
  +     *
  +     * @param original the source for this constraint object
  +     * @return a new Constraints object appropriate for this controller
  +     */
  +    public PortletSet.Constraints getConstraints( Map original );
           
   }
  
  
  
  1.35      +1 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletURIManager.java
  
  Index: PortletURIManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletURIManager.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- PortletURIManager.java	2001/05/27 15:34:35	1.34
  +++ PortletURIManager.java	2001/06/04 17:46:54	1.35
  @@ -62,7 +62,6 @@
   
   //jetspeed support
   import org.apache.jetspeed.util.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.om.newregistry.RegistryEntry;
   import org.apache.jetspeed.om.newregistry.PortletEntry;
   import org.apache.jetspeed.services.Registry;
  @@ -101,7 +100,7 @@
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
   @author <a href="mailto:sgala@hisitech.com">Santiago Gala</a>
  -@version $Id: PortletURIManager.java,v 1.34 2001/05/27 15:34:35 raphael Exp $
  +@version $Id: PortletURIManager.java,v 1.35 2001/06/04 17:46:54 raphael Exp $
   */
   
   public class PortletURIManager {
  
  
  
  1.7       +3 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/AbstractPortletControl.java
  
  Index: AbstractPortletControl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/AbstractPortletControl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractPortletControl.java	2001/05/29 23:07:48	1.6
  +++ AbstractPortletControl.java	2001/06/04 17:46:56	1.7
  @@ -89,7 +89,7 @@
    * a simple portlet wherever in a PSML object tree.
    *
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: AbstractPortletControl.java,v 1.6 2001/05/29 23:07:48 raphael Exp $
  + * @version $Id: AbstractPortletControl.java,v 1.7 2001/06/04 17:46:56 raphael Exp $
    */
   public abstract class AbstractPortletControl extends AbstractPortlet
       implements PortletControl
  @@ -510,7 +510,7 @@
        * @param portlet the portlet to add
        * @param constraints the portlet layout constraints
        */
  -    public synchronized void addPortlet(Portlet portlet, Map constraints)
  +    public synchronized void addPortlet(Portlet portlet, PortletSet.Constraints constraints)
       {
           if (getPortlet() instanceof PortletSet)
               ((PortletSet)getPortlet()).addPortlet(portlet,constraints);
  @@ -524,7 +524,7 @@
        * @param constraint the portlet layout constraints
        * @param position the portlet required position
        */
  -    public synchronized void addPortlet(Portlet portlet, Map constraint, int position)
  +    public synchronized void addPortlet(Portlet portlet, PortletSet.Constraints constraint, int position)
       {
           if (getPortlet() instanceof PortletSet)
               ((PortletSet)getPortlet()).addPortlet(portlet,constraint,position);
  
  
  
  1.4       +2 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java
  
  Index: VelocityPortletControl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controls/VelocityPortletControl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- VelocityPortletControl.java	2001/05/31 17:10:58	1.3
  +++ VelocityPortletControl.java	2001/06/04 17:46:57	1.4
  @@ -67,10 +67,8 @@
   import org.apache.jetspeed.portal.PortletState;
   import org.apache.jetspeed.portal.PortletCustomizer;
   import org.apache.jetspeed.portal.PortalState;
  -import org.apache.jetspeed.portal.factory.PortletFactory;
  -import org.apache.jetspeed.services.Registry;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.resources.JetspeedResources;
  -import org.apache.jetspeed.om.newregistry.PortletEntry;
   import org.apache.jetspeed.util.MimeType;
   
   // Ecs stuff
  @@ -189,8 +187,7 @@
           
               try
               {
  -                PortletEntry entry = (PortletEntry)Registry.getEntry(Registry.PORTLET,name);
  -                customizer = PortletFactory.getPortlet(entry);
  +                customizer = PortletFactory.getPortlet(name);
                   data.getSession().setAttribute("customize", p);
               }
               catch (Exception e)
  
  
  
  1.41      +55 -13    jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java
  
  Index: AbstractPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- AbstractPortlet.java	2001/05/31 17:11:02	1.40
  +++ AbstractPortlet.java	2001/06/04 17:46:59	1.41
  @@ -93,7 +93,7 @@
   
   @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
   @author <A HREF="mailto:raphael@apache.org">RaphaŽl Luta</A>
  -@version $Id: AbstractPortlet.java,v 1.40 2001/05/31 17:11:02 raphael Exp $
  +@version $Id: AbstractPortlet.java,v 1.41 2001/06/04 17:46:59 raphael Exp $
   */
   public abstract class AbstractPortlet implements Portlet, PortletState, Cacheable
   {
  @@ -194,6 +194,60 @@
   
       /**
       */
  +    public final String getHandle() {
  +        return this.handle;
  +    }
  +
  +    /**
  +    */
  +    public final void setHandle( String handle ) {
  +        this.handle = handle;
  +    }
  +
  +    /** Builds a new cache handle for this cacheable class with the specified
  +     *  config object.
  +     *
  +     * @param config the configuration object to use for building the handle
  +     * @return a cache handle
  +     */
  +    public static Object getHandle(Object config)
  +    {
  +        //this implementation expects a PortletConfig object as its
  +        // configuration 
  +        PortletConfig pc = null;
  +
  +        if (!(config instanceof PortletConfig))
  +        {
  +            return null;
  +
  +        }
  +
  +        // By default, only take into account the init parameters 
  +        pc = (PortletConfig)config;
  +        StringBuffer handle = new StringBuffer(256);
  +
  +        if (pc.getURL()!=null)
  +        {
  +            handle.append(String.valueOf(pc.getURL().hashCode()));
  +        }
  +
  +        Iterator i = pc.getInitParameterNames();
  +        while(i.hasNext())
  +        {
  +            String name = (String)i.next();
  +            String value = pc.getInitParameter(name);
  +            
  +            if (value!=null)
  +            {
  +                handle.append("|").append(name).append("-").append(value);
  +            }
  +        }
  +
  +        return handle.toString();        
  +    }
  +    
  +    /**
  +    */
       public ConcreteElement getContent( RunData rundata ) {
   
           return getContent( rundata, null , true );
  @@ -345,18 +399,6 @@
           meta.setTitle(title);
       }
   
  -
  -    /**
  -    */
  -    public final String getHandle() {
  -        return this.handle;
  -    }
  -
  -    /**
  -    */
  -    public final void setHandle( String handle ) {
  -        this.handle = handle;
  -    }
   
       /**
       */
  
  
  
  1.32      +8 -12     jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/ApplicationsPortlet.java
  
  Index: ApplicationsPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/ApplicationsPortlet.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- ApplicationsPortlet.java	2001/05/02 14:17:22	1.31
  +++ ApplicationsPortlet.java	2001/06/04 17:47:00	1.32
  @@ -62,12 +62,11 @@
   
   //Jetspeed stuff
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.util.*;
  -import org.apache.jetspeed.cache.disk.*;
   
  -import org.apache.jetspeed.om.newregistry.PortletEntry;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.Registry;
  +import org.apache.jetspeed.om.newregistry.PortletEntry;
   
   //turbine
   import org.apache.turbine.util.*;
  @@ -82,7 +81,7 @@
    *
    * @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
    * @author <a href="mailto:sgala@hisitech.com">Santiago Gala</a>
  - * @version $Id: ApplicationsPortlet.java,v 1.31 2001/05/02 14:17:22 raphael Exp $
  + * @version $Id: ApplicationsPortlet.java,v 1.32 2001/06/04 17:47:00 raphael Exp $
    */
   public class ApplicationsPortlet extends AbstractPortlet {
   
  @@ -91,7 +90,8 @@
   
       /**
       */
  -    public void init() throws PortletException {
  +    public void init() throws PortletException
  +    {
   
           PortletConfig config = this.getPortletConfig();
   
  @@ -100,19 +100,15 @@
   
           Log.note( "Jetspeed: initializing the ApplicationsPortlet: BEGIN " );
   
  -
           Enumeration portlets = Registry.get( Registry.PORTLET ).getEntries();
   
           while ( portlets.hasMoreElements() ) {
   
               PortletEntry entry = (PortletEntry)portlets.nextElement();
   
  -            if ( entry.isApplication() ) {
  -
  -                Portlet portlet = PortletFactory.getPortlet(entry );
  -
  +            if ( entry.isApplication() )
  +            {
                   applications.addElement(entry);
  -
               }
           }
   
  @@ -134,7 +130,7 @@
               String url = PortletURIManager.getPortletMaxURI( entry, data ).toString();
               Portlet portlet = null;
               try {
  -                portlet = PortletFactory.getPortlet(entry );
  +                portlet = PortletFactory.getPortlet(entry.getName());
               } catch (PortletException e) {
                   continue;
               }
  
  
  
  1.38      +6 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/PortletInfoPortlet.java
  
  Index: PortletInfoPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/PortletInfoPortlet.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- PortletInfoPortlet.java	2001/05/02 10:47:55	1.37
  +++ PortletInfoPortlet.java	2001/06/04 17:47:01	1.38
  @@ -69,7 +69,7 @@
   
   //Jetspeed stuff
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.PortletFactory;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.cache.disk.*;
   import org.apache.jetspeed.capability.*;
   import org.apache.jetspeed.util.*;
  @@ -93,7 +93,7 @@
   </p>
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: PortletInfoPortlet.java,v 1.37 2001/05/02 10:47:55 raphael Exp $
  +@version $Id: PortletInfoPortlet.java,v 1.38 2001/06/04 17:47:01 raphael Exp $
   */
   public class PortletInfoPortlet extends AbstractPortlet {
   
  @@ -121,10 +121,11 @@
       */
       public ConcreteElement getContent( RunData rundata ) {
   
  -        PortletEntry entry = PortletURIManager.getEntry( rundata.getParameters() );
  +        String portletName = rundata.getParameters().getString("portlet");
  +
           DateFormat df = DateFormat.getDateTimeInstance();
           
  -        if ( entry == null ) {
  +        if ( portletName == null ) {
               String message = "Could not find given entry ";
               Log.error( message );
               return new StringElement( message );
  @@ -132,7 +133,7 @@
   
           Portlet portlet = null;
           try {
  -            portlet = PortletFactory.getPortlet( entry );
  +            portlet = PortletFactory.getPortlet( portletName );
           } catch (PortletException e) {
               Log.error(e);
               return new StringElement( e.getMessage() );
  
  
  
  1.8       +2 -6      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/TurbineScreenPortlet.java
  
  Index: TurbineScreenPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/TurbineScreenPortlet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TurbineScreenPortlet.java	2001/03/07 06:47:14	1.7
  +++ TurbineScreenPortlet.java	2001/06/04 17:47:01	1.8
  @@ -68,8 +68,6 @@
   
   //standard Jetspeed stuff
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.portlets.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.util.*;
   
   //turbine stuff
  @@ -101,7 +99,7 @@
    In the above example, the parameter MYPARAM=MYVALUE will be set in the rundata that calls the screen.
   
   @author <a href="mailto:ekkerbj@netscape.net">Jeff Breckke</a>
  -@version $Id: TurbineScreenPortlet.java,v 1.7 2001/03/07 06:47:14 taylor Exp $
  +@version $Id: TurbineScreenPortlet.java,v 1.8 2001/06/04 17:47:01 raphael Exp $
   */
   public class TurbineScreenPortlet extends AbstractPortlet
   {
  @@ -181,9 +179,7 @@
                   }
               }
   
  -            /* Save the background color and class path */
  -            PortletControl pcont = PortletControlFactory.getPortletControl( this );
  -            bgcolor = pcont.getBackgroundColor();
  +            bgcolor = this.getPortletConfig().getPortletSkin().getBackgroundColor();
               classes = "WEB-INF/classes";
           }
           catch ( Exception e )
  
  
  
  1.21      +6 -7      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/DaemonAdminPortlet.java
  
  Index: DaemonAdminPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/DaemonAdminPortlet.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- DaemonAdminPortlet.java	2001/03/07 06:47:34	1.20
  +++ DaemonAdminPortlet.java	2001/06/04 17:47:04	1.21
  @@ -61,7 +61,6 @@
   //Jetspeed stuff
   import org.apache.jetspeed.portal.portlets.*;
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.util.*;
   import org.apache.jetspeed.daemon.*;
   import org.apache.jetspeed.daemon.impl.*;
  @@ -80,7 +79,7 @@
   Handles enumerating Portlets that are also applications
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: DaemonAdminPortlet.java,v 1.20 2001/03/07 06:47:34 taylor Exp $
  +@version $Id: DaemonAdminPortlet.java,v 1.21 2001/06/04 17:47:04 raphael Exp $
   */
   public class DaemonAdminPortlet extends AbstractPortlet {
   
  @@ -175,7 +174,7 @@
   
       /**
       @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -    @version $Id: DaemonAdminPortlet.java,v 1.20 2001/03/07 06:47:34 taylor Exp $
  +    @version $Id: DaemonAdminPortlet.java,v 1.21 2001/06/04 17:47:04 raphael Exp $
       */
       private String getStatus(int status) {
   
  @@ -201,7 +200,7 @@
   
       /**
       @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -    @version $Id: DaemonAdminPortlet.java,v 1.20 2001/03/07 06:47:34 taylor Exp $
  +    @version $Id: DaemonAdminPortlet.java,v 1.21 2001/06/04 17:47:04 raphael Exp $
       */
       private String getResult( int result ) {
   
  @@ -228,7 +227,7 @@
   
       /**
       @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -    @version $Id: DaemonAdminPortlet.java,v 1.20 2001/03/07 06:47:34 taylor Exp $
  +    @version $Id: DaemonAdminPortlet.java,v 1.21 2001/06/04 17:47:04 raphael Exp $
       */
       private ConcreteElement getFeedCount() {
   
  @@ -242,7 +241,7 @@
       Return a form that can refresh the current daemon
   
       @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -    @version $Id: DaemonAdminPortlet.java,v 1.20 2001/03/07 06:47:34 taylor Exp $
  +    @version $Id: DaemonAdminPortlet.java,v 1.21 2001/06/04 17:47:04 raphael Exp $
       */
       private Form getForm( String daemon, RunData rundata ) {
   
  @@ -275,7 +274,7 @@
   
       /**
       @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -    @version $Id: DaemonAdminPortlet.java,v 1.20 2001/03/07 06:47:34 taylor Exp $
  +    @version $Id: DaemonAdminPortlet.java,v 1.21 2001/06/04 17:47:04 raphael Exp $
       */
       public void init() throws PortletException {
   
  
  
  
  1.14      +1 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/GlobalAdminPortlet.java
  
  Index: GlobalAdminPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/GlobalAdminPortlet.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- GlobalAdminPortlet.java	2001/05/28 16:08:18	1.13
  +++ GlobalAdminPortlet.java	2001/06/04 17:47:05	1.14
  @@ -62,7 +62,6 @@
   
   //Jetspeed stuff
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.portal.portlets.*;
   import org.apache.jetspeed.util.*;
   import org.apache.jetspeed.services.Registry;
  @@ -86,7 +85,7 @@
   Returns global information about Jetspeed.
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: GlobalAdminPortlet.java,v 1.13 2001/05/28 16:08:18 raphael Exp $ 
  +@version $Id: GlobalAdminPortlet.java,v 1.14 2001/06/04 17:47:05 raphael Exp $ 
   */
   public class GlobalAdminPortlet extends AbstractPortlet {
   
  
  
  
  1.15      +2 -4      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/JavaRuntimePortlet.java
  
  Index: JavaRuntimePortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/JavaRuntimePortlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- JavaRuntimePortlet.java	2001/03/29 06:13:01	1.14
  +++ JavaRuntimePortlet.java	2001/06/04 17:47:06	1.15
  @@ -63,9 +63,7 @@
   //Jetspeed stuff
   import org.apache.jetspeed.portal.portlets.*;
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.*;
   import org.apache.jetspeed.util.*;
  -import org.apache.jetspeed.cache.disk.*;
   
   //turbine
   import org.apache.turbine.util.RunData;
  @@ -80,7 +78,7 @@
   Handles enumerating Portlets that are also applications
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: JavaRuntimePortlet.java,v 1.14 2001/03/29 06:13:01 sgala Exp $ 
  +@version $Id: JavaRuntimePortlet.java,v 1.15 2001/06/04 17:47:06 raphael Exp $ 
   */
   public class JavaRuntimePortlet extends AbstractPortlet {
   
  @@ -129,7 +127,7 @@
       
       /**
       @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -    @version $Id: JavaRuntimePortlet.java,v 1.14 2001/03/29 06:13:01 sgala Exp $ 
  +    @version $Id: JavaRuntimePortlet.java,v 1.15 2001/06/04 17:47:06 raphael Exp $ 
       */
       public void init() throws PortletException {
   
  
  
  
  1.23      +4 -58     jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/JetspeedContentAdmin.java
  
  Index: JetspeedContentAdmin.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/admin/JetspeedContentAdmin.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- JetspeedContentAdmin.java	2001/03/07 06:47:38	1.22
  +++ JetspeedContentAdmin.java	2001/06/04 17:47:07	1.23
  @@ -63,7 +63,6 @@
   import org.apache.jetspeed.portal.portlets.*;
   import org.apache.jetspeed.util.*;
   import org.apache.jetspeed.cache.disk.*;
  -import org.apache.jetspeed.modules.screens.Admin;
   
   //Jetspeed Content Markup support
   import org.apache.jetspeed.xml.api.jcm.*;
  @@ -81,7 +80,7 @@
   Handles enumerating Portlets that are also applications
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: JetspeedContentAdmin.java,v 1.22 2001/03/07 06:47:38 taylor Exp $ 
  +@version $Id: JetspeedContentAdmin.java,v 1.23 2001/06/04 17:47:07 raphael Exp $ 
   */
   public class JetspeedContentAdmin extends AbstractPortlet {
   
  @@ -232,9 +231,7 @@
       */
       private ConcreteElement getForm( String provider, RunData rundata ) {
           
  -        //DynamicURI duri = new DynamicURI( rundata );
  -        DynamicURI duri = Admin.getURI( this.getName(), 
  -                                        rundata );
  +        DynamicURI duri = new DynamicURI( rundata );
           
           Form form = new Form().setAction(  duri.toString() );
   
  @@ -299,21 +296,6 @@
                                       .setName( POST_ARTICLE )
                                       .setValue( POST_ARTICLE ) );
   
  -        /* BEGIN REQUIRED OPTIONS FOR ADMIN INTERFACE 
  -        form.addElement( new Input().setType( "hidden" )
  -                                    .setName( Admin.USERNAME )
  -                                    .setValue( Admin.getUsername( rundata.getParameters() ) ) );
  -
  -        form.addElement( new Input().setType( "hidden" )
  -                                    .setName( Admin.PASSWORD )
  -                                    .setValue( Admin.getPassword( rundata.getParameters() ) ) );
  -
  -        form.addElement( new Input().setType( "hidden" )
  -                                    .setName( Admin.SELECT_PORTLET_KEY )
  -                                    .setValue( this.getName() ) );
  -                                    
  -         END REQUIRED OPTIONS FOR ADMIN INTERFACE */                                    
  -                                    
           return new Center( form );
   
       }
  @@ -363,40 +345,6 @@
       */
       private String getBookmarklet( String provider, RunData rundata ) {
           
  -        /*
  -        
  -        NOTE:  I generally consider raw content generation like this to be a 
  -        kludge but since it is short this isn't that huge of a deal.
  -        
  -        Content for the bookmarklet should be generated with a URL like the following:
  -        
  -            var url = "http://relativity.yi.org/servlet/jetspeed/screen/Admin?select-panel=JetspeedContentAdmin";
  -
  -            //get the values to pass
  -
  -            var username = "jetspeed";
  -            var password = "changeme";
  -            var provider = "jetspeed";
  -            var title = document.title;
  -
  -            //get the username
  -            url += "&username=" + username;
  -
  -            //get the password
  -            url += "&password=" + password;
  -
  -            //get the provider
  -            url += "&provider-name=" + provider;
  -
  -            //get the url
  -            url += "&link=" + document.location;
  -
  -            url += "&title=" + title;
  -
  -            top.location =  url;
  -        
  -        */
  -
           ParameterParser params = rundata.getParameters();
           
           StringBuffer buff = new StringBuffer();
  @@ -411,9 +359,7 @@
                      (rundata.getServerPort() != 80 ? ":" + 
                        rundata.getServerPort() : "") + 
                        rundata.getScriptName() + 
  -                     "/screen/Admin?select-panel=JetspeedContentAdmin" );
  -        buff.append( "&username=" + Admin.getUsername( params ) );
  -        buff.append( "&password=" + Admin.getPassword( params ) );
  +                     "select-panel=JetspeedContentAdmin" );
           buff.append( "&provider-name=" + provider );
           buff.append( "&title=' + escape( document.title ) + '&link=' + escape( top.location );" );
   
  @@ -444,7 +390,7 @@
   content if it has been modified on disk.
   
   @author <a href="mailto:burton@apache.org">Kevin A. Burton</a>
  -@version $Id: JetspeedContentAdmin.java,v 1.22 2001/03/07 06:47:38 taylor Exp $ 
  +@version $Id: JetspeedContentAdmin.java,v 1.23 2001/06/04 17:47:07 raphael Exp $ 
   */
   class ContentMarkup {
       
  
  
  
  1.12      +1 -1      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/customize/CustomizePortlet.java
  
  Index: CustomizePortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/customize/CustomizePortlet.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CustomizePortlet.java	2001/06/04 07:45:47	1.11
  +++ CustomizePortlet.java	2001/06/04 17:47:11	1.12
  @@ -57,7 +57,7 @@
   
   import org.apache.jetspeed.xml.api.portletmarkup.*;
   
  -import org.apache.jetspeed.portal.factory.*;
  +import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.om.newregistry.*;
   import org.apache.ecs.html.*;
   import org.apache.jetspeed.portal.portlets.*;
  
  
  
  1.9       +5 -16     jakarta-jetspeed/src/java/org/apache/jetspeed/util/PSMLManager.java
  
  Index: PSMLManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/PSMLManager.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PSMLManager.java	2001/05/31 17:11:19	1.8
  +++ PSMLManager.java	2001/06/04 17:47:13	1.9
  @@ -66,7 +66,8 @@
   import org.apache.jetspeed.services.profiler.*;
   
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.portal.factory.*;
  +import org.apache.jetspeed.services.PsmlManager;
  +import org.apache.jetspeed.services.PortalToolkit;
   import org.apache.jetspeed.profiler.*;
   import org.apache.jetspeed.util.*;
   import org.apache.jetspeed.xml.api.portletmarkup.*;
  @@ -174,12 +175,9 @@
           
           Log.note("PSMLManager: Reading "+username+"'s PSML for "+mimetype.toString()+" from "+url);
           
  -        PortletSetFactory psf = PortletSetFactory.getInstance( url );
  -    
  -        // FIX ME: What about performance???
  -        psf.init(psf.getSingletonHandle());
  -    
  -        return psf.getPortlets();
  +        Portlets portlets = PsmlManager.getDocument(url).getPortlets();
  +
  +        return portlets;
       }
       /**
        * Get the MimeTypes that are supported
  @@ -262,11 +260,6 @@
               out.flush();
               out.close();
   
  -            PortletSetFactory psf = PortletSetFactory.getInstance( url );
  -
  -            psf.refresh();
  -
  -    
               return true;
           }
           catch (Exception e)
  @@ -306,10 +299,6 @@
               portlets.marshal(serializer.asDocumentHandler());
               out.flush();
               out.close();
  -
  -            PortletSetFactory psf = PortletSetFactory.getInstance( url );
  -
  -            psf.refresh();
   
               return true;
           }
  
  
  
  1.3       +1 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/util/customization/PSMLDocument.java
  
  Index: PSMLDocument.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/customization/PSMLDocument.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PSMLDocument.java	2001/05/09 07:21:01	1.2
  +++ PSMLDocument.java	2001/06/04 17:47:15	1.3
  @@ -65,7 +65,6 @@
   import org.apache.jetspeed.services.resources.JetspeedResources;
   import org.apache.jetspeed.cache.disk.DiskCacheEntry;
   import org.apache.jetspeed.cache.disk.JetspeedDiskCache;
  -import org.apache.jetspeed.portal.factory.PortletSetFactory;
   import org.apache.jetspeed.portal.PortletSet;
   import org.apache.jetspeed.xml.api.portletmarkup.Skin;
   import org.apache.jetspeed.xml.api.portletmarkup.Property;
  @@ -94,7 +93,7 @@
    *
    *     @author <a href="mailto:pyoo@gluecode.com">Peter Yoo </a>
    *     @author <a href="mailto:eros@gluecode.com">Ernest Ros </a>
  - *     @version $Id: PSMLDocument.java,v 1.2 2001/05/09 07:21:01 taylor Exp $
  + *     @version $Id: PSMLDocument.java,v 1.3 2001/06/04 17:47:15 raphael Exp $
    *
    */
   public class PSMLDocument
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message