portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r489536 - in /portals/jetspeed-2/trunk: ./ components/portal/src/java/org/apache/jetspeed/tools/registration/ components/portal/src/test/org/apache/jetspeed/aggregator/ etc/registration/
Date Fri, 22 Dec 2006 01:22:06 GMT
Author: taylor
Date: Thu Dec 21 17:22:04 2006
New Revision: 489536

URL: http://svn.apache.org/viewvc?view=rev&rev=489536
Log:
https://issues.apache.org/jira/browse/JS2-226
register the jetspeed-layouts
complete RegistrationTool, register jetspeed services from jetspeed-portlet.xml


Modified:
    portals/jetspeed-2/trunk/.classpath
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/registration/RegistrationTool.java
    portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/aggregator/TestAggregator.java
    portals/jetspeed-2/trunk/etc/registration/registration.properties
    portals/jetspeed-2/trunk/maven.xml

Modified: portals/jetspeed-2/trunk/.classpath
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/.classpath?view=diff&rev=489536&r1=489535&r2=489536
==============================================================================
--- portals/jetspeed-2/trunk/.classpath (original)
+++ portals/jetspeed-2/trunk/.classpath Thu Dec 21 17:22:04 2006
@@ -103,7 +103,7 @@
 	<classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-mock-2.0.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-portlet-2.0.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/org.springframework/jars/spring-webmvc-2.0.jar"/>
-	<classpathentry kind="var" path="MAVEN_REPO/springframeworkmodules/jars/spring-modules-ojb-0.6.jar"/>

+	<classpathentry kind="var" path="MAVEN_REPO/springmodules/jars/spring-modules-ojb-0.6.jar"/>

 	<classpathentry kind="var" path="MAVEN_REPO/commons-fileupload/jars/commons-fileupload-1.0.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/org.apache.portals.bridges/jars/portals-bridges-common-1.0.1-dev.jar"/>
 	<classpathentry kind="var" path="MAVEN_REPO/org.apache.portals.bridges/jars/portals-bridges-frameworks-1.0.1-dev.jar"/>

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/registration/RegistrationTool.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/registration/RegistrationTool.java?view=diff&rev=489536&r1=489535&r2=489536
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/registration/RegistrationTool.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/registration/RegistrationTool.java
Thu Dec 21 17:22:04 2006
@@ -24,6 +24,7 @@
 import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
 import org.apache.jetspeed.om.common.portlet.PortletApplication;
 import org.apache.jetspeed.om.common.servlet.MutableWebApplication;
+import org.apache.jetspeed.util.descriptor.ExtendedPortletMetadata;
 import org.apache.jetspeed.util.descriptor.PortletApplicationDescriptor;
 import org.apache.jetspeed.util.descriptor.WebApplicationDescriptor;
 import org.springframework.context.ApplicationContext;
@@ -56,7 +57,7 @@
             System.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, appRootDir.getAbsolutePath());
           
             configuration.load(fileName);        
             String [] bootAssemblies = configuration.getStringArray("boot.assemblies");
-            String [] assemblies = configuration.getStringArray("assemblies");
+            String [] assemblies = configuration.getStringArray("assemblies");          
 
             ClassPathXmlApplicationContext ctx;            
             
             if (bootAssemblies != null)
@@ -74,7 +75,7 @@
             String[] appNames = configuration.getStringArray("apps");
             String[] appDescriptors = configuration.getStringArray("descriptors");
             String[] webappDescriptors = configuration.getStringArray("webapp.descriptors");
-            
+            String[] extendedDescriptors = configuration.getStringArray("extended.descriptors");
             PortletRegistry registry = (PortletRegistry)ctx.getBean(registryBean);
             RegistrationTool tool = new RegistrationTool(registry, overwriteApps);
             
@@ -84,7 +85,7 @@
                 {
                     tool.unregister(appNames[ix]);
                 }
-                tool.register(appNames[ix], appDescriptors[ix], webappDescriptors[ix]);
+                tool.register(appNames[ix], appDescriptors[ix], webappDescriptors[ix], extendedDescriptors[ix]);
             }
         }
         catch (Exception e)
@@ -114,14 +115,16 @@
         }
     }
     
-    public void register(String appName, String appDescriptor, String webappDescriptor)
+    public void register(String appName, String appDescriptor, String webappDescriptor, String
extendedDescriptor)
     throws Exception
     {
         WebApplicationDescriptor wad = new WebApplicationDescriptor(new FileReader(webappDescriptor),
"/" + appName);
         MutableWebApplication webapp = wad.createWebApplication();
         PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(appDescriptor),
appName);        
-        MutablePortletApplication app = pad.createPortletApplication();        
+        MutablePortletApplication app = pad.createPortletApplication();                
         app.setWebApplicationDefinition(webapp);
+        ExtendedPortletMetadata extMetaData = new ExtendedPortletMetadata(new FileReader(extendedDescriptor),
app);
+        extMetaData.load();        
         registry.registerPortletApplication(app);
     }
 }

