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-2/portal/test/testdata/pages default-page.psml test001.psml
Date Wed, 10 Mar 2004 07:55:28 GMT
taylor      2004/03/09 23:55:28

  Modified:    portal   maven.xml
               portal/src/java/org/apache/jetspeed/om/page Fragment.java
               portal/src/java/org/apache/jetspeed/om/page/psml
                        FragmentImpl.java
               portal/src/java/org/apache/jetspeed/page/impl
                        page-mapping.xml
               portal/src/test/org/apache/jetspeed
                        PortalComponentAssemblyTestCase.java
               portal/src/test/org/apache/jetspeed/page
                        TestCastorXmlPageManager.java
               portal/src/webapp/WEB-INF/conf/test jetspeed.properties
               portal/src/webapp/WEB-INF/pages default-page.psml p001.psml
                        p002.psml testsuite.psml
               portal/test/testdata/pages default-page.psml test001.psml
  Log:
  laying groundwork to switch aggregation from portlet names to entity ids
  
  Revision  Changes    Path
  1.55      +20 -1     jakarta-jetspeed-2/portal/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/maven.xml,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- maven.xml	10 Mar 2004 02:06:33 -0000	1.54
  +++ maven.xml	10 Mar 2004 07:55:27 -0000	1.55
  @@ -5,7 +5,7 @@
            xmlns:maven="jelly:maven">
   
     <!-- Target of maven test:single test -->
  -<property name='testcase' value='org.apache.jetspeed.tools.pamanager.TestPortletDescriptor'/>

  +<property name='testcase' value='org.apache.jetspeed.page.TestCastorXmlPageManager'/>

                                                     
    <preGoal name="java:prepare-filesystem">
    	<echo message="====================================" />
  @@ -257,6 +257,7 @@
     	 <attainGoal name="pam.register" />
     	 <attainGoal name="pam.deploy" />
     	 <attainGoal name="pam.padeploy" />
  +     <attainGoal name="db.entities" />
     </goal>
   
     <preGoal name="hotdeploy">
  @@ -355,6 +356,24 @@
               <arg value="-ApplicationType" />
               <arg value="webapp" />
           </java>
  +  </goal>
  +
  +  <!-- ================================================================ -->
  +  <!-- EXECUTE a DB SCRIPT                                              -->
  +  <!-- ================================================================ -->
  +  <goal name="db.execute">
  +    <sql driver="${org.apache.jetspeed.database.driver}"
  +         classpathref="maven.dependency.classpath"
  +         url="${org.apache.jetspeed.database.url}"
  +         userid="${org.apache.jetspeed.database.user}"
  +         password="${org.apache.jetspeed.database.password}"
  +         src="${database.arg.script}">
  +    </sql>
  +  </goal>
  +
  +  <goal name="db.entities">
  +      <j:set var="database.arg.script" value="../src/sql/populate-entities-for-default-psml.sql"
