portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/util/template JetspeedTool.java
Date Fri, 22 Mar 2002 18:51:57 GMT
taylor      02/03/22 10:51:57

  Modified:    src/java/org/apache/jetspeed/portal/service
                        JetspeedPersistenceService.java
               src/java/org/apache/jetspeed/services PortalToolkit.java
                        PortletFactory.java
               src/java/org/apache/jetspeed/services/jsp/tags
                        JetspeedPortletTag.java
               src/java/org/apache/jetspeed/services/portaltoolkit
                        JetspeedPortalToolkitService.java
                        PortalToolkitService.java
               src/java/org/apache/jetspeed/services/portletfactory
                        JetspeedPortletFactoryService.java
                        PortletFactoryService.java
               src/java/org/apache/jetspeed/services/psmlmanager
                        CastorPsmlManagerService.java
               src/java/org/apache/jetspeed/services/psmlmanager/db
                        DBUtils.java DatabasePsmlManagerService.java
               src/java/org/apache/jetspeed/util AutoProfile.java
                        PSMLManager.java
               src/java/org/apache/jetspeed/util/template JetspeedTool.java
  Added:       src/java/org/apache/jetspeed/services/psmlmanager
                        TestMarshalPsml.java
  Removed:     src/java/org/apache/jetspeed/util/customization
                        AllowableColumnSet.java AllowablePortletSet.java
                        CustomizerException.java CustomizerResources.java
                        ElementNotFoundException.java JetspeedColors.java
                        PSMLDocument.java PSMLEntry.java
                        UserNotLoggedInException.java
  Log:
      o Add - updated factories and toolkits to use new PSML OM
      o Removed - old customizers
      o Add - test case for unmarshalling PSML
  
  Revision  Changes    Path
  1.12      +4 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/service/JetspeedPersistenceService.java
  
  Index: JetspeedPersistenceService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/service/JetspeedPersistenceService.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JetspeedPersistenceService.java	6 Mar 2002 17:03:34 -0000	1.11
  +++ JetspeedPersistenceService.java	22 Mar 2002 18:51:56 -0000	1.12
  @@ -65,8 +65,9 @@
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
   import org.apache.jetspeed.om.profile.Profile;
   import org.apache.jetspeed.om.profile.PSMLDocument;
  -import org.apache.jetspeed.xml.api.portletmarkup.Entry;
  -import org.apache.jetspeed.xml.api.portletmarkup.Parameter;
  +import org.apache.jetspeed.om.profile.Entry;
  +import org.apache.jetspeed.om.profile.Parameter;
  +import org.apache.jetspeed.om.profile.psml.PsmlParameter;
   
   public class JetspeedPersistenceService implements PersistenceService
   {
  @@ -354,7 +355,7 @@
                   {
                       String value = (String) e2.nextElement ();
   
  -                    Parameter param = new Parameter ();
  +                    Parameter param = new PsmlParameter ();
   
                       param.setName (name);
                       param.setValue (value);
  
  
  
  1.2       +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/services/PortalToolkit.java
  
  Index: PortalToolkit.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/PortalToolkit.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PortalToolkit.java	4 Jun 2001 17:30:26 -0000	1.1
  +++ PortalToolkit.java	22 Mar 2002 18:51:56 -0000	1.2
  @@ -59,10 +59,10 @@
   import org.apache.jetspeed.portal.PortletSkin;
   import org.apache.jetspeed.portal.PortletControl;
   import org.apache.jetspeed.portal.PortletController;
  -import org.apache.jetspeed.xml.api.portletmarkup.Control;
  -import org.apache.jetspeed.xml.api.portletmarkup.Controller;
  -import org.apache.jetspeed.xml.api.portletmarkup.Portlets;
  -import org.apache.jetspeed.xml.api.portletmarkup.Skin;
  +import org.apache.jetspeed.om.profile.Control;
  +import org.apache.jetspeed.om.profile.Controller;
  +import org.apache.jetspeed.om.profile.Portlets;
  +import org.apache.jetspeed.om.profile.Skin;
   import org.apache.jetspeed.services.portaltoolkit.PortalToolkitService;
   import org.apache.turbine.services.TurbineServices;
    
  @@ -70,7 +70,7 @@
    * Commodity static wrapper around the PortalToolit service
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: PortalToolkit.java,v 1.1 2001/06/04 17:30:26 raphael Exp $
  + * @version $Id: PortalToolkit.java,v 1.2 2002/03/22 18:51:56 taylor Exp $
    */
   public class PortalToolkit
   {
  
  
  
  1.2       +2 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/services/PortletFactory.java
  
  Index: PortletFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/PortletFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PortletFactory.java	4 Jun 2001 17:30:26 -0000	1.1
  +++ PortletFactory.java	22 Mar 2002 18:51:56 -0000	1.2
  @@ -57,7 +57,7 @@
   //jetspeed stuff
   import org.apache.jetspeed.portal.Portlet;
   import org.apache.jetspeed.portal.PortletException;
  -import org.apache.jetspeed.xml.api.portletmarkup.Entry;
  +import org.apache.jetspeed.om.profile.Entry;
   import org.apache.jetspeed.services.portletfactory.PortletFactoryService;
   import org.apache.turbine.services.TurbineServices;
    
  @@ -65,7 +65,7 @@
    * Static wrapper around the PortletFactoryService
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: PortletFactory.java,v 1.1 2001/06/04 17:30:26 raphael Exp $
  + * @version $Id: PortletFactory.java,v 1.2 2002/03/22 18:51:56 taylor Exp $
    */
   public class PortletFactory
   {
  
  
  
  1.4       +2 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/services/jsp/tags/JetspeedPortletTag.java
  
  Index: JetspeedPortletTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/jsp/tags/JetspeedPortletTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JetspeedPortletTag.java	16 Jun 2001 10:35:31 -0000	1.3
  +++ JetspeedPortletTag.java	22 Mar 2002 18:51:56 -0000	1.4
  @@ -69,7 +69,7 @@
   import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.services.resources.JetspeedResources;
   import org.apache.jetspeed.services.rundata.JetspeedRunData;
  -import org.apache.jetspeed.xml.api.portletmarkup.Entry;
  +import org.apache.jetspeed.om.profile.Entry;
   
   /**
    * Supporting class for the portlet tag.
  @@ -77,7 +77,7 @@
    * current JSP page
    *
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: JetspeedPortletTag.java,v 1.3 2001/06/16 10:35:31 raphael Exp $
  + * @version $Id: JetspeedPortletTag.java,v 1.4 2002/03/22 18:51:56 taylor Exp $
    */
   public class JetspeedPortletTag extends TagSupport 
   {
  
  
  
  1.16      +32 -86    jakarta-jetspeed/src/java/org/apache/jetspeed/services/portaltoolkit/JetspeedPortalToolkitService.java
  
  Index: JetspeedPortalToolkitService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/portaltoolkit/JetspeedPortalToolkitService.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JetspeedPortalToolkitService.java	13 Mar 2002 05:41:15 -0000	1.15
  +++ JetspeedPortalToolkitService.java	22 Mar 2002 18:51:56 -0000	1.16
  @@ -56,7 +56,7 @@
   
   //jetspeed stuff
   import org.apache.jetspeed.portal.*;
  -import org.apache.jetspeed.xml.api.portletmarkup.*;
  +import org.apache.jetspeed.om.profile.*;
   import org.apache.jetspeed.services.Registry;
   import org.apache.jetspeed.services.PortletFactory;
   import org.apache.jetspeed.om.registry.PortletEntry;
  @@ -72,9 +72,10 @@
   import org.apache.turbine.services.resources.ResourceService;
   import org.apache.turbine.util.Log;
   
  +import java.util.Iterator;
  +
   import java.util.Enumeration;
   import java.util.Hashtable;
  -import java.util.Stack;
   import java.util.Map;
   import javax.servlet.ServletConfig;
   
  @@ -84,7 +85,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    *
  - * @version $Id: JetspeedPortalToolkitService.java,v 1.15 2002/03/13 05:41:15 paulsp Exp $
  + * @version $Id: JetspeedPortalToolkitService.java,v 1.16 2002/03/22 18:51:56 taylor Exp $
    */
   public class JetspeedPortalToolkitService extends TurbineBaseService
       implements PortalToolkitService
  @@ -355,23 +356,8 @@
        */
       public PortletSet getSet( Portlets portlets )
       {
  -        Stack unidentified = new Stack();
           VariableInteger lastID = new VariableInteger(0);
  -        PortletSet pset = getSet( portlets, new VariableInteger(0), lastID, unidentified );
  - 
  -        // FIXME: The section will be replaced when the ID is set when the PSML 
  -        // read and the <entry> or <portlet> does not contain an ID.  The
  -        // customizer (in actions.portlets.CustomizeSetAction.doAdd() and doAddSet()
  -        int nextID = lastID.getValue() + 1;
  -        while (!unidentified.empty())
  -        {
  -            Portlet p = (Portlet)unidentified.pop();
  -            
  -            p.setID(String.valueOf(nextID));
  -            nextID++;
  -        }
  -        unidentified = null;
  -        return pset;
  +        return getSet( portlets, new VariableInteger(0) ); 
       }
       
       /**
  @@ -382,7 +368,7 @@
        * @param count the portletset number within the complete tree
        * @return a new instance of PortletSet
        */
  -    protected PortletSet getSet( Portlets portlets, VariableInteger theCount, VariableInteger lastID, Stack unidentified )
  +    protected PortletSet getSet( Portlets portlets, VariableInteger theCount)
       {
           // Create a new BasePortletSet to handle the portlets
           BasePortletSet set = new BasePortletSet();
  @@ -390,9 +376,8 @@
           set.setController( controller );
           set.setName(String.valueOf(theCount.getValue()));
              
  -        String id = portlets.getId();
  -        setPortletID(id, set, unidentified, lastID);
  -        
  +        set.setID(portlets.getId());
  +                    
           theCount.setValue(theCount.getValue()+1);
           
           //FIXME: this sucks ! we should either associate the portlet set
  @@ -402,39 +387,43 @@
           set.setPortletConfig( getPortletConfig( portlets ) );
   
           // Add all sub portlet sets in the main set
  -        Portlets[] subsets = portlets.getPortlets();
  -        for (int i=0; i < subsets.length; i++ )
  +//        Portlets[] subsets = portlets.getPortlets();
  +//        for (int i=0; i < subsets.length; i++ )
  +
  +        for (Iterator it = portlets.getPortletsIterator(); it.hasNext(); )
           {
  -            Map constraints = getParameters(subsets[i].getLayout());
  -            int position = getPosition( subsets[i].getLayout() );
  -            set.addPortlet( getSet( subsets[i], theCount, lastID, unidentified ),
  +            Portlets subset = (Portlets)it.next();
  +            Map constraints = getParameters(subset.getLayout());
  +            int position = getPosition( subset.getLayout() );
  +            set.addPortlet( getSet( subset, theCount ),
                               controller.getConstraints(constraints),
                               position );
           }
   
           // Populate the PortletSet with Portlets
  -        Entry[] entries = portlets.getEntry();
  +//        Entry[] entries = portlets.getEntry();
  +//        for( int i = 0; i < entries.length; ++i )
   
  -        for( int i = 0; i < entries.length; ++i )
  +        for (Iterator eit = portlets.getEntriesIterator(); eit.hasNext(); )
           {
               try
               {
   
  -                PortletEntry entry = (PortletEntry)Registry.getEntry( Registry.PORTLET, entries[i].getParent() );
  +                Entry psmlEntry = (Entry)eit.next();
  +                PortletEntry entry = (PortletEntry)Registry.getEntry( Registry.PORTLET, psmlEntry.getParent() );
              
                   if ( entry != null )
                   {
  -                    Portlet p = PortletFactory.getPortlet( entries[i] );
  +                    Portlet p = PortletFactory.getPortlet( psmlEntry );
   
  -                    id = entries[i].getId();
  -                    setPortletID(id, p, unidentified, lastID);
  +                    p.setID(psmlEntry.getId());
                       
                       if (p != null)
                       {
  -                        Map constraints = getParameters(entries[i].getLayout());
  -                        int position = getPosition( entries[i].getLayout() );
  +                        Map constraints = getParameters(psmlEntry.getLayout());
  +                        int position = getPosition( psmlEntry.getLayout() );
                       
  -                        PortletControl control =  getControl(entries[i].getControl());
  +                        PortletControl control =  getControl(psmlEntry.getControl());
                       
                           set.addPortlet( initControl(control,p),
                                           controller.getConstraints( constraints ),
  @@ -443,7 +432,7 @@
                   }
                   else 
                   {
  -                    Log.error(" The portlet "+entries[i].getParent()+" does not exist in the Registry ");
  +                    Log.error(" The portlet "+psmlEntry.getParent()+" does not exist in the Registry ");
                       continue;
                   }
               }
  @@ -468,49 +457,6 @@
       }
   
       /**
  -     * Sets the id for the given portlet or portletset
  -     * If the id is not found in the entry, adds the id to the list of unidentified portlets 
  -     *
  -     * @param id  The id from the portlet entry
  -     * @param p   The portlet or portletset to have its id set
  -     * @param unidentified The collection of portlets that do not have an ID in the portlet entry
  -     * @param lastID Keeps track of the last/highest ID number
  -     */
  -    protected String setPortletID(String id, Portlet p, Stack unidentified, VariableInteger lastID)
  -    {
  -        if (id == null || id.equals(""))
  -        {
  -            unidentified.push(p);
  -            return null;
  -        }
  -        else
  -        {
  -            try 
  -            {
  -                int newID = Integer.parseInt(id);
  -                if (newID > lastID.getValue())
  -                {
  -                    lastID.setValue(newID);
  -                }
  -            }
  -            catch (NumberFormatException e)
  -            {
  -                // ID was not a number, not null, or not an empty string, so it 
  -                // will not conflict with generated numbers.
  -                p.setID( id );
  -                return id;
  -            }
  -            catch (Exception e)
  -            {
  -                unidentified.push(p);
  -                return null;
  -            }
  -            p.setID( id );
  -            return id;
  -        }
  -    }
  -
  -    /**
        * Associates a PortletControl wit an existing Portlet and
        * returns the Control
        *
  @@ -642,8 +588,8 @@
   
           if (layout!=null)
           {
  -            Property[] props = layout.getProperty();
  -            
  +            Parameter[] props = layout.getParameter();
  +                        
               for(int i = 0; i < props.length; ++i)
               {
                   hash.put(props[i].getName(), props[i].getValue() );
  @@ -666,7 +612,7 @@
   
           if (skin!=null)
           {
  -            Property[] props = skin.getProperty();
  +            Parameter[] props = skin.getParameter();
               
               for(int i = 0; i < props.length; ++i)
               {
  @@ -687,7 +633,7 @@
       protected static MetaData getMetaData(Portlets portlets)
       {
           MetaData data = new MetaData();
  -        Metainfo meta = portlets.getMetainfo();
  +        MetaInfo meta = portlets.getMetaInfo();
   
           if ( meta != null )
           {
  @@ -723,7 +669,7 @@
           int pos=-1;
           
           try {
  -            pos=Integer.parseInt(layout.getPosition());
  +            pos=(int)layout.getPosition();
           } catch (RuntimeException e) {
               // either layout is null or the position isn't an integer
               // keep the default value
  
  
  
  1.2       +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/services/portaltoolkit/PortalToolkitService.java
  
  Index: PortalToolkitService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/portaltoolkit/PortalToolkitService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PortalToolkitService.java	4 Jun 2001 17:30:36 -0000	1.1
  +++ PortalToolkitService.java	22 Mar 2002 18:51:56 -0000	1.2
  @@ -59,10 +59,10 @@
   import org.apache.jetspeed.portal.PortletSkin;
   import org.apache.jetspeed.portal.PortletControl;
   import org.apache.jetspeed.portal.PortletController;
  -import org.apache.jetspeed.xml.api.portletmarkup.Control;
  -import org.apache.jetspeed.xml.api.portletmarkup.Controller;
  -import org.apache.jetspeed.xml.api.portletmarkup.Portlets;
  -import org.apache.jetspeed.xml.api.portletmarkup.Skin;
  +import org.apache.jetspeed.om.profile.Control;
  +import org.apache.jetspeed.om.profile.Controller;
  +import org.apache.jetspeed.om.profile.Portlets;
  +import org.apache.jetspeed.om.profile.Skin;
   import org.apache.turbine.services.Service;
    
   /**
  @@ -72,7 +72,7 @@
    * handled by a separate PortletFactory service
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: PortalToolkitService.java,v 1.1 2001/06/04 17:30:36 raphael Exp $
  + * @version $Id: PortalToolkitService.java,v 1.2 2002/03/22 18:51:56 taylor Exp $
    */
   public interface PortalToolkitService extends Service
   {
  
  
  
  1.7       +5 -5      jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletfactory/JetspeedPortletFactoryService.java
  
  Index: JetspeedPortletFactoryService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletfactory/JetspeedPortletFactoryService.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JetspeedPortletFactoryService.java	28 Jan 2002 11:10:48 -0000	1.6
  +++ JetspeedPortletFactoryService.java	22 Mar 2002 18:51:56 -0000	1.7
  @@ -62,9 +62,9 @@
   
   import org.apache.jetspeed.portal.security.portlets.PortletWrapper;
   
  -import org.apache.jetspeed.xml.api.portletmarkup.Entry;
  -import org.apache.jetspeed.xml.api.portletmarkup.Parameter;
  -import org.apache.jetspeed.xml.api.portletmarkup.Metainfo;
  +import org.apache.jetspeed.om.profile.Entry;
  +import org.apache.jetspeed.om.profile.Parameter;
  +import org.apache.jetspeed.om.profile.MetaInfo;
   import org.apache.jetspeed.services.Registry;
   import org.apache.jetspeed.services.PortalToolkit;
   import org.apache.jetspeed.services.portletcache.PortletCache;
  @@ -90,7 +90,7 @@
    * Simple implementation of the PortalFactoryService.
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: JetspeedPortletFactoryService.java,v 1.6 2002/01/28 11:10:48 sgala Exp $
  + * @version $Id: JetspeedPortletFactoryService.java,v 1.7 2002/03/22 18:51:56 taylor Exp $
    */
   public class JetspeedPortletFactoryService extends TurbineBaseService
       implements PortletFactoryService
  @@ -398,7 +398,7 @@
       protected static MetaData getMetaData(Entry entry)
       {
           MetaData data = new MetaData();
  -        Metainfo meta = entry.getMetainfo();
  +        MetaInfo meta = entry.getMetaInfo();
   
           if ( meta != null )
           {
  
  
  
  1.2       +2 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletfactory/PortletFactoryService.java
  
  Index: PortletFactoryService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/portletfactory/PortletFactoryService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PortletFactoryService.java	4 Jun 2001 17:30:39 -0000	1.1
  +++ PortletFactoryService.java	22 Mar 2002 18:51:56 -0000	1.2
  @@ -57,14 +57,14 @@
   //jetspeed stuff
   import org.apache.jetspeed.portal.Portlet;
   import org.apache.jetspeed.portal.PortletException;
  -import org.apache.jetspeed.xml.api.portletmarkup.Entry;
  +import org.apache.jetspeed.om.profile.Entry;
   import org.apache.turbine.services.Service;
    
   /**
    * This service handles the creation of Portlet objects
    * 
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
  - * @version $Id: PortletFactoryService.java,v 1.1 2001/06/04 17:30:39 raphael Exp $
  + * @version $Id: PortletFactoryService.java,v 1.2 2002/03/22 18:51:56 taylor Exp $
    */
   public interface PortletFactoryService extends Service
   {
  
  
  
  1.17      +67 -7     jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java
  
  Index: CastorPsmlManagerService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/CastorPsmlManagerService.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- CastorPsmlManagerService.java	25 Feb 2002 04:51:24 -0000	1.16
  +++ CastorPsmlManagerService.java	22 Mar 2002 18:51:56 -0000	1.17
  @@ -63,7 +63,7 @@
   import org.apache.jetspeed.services.JetspeedSecurity;
   
   //Castor defined API
  -import org.apache.jetspeed.xml.api.portletmarkup.Portlets;
  +import org.apache.jetspeed.om.profile.Portlets;
   import org.apache.jetspeed.om.profile.*;
   
   //turbine stuff
  @@ -82,7 +82,12 @@
   
   //castor support
   import org.exolab.castor.xml.MarshalException;
  +import org.exolab.castor.xml.Unmarshaller;
  +import org.exolab.castor.xml.Marshaller;
   import org.exolab.castor.xml.ValidationException;
  +import org.exolab.castor.mapping.Mapping;
  +import org.exolab.castor.mapping.MappingException;
  +import org.xml.sax.InputSource;
   
   // serialization support
   import org.apache.xml.serialize.Serializer;
  @@ -112,7 +117,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @author <a href="mailto:sgala@apache.org">Santiago Gala</a>
  - * @version $Id: CastorPsmlManagerService.java,v 1.16 2002/02/25 04:51:24 taylor Exp $
  + * @version $Id: CastorPsmlManagerService.java,v 1.17 2002/03/22 18:51:56 taylor Exp $
    */
   public class CastorPsmlManagerService extends TurbineBaseService
       implements PsmlManagerService
  @@ -133,7 +138,7 @@
   
       // default resource
       public final static String DEFAULT_RESOURCE         = "default.psml";
  -
  +    
       // the root psml resource directory
       private String root;
       // base store directory
  @@ -157,6 +162,12 @@
       private PsmlManagerService consumer = null;
       private boolean importFlag = false;
   
  +    // castor mapping
  +    public static final String DEFAULT_MAPPING = "${webappRoot}/WEB-INF/conf/psml-mapping.xml";
  +    String mapFile = null;
  +    /** the Castor mapping file name */
  +    private Mapping mapping = null;
  +
       /**
        * This is the early initialization method called by the 
        * Turbine <code>Service</code> framework
  @@ -194,6 +205,11 @@
           format.setIndenting(true);
           format.setIndent(4);
   
  +        // psml castor mapping file
  +        mapFile = serviceConf.getString("mapping",DEFAULT_MAPPING);
  +        mapFile = TurbineServlet.getRealPath( mapFile );
  +        loadMapping();
  +
           this.watcher = new DocumentWatcher();
           this.watcher.start();
   
  @@ -393,6 +409,10 @@
               {
                   Log.error("PSMLManager: Could not unmarshal the file "+f.getAbsolutePath(), e);
               }
  +            catch (MappingException e)
  +            {
  +                Log.error("PSMLManager: Could not unmarshal the file "+f.getAbsolutePath(), e);
  +            }
               catch (ValidationException e)
               {
                   Log.error("PSMLManager: document "+f.getAbsolutePath()+" is not valid", e);
  @@ -509,6 +529,10 @@
           {
               Log.error("PSMLManager: Could not marshal the file "+f.getAbsolutePath(), e);
           }
  +        catch (MappingException e)
  +        {
  +            Log.error("PSMLManager: Could not marshal the file "+f.getAbsolutePath(), e);
  +        }
           catch (ValidationException e)
           {
               Log.error("PSMLManager: document "+f.getAbsolutePath()+" is not valid", e);
  @@ -536,11 +560,44 @@
        * @param the loaded portlets structure or null
        */
       protected Portlets load(Reader reader)
  -        throws IOException, MarshalException, ValidationException
  +        throws IOException, MarshalException, ValidationException, MappingException
       {
  -        return Portlets.unmarshal(reader);        
  +        Unmarshaller unmarshaller = new Unmarshaller(this.mapping);
  +        Portlets portlets = (Portlets)unmarshaller.unmarshal(reader);
  +        return portlets;
       }
       
  +    protected void loadMapping()
  +        throws InitializationException
  +    {
  +        // test the mapping file and create the mapping object
  +        
  +        if (mapFile != null)
  +        {
  +            File map = new File(mapFile);
  +            Log.debug("Loading psml mapping file "+mapFile);
  +            if (map.exists() && map.isFile() && map.canRead())
  +            {
  +                try
  +                {
  +                    mapping = new Mapping();
  +                    InputSource is = new InputSource( new FileReader(map) );
  +                    is.setSystemId( mapFile );
  +                    mapping.loadMapping( is );
  +                }
  +                catch (Exception e)
  +                {
  +                    Log.error("Error in psml mapping creation",e);
  +                    throw new InitializationException("Error in mapping",e);
  +                }
  +            }
  +            else
  +            {
  +                throw new InitializationException("PSML Mapping not found or not a file or unreadable: "+mapFile);
  +            }
  +        }
  +    }
  +
       /** Serializes a PSML structure using the specified writer with Castor
        *  XML marshaller and a Xerces serializer for pretty printing
        *
  @@ -548,12 +605,15 @@
        * @param portlets the structure to save
        */
       protected void save(Writer writer, Portlets portlets)
  -        throws IOException, MarshalException, ValidationException
  +        throws IOException, MarshalException, ValidationException, MappingException
       {
           if (portlets != null)
           {
               Serializer serializer = new XMLSerializer(writer, format); 
  -            portlets.marshal(serializer.asDocumentHandler());
  +//            portlets.marshal(serializer.asDocumentHandler());
  +            Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
  +            marshaller.setMapping(this.mapping);
  +            marshaller.marshal(portlets);
           }        
       }
   
  
  
  
  1.1                  jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/TestMarshalPsml.java
  
  Index: TestMarshalPsml.java
  ===================================================================
  package org.apache.jetspeed.services.psmlmanager;
  
  import java.io.File;
  import java.io.FileReader;
  
  import java.util.Vector;
  
  // Junit imports
  import junit.framework.Test;
  import junit.framework.TestSuite;
  import junit.framework.TestCase;
  
  //castor support
  import org.exolab.castor.xml.MarshalException;
  import org.exolab.castor.xml.Unmarshaller;
  import org.exolab.castor.xml.ValidationException;
  import org.exolab.castor.mapping.Mapping;
  import org.exolab.castor.mapping.MappingException;
  import org.xml.sax.InputSource;
  
  import org.apache.jetspeed.om.profile.*;
  
  /**
   * TestMarshalPsml
   *
   * @author <a href="taylor@apache.org">David Sean Taylor</a>
   * @version $Id: TestMarshalPsml.java,v 1.1 2002/03/22 18:51:56 taylor Exp $
   */
  //public class TestMarshalPsml extends ServletTestCase {
  public class TestMarshalPsml extends TestCase {    
  
      /**
       * Defines the testcase name for JUnit.
       *
       * @param name the testcase's name.
       */
      public TestMarshalPsml( String name ) {
          super( name );
      }
      
      /**
       * Start the tests.
       *
       * @param args the arguments. Not used
       */
      public static void main(String args[]) {
          junit.awtui.TestRunner.main( new String[] { TestMarshalPsml.class.getName() } );
      }
   
      public void setup() {
          System.out.println("Setup: Testing marshalling of PSML");
       }
      /**
       * Creates the test suite.
       *
       * @return a test suite (<code>TestSuite</code>) that includes all methods
       *         starting with "test"
       */
      public static Test suite() {
          // All methods starting with "test" will be executed in the test suite.
          return new TestSuite( TestMarshalPsml.class );
      }
  
      private String getMappingFileName()
      {
          return "../webapp/WEB-INF/conf/psml-mapping.xml";
      }
  
      /**
       * Tests ConfigElement unmarshaling entryset base stuff
       * @throws Exception
       */
  
      public void testUnmarshalConfigElement() throws Exception 
      {
          System.out.println("Testing marshalling of PSML on base *** ConfigElement ***");
  
          String psmlFile = "../webapp/WEB-INF/psml/test/testcase.psml";
  
          Mapping mapping = null;
          String mapFile = getMappingFileName();
          File map = new File(mapFile);
          if (map.exists() && map.isFile() && map.canRead())
          {
              try
              {
                  FileReader reader = new FileReader(psmlFile);
                  mapping = new Mapping();
                  InputSource is = new InputSource( new FileReader(map) );
                  is.setSystemId( mapFile );
                  mapping.loadMapping( is );
                  Unmarshaller unmarshaller = new Unmarshaller(mapping);
                  ConfigElement rootset = (ConfigElement)unmarshaller.unmarshal(reader);
                  assertTrue(rootset.getName().equals("theRootSet"));
  
                  Vector params = rootset.getParameters();
                  assertTrue(((Parameter)params.elementAt(0)).getName().equals("city"));
                  assertTrue(((Parameter)params.elementAt(0)).getValue().equals("Atlanta"));
                  assertTrue(((Parameter)params.elementAt(1)).getName().equals("state"));
                  assertTrue(((Parameter)params.elementAt(1)).getValue().equals("Georgia"));
                  assertTrue(((Parameter)params.elementAt(2)).getName().equals("country"));
                  assertTrue(((Parameter)params.elementAt(2)).getValue().equals("USA"));
                  assertTrue(rootset.getParameterValue("city").equals("Atlanta"));
                  assertTrue(rootset.getParameterValue("country").equals("USA"));
                  assertTrue(rootset.getParameter("state").getValue().equals("Georgia"));                
              }
              catch (Exception e)
              {
                  String errmsg = "Error in psml mapping creation" + e.toString();
                  System.err.println(errmsg);
                  assertNotNull(errmsg, null);
              }
          }
          else
          {
              String errmsg = "PSML Mapping not found or not a file or unreadable: ";
              System.err.println(errmsg);
              assertNotNull(errmsg, null);
          }  
      }
  
      /**
       * Tests IdentityElement unmarshaling entryset base stuff
       * @throws Exception
       */
  
      public void testUnmarshalPsml() throws Exception 
      {
          System.out.println("Testing marshalling of PSML on base *** IdentityElement ***");
  
          String psmlFile = "../webapp/WEB-INF/psml/test/testcase.psml";
  
          Mapping mapping = null;
          String mapFile = getMappingFileName();
          File map = new File(mapFile);
          if (map.exists() && map.isFile() && map.canRead())
          {
              try
              {
                  FileReader reader = new FileReader(psmlFile);
                  mapping = new Mapping();
                  InputSource is = new InputSource( new FileReader(map) );
                  is.setSystemId( mapFile );
                  mapping.loadMapping( is );
                  Unmarshaller unmarshaller = new Unmarshaller(mapping);
                  Portlets rootset = (Portlets)unmarshaller.unmarshal(reader);
                  assertTrue(rootset.getName().equals("theRootSet"));
                  assertTrue(rootset.getId().equals("01"));
  
                  MetaInfo meta = rootset.getMetaInfo();
                  assertNotNull(meta);
                  assertTrue(meta.getTitle().equals("Jetspeed"));
                  assertTrue(meta.getDescription().equals("This is the default page for me"));
                  assertTrue(meta.getImage().equals("me.png"));
                  assertTrue(rootset.getTitle().equals("Jetspeed"));
                  assertTrue(rootset.getDescription().equals("This is the default page for me"));
                  assertTrue(rootset.getImage().equals("me.png"));
  
                  Vector params = rootset.getParameters();
                  assertNotNull(params);
                  assertTrue(((Parameter)params.elementAt(0)).getName().equals("city"));
                  assertTrue(((Parameter)params.elementAt(0)).getValue().equals("Atlanta"));
                  assertTrue(((Parameter)params.elementAt(1)).getName().equals("state"));
                  assertTrue(((Parameter)params.elementAt(1)).getValue().equals("Georgia"));
                  assertTrue(((Parameter)params.elementAt(2)).getName().equals("country"));
                  assertTrue(((Parameter)params.elementAt(2)).getValue().equals("USA"));
                  assertTrue(rootset.getParameterValue("city").equals("Atlanta"));
                  assertTrue(rootset.getParameterValue("country").equals("USA"));
                  assertTrue(rootset.getParameter("state").getValue().equals("Georgia"));                
  
                  Skin skin = rootset.getSkin();
                  assertNotNull(skin);
                  assertTrue(skin.getName().equals("skinny"));
                  assertTrue(skin.getState().equals("DETACHED"));
                  Vector skinParams = skin.getParameters();
                  assertNotNull(skinParams);
                  assertTrue(((Parameter)skinParams.elementAt(0)).getName().equals("a"));
                  assertTrue(((Parameter)skinParams.elementAt(0)).getValue().equals("1"));
                  assertTrue(((Parameter)skinParams.elementAt(1)).getName().equals("b"));
                  assertTrue(((Parameter)skinParams.elementAt(1)).getValue().equals("2"));
  
                  Layout layout = rootset.getLayout();
                  assertNotNull(layout);
                  assertTrue(layout.getName().equals("layout1"));
                  assertTrue(layout.getSize() == 1);
                  assertTrue(layout.getPosition() == 3);
  
                  Vector layoutParams = layout.getParameters();
                  assertNotNull(layoutParams);
                  assertTrue(((Parameter)layoutParams.elementAt(0)).getName().equals("a"));
                  assertTrue(((Parameter)layoutParams.elementAt(0)).getValue().equals("1"));
                  assertTrue(((Parameter)layoutParams.elementAt(1)).getName().equals("b"));
                  assertTrue(((Parameter)layoutParams.elementAt(1)).getValue().equals("2"));
  
                  Control control = rootset.getControl();
                  assertNotNull(control);
                  Vector controlParams = layout.getParameters();
                  assertNotNull(controlParams);
                  assertTrue(control.getName().equals("TabControl"));
                  assertTrue(((Parameter)controlParams.elementAt(0)).getName().equals("a"));
                  assertTrue(((Parameter)controlParams.elementAt(0)).getValue().equals("1"));
                  assertTrue(((Parameter)controlParams.elementAt(1)).getName().equals("b"));
                  assertTrue(((Parameter)controlParams.elementAt(1)).getValue().equals("2"));
  
                  Controller controller = rootset.getController();
                  assertNotNull(controller);
                  Vector controllerParams = layout.getParameters();
                  assertNotNull(controllerParams);
                  assertTrue(controller.getName().equals("TabController"));
                  assertTrue(((Parameter)controllerParams.elementAt(0)).getName().equals("a"));
                  assertTrue(((Parameter)controllerParams.elementAt(0)).getValue().equals("1"));
                  assertTrue(((Parameter)controllerParams.elementAt(1)).getName().equals("b"));
                  assertTrue(((Parameter)controllerParams.elementAt(1)).getValue().equals("2"));
  
                  Vector entries = rootset.getEntries();
                  assertNotNull(entries);
                  Entry entry = (Entry)entries.elementAt(0);
                  assertTrue(entry.getParent().equals("LoggedInWelcome"));    
                  assertTrue(entry.getId().equals("03"));    
  
                  Layout elayout = entry.getLayout();
                  assertNotNull(elayout);
                  Vector elayoutParams = elayout.getParameters();
                  assertNotNull(elayoutParams);
                  assertTrue(((Parameter)elayoutParams.elementAt(1)).getName().equals("row"));
                  assertTrue(((Parameter)elayoutParams.elementAt(0)).getName().equals("column"));
  
                  Vector pv = rootset.getPortlets();
  
                  Portlets p = (Portlets)pv.elementAt(0);
                  assertNotNull(p);
  
                  Controller pc = p.getController();
                  assertNotNull(pc);
                  assertTrue(pc.getName().equals("TwoColumns"));
  
                  Vector pe = p.getEntries();
                  assertNotNull(pe);
                  Entry e1 = (Entry)pe.elementAt(0);
                  assertTrue(e1.getParent().equals("HelloWhatever"));    
                  assertTrue(e1.getId().equals("99"));    
  
                  Entry e2 = (Entry)pe.elementAt(1);
                  assertTrue(e2.getParent().equals("HelloVelocity"));    
                  assertTrue(e2.getId().equals("100"));    
  
                  Entry e3 = (Entry)pe.elementAt(2);
                  assertTrue(e3.getParent().equals("HelloCleveland"));    
                  assertTrue(e3.getId().equals("9999"));    
  
              }
              catch (Exception e)
              {
                  String errmsg = "Error in psml mapping creation" + e.toString();
                  System.err.println(errmsg);
                  assertNotNull(errmsg, null);
              }
          }
          else
          {
              String errmsg = "PSML Mapping not found or not a file or unreadable: ";
              System.err.println(errmsg);
              assertNotNull(errmsg, null);
          }  
      }
  
      /**
       * Tests unmarshaling security
       * @throws Exception
       */
      public void testUnmarshalSecurity() throws Exception 
      {
          System.out.println("Testing marshalling of PSML on base *** Security ***");
  
          String psmlFile = "../webapp/WEB-INF/psml/test/testsecurity.psml";
  
          Mapping mapping = null;
          String mapFile = getMappingFileName();
          File map = new File(mapFile);
          if (map.exists() && map.isFile() && map.canRead())
          {
              try
              {
                  FileReader reader = new FileReader(psmlFile);
                  mapping = new Mapping();
                  InputSource is = new InputSource( new FileReader(map) );
                  is.setSystemId( mapFile );
                  mapping.loadMapping( is );
                  Unmarshaller unmarshaller = new Unmarshaller(mapping);
                  Security rootset = (Security)unmarshaller.unmarshal(reader);
                  Vector roles = rootset.getRoles();
                  assertTrue(((Role)roles.elementAt(0)).getName().equals("admin"));
                  assertTrue(((Role)roles.elementAt(1)).getName().equals("user"));
                  assertTrue(((Role)roles.elementAt(2)).getName().equals("manager"));
              }
              catch (Exception e)
              {
                  String errmsg = "Error in psml mapping creation" + e.toString();
                  System.err.println(errmsg);
                  assertNotNull(errmsg, null);
              }
          }
          else
          {
              String errmsg = "PSML Mapping not found or not a file or unreadable: ";
              System.err.println(errmsg);
              assertNotNull(errmsg, null);
          }
     
      }
  
  
  }
  
  
  1.3       +29 -4     jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/db/DBUtils.java
  
  Index: DBUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/db/DBUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DBUtils.java	4 Dec 2001 18:28:26 -0000	1.2
  +++ DBUtils.java	22 Mar 2002 18:51:57 -0000	1.3
  @@ -55,13 +55,18 @@
   package org.apache.jetspeed.services.psmlmanager.db;
   
   //Castor defined API
  -import org.apache.jetspeed.xml.api.portletmarkup.Portlets;
  +import org.apache.jetspeed.om.profile.Portlets;
    
   //turbine stuff
   import org.apache.turbine.util.Log;
   
   //castor support
  +import org.exolab.castor.xml.Unmarshaller;
  +import org.exolab.castor.xml.Marshaller;
  +
   import org.exolab.castor.xml.MarshalException;
  +import org.exolab.castor.mapping.Mapping;
  +import org.exolab.castor.mapping.MappingException;
   import org.exolab.castor.xml.ValidationException;
   
   //standard java stuff
  @@ -75,7 +80,7 @@
    * This is a utility class used for database PSML implementation.
    *
    * @author <a href="mailto:adambalk@cisco.com">Atul Dambalkar</a>
  - * @version $Id: DBUtils.java,v 1.2 2001/12/04 18:28:26 sgala Exp $
  + * @version $Id: DBUtils.java,v 1.3 2002/03/22 18:51:57 taylor Exp $
    */
   public class DBUtils 
   {
  @@ -91,12 +96,20 @@
           Reader reader = new StringReader(new String(portletBytes));
           try 
           {
  -            return Portlets.unmarshal(reader);
  +            Unmarshaller unmarshaller = new Unmarshaller((Mapping)null);
  +            return (Portlets)unmarshaller.unmarshal(reader);
  +
  +//            return Portlets.unmarshal(reader);
           }
           catch (MarshalException e)
           {
               Log.error("PSMLManager: Could not unmarshal the inputstream ", e);
           }  
  +        catch (MappingException e)
  +        {
  +            Log.error("PSMLManager: Could not unmarshal the inputstream ", e);
  +        }  
  +
           catch (ValidationException e)
           {
               Log.error("PSMLManager: document is not valid", e);
  @@ -127,7 +140,11 @@
           StringWriter writer = new StringWriter();
           try 
           {
  -            portlets.marshal(writer);
  +//            portlets.marshal(writer);
  +
  +            Marshaller marshaller = new Marshaller(writer);
  +            marshaller.setMapping(null);
  +            marshaller.marshal(portlets);
   
               Log.debug("Portlets: " + writer.toString());
   
  @@ -135,6 +152,14 @@
               return writer.toString().getBytes(); 
           }
           catch (MarshalException e)
  +        {
  +            Log.error("PSMLManager: Could not marshal the stringwriter ", e);
  +        }
  +        catch (IOException e)
  +        {
  +            Log.error("PSMLManager: Could not marshal the stringwriter ", e);
  +        }
  +        catch (MappingException e)
           {
               Log.error("PSMLManager: Could not marshal the stringwriter ", e);
           }
  
  
  
  1.13      +2 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/db/DatabasePsmlManagerService.java
  
  Index: DatabasePsmlManagerService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/psmlmanager/db/DatabasePsmlManagerService.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DatabasePsmlManagerService.java	6 Dec 2001 05:12:41 -0000	1.12
  +++ DatabasePsmlManagerService.java	22 Mar 2002 18:51:57 -0000	1.13
  @@ -68,7 +68,7 @@
   import org.apache.jetspeed.om.profile.BaseProfileLocator;
   import org.apache.jetspeed.om.profile.QueryLocator;
   //Castor defined API
  -import org.apache.jetspeed.xml.api.portletmarkup.Portlets;
  +import org.apache.jetspeed.om.profile.Portlets;
   import org.apache.jetspeed.om.profile.PSMLDocument;
   import org.apache.jetspeed.om.profile.BasePSMLDocument;
    
  @@ -125,7 +125,7 @@
    *
    * @author <a href="mailto:adambalk@cisco.com">Atul Dambalkar</a>
    * @author <a href="mailto:mvaidya@cisco.com">Medha Vaidya</a>
  - * @version $Id: DatabasePsmlManagerService.java,v 1.12 2001/12/06 05:12:41 taylor Exp $
  + * @version $Id: DatabasePsmlManagerService.java,v 1.13 2002/03/22 18:51:57 taylor Exp $
    */
   public class DatabasePsmlManagerService extends TurbineBaseService 
                                        implements PsmlManagerService, DBOperations
  
  
  
  1.2       +2 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/util/AutoProfile.java
  
  Index: AutoProfile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/AutoProfile.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AutoProfile.java	6 Dec 2001 06:26:54 -0000	1.1
  +++ AutoProfile.java	22 Mar 2002 18:51:57 -0000	1.2
  @@ -1,7 +1,7 @@
   package org.apache.jetspeed.util;
   
  -import org.apache.jetspeed.xml.api.portletmarkup.Portlets;
  -import org.apache.jetspeed.xml.api.portletmarkup.Entry;
  +import org.apache.jetspeed.om.profile.Portlets;
  +import org.apache.jetspeed.om.profile.Entry;
   import org.apache.jetspeed.om.profile.Profile;
   import org.apache.jetspeed.services.Profiler;
   import org.apache.jetspeed.util.MimeType;
  
  
  
  1.16      +5 -5      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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- PSMLManager.java	17 Dec 2001 15:32:28 -0000	1.15
  +++ PSMLManager.java	22 Mar 2002 18:51:57 -0000	1.16
  @@ -73,8 +73,8 @@
   import org.apache.jetspeed.om.profile.PSMLDocument;
   import org.apache.jetspeed.om.profile.BasePSMLDocument;
   import org.apache.jetspeed.om.registry.MediaTypeEntry;
  -import org.apache.jetspeed.xml.api.portletmarkup.Portlets;
  -import org.apache.jetspeed.xml.api.portletmarkup.Entry;
  +import org.apache.jetspeed.om.profile.Portlets;
  +import org.apache.jetspeed.om.profile.Entry;
   
   import org.apache.turbine.util.RunData;
   import org.apache.turbine.util.Log;
  @@ -100,7 +100,7 @@
       }
       /**
        * Reads a userconfiguration and builds an Portlets tree
  -     * @return org.apache.jetspeed.xml.api.portletmarkup.Portlets The Portlets tree representing the PSML
  +     * @return org.apache.jetspeed.om.profile.Portlets The Portlets tree representing the PSML
        * @param username java.lang.String UserName of the requested PSML file
        * @param mimeType org.apache.jetspeed.util.MimeType MimeType of the requested PSML file
        */
  @@ -155,7 +155,7 @@
        * @return boolean true if successfull, else false
        * @param username java.lang.String UserName of the requested PSML file
        * @param mimetype org.apache.jetspeed.util.MimeType MimeType of the requested PSML file
  -     * @param portlets org.apache.jetspeed.xml.api.portletmarkup.Portlets The Portlets-tree representing the PSML
  +     * @param portlets org.apache.jetspeed.om.profile.Portlets The Portlets-tree representing the PSML
        */
       public static boolean setPSMLContent(RunData data, MimeType mimetype, Portlets portlets)
       {
  @@ -216,7 +216,7 @@
        * Insert the method's description here.
        * @return boolean true if successfull, else false
        * @param url java.lang.String the url handle for this PSML content
  -     * @param portlets org.apache.jetspeed.xml.api.portletmarkup.Portlets The Portlets-tree representing the PSML
  +     * @param portlets org.apache.jetspeed.om.profile.Portlets The Portlets-tree representing the PSML
        */
       public static boolean setPSMLContent(RunData data, String url, Portlets portlets)
       {
  
  
  
  1.16      +2 -2      jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedTool.java
  
  Index: JetspeedTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedTool.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JetspeedTool.java	13 Mar 2002 05:41:16 -0000	1.15
  +++ JetspeedTool.java	22 Mar 2002 18:51:57 -0000	1.16
  @@ -72,7 +72,7 @@
   import org.apache.jetspeed.om.profile.PSMLDocument;
   import org.apache.jetspeed.om.profile.Profile;
   import org.apache.jetspeed.om.profile.ProfileException;
  -import org.apache.jetspeed.xml.api.portletmarkup.Entry;
  +import org.apache.jetspeed.om.profile.Entry;
   
   import java.util.Enumeration;
   import java.util.Stack;
  @@ -89,7 +89,7 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    *
  - * @version $Id: JetspeedTool.java,v 1.15 2002/03/13 05:41:16 paulsp Exp $
  + * @version $Id: JetspeedTool.java,v 1.16 2002/03/22 18:51:57 taylor Exp $
    */
   public class JetspeedTool implements ApplicationTool
   {
  
  
  

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


Mime
View raw message