Modified: portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/aggregator/TestAggregator.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/aggregator/TestAggregator.java?view=diff&rev=489536&r1=489535&r2=489536
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/aggregator/TestAggregator.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/test/org/apache/jetspeed/aggregator/TestAggregator.java
Thu Dec 21 17:22:04 2006
@@ -125,14 +125,14 @@
         portletFactory = (PortletFactory) engine.getComponentManager().getComponent("portletFactory");
         rcc = (RequestContextComponent) engine.getComponentManager().getComponent("org.apache.jetspeed.request.RequestContextComponent");
 
+        initPA("jetspeed-layouts", "/jetspeed-layouts", new File("../../layout-portlets/target/jetspeed-layout-portlets"));
         initPA("demo", "/demo", new File("../../applications/demo/target/demo"));
-        ServletContext paContext = 
-            initPA("j2-admin", "/j2-admin", new File("../../applications/j2-admin/target/j2-admin"));
+        initPA("j2-admin", "/j2-admin", new File("../../applications/j2-admin/target/j2-admin"));
 
         // j2-admin portlet needs user manager component, but the followings does not effect..
-        userManager = (UserManager) engine.getComponentManager().getComponent(UserManager.class);
-        paContext.setAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT, userManager);
-        assertEquals(userManager, paContext.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT));
+//        userManager = (UserManager) engine.getComponentManager().getComponent(UserManager.class);
+//        paContext.setAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT, userManager);
+//        assertEquals(userManager, paContext.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT));
     }
 
     public static Test suite()
@@ -249,23 +249,6 @@
         ((ResourceLocatingServletContext) servletContext).setContext(paContextPath, paContext);
 
         return paContext;
-    }
-
-    protected String[] getBootConfigurations()
-    {
-        return new String[]
-        { "boot/datasource.xml"};
-    }
-    
-    protected String[] getConfigurations()
-    {
-        //String[] confs = super.getConfigurations();
-        //List confList = new ArrayList(Arrays.asList(confs));
-        List confList = new ArrayList();
-        confList.add("registry.xml");
-        confList.add("transaction.xml");
-        confList.add("prefs.xml");
-        return (String[]) confList.toArray(new String[1]);
     }
 
     protected ClassLoader createLocalPAClassLoader(File paDir)

Modified: portals/jetspeed-2/trunk/etc/registration/registration.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/etc/registration/registration.properties?view=diff&rev=489536&r1=489535&r2=489536
==============================================================================
--- portals/jetspeed-2/trunk/etc/registration/registration.properties (original)
+++ portals/jetspeed-2/trunk/etc/registration/registration.properties Thu Dec 21 17:22:04
2006
@@ -7,10 +7,13 @@
 # registry component name
 registry.component = org.apache.jetspeed.components.portletregistry.PortletRegistry
 # apps to register
-apps = demo, j2-admin
+apps = jetspeed-layouts, demo, j2-admin
 # app descriptor locations
-descriptors = ./applications/demo/src/webapp/WEB-INF/portlet.xml, ./applications/j2-admin/src/webapp/WEB-INF/portlet.xml
+descriptors = ./layout-portlets/target/jetspeed-layout-portlets/WEB-INF/portlet.xml, ./applications/demo/src/webapp/WEB-INF/portlet.xml,
./applications/j2-admin/src/webapp/WEB-INF/portlet.xml
 # webapp descriptor locations
-webapp.descriptors = ./applications/demo/src/webapp/WEB-INF/web.xml, ./applications/j2-admin/src/webapp/WEB-INF/web.xml
+webapp.descriptors = ./layout-portlets/target/jetspeed-layout-portlets/WEB-INF/web.xml, ./applications/demo/src/webapp/WEB-INF/web.xml,
./applications/j2-admin/src/webapp/WEB-INF/web.xml
+# extended app descriptor locations
+extended.descriptors = ./layout-portlets/target/jetspeed-layout-portlets/WEB-INF/jetspeed-portlet.xml,
./applications/demo/src/webapp/WEB-INF/jetspeed-portlet.xml, ./applications/j2-admin/src/webapp/WEB-INF/jetspeed-portlet.xml
+
 
 

Modified: portals/jetspeed-2/trunk/maven.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/maven.xml?view=diff&rev=489536&r1=489535&r2=489536
==============================================================================
--- portals/jetspeed-2/trunk/maven.xml (original)
+++ portals/jetspeed-2/trunk/maven.xml Thu Dec 21 17:22:04 2006
@@ -390,4 +390,16 @@
         </java>
     </goal>
         
+    <goal name='test.eclipse'>
+        <copy todir="./bin">
+            <fileset dir="./src/webapp/WEB-INF/assembly/"/>
+        </copy>
+        <mkdir dir="./bin/boot/"/>
+        <copy todir="./bin/boot/">
+            <fileset dir="./src/webapp/WEB-INF/assembly/boot/"/>
+        </copy>
+        <copy todir="./bin">
+            <fileset dir="./etc/db-ojb/"/>
+        </copy>        
+    </goal>
 </project>



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


Mime
View raw message