/>
  +      <attainGoal name="db.execute" />
     </goal>
   
   </project>
  
  
  
  1.5       +7 -1      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/om/page/Fragment.java
  
  Index: Fragment.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/om/page/Fragment.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Fragment.java	8 Mar 2004 00:29:03 -0000	1.4
  +++ Fragment.java	10 Mar 2004 07:55:27 -0000	1.5
  @@ -187,4 +187,10 @@
        */
       public Object clone()
           throws java.lang.CloneNotSupportedException;
  +    
  +    public void setEntityId(String id);
  +    
  +    public String getEntityId();
  + 
  +    
   }
  
  
  
  1.5       +13 -1     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/om/page/psml/FragmentImpl.java
  
  Index: FragmentImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/om/page/psml/FragmentImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FragmentImpl.java	8 Mar 2004 00:28:51 -0000	1.4
  +++ FragmentImpl.java	10 Mar 2004 07:55:28 -0000	1.5
  @@ -42,8 +42,20 @@
   
       private List properties = new Vector();
   
  +    private String entityId;
  +
       public FragmentImpl()
       {}
  +
  +    public String getEntityId()
  +    {
  +        return entityId;
  +    }
  +
  +    public void setEntityId(String id)
  +    {
  +        this.entityId = id;
  +    }
   
       public String getType()
       {
  
  
  
  1.2       +4 -0      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/page/impl/page-mapping.xml
  
  Index: page-mapping.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/page/impl/page-mapping.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- page-mapping.xml	24 Feb 2004 05:34:01 -0000	1.1
  +++ page-mapping.xml	10 Mar 2004 07:55:28 -0000	1.2
  @@ -37,6 +37,10 @@
         <bind-xml name="acl" node="attribute"/>
       </field>
   
  +    <field name="entityId" type="java.lang.String">
  +      <bind-xml name="entity" node="attribute"/>
  +    </field>
  +
       <field name="type" type="java.lang.String">
         <bind-xml name="type" node="attribute"/>
       </field>
  
  
  
  1.3       +37 -1     jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/PortalComponentAssemblyTestCase.java
  
  Index: PortalComponentAssemblyTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/PortalComponentAssemblyTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PortalComponentAssemblyTestCase.java	8 Mar 2004 00:38:57 -0000	1.2
  +++ PortalComponentAssemblyTestCase.java	10 Mar 2004 07:55:28 -0000	1.3
  @@ -16,6 +16,13 @@
   package org.apache.jetspeed;
   
   import org.apache.jetspeed.components.ComponentAssemblyTestCase;
  +import java.io.FileInputStream;
  +import java.util.Properties;
  +import java.io.File;
  +
  +import org.apache.commons.logging.LogFactory;
  +import org.apache.commons.logging.impl.Log4jFactory;
  +import org.apache.log4j.PropertyConfigurator;
   
   /**
    * PortalComponentAssemblyTestCase
  @@ -25,6 +32,8 @@
    */
   public class PortalComponentAssemblyTestCase extends ComponentAssemblyTestCase
   {
  +    private String log4jFile = "./src/webapp/WEB-INF/conf/Log4j.properties";
  +    
       public PortalComponentAssemblyTestCase(String name)
       {
           super(name);
  @@ -37,4 +46,31 @@
       {
           return "portal";
       }
  +    
  +    public void setUp()
  +    throws Exception
  +    {
  +        super.setUp();
  +        Properties p = new Properties();
  +        try
  +        {
  +            File baseDir = new File(System.getProperty("basedir"));
  +            if(baseDir.exists())
  +            {
  +                System.out.println("Finding logfile from basedir " + baseDir);
  +                File logFile = new File(baseDir, log4jFile);
  +                p.load(new FileInputStream(logFile));
  +            }
  +        }
  +        catch (Exception e)
  +        {
  +            e.printStackTrace();
  +        }
  +        PropertyConfigurator.configure(p);
  +        
  +        System.getProperties().setProperty(LogFactory.class.getName(), Log4jFactory.class.getName());
  +        System.out.println("set props ok");
  +        
  +    }
  +    
   }
  
  
  
  1.5       +3 -1      jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java
  
  Index: TestCastorXmlPageManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/page/TestCastorXmlPageManager.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestCastorXmlPageManager.java	8 Mar 2004 00:37:25 -0000	1.4
  +++ TestCastorXmlPageManager.java	10 Mar 2004 07:55:28 -0000	1.5
  @@ -126,6 +126,7 @@
           Fragment f = (Fragment) children.get(0);
           assertTrue(f.getId().equals("pe001"));
           assertTrue(f.getName().equals("HelloPortlet"));
  +        assertTrue(f.getEntityId().equals("3"));
           assertTrue(f.getType().equals(Fragment.PORTLET));
   
           List properties = f.getProperties(root.getName());
  @@ -140,6 +141,7 @@
           assertTrue(f.getId().equals("pe002"));
           assertTrue(f.getName().equals("JMXPortlet"));
           assertTrue(f.getType().equals(Fragment.PORTLET));
  +        assertTrue(f.getEntityId().equals("4"));
   
           properties = f.getProperties(root.getName());
           assertNotNull(properties);
  
  
  
  1.18      +1 -26     jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/test/jetspeed.properties
  
  Index: jetspeed.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/test/jetspeed.properties,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- jetspeed.properties	6 Mar 2004 18:41:54 -0000	1.17
  +++ jetspeed.properties	10 Mar 2004 07:55:28 -0000	1.18
  @@ -25,31 +25,6 @@
   # -------------------------------------------------------------------
   services.PsmlManager.root=./test/testdata/psml
   
  -# -------------------------------------------------------------------
  -# Page Manager (Castor based)            
  -# -------------------------------------------------------------------
  -services.XMLPageManager.classname=org.apache.jetspeed.services.page.impl.CastorXmlPageManagerService
  -services.XMLPageManager.root=./test/testdata/pages
  -services.XMLPageManager.ext=.psml
  -services.XMLPageManager.mapping=/WEB-INF/conf/page-mapping.xml
  -# scan rate in seconds (every 2 minutes)
  -services.XMLPageManager.scanRate=120
  -# cache size - number of PSML pages to cache
  -services.XMLPageManager.cacheSize=100
  -services.XMLPageManager.fragment.impl = org.apache.jetspeed.om.page.psml.FragmentImpl
  -services.XMLPageManager.page.impl = org.apache.jetspeed.om.page.psml.PageImpl
  -services.XMLPageManager.property.impl = org.apache.jetspeed.om.page.psml.PropertyImpl
  -
  -services.PageManager.root=./test/testdata/pages
  -services.PageManager.mapping=/WEB-INF/conf/page-mapping.xml
  -
  -# -------------------------------------------------------------------
  -# Page Manager (DB)            
  -# -------------------------------------------------------------------
  -services.DBPageManager.classname = org.apache.jetspeed.services.page.impl.DatabasePageManagerService
  -services.DBPageManager.fragment.impl = org.apache.jetspeed.om.page.psml.FragmentImpl
  -services.DBPageManager.page.impl = org.apache.jetspeed.om.page.psml.PageImpl
  -services.DBPageManager.property.impl = org.apache.jetspeed.om.page.psml.PropertyImpl
   
   #---------------------------------------------------------------------------------
   # Run Auto-Deployment set up
  
  
  
  1.8       +6 -6      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/default-page.psml
  
  Index: default-page.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/default-page.psml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- default-page.psml	4 Feb 2004 21:47:58 -0000	1.7
  +++ default-page.psml	10 Mar 2004 07:55:28 -0000	1.8
  @@ -5,24 +5,24 @@
        portlet-decorator="portletstd"
     />
     <title>My First PSML Page</title>
  -  <fragment id="f001" type="layout" name="jetspeed::VelocityTwoColumns">
  -    <fragment id="pe001" type="portlet" name="HW_App::HelloPortlet">
  +  <fragment id="f001" entity="2" type="layout" name="jetspeed::VelocityTwoColumns">
  +    <fragment id="pe001" entity="3" type="portlet" name="HW_App::HelloPortlet">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="0" />
       </fragment>                                
  -    <fragment id="pe002" type="portlet" name="HW_App::JMXPortlet">
  +    <fragment id="pe002" entity="4" type="portlet" name="HW_App::JMXPortlet">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="1" />
       </fragment>
  -    <fragment id="pe003" type="portlet" name="HW_App::PreferencePortlet">
  +    <fragment id="pe003" entity="5" type="portlet" name="HW_App::PreferencePortlet">
         <property layout="TwoColumns" name="row" value="1" />
         <property layout="TwoColumns" name="column" value="0" />
       </fragment>
  -    <fragment id="pe004" type="portlet" name="HW_App::CustomerList">
  +    <fragment id="pe004" entity="9" type="portlet" name="HW_App::CustomerList">
         <property layout="TwoColumns" name="row" value="1" />
         <property layout="TwoColumns" name="column" value="1" />
       </fragment>
  -    <fragment id="pe005" type="portlet" name="PAM::PortletApplicationBrowser">
  +    <fragment id="pe005" entity="13" type="portlet" name="PAM::PortletApplicationBrowser">
         <property layout="TwoColumns" name="row" value="1" />
         <property layout="TwoColumns" name="column" value="2" />
       </fragment>
  
  
  
  1.4       +5 -5      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/p001.psml
  
  Index: p001.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/p001.psml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- p001.psml	4 Feb 2004 21:47:58 -0000	1.3
  +++ p001.psml	10 Mar 2004 07:55:28 -0000	1.4
  @@ -6,20 +6,20 @@
        portlet-decorator="portletstd"
     />
     <title>My First PSML Page</title>
  -  <fragment id="f001" type="layout" name="jetspeed::TwoColumns">
  -    <fragment id="pe001" type="portlet" name="HW_App::HelloPortlet">
  +  <fragment id="f001" entity="1" type="layout" name="jetspeed::TwoColumns">
  +    <fragment id="pe001" entity="3" type="portlet" name="HW_App::HelloPortlet">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="0" />
       </fragment>
  -    <fragment id="pe002" type="portlet" name="HW_App::JMXPortlet">
  +    <fragment id="pe002" entity="4" type="portlet" name="HW_App::JMXPortlet">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="1" />
       </fragment>
  -    <fragment id="pe003" type="portlet" name="HW_App::PreferencePortlet">
  +    <fragment id="pe003" entity="5" type="portlet" name="HW_App::PreferencePortlet">
         <property layout="TwoColumns" name="row" value="1" />
         <property layout="TwoColumns" name="column" value="0" />
       </fragment>
  -    <fragment id="pe004" type="portlet" name="HW_App::CustomerList">
  +    <fragment id="pe004" entity="9" type="portlet" name="HW_App::CustomerList">
         <property layout="TwoColumns" name="row" value="1" />
         <property layout="TwoColumns" name="column" value="1" />
       </fragment>
  
  
  
  1.4       +9 -9      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/p002.psml
  
  Index: p002.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/p002.psml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- p002.psml	4 Feb 2004 21:47:58 -0000	1.3
  +++ p002.psml	10 Mar 2004 07:55:28 -0000	1.4
  @@ -6,14 +6,14 @@
        portlet-decorator="box-titled"
     />
     <title>Welcome to Jetspeed-2</title>
  -  <fragment id="f001" type="layout" name="jetspeed::OneColumn">
  -    <fragment id="p002-01" type="portlet" name="HW_App::LoginPortlet"/>
  -    <fragment id="p002-01" type="portlet" name="HW_App::HelloPortlet"/>
  -    <fragment id="p002-01" type="portlet" name="HW_App::DisplayRequestPortlet"/>
  -    <fragment id="p002-01" type="portlet" name="HW_App::CustomerList"/>
  -    <fragment id="p002-01" type="portlet" name="HW_App::CustomerInfo"/>
  -    <fragment id="p002-01" type="portlet" name="HW_App::CustomerDetail"/>
  -    <fragment id="p002-01" type="portlet" name="HW_App::JMXPortlet"/>
  -    <fragment id="p002-01" type="portlet" name="HW_App::PreferencePortlet"/>
  +  <fragment id="f001" entity="1" type="layout" name="jetspeed::OneColumn">
  +    <fragment id="p002-01" entity="12" type="portlet" name="HW_App::LoginPortlet"/>
  +    <fragment id="p002-02" entity="3" type="portlet" name="HW_App::HelloPortlet"/>
  +    <fragment id="p002-03" entity="6" type="portlet" name="HW_App::DisplayRequestPortlet"/>
  +    <fragment id="p002-04" entity="9" type="portlet" name="HW_App::CustomerList"/>
  +    <fragment id="p002-05" entity="10" type="portlet" name="HW_App::CustomerInfo"/>
  +    <fragment id="p002-06" entity="11" type="portlet" name="HW_App::CustomerDetail"/>
  +    <fragment id="p002-07" entity="4" type="portlet" name="HW_App::JMXPortlet"/>
  +    <fragment id="p002-08" entity="5" type="portlet" name="HW_App::PreferencePortlet"/>
     </fragment>
   </page>
  
  
  
  1.3       +2 -2      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/testsuite.psml
  
  Index: testsuite.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/testsuite.psml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- testsuite.psml	4 Feb 2004 21:47:58 -0000	1.2
  +++ testsuite.psml	10 Mar 2004 07:55:28 -0000	1.3
  @@ -5,8 +5,8 @@
        portlet-decorator="portletstd"
     />
     <title>Test Suite Page</title>
  -  <fragment id="f002" type="layout" name="jetspeed::VelocityTwoColumns">
  -    <fragment id="pe066" type="portlet" name="TestPortlet1">
  +  <fragment id="f002" entity="2" type="layout" name="jetspeed::VelocityTwoColumns">
  +    <fragment id="pe066" entity='18' type="portlet" name="TestPortlet1">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="0" />
       </fragment>    
  
  
  
  1.2       +5 -5      jakarta-jetspeed-2/portal/test/testdata/pages/default-page.psml
  
  Index: default-page.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/test/testdata/pages/default-page.psml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- default-page.psml	4 Dec 2003 04:50:52 -0000	1.1
  +++ default-page.psml	10 Mar 2004 07:55:28 -0000	1.2
  @@ -6,20 +6,20 @@
        portlet-decorator="box-titled"
     />
     <title>My First PSML Page</title>
  -  <fragment id="f001" type="layout" name="TwoColumns">
  -    <fragment id="pe001" type="portlet" name="HelloPortlet">
  +  <fragment id="f001" entity='1' type="layout" name="TwoColumns">
  +    <fragment id="pe001" entity='3' type="portlet" name="HelloPortlet">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="0" />      
       </fragment>
  -    <fragment id="pe002" type="portlet" name="JMXPortlet">
  +    <fragment id="pe002" entity='4' type="portlet" name="JMXPortlet">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="1" />      
       </fragment>
  -    <fragment id="pe003" type="portlet" name="CustomerList">
  +    <fragment id="pe003" entity='9' type="portlet" name="CustomerList">
         <property layout="TwoColumns" name="row" value="1" />
         <property layout="TwoColumns" name="column" value="0" />      
       </fragment>
  -    <fragment id="pe004" type="portlet" name="CustomerInfo">
  +    <fragment id="pe004" entity='10' type="portlet" name="CustomerInfo">
         <property layout="TwoColumns" name="row" value="1" />
         <property layout="TwoColumns" name="column" value="1" />      
       </fragment>
  
  
  
  1.2       +6 -6      jakarta-jetspeed-2/portal/test/testdata/pages/test001.psml
  
  Index: test001.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/test/testdata/pages/test001.psml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test001.psml	8 Aug 2003 22:06:10 -0000	1.1
  +++ test001.psml	10 Mar 2004 07:55:28 -0000	1.2
  @@ -6,20 +6,20 @@
        layout-decorator="test-layout"
        portlet-decorator="test-portlet"
     />
  -  <fragment id="f001" type="layout" name="TwoColumns">
  -    <fragment id="pe001" type="portlet" name="HelloPortlet">
  +  <fragment id="f001" entity='1' type="layout" name="TwoColumns">
  +    <fragment id="pe001" entity='3' type="portlet" name="HelloPortlet">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="0" />      
       </fragment>
  -    <fragment id="pe002" type="portlet" name="JMXPortlet">
  +    <fragment id="pe002" entity='4' type="portlet" name="JMXPortlet">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="1" />      
       </fragment>
  -    <fragment id="f002" type="layout" name="Card" decorator="Tab">
  +    <fragment id="f002" entity='99' type="layout" name="Card" decorator="Tab">
         <property layout="TwoColumns" name="row" value="1" />
         <property layout="TwoColumns" name="column" value="0" />      
  -      <fragment id="pe003" type="portlet" name="CustomerList"/>
  -      <fragment id="pe004" type="portlet" name="CustomerInfo"/>
  +      <fragment id="pe003" entity='9' type="portlet" name="CustomerList"/>
  +      <fragment id="pe004" entity='10' type="portlet" name="CustomerInfo"/>
       </fragment>
     </fragment>
   </page>
  
  
  

---------------------------------------------------------------------
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