gatein SVN: r6952 - in portal/branches/api/examples/portlets/api: src/main/java/org/gatein/portal/samples/api and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-07-29 12:50:35 -0400 (Fri, 29 Jul 2011)
New Revision: 6952
Added:
portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java
Modified:
portal/branches/api/examples/portlets/api/pom.xml
portal/branches/api/examples/portlets/api/src/main/webapp/WEB-INF/portlet.xml
Log:
- Added sample portlet to show how the API can be used to navigation portal information.
Modified: portal/branches/api/examples/portlets/api/pom.xml
===================================================================
--- portal/branches/api/examples/portlets/api/pom.xml 2011-07-29 16:46:44 UTC (rev 6951)
+++ portal/branches/api/examples/portlets/api/pom.xml 2011-07-29 16:50:35 UTC (rev 6952)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
@@ -35,5 +36,10 @@
<artifactId>portlet-api</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>gatein-java-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Added: portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java
===================================================================
--- portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java (rev 0)
+++ portal/branches/api/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java 2011-07-29 16:50:35 UTC (rev 6952)
@@ -0,0 +1,58 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.gatein.portal.samples.api;
+
+import org.gatein.api.GateIn;
+import org.gatein.api.portal.Portal;
+import org.gatein.api.util.IterableIdentifiableCollection;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+
+/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
+public class NavigationPortlet extends GenericPortlet
+{
+ private GateIn gateIn;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException
+ {
+ super.init(config);
+ gateIn = (GateIn)config.getPortletContext().getAttribute(GateIn.GATEIN_API);
+ }
+
+ @Override
+ protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
+ {
+
+ IterableIdentifiableCollection<Portal> portals = gateIn.getPortals();
+ for (Portal portal : portals)
+ {
+ response.getWriter().println(portal.getNavigation());
+ }
+ }
+}
Modified: portal/branches/api/examples/portlets/api/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/branches/api/examples/portlets/api/src/main/webapp/WEB-INF/portlet.xml 2011-07-29 16:46:44 UTC (rev 6951)
+++ portal/branches/api/examples/portlets/api/src/main/webapp/WEB-INF/portlet.xml 2011-07-29 16:50:35 UTC (rev 6952)
@@ -26,62 +26,81 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
-->
- <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="1.0">
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="1.0">
<portlet>
- <description xml:lang="EN">Public Render Parameter API Portlet</description>
- <portlet-name>PRPAPIPortlet</portlet-name>
- <display-name xml:lang="EN">Public Render Parameter API Portlet</display-name>
- <portlet-class>org.gatein.portal.samples.api.PRPPortlet</portlet-class>
+ <description xml:lang="EN">Public Render Parameter API Portlet</description>
+ <portlet-name>PRPAPIPortlet</portlet-name>
+ <display-name xml:lang="EN">Public Render Parameter API Portlet</display-name>
+ <portlet-class>org.gatein.portal.samples.api.PRPPortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- </supports>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
- <portlet-info>
- <title>PRP Portlet</title>
- <short-title>PRP Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
+ <portlet-info>
+ <title>PRP Portlet</title>
+ <short-title>PRP Portlet</short-title>
+ <keywords>Sample</keywords>
+ </portlet-info>
- <supported-public-render-parameter>navigation_uri</supported-public-render-parameter>
- <supported-public-render-parameter>page_name</supported-public-render-parameter>
- <supported-public-render-parameter>site_type</supported-public-render-parameter>
- <supported-public-render-parameter>site_name</supported-public-render-parameter>
- <supported-public-render-parameter>window_width</supported-public-render-parameter>
- <supported-public-render-parameter>window_height</supported-public-render-parameter>
- <supported-public-render-parameter>window_show_info_bar</supported-public-render-parameter>
+ <supported-public-render-parameter>navigation_uri</supported-public-render-parameter>
+ <supported-public-render-parameter>page_name</supported-public-render-parameter>
+ <supported-public-render-parameter>site_type</supported-public-render-parameter>
+ <supported-public-render-parameter>site_name</supported-public-render-parameter>
+ <supported-public-render-parameter>window_width</supported-public-render-parameter>
+ <supported-public-render-parameter>window_height</supported-public-render-parameter>
+ <supported-public-render-parameter>window_show_info_bar</supported-public-render-parameter>
- </portlet>
+ </portlet>
- <public-render-parameter>
- <identifier>navigation_uri</identifier>
- <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:navigation_uri</qname>
- </public-render-parameter>
- <public-render-parameter>
- <identifier>page_name</identifier>
- <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:page_name</qname>
- </public-render-parameter>
- <public-render-parameter>
- <identifier>site_type</identifier>
- <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:site_type</qname>
- </public-render-parameter>
- <public-render-parameter>
- <identifier>site_name</identifier>
- <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:site_name</qname>
- </public-render-parameter>
- <public-render-parameter>
- <identifier>window_width</identifier>
- <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_width</qname>
- </public-render-parameter>
- <public-render-parameter>
- <identifier>window_height</identifier>
- <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_height</qname>
- </public-render-parameter>
- <public-render-parameter>
- <identifier>window_show_info_bar</identifier>
- <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_show_info_bar</qname>
- </public-render-parameter>
+ <portlet>
+ <description xml:lang="EN">Navigation Portlet Example using GateIn's public API</description>
+ <portlet-name>NavigationAPIPortlet</portlet-name>
+ <display-name xml:lang="EN">API Navigation Portlet</display-name>
+ <portlet-class>org.gatein.portal.samples.api.NavigationPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+
+ <portlet-info>
+ <title>API Navigation Portlet</title>
+ <short-title>Navigation Portlet</short-title>
+ <keywords>Sample</keywords>
+ </portlet-info>
+ </portlet>
+
+ <public-render-parameter>
+ <identifier>navigation_uri</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:navigation_uri</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>page_name</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:page_name</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>site_type</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:site_type</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>site_name</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:site_name</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>window_width</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_width</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>window_height</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_height</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>window_show_info_bar</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_show_info_bar</qname>
+ </public-render-parameter>
+
</portlet-app>
13 years, 5 months
gatein SVN: r6951 - in portal/branches/api/component/api-impl/src: test/java/org/gatein/portal/api/impl and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-07-29 12:46:44 -0400 (Fri, 29 Jul 2011)
New Revision: 6951
Added:
portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/portal/
portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/portal/SiteTestCase.java
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/PortalImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/SiteImpl.java
Log:
- Added SiteTestCase to check that Type is properly retrieved.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/PortalImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/PortalImpl.java 2011-07-29 16:44:27 UTC (rev 6950)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/PortalImpl.java 2011-07-29 16:46:44 UTC (rev 6951)
@@ -37,7 +37,7 @@
public PortalImpl(PortalData portal, GateInImpl gateIn)
{
- super(gateIn.siteId(Type.forName(portal.getKey().getType(), Site.class), portal.getKey().getId()), portal.getName(), gateIn);
+ super(gateIn.siteId(getAPITypeFrom(portal.getKey()), portal.getKey().getId()), portal.getName(), gateIn);
}
public ContentRegistry getContentRegistry()
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/SiteImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/SiteImpl.java 2011-07-29 16:44:27 UTC (rev 6950)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/SiteImpl.java 2011-07-29 16:46:44 UTC (rev 6951)
@@ -28,11 +28,13 @@
import org.exoplatform.portal.mop.navigation.NavigationState;
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.portal.pom.data.OwnerKey;
import org.gatein.api.id.Id;
import org.gatein.api.portal.Navigation;
import org.gatein.api.portal.Page;
import org.gatein.api.portal.Site;
import org.gatein.api.util.HierarchicalContainer;
+import org.gatein.api.util.Type;
import org.gatein.portal.api.impl.GateInImpl;
import org.gatein.portal.api.impl.IdentifiableImpl;
@@ -50,6 +52,11 @@
return getType().getName() + "\n" + getNavigation().toString();
}
+ static Type getAPITypeFrom(OwnerKey key)
+ {
+ return Type.forName(key.getType(), Site.class);
+ }
+
public HierarchicalContainer<String, Page> getPageRegistry()
{
return null; //To change body of implemented methods use File | Settings | File Templates.
Added: portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/portal/SiteTestCase.java
===================================================================
--- portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/portal/SiteTestCase.java (rev 0)
+++ portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/portal/SiteTestCase.java 2011-07-29 16:46:44 UTC (rev 6951)
@@ -0,0 +1,42 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.gatein.portal.api.impl.portal;
+
+import org.exoplatform.portal.mop.SiteType;
+import org.exoplatform.portal.pom.data.PageKey;
+import org.exoplatform.portal.pom.data.PortalKey;
+import org.gatein.api.portal.Site;
+import org.testng.annotations.Test;
+
+/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
+public class SiteTestCase
+{
+ @Test
+ public void getAPITypeShouldProperlyResolve()
+ {
+ assert Site.DASHBOARD.equals(SiteImpl.getAPITypeFrom(new PageKey(SiteType.USER.getName(), "foo", "foo")));
+ assert Site.GROUP.equals(SiteImpl.getAPITypeFrom(new PageKey(SiteType.GROUP.getName(), "foo", "foo")));
+ assert Site.PORTAL.equals(SiteImpl.getAPITypeFrom(new PortalKey(SiteType.PORTAL.getName(), "foo")));
+ assert Site.PORTAL.equals(SiteImpl.getAPITypeFrom(new PortalKey("portal", "foo")));
+ }
+}
13 years, 5 months
gatein SVN: r6950 - in portal/branches/api/component/pc: src/main/java/org/exoplatform/portal/pc and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-07-29 12:44:27 -0400 (Fri, 29 Jul 2011)
New Revision: 6950
Modified:
portal/branches/api/component/pc/pom.xml
portal/branches/api/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
portal/branches/api/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java
Log:
- Inject API automatically in PortletContexts accessible via GateIn.GATEIN_API attribute.
Modified: portal/branches/api/component/pc/pom.xml
===================================================================
--- portal/branches/api/component/pc/pom.xml 2011-07-29 16:17:05 UTC (rev 6949)
+++ portal/branches/api/component/pc/pom.xml 2011-07-29 16:44:27 UTC (rev 6950)
@@ -19,59 +19,66 @@
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component</artifactId>
- <version>3.2.0-M02-SNAPSHOT</version>
- </parent>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component</artifactId>
+ <version>3.2.0-M02-SNAPSHOT</version>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>exo.portal.component.pc</artifactId>
- <packaging>jar</packaging>
- <name>GateIn Portal Component PC integration</name>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>exo.portal.component.pc</artifactId>
+ <packaging>jar</packaging>
+ <name>GateIn Portal Component PC integration</name>
- <dependencies>
+ <dependencies>
- <dependency>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.resources</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-portlet</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-mc</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-federation</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-bridge</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.wci</groupId>
- <artifactId>wci-wci</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.resources</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-portlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-mc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-federation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-bridge</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-wci</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
- </dependencies>
-
- <build>
- </build>
+ <!-- GateIn API support -->
+ <dependency>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>gatein-java-api</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ </build>
</project>
Modified: portal/branches/api/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
===================================================================
--- portal/branches/api/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2011-07-29 16:17:05 UTC (rev 6949)
+++ portal/branches/api/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2011-07-29 16:44:27 UTC (rev 6950)
@@ -22,6 +22,7 @@
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.services.resources.ResourceBundleService;
+import org.gatein.api.GateIn;
import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.bridge.BridgeInterceptor;
import org.gatein.pc.federation.FederatingPortletInvoker;
@@ -66,7 +67,7 @@
* We enforce the dependency with the ResourceBundleService since it must be stared before the
* <code>portletApplicationRegistry</code>
*
- * @param context the exo container context
+ * @param context the exo container context
* @param resourceBundleService the resource bundle service that is here for the sake of creating a dependency
*/
public ExoKernelIntegration(ExoContainerContext context, ResourceBundleService resourceBundleService)
@@ -83,13 +84,15 @@
// The portlet application deployer
portletApplicationRegistry = new ExoPortletApplicationDeployer();
portletApplicationRegistry.setContainerPortletInvoker(containerPortletInvoker);
+ GateIn gateIn = (GateIn)container.getComponentInstanceOfType(GateIn.class);
+ ((ExoPortletApplicationDeployer)portletApplicationRegistry).setAPIInstance(gateIn);
//Container Stack
ContainerPortletDispatcher portletContainerDispatcher = new ContainerPortletDispatcher();
-
+
// Federating portlet invoker
FederatingPortletInvoker federatingPortletInvoker = new FederatingPortletInvokerService();
-
+
EventPayloadInterceptor eventPayloadInterceptor = new EventPayloadInterceptor();
eventPayloadInterceptor.setNext(portletContainerDispatcher);
RequestAttributeConversationInterceptor requestAttributeConversationInterceptor =
Modified: portal/branches/api/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java
===================================================================
--- portal/branches/api/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java 2011-07-29 16:17:05 UTC (rev 6949)
+++ portal/branches/api/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java 2011-07-29 16:44:27 UTC (rev 6950)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
- *
+ *
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
@@ -21,6 +21,7 @@
import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.commons.utils.Safe;
+import org.gatein.api.GateIn;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.pc.mc.PortletApplicationDeployer;
@@ -44,6 +45,7 @@
public class ExoPortletApplicationDeployer extends PortletApplicationDeployer
{
private final Logger log = LoggerFactory.getLogger(ExoPortletApplicationDeployer.class);
+ private GateIn gateIn;
@Override
protected PortletApplication10MetaData buildPortletApplicationMetaData(WebApp webApp)
@@ -80,6 +82,7 @@
log.warn("The global portlet metadata is not configured");
}
+ webApp.getServletContext().setAttribute(GateIn.GATEIN_API, gateIn);
}
return md;
}
@@ -89,8 +92,8 @@
* to ensure independence between portlet applications
*
* @return
- * @throws FileNotFoundException
- * @throws JBossXBException
+ * @throws FileNotFoundException
+ * @throws JBossXBException
*/
private GlobalPortletMetaData loadGlobalMetadata(String globalPortletLocation) throws FileNotFoundException,
JBossXBException
@@ -106,4 +109,9 @@
Safe.close(in);
}
}
+
+ public void setAPIInstance(GateIn gateIn)
+ {
+ this.gateIn = gateIn;
+ }
}
13 years, 5 months
gatein SVN: r6949 - portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site.
by do-not-reply@jboss.org
Author: nscavell
Date: 2011-07-29 12:17:05 -0400 (Fri, 29 Jul 2011)
New Revision: 6949
Modified:
portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java
portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java
Log:
Fix site names read resource operation.
Modified: portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java
===================================================================
--- portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java 2011-07-29 03:51:39 UTC (rev 6948)
+++ portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java 2011-07-29 16:17:05 UTC (rev 6949)
@@ -28,9 +28,11 @@
import org.gatein.management.api.operation.ResultHandler;
import org.gatein.management.api.operation.model.ReadResourceModel;
import org.gatein.mop.api.workspace.Navigation;
+import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.Page;
import org.gatein.mop.api.workspace.Site;
+import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -64,7 +66,26 @@
{
children.add("portal");
}
+ else
+ {
+ if (site.getObjectType() == ObjectType.GROUP_SITE)
+ {
+ Collection<? extends Site> groupsites = site.getWorkspace().getSites(site.getObjectType());
+ for (Site groupsite : groupsites)
+ {
+ String siteName = site.getName();
+ String groupName = groupsite.getName();
+ if (siteName.equals(groupName)) continue;
+ int index = groupName.indexOf(siteName);
+ if (index == 0)
+ {
+ children.add(groupName.substring(siteName.length(), groupName.length()));
+ }
+ }
+ }
+ }
+
resultHandler.completed(new ReadResourceModel("Available artifacts for site " + getSiteKey(site), children));
}
}
Modified: portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java
===================================================================
--- portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java 2011-07-29 03:51:39 UTC (rev 6948)
+++ portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java 2011-07-29 16:17:05 UTC (rev 6949)
@@ -28,7 +28,9 @@
import org.gatein.management.api.operation.OperationContext;
import org.gatein.management.api.operation.ResultHandler;
import org.gatein.management.api.operation.model.ReadResourceModel;
+import org.gatein.mop.api.workspace.Navigation;
import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.api.workspace.Page;
import org.gatein.mop.api.workspace.Site;
import org.gatein.mop.api.workspace.Workspace;
@@ -49,7 +51,31 @@
Set<String> children = new LinkedHashSet<String>(sites.size());
for (Site site : sites)
{
- children.add(site.getName());
+ boolean pageOrNav = false;
+ Page pages = site.getRootPage().getChild("pages");
+ if (pages != null && !pages.getChildren().isEmpty())
+ {
+ pageOrNav = true;
+ }
+ Navigation defaultNav = site.getRootNavigation().getChild("default");
+ if (defaultNav != null && !defaultNav.getChildren().isEmpty())
+ {
+ pageOrNav = true;
+ }
+
+ //TODO: Until invalid site entries without a leading slash is corrected, this is needed to ignore them.
+ if (siteType == ObjectType.GROUP_SITE)
+ {
+ String name = site.getName();
+ if (name.charAt(0) == '/' && pageOrNav)
+ {
+ children.add(site.getName());
+ }
+ }
+ else if (pageOrNav)
+ {
+ children.add(site.getName());
+ }
}
resultHandler.completed(new ReadResourceModel("Available sites for site type '" + getSiteType(siteType).getName() + "'", children));
}
13 years, 5 months
gatein SVN: r6948 - in portal/branches/branch-GTNPORTAL-1963: gadgets/core/src/main/java/org/exoplatform/portal/gadget/core and 12 other directories.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2011-07-28 23:51:39 -0400 (Thu, 28 Jul 2011)
New Revision: 6948
Added:
portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/
portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/oauthkey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/
portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/oauthkey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/gadgets/
portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/gadgets/oauthkey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/gadgets/
portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/gadgets/oauthkey.pem
Removed:
portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/bin/exokey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/bin/oauthkey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/bin/exokey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/bin/oauthkey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/bin/exokey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/bin/oauthkey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/exokey.pem
portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/oauthkey.pem
Modified:
portal/branches/branch-GTNPORTAL-1963/component/common/src/main/java/conf/configuration-jboss.properties
portal/branches/branch-GTNPORTAL-1963/component/common/src/main/java/conf/configuration-tomcat.properties
portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java
portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoDefaultSecurityTokenGenerator.java
portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoOAuthModule.java
Log:
GTNPORTAL-1972 Gadgets dont work under loadbalancing
Modified: portal/branches/branch-GTNPORTAL-1963/component/common/src/main/java/conf/configuration-jboss.properties
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/component/common/src/main/java/conf/configuration-jboss.properties 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/component/common/src/main/java/conf/configuration-jboss.properties 2011-07-29 03:51:39 UTC (rev 6948)
@@ -62,5 +62,6 @@
# Global portlet.xml
gatein.portlet.config=${gatein.conf.dir}/portlet.xml
-# Web
-gatein.web.compressor.js.level=simple
\ No newline at end of file
+# key files for gadget
+gatein.gadgets.securityTokenKeyFile=${gatein.conf.dir}/gadgets/key.txt
+gatein.gadgets.signingKeyFile=${gatein.conf.dir}/gadgets/oauthkey.pem
\ No newline at end of file
Modified: portal/branches/branch-GTNPORTAL-1963/component/common/src/main/java/conf/configuration-tomcat.properties
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/component/common/src/main/java/conf/configuration-tomcat.properties 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/component/common/src/main/java/conf/configuration-tomcat.properties 2011-07-29 03:51:39 UTC (rev 6948)
@@ -65,5 +65,6 @@
# Global portlet.xml
gatein.portlet.config=${gatein.conf.dir}/portlet.xml
-# Web
-gatein.web.compressor.js.level=simple
\ No newline at end of file
+# Key files for gadget
+gatein.gadgets.securityTokenKeyFile=${gatein.conf.dir}/gadgets/key.txt
+gatein.gadgets.signingKeyFile=${gatein.conf.dir}/gadgets/oauthkey.pem
\ No newline at end of file
Modified: portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java 2011-07-29 03:51:39 UTC (rev 6948)
@@ -28,8 +28,9 @@
import org.apache.shindig.auth.BlobCrypterSecurityTokenDecoder;
import org.apache.shindig.config.ContainerConfigException;
import org.apache.shindig.expressions.Expressions;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.commons.utils.Safe;
-import org.exoplatform.container.monitor.jvm.J2EEServerInfo;
+import org.exoplatform.container.RootContainer;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -41,19 +42,19 @@
import java.security.SecureRandom;
/**
- * <p>The goal of the container config subclass is to integrate security key file along
+ * <p>The goal of the container config subclass is to integrate security key files along
* with exo configuration.</p>
- *
- * <p>The implementation first determine the most relevant directory for performing the key lookup.
- * It will look for a <i>gadgets</i> directory under the configuration directory returned by the
- * {@link org.exoplatform.container.monitor.jvm.J2EEServerInfo#getExoConfigurationDirectory()}
- * method. If no such valid directory can be found then the implementation use the current execution directory
+ * <p>
+ * The implementation first determine the most relevant locations of key files for performing the lookup.
+ * Ideally it will take ones configured as properties <i>gatein.gadgets.securityTokenKeyFile</i>
+ * and <i>gatein.gadgets.signingKeyFile</i> in the <i>configuration.properties</i>.
+ * If these properties are not configured, then the implementation uses the current execution directory
* (which should be /bin in tomcat and jboss).</p>
*
- * <p>When the lookup directory is determined, the implementation looks for a file named key.txt.
- * If no such file is found, then it will attempt to create it with a base 64 value encoded from
+ * <p>When the lookup file locations are determined, the implementation looks for these key files.
+ * If no such files are found, then it will attempt to create them with a base 64 value encoded from
* a 32 bytes random sequence generated by {@link SecureRandom} seeded by the current time. If the
- * file exist already but is a directory then no acton is done.<p>
+ * file exist already but is a directory then no action is done.<p>
*
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
@@ -68,7 +69,8 @@
private Log log = ExoLogger.getLogger(ExoContainerConfig.class);
/** . */
- private static volatile String _keyPath;
+ private static volatile String tokenKey_;
+ private String signingKey_;
@Inject
public ExoContainerConfig(@Named("shindig.containers.default") String s, Expressions expressions)
@@ -76,109 +78,134 @@
{
super(s, expressions);
- //
- J2EEServerInfo info = new J2EEServerInfo();
+ // This ensures RootContainer initialized first
+ // to populate properties in configuration.properties into PropertyManager
+ RootContainer.getInstance();
+
+ initializeTokenKeyFile();
+ initializeSigningKeyFile();
+ }
+
+ private void initializeTokenKeyFile()
+ {
+ String keyPath = PropertyManager.getProperty("gatein.gadgets.securityTokenKeyFile");
+
+ File tokenKeyFile = null;
+ if (keyPath == null)
+ {
+ log.warn("The gadgets token key is not configured. The default key.txt file in /bin will be used");
+ tokenKeyFile = new File("key.txt");
+ }
+ else
+ {
+ tokenKeyFile = new File(keyPath);
+ }
+
+ boolean isCreated = initializeKeyFile(tokenKeyFile);
+ if (isCreated)
+ {
+ setTokenKeyPath(tokenKeyFile.getAbsolutePath());
+ }
+ }
- //
- String confPath = info.getExoConfigurationDirectory();
-
- File keyFile = null;
- if (confPath != null)
+ private void initializeSigningKeyFile()
+ {
+ String signingKey = PropertyManager.getProperty("gatein.gadgets.signingKeyFile");
+
+ File signingKeyFile;
+ if (signingKey == null)
{
- File confDir = new File(confPath);
- if (!confDir.exists())
+ log.warn("The gadgets signing key is not configured. The default oauthkey.pem file in /bin will be used");
+ signingKeyFile = new File("oauthkey.pem");
+ }
+ else
+ {
+ signingKeyFile = new File(signingKey);
+ }
+
+ boolean isCreated = initializeKeyFile(signingKeyFile);
+ if (isCreated)
+ {
+ signingKey_ = signingKeyFile.getAbsolutePath();
+ }
+ }
+
+ private boolean initializeKeyFile(File file)
+ {
+ String keyPath = file.getAbsolutePath();
+ if (file.exists())
+ {
+ if (file.isFile())
{
- log.debug("Exo conf directory (" + confPath + ") does not exist");
+ log.info("Found key file " + keyPath + " for gadgets security");
}
else
{
- if (!confDir.isDirectory())
- {
- log.debug("Exo conf directory (" + confPath + ") is not a directory");
- }
- else
- {
- keyFile = new File(confDir, "gadgets/key.txt");
- }
+ log.error("Found path file " + keyPath + " but it's not a key file");
}
}
-
- if (keyFile == null)
+ else
{
- keyFile = new File("key.txt");
- }
-
- String keyPath = keyFile.getAbsolutePath();
-
- if (!keyFile.exists())
- {
- log.debug("No key file found at path " + keyPath + " generating a new key and saving it");
- File fic = keyFile.getAbsoluteFile();
+ log.debug("No key file found at path " + keyPath + ". it's generating a new key and saving it");
+ File fic = file.getAbsoluteFile();
File parentFolder = fic.getParentFile();
- if (!parentFolder.exists())
- parentFolder.mkdirs();
+ if (!parentFolder.exists()) {
+ if (!parentFolder.mkdirs())
+ {
+ log.error("Coult not create parent folder/s for the key file " + keyPath);
+ return false;
+ }
+ }
String key = generateKey();
Writer out = null;
try
{
- out = new FileWriter(keyFile);
+ out = new FileWriter(file);
out.write(key);
out.write('\n');
- log.info("Generated key file " + keyPath + " for eXo Gadgets");
- setKeyPath(keyPath);
+ log.debug("Generated key file " + keyPath + " for eXo Gadgets");
}
catch (IOException e)
{
- log.error("Coult not create key file " + keyPath, e);
+ log.error("Could not create key file " + keyPath, e);
+ return false;
}
finally
{
Safe.close(out);
}
}
- else if (!keyFile.isFile())
- {
- log.debug("Found key file " + keyPath + " but it's not a file");
- }
- else
- {
- log.info("Found key file " + keyPath + " for gadgets security");
- setKeyPath(keyPath);
- }
+ return true;
}
-
- private void setKeyPath(String keyPath)
+
+ private void setTokenKeyPath(String keyPath)
{
// _keyPath is volatile so no concurrent writes and read are safe
synchronized (ExoContainerConfig.class)
{
- if (_keyPath != null && !_keyPath.equals(keyPath))
+ if (tokenKey_ != null && !tokenKey_.equals(keyPath))
{
- throw new IllegalStateException("There is already a configured key path old=" + _keyPath + " new="
+ throw new IllegalStateException("There is already a configured key path old=" + tokenKey_ + " new="
+ keyPath);
}
- _keyPath = keyPath;
+ tokenKey_ = keyPath;
}
}
@Override
public Object getProperty(String container, String property)
{
- if (property.equals(BlobCrypterSecurityTokenDecoder.SECURITY_TOKEN_KEY_FILE) && _keyPath != null)
+ if (property.equals(BlobCrypterSecurityTokenDecoder.SECURITY_TOKEN_KEY_FILE) && tokenKey_ != null)
{
- return _keyPath;
+ return tokenKey_;
}
+ if (property.equals(ExoOAuthModule.SIGNING_KEY_FILE) && signingKey_ != null)
+ {
+ return signingKey_;
+ }
return super.getProperty(container, property);
}
- // @Override
- // public Object getJson(String container, String parameter) {
- // if (parameter.equals(BlobCrypterSecurityTokenDecoder.SECURITY_TOKEN_KEY_FILE) && _keyPath != null) {
- // return _keyPath;
- // }
- // return super.getJson(container, parameter);
- // }
-
/**
* It's not public as we don't want to expose it to the outter world. The fact that this class
* is instantiated by Guice and the ExoDefaultSecurityTokenGenerator is managed by exo kernel
@@ -186,9 +213,9 @@
*
* @return the key path
*/
- static String getKeyPath()
+ static String getTokenKeyPath()
{
- return _keyPath;
+ return tokenKey_;
}
/**
Modified: portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoDefaultSecurityTokenGenerator.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoDefaultSecurityTokenGenerator.java 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoDefaultSecurityTokenGenerator.java 2011-07-29 03:51:39 UTC (rev 6948)
@@ -27,70 +27,23 @@
import org.apache.shindig.common.crypto.BlobCrypter;
import org.apache.shindig.common.crypto.BlobCrypterException;
import org.apache.shindig.common.util.TimeSource;
-import org.exoplatform.container.monitor.jvm.J2EEServerInfo;
import org.exoplatform.web.application.RequestContext;
public class ExoDefaultSecurityTokenGenerator implements SecurityTokenGenerator
{
- private String containerKey;
-
private final TimeSource timeSource;
public ExoDefaultSecurityTokenGenerator() throws Exception
{
- // TODO should be moved to config
- // generateKeys("RSA", 1024);
- this.containerKey = getKeyFilePath();
this.timeSource = new TimeSource();
}
- // private static void generateKeys(String keyAlgorithm, int numBits) {
- // FileOutputStream keyFile = null;
- // try {
- // keyFile = new FileOutputStream("exokey.pem");
- //
- // // RSA private key
- //
- // CertAndKeyGen cakg = new CertAndKeyGen(keyAlgorithm, "SHA1WithRSA");
- // cakg.generate(1024);
- //
- // PrivateKey privateKey = cakg.getPrivateKey();
- //
- // keyFile.write("-----BEGIN RSA PRIVATE KEY-----\n".getBytes());
- // // wrap at 64
- // int wrapIndex = 64;
- // StringBuffer sb = new StringBuffer(new String(Base64.encode(privateKey.getEncoded())));
- // for (int i = wrapIndex; i < sb.length(); i = i + wrapIndex + 1) {
- // sb.insert(i, "\n");
- // }
- // keyFile.write((sb.toString()).getBytes());
- // keyFile.write("\n-----END RSA PRIVATE KEY-----\n".getBytes());
- //
- // X500Name name = new X500Name("One", "Two", "Three", "Four", "Five", "Six");
- //
- // X509Certificate certificate = cakg.getSelfCertificate(name, 2000000);
- // System.out.println("\n CN: " + certificate.getSubjectDN());
- // keyFile.write("-----BEGIN CERTIFICATE-----\n".getBytes());
- // // wrap at 64
- // wrapIndex = 64;
- // sb = new StringBuffer(new String(Base64.encode(certificate.getEncoded())));
- // for (int i = wrapIndex; i < sb.length(); i = i + wrapIndex + 1) {
- // sb.insert(i, "\n");
- // }
- // keyFile.write(sb.toString().getBytes());
- // keyFile.write("\n-----END CERTIFICATE-----".getBytes());
- // } catch (Exception e) {
- // e.printStackTrace();
- // } finally {
- // Safe.close(keyFile);
- // }
- // }
-
protected String createToken(String gadgetURL, String owner, String viewer, Long moduleId, String container)
{
try
{
- BlobCrypterSecurityToken t = new BlobCrypterSecurityToken(getBlobCrypter(this.containerKey), container, null);
+ BlobCrypter blobCrypter = getBlobCrypter();
+ BlobCrypterSecurityToken t = new BlobCrypterSecurityToken(blobCrypter, container, null);
t.setAppUrl(gadgetURL);
t.setModuleId(moduleId);
@@ -102,13 +55,11 @@
}
catch (IOException e)
{
- e.printStackTrace(); // To change body of catch statement use File |
- // Settings | File Templates.
+ e.printStackTrace();
}
catch (BlobCrypterException e)
{
- e.printStackTrace(); // To change body of catch statement use File |
- // Settings | File Templates.
+ e.printStackTrace();
}
return null;
}
@@ -123,8 +74,9 @@
return createToken(gadgetURL, viewer, rUser, moduleId, "default");
}
- private BlobCrypter getBlobCrypter(String fileName) throws IOException
+ protected BlobCrypter getBlobCrypter() throws IOException
{
+ String fileName = getKeyFilePath();
BasicBlobCrypter c = new BasicBlobCrypter(new File(fileName));
c.timeSource = timeSource;
return c;
@@ -133,22 +85,19 @@
/**
* Method returns a path to the file containing the encryption key
*/
- private String getKeyFilePath(){
- J2EEServerInfo info = new J2EEServerInfo();
- String confPath = info.getExoConfigurationDirectory();
- File keyFile = null;
-
- if (confPath != null) {
- File confDir = new File(confPath);
- if (confDir != null && confDir.exists() && confDir.isDirectory()) {
- keyFile = new File(confDir, "gadgets/key.txt");
- }
- }
+ protected String getKeyFilePath()
+ {
+ String keyPath = ExoContainerConfig.getTokenKeyPath();
+ File keyFile = null;
+ if (keyPath != null)
+ {
+ keyFile = new File(keyPath);
+ }
+ else
+ {
+ keyFile = new File("key.txt");
+ }
- if (keyFile == null) {
- keyFile = new File("key.txt");
- }
-
- return keyFile.getAbsolutePath();
+ return keyFile.getAbsolutePath();
}
}
Modified: portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoOAuthModule.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoOAuthModule.java 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoOAuthModule.java 2011-07-29 03:51:39 UTC (rev 6948)
@@ -19,6 +19,8 @@
package org.exoplatform.portal.gadget.core;
+import com.google.inject.Singleton;
+
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -28,7 +30,6 @@
import org.apache.shindig.common.crypto.BlobCrypter;
import org.apache.shindig.common.util.ResourceLoader;
import org.apache.shindig.config.ContainerConfig;
-import org.apache.shindig.gadgets.http.HttpFetcher;
import org.apache.shindig.gadgets.oauth.BasicOAuthStore;
import org.apache.shindig.gadgets.oauth.BasicOAuthStoreConsumerKeyAndSecret;
import org.apache.shindig.gadgets.oauth.OAuthFetcherConfig;
@@ -50,18 +51,14 @@
*/
public class ExoOAuthModule extends OAuthModule
{
- private static final String SIGNING_KEY_FILE = "gadgets.signingKeyFile";
+ public static final String SIGNING_KEY_FILE = "gadgets.signingKeyFile";
private static final String SIGNING_KEY_NAME = "gadgets.signingKeyName";
private static final String CALLBACK_URL = "gadgets.signing.global-callback-url";
private static final String OAUTH_CONFIG = "config/oauth.json";
- private static final String OAUTH_SIGNING_KEY_FILE = "shindig.signing.key-file";
- private static final String OAUTH_SIGNING_KEY_NAME = "shindig.signing.key-name";
- private static final String OAUTH_CALLBACK_URL = "shindig.signing.global-callback-url";
-
private static final Logger logger = Logger.getLogger(OAuthModule.class.getName());
@Override
@@ -80,6 +77,7 @@
Boolean.TRUE);
}
+ @Singleton
public static class ExoOAuthStoreProvider implements Provider<OAuthStore>
{
@@ -88,18 +86,13 @@
@Inject
public ExoOAuthStoreProvider(ContainerConfig config)
{
- //super(config.getString(ContainerConfig.DEFAULT_CONTAINER, SIGNING_KEY_FILE), config.getString(ContainerConfig.DEFAULT_CONTAINER, SIGNING_KEY_NAME));
-// super(config.getString(ContainerConfig.DEFAULT_CONTAINER, SIGNING_KEY_FILE), config.getString(
-// ContainerConfig.DEFAULT_CONTAINER, SIGNING_KEY_NAME), config.getString(ContainerConfig.DEFAULT_CONTAINER,
-// CALLBACK_URL));
-
store = new ExoOAuthStore();
String signingKeyFile = config.getString(ContainerConfig.DEFAULT_CONTAINER, SIGNING_KEY_FILE);
String signingKeyName = config.getString(ContainerConfig.DEFAULT_CONTAINER, SIGNING_KEY_NAME);
- String defaultCallbackUrl = config.getString(ContainerConfig.DEFAULT_CONTAINER,CALLBACK_URL);
-
loadDefaultKey(signingKeyFile, signingKeyName);
+
+ String defaultCallbackUrl = config.getString(ContainerConfig.DEFAULT_CONTAINER,CALLBACK_URL);
store.setDefaultCallbackUrl(defaultCallbackUrl);
loadConsumers();
}
@@ -128,8 +121,7 @@
" openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM\n" +
'\n' +
"Then edit gadgets.properties and add these lines:\n" +
- OAUTH_SIGNING_KEY_FILE + "=<path-to-oauthkey.pem>\n" +
- OAUTH_SIGNING_KEY_NAME + "=mykey\n");
+ SIGNING_KEY_FILE + "=<path-to-oauthkey.pem>\n");
}
}
@@ -146,24 +138,4 @@
return store;
}
}
-
- public static class ExoOAuthRequestProvider extends OAuthRequestProvider
- {
- private final HttpFetcher fetcher;
-
- private final OAuthFetcherConfig config;
-
- @Inject
- public ExoOAuthRequestProvider(HttpFetcher fetcher, OAuthFetcherConfig config)
- {
- super(fetcher, config);
- this.fetcher = fetcher;
- this.config = config;
- }
-
- public OAuthRequest get()
- {
- return new OAuthRequest(config, fetcher);
- }
- }
}
Deleted: portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/bin/exokey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/bin/exokey.pem 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/bin/exokey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -1,29 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDMYzu2ZJb6Mt89RxjYcPb01clMna7PJTm+UneDYELKjG6EZ4Nu
-+v8Di7e2PxpNlW4cCwUiEkiWBrZH8S1caz4CYIAG+VmKXZXBgmNCINgRVzNtj0/E
-4xi5Yz+G1uGCkaB+1mheJWke1rO6SgL6tJ5LmEYCGGu0mj+vxD8W2i4nBwIDAQAB
-AoGAJS1zwiSf9djlFI9nLI+3zCdLG32fO5zI2R7FEIek/pT20WzG0pwjYPC8NRFb
-Zntk8QLsJxtuSqPj6kgreSEkwRR/YGVIo/xIr46vwl/WydMLKJljvu+E7Y4yjYHb
-X4+FDRSL+huOMNNrHgnMy8WnplvtuW5LNV4kD3izU37jxQECQQD15re+8J3C8O6m
-wt8+5Ed6a+1+BIdFggFFpV4oC2AKE11+dnwxD5ZyB77sg6sCbcWbLTXOyp/CCAY8
-bkp9ZbOBAkEA1MgP7ZKUUrtrIIg0VYaTTH24iMWTOsPbgNWg9DlLzmIagHHmmmLC
-O6gFT05bsNPcFv5a25m+jT1yfvjuKLN+hwJBAJHD544/UjWZ3s5p3C6K4bg3PDwk
-cQ+KBjkD0zHHtHGkkxqBIBNxGwyTfOD1GC1DZw0amrfvsw4w9YljE7ML04ECQHrX
-IPLrm3uDvZ3jZCs37RPMxNsZDR1w8ukW67vy1APK+TfMCfB5MV8VajNVrnOQa9BO
-eY+r26lYnyAUgBG5RkMCQHW5qFDYmgJjb38+uwxd53zGy6m+Jd7kdnGms9V4pPd1
-b21WA/5ncxrpFaz5OFPLtv2zrKYVBAj0tros5hs8Fwk=
------END RSA PRIVATE KEY-----
------BEGIN CERTIFICATE-----
-MIICGzCCAYSgAwIBAgIJAJ/PJcjrAB25MA0GCSqGSIb3DQEBBAUAMBQxEjAQBgNV
-BAMTCW15dGVzdGtleTAeFw0wOTAxMDgwNzUwMjlaFw0xMDAxMDgwNzUwMjlaMBQx
-EjAQBgNVBAMTCW15dGVzdGtleTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-zGM7tmSW+jLfPUcY2HD29NXJTJ2uzyU5vlJ3g2BCyoxuhGeDbvr/A4u3tj8aTZVu
-HAsFIhJIlga2R/EtXGs+AmCABvlZil2VwYJjQiDYEVczbY9PxOMYuWM/htbhgpGg
-ftZoXiVpHtazukoC+rSeS5hGAhhrtJo/r8Q/FtouJwcCAwEAAaN1MHMwHQYDVR0O
-BBYEFB6QdOIZawuedUjT4F+bK9RG8+sMMEQGA1UdIwQ9MDuAFB6QdOIZawuedUjT
-4F+bK9RG8+sMoRikFjAUMRIwEAYDVQQDEwlteXRlc3RrZXmCCQCfzyXI6wAduTAM
-BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAAE/6mmd8/mMyzzFozblp04e
-TonwNrUB7TldXj+0WnYP04u0hNJuFJ/KD29gHdMnYDdOiVdmK/WS6a7Mn+7HVDT7
-wytizzu/Jfvlrr3yMQYCZssvNIbXPTmr+MjLErjkRxYi4quAnkankTNCDxa4mxN3
-WNlNt2SavfSi3d60wd5o
------END CERTIFICATE-----
Deleted: portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/bin/oauthkey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/bin/oauthkey.pem 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/bin/oauthkey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -1,16 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
-GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
-LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
-Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
-fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
-ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
-bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
-XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
-hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
-s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
-4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
-6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
-AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
-CPS2uizmGzwXCQ==
------END PRIVATE KEY-----
Added: portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/oauthkey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/oauthkey.pem (rev 0)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/oauthkey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
+GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
+LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
+Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
+fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
+ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
+bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
+XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
+hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
+s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
+4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
+6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
+AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
+CPS2uizmGzwXCQ==
+-----END PRIVATE KEY-----
Deleted: portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/bin/exokey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/bin/exokey.pem 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/bin/exokey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -1,29 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDMYzu2ZJb6Mt89RxjYcPb01clMna7PJTm+UneDYELKjG6EZ4Nu
-+v8Di7e2PxpNlW4cCwUiEkiWBrZH8S1caz4CYIAG+VmKXZXBgmNCINgRVzNtj0/E
-4xi5Yz+G1uGCkaB+1mheJWke1rO6SgL6tJ5LmEYCGGu0mj+vxD8W2i4nBwIDAQAB
-AoGAJS1zwiSf9djlFI9nLI+3zCdLG32fO5zI2R7FEIek/pT20WzG0pwjYPC8NRFb
-Zntk8QLsJxtuSqPj6kgreSEkwRR/YGVIo/xIr46vwl/WydMLKJljvu+E7Y4yjYHb
-X4+FDRSL+huOMNNrHgnMy8WnplvtuW5LNV4kD3izU37jxQECQQD15re+8J3C8O6m
-wt8+5Ed6a+1+BIdFggFFpV4oC2AKE11+dnwxD5ZyB77sg6sCbcWbLTXOyp/CCAY8
-bkp9ZbOBAkEA1MgP7ZKUUrtrIIg0VYaTTH24iMWTOsPbgNWg9DlLzmIagHHmmmLC
-O6gFT05bsNPcFv5a25m+jT1yfvjuKLN+hwJBAJHD544/UjWZ3s5p3C6K4bg3PDwk
-cQ+KBjkD0zHHtHGkkxqBIBNxGwyTfOD1GC1DZw0amrfvsw4w9YljE7ML04ECQHrX
-IPLrm3uDvZ3jZCs37RPMxNsZDR1w8ukW67vy1APK+TfMCfB5MV8VajNVrnOQa9BO
-eY+r26lYnyAUgBG5RkMCQHW5qFDYmgJjb38+uwxd53zGy6m+Jd7kdnGms9V4pPd1
-b21WA/5ncxrpFaz5OFPLtv2zrKYVBAj0tros5hs8Fwk=
------END RSA PRIVATE KEY-----
------BEGIN CERTIFICATE-----
-MIICGzCCAYSgAwIBAgIJAJ/PJcjrAB25MA0GCSqGSIb3DQEBBAUAMBQxEjAQBgNV
-BAMTCW15dGVzdGtleTAeFw0wOTAxMDgwNzUwMjlaFw0xMDAxMDgwNzUwMjlaMBQx
-EjAQBgNVBAMTCW15dGVzdGtleTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-zGM7tmSW+jLfPUcY2HD29NXJTJ2uzyU5vlJ3g2BCyoxuhGeDbvr/A4u3tj8aTZVu
-HAsFIhJIlga2R/EtXGs+AmCABvlZil2VwYJjQiDYEVczbY9PxOMYuWM/htbhgpGg
-ftZoXiVpHtazukoC+rSeS5hGAhhrtJo/r8Q/FtouJwcCAwEAAaN1MHMwHQYDVR0O
-BBYEFB6QdOIZawuedUjT4F+bK9RG8+sMMEQGA1UdIwQ9MDuAFB6QdOIZawuedUjT
-4F+bK9RG8+sMoRikFjAUMRIwEAYDVQQDEwlteXRlc3RrZXmCCQCfzyXI6wAduTAM
-BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAAE/6mmd8/mMyzzFozblp04e
-TonwNrUB7TldXj+0WnYP04u0hNJuFJ/KD29gHdMnYDdOiVdmK/WS6a7Mn+7HVDT7
-wytizzu/Jfvlrr3yMQYCZssvNIbXPTmr+MjLErjkRxYi4quAnkankTNCDxa4mxN3
-WNlNt2SavfSi3d60wd5o
------END CERTIFICATE-----
Deleted: portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/bin/oauthkey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/bin/oauthkey.pem 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/bin/oauthkey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -1,16 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
-GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
-LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
-Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
-fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
-ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
-bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
-XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
-hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
-s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
-4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
-6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
-AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
-CPS2uizmGzwXCQ==
------END PRIVATE KEY-----
Added: portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/oauthkey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/oauthkey.pem (rev 0)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/gadgets/oauthkey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
+GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
+LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
+Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
+fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
+ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
+bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
+XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
+hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
+s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
+4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
+6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
+AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
+CPS2uizmGzwXCQ==
+-----END PRIVATE KEY-----
Deleted: portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/bin/exokey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/bin/exokey.pem 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/bin/exokey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -1,29 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDMYzu2ZJb6Mt89RxjYcPb01clMna7PJTm+UneDYELKjG6EZ4Nu
-+v8Di7e2PxpNlW4cCwUiEkiWBrZH8S1caz4CYIAG+VmKXZXBgmNCINgRVzNtj0/E
-4xi5Yz+G1uGCkaB+1mheJWke1rO6SgL6tJ5LmEYCGGu0mj+vxD8W2i4nBwIDAQAB
-AoGAJS1zwiSf9djlFI9nLI+3zCdLG32fO5zI2R7FEIek/pT20WzG0pwjYPC8NRFb
-Zntk8QLsJxtuSqPj6kgreSEkwRR/YGVIo/xIr46vwl/WydMLKJljvu+E7Y4yjYHb
-X4+FDRSL+huOMNNrHgnMy8WnplvtuW5LNV4kD3izU37jxQECQQD15re+8J3C8O6m
-wt8+5Ed6a+1+BIdFggFFpV4oC2AKE11+dnwxD5ZyB77sg6sCbcWbLTXOyp/CCAY8
-bkp9ZbOBAkEA1MgP7ZKUUrtrIIg0VYaTTH24iMWTOsPbgNWg9DlLzmIagHHmmmLC
-O6gFT05bsNPcFv5a25m+jT1yfvjuKLN+hwJBAJHD544/UjWZ3s5p3C6K4bg3PDwk
-cQ+KBjkD0zHHtHGkkxqBIBNxGwyTfOD1GC1DZw0amrfvsw4w9YljE7ML04ECQHrX
-IPLrm3uDvZ3jZCs37RPMxNsZDR1w8ukW67vy1APK+TfMCfB5MV8VajNVrnOQa9BO
-eY+r26lYnyAUgBG5RkMCQHW5qFDYmgJjb38+uwxd53zGy6m+Jd7kdnGms9V4pPd1
-b21WA/5ncxrpFaz5OFPLtv2zrKYVBAj0tros5hs8Fwk=
------END RSA PRIVATE KEY-----
------BEGIN CERTIFICATE-----
-MIICGzCCAYSgAwIBAgIJAJ/PJcjrAB25MA0GCSqGSIb3DQEBBAUAMBQxEjAQBgNV
-BAMTCW15dGVzdGtleTAeFw0wOTAxMDgwNzUwMjlaFw0xMDAxMDgwNzUwMjlaMBQx
-EjAQBgNVBAMTCW15dGVzdGtleTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-zGM7tmSW+jLfPUcY2HD29NXJTJ2uzyU5vlJ3g2BCyoxuhGeDbvr/A4u3tj8aTZVu
-HAsFIhJIlga2R/EtXGs+AmCABvlZil2VwYJjQiDYEVczbY9PxOMYuWM/htbhgpGg
-ftZoXiVpHtazukoC+rSeS5hGAhhrtJo/r8Q/FtouJwcCAwEAAaN1MHMwHQYDVR0O
-BBYEFB6QdOIZawuedUjT4F+bK9RG8+sMMEQGA1UdIwQ9MDuAFB6QdOIZawuedUjT
-4F+bK9RG8+sMoRikFjAUMRIwEAYDVQQDEwlteXRlc3RrZXmCCQCfzyXI6wAduTAM
-BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAAE/6mmd8/mMyzzFozblp04e
-TonwNrUB7TldXj+0WnYP04u0hNJuFJ/KD29gHdMnYDdOiVdmK/WS6a7Mn+7HVDT7
-wytizzu/Jfvlrr3yMQYCZssvNIbXPTmr+MjLErjkRxYi4quAnkankTNCDxa4mxN3
-WNlNt2SavfSi3d60wd5o
------END CERTIFICATE-----
Deleted: portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/bin/oauthkey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/bin/oauthkey.pem 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/bin/oauthkey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -1,16 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
-GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
-LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
-Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
-fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
-ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
-bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
-XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
-hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
-s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
-4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
-6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
-AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
-CPS2uizmGzwXCQ==
------END PRIVATE KEY-----
Added: portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/gadgets/oauthkey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/gadgets/oauthkey.pem (rev 0)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/gadgets/oauthkey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
+GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
+LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
+Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
+fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
+ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
+bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
+XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
+hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
+s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
+4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
+6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
+AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
+CPS2uizmGzwXCQ==
+-----END PRIVATE KEY-----
Deleted: portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/exokey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/exokey.pem 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/exokey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -1,29 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDMYzu2ZJb6Mt89RxjYcPb01clMna7PJTm+UneDYELKjG6EZ4Nu
-+v8Di7e2PxpNlW4cCwUiEkiWBrZH8S1caz4CYIAG+VmKXZXBgmNCINgRVzNtj0/E
-4xi5Yz+G1uGCkaB+1mheJWke1rO6SgL6tJ5LmEYCGGu0mj+vxD8W2i4nBwIDAQAB
-AoGAJS1zwiSf9djlFI9nLI+3zCdLG32fO5zI2R7FEIek/pT20WzG0pwjYPC8NRFb
-Zntk8QLsJxtuSqPj6kgreSEkwRR/YGVIo/xIr46vwl/WydMLKJljvu+E7Y4yjYHb
-X4+FDRSL+huOMNNrHgnMy8WnplvtuW5LNV4kD3izU37jxQECQQD15re+8J3C8O6m
-wt8+5Ed6a+1+BIdFggFFpV4oC2AKE11+dnwxD5ZyB77sg6sCbcWbLTXOyp/CCAY8
-bkp9ZbOBAkEA1MgP7ZKUUrtrIIg0VYaTTH24iMWTOsPbgNWg9DlLzmIagHHmmmLC
-O6gFT05bsNPcFv5a25m+jT1yfvjuKLN+hwJBAJHD544/UjWZ3s5p3C6K4bg3PDwk
-cQ+KBjkD0zHHtHGkkxqBIBNxGwyTfOD1GC1DZw0amrfvsw4w9YljE7ML04ECQHrX
-IPLrm3uDvZ3jZCs37RPMxNsZDR1w8ukW67vy1APK+TfMCfB5MV8VajNVrnOQa9BO
-eY+r26lYnyAUgBG5RkMCQHW5qFDYmgJjb38+uwxd53zGy6m+Jd7kdnGms9V4pPd1
-b21WA/5ncxrpFaz5OFPLtv2zrKYVBAj0tros5hs8Fwk=
------END RSA PRIVATE KEY-----
------BEGIN CERTIFICATE-----
-MIICGzCCAYSgAwIBAgIJAJ/PJcjrAB25MA0GCSqGSIb3DQEBBAUAMBQxEjAQBgNV
-BAMTCW15dGVzdGtleTAeFw0wOTAxMDgwNzUwMjlaFw0xMDAxMDgwNzUwMjlaMBQx
-EjAQBgNVBAMTCW15dGVzdGtleTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
-zGM7tmSW+jLfPUcY2HD29NXJTJ2uzyU5vlJ3g2BCyoxuhGeDbvr/A4u3tj8aTZVu
-HAsFIhJIlga2R/EtXGs+AmCABvlZil2VwYJjQiDYEVczbY9PxOMYuWM/htbhgpGg
-ftZoXiVpHtazukoC+rSeS5hGAhhrtJo/r8Q/FtouJwcCAwEAAaN1MHMwHQYDVR0O
-BBYEFB6QdOIZawuedUjT4F+bK9RG8+sMMEQGA1UdIwQ9MDuAFB6QdOIZawuedUjT
-4F+bK9RG8+sMoRikFjAUMRIwEAYDVQQDEwlteXRlc3RrZXmCCQCfzyXI6wAduTAM
-BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAAE/6mmd8/mMyzzFozblp04e
-TonwNrUB7TldXj+0WnYP04u0hNJuFJ/KD29gHdMnYDdOiVdmK/WS6a7Mn+7HVDT7
-wytizzu/Jfvlrr3yMQYCZssvNIbXPTmr+MjLErjkRxYi4quAnkankTNCDxa4mxN3
-WNlNt2SavfSi3d60wd5o
------END CERTIFICATE-----
Deleted: portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/oauthkey.pem
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/oauthkey.pem 2011-07-28 20:25:21 UTC (rev 6947)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/oauthkey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -1,16 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
-GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
-LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
-Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
-fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
-ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
-bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
-XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
-hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
-s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
-4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
-6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
-AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
-CPS2uizmGzwXCQ==
------END PRIVATE KEY-----
Copied: portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/gadgets/oauthkey.pem (from rev 6938, portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/bin/oauthkey.pem)
===================================================================
--- portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/gadgets/oauthkey.pem (rev 0)
+++ portal/branches/branch-GTNPORTAL-1963/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/gadgets/oauthkey.pem 2011-07-29 03:51:39 UTC (rev 6948)
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
+GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
+LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
+Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
+fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
+ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
+bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
+XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
+hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
+s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
+4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
+6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
+AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
+CPS2uizmGzwXCQ==
+-----END PRIVATE KEY-----
13 years, 5 months
gatein SVN: r6947 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-07-28 16:25:21 -0400 (Thu, 28 Jul 2011)
New Revision: 6947
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/SiteImpl.java
Log:
- Added toString implementation.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/SiteImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/SiteImpl.java 2011-07-28 20:18:01 UTC (rev 6946)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/SiteImpl.java 2011-07-28 20:25:21 UTC (rev 6947)
@@ -44,6 +44,12 @@
super(siteId, name, gateIn);
}
+ @Override
+ public String toString()
+ {
+ return getType().getName() + "\n" + getNavigation().toString();
+ }
+
public HierarchicalContainer<String, Page> getPageRegistry()
{
return null; //To change body of implemented methods use File | Settings | File Templates.
13 years, 5 months
gatein SVN: r6946 - in portal/branches/api/packaging: jboss-as6/pkg and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-07-28 16:18:01 -0400 (Thu, 28 Jul 2011)
New Revision: 6946
Modified:
portal/branches/api/packaging/jboss-as5/pkg/pom.xml
portal/branches/api/packaging/jboss-as6/pkg/pom.xml
Log:
- Updated dependencies.
Modified: portal/branches/api/packaging/jboss-as5/pkg/pom.xml
===================================================================
--- portal/branches/api/packaging/jboss-as5/pkg/pom.xml 2011-07-28 19:54:56 UTC (rev 6945)
+++ portal/branches/api/packaging/jboss-as5/pkg/pom.xml 2011-07-28 20:18:01 UTC (rev 6946)
@@ -304,6 +304,10 @@
<groupId>org.gatein.api</groupId>
<artifactId>gatein-java-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>generic-id-impl</artifactId>
+ </dependency>
<!-- Gatein common -->
<dependency>
Modified: portal/branches/api/packaging/jboss-as6/pkg/pom.xml
===================================================================
--- portal/branches/api/packaging/jboss-as6/pkg/pom.xml 2011-07-28 19:54:56 UTC (rev 6945)
+++ portal/branches/api/packaging/jboss-as6/pkg/pom.xml 2011-07-28 20:18:01 UTC (rev 6946)
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -342,6 +343,20 @@
<artifactId>pc-bridge</artifactId>
</dependency>
+ <!-- GateIn API -->
+ <dependency>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>java-api-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>gatein-java-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>generic-id-impl</artifactId>
+ </dependency>
+
<!-- GateIn MOP -->
<dependency>
<groupId>org.gatein.mop</groupId>
@@ -488,9 +503,9 @@
<!-- Provided -->
<dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
@@ -611,8 +626,8 @@
<version>2.0.235</version>
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
@@ -779,19 +794,19 @@
<version>1.2.3</version>
</dependency>
<dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-core</artifactId>
- <version>0.7</version>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-core</artifactId>
+ <version>0.7</version>
</dependency>
<dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-parsers</artifactId>
- <version>0.7</version>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-parsers</artifactId>
+ <version>0.7</version>
</dependency>
<dependency>
- <groupId>com.google.javascript</groupId>
- <artifactId>closure-compiler</artifactId>
- <version>r706</version>
+ <groupId>com.google.javascript</groupId>
+ <artifactId>closure-compiler</artifactId>
+ <version>r706</version>
</dependency>
<dependency>
@@ -908,17 +923,17 @@
<requireProperty>
<property>jbossas.path</property>
<message>"
-You must define the property 'jbossas.path'
-to give the path to the directory where you store your applications servers.
-"
+ You must define the property 'jbossas.path'
+ to give the path to the directory where you store your applications servers.
+ "
</message>
</requireProperty>
<requireProperty>
<property>jbossas.name</property>
<message>"
-You must define the property 'jbossas.name'
-to give the name of the directory where JBoss AS is stored.
-"
+ You must define the property 'jbossas.name'
+ to give the name of the directory where JBoss AS is stored.
+ "
</message>
</requireProperty>
<requireFilesExist>
@@ -926,13 +941,14 @@
<file>${jbossas.path}/${jbossas.name}/</file>
</files>
<message>"
-The following JBoss AS directory doesn't exist :
+ The following JBoss AS directory doesn't exist :
${jbossas.path}/${jbossas.name}
-Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to the correct location of servers directory
-and/or -Djbossas.name=NAME to point to the correct directory under the servers directory.
-You can also use -Pdownload to automatically provide JBoss AS instance.
-"
+ Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to
+ the correct location of servers directory
+ and/or -Djbossas.name=NAME to point to the correct directory under the servers directory.
+ You can also use -Pdownload to automatically provide JBoss AS instance.
+ "
</message>
</requireFilesExist>
</rules>
@@ -968,9 +984,9 @@
<configuration>
<target>
<ant antfile="${project.basedir}/package.xml" inheritRefs="true">
- <target name="package" />
- <property name="maven.project.basedir" value="${project.basedir}" />
- <property name="maven.project.build.directory" value="${project.build.directory}" />
+ <target name="package"/>
+ <property name="maven.project.basedir" value="${project.basedir}"/>
+ <property name="maven.project.build.directory" value="${project.build.directory}"/>
</ant>
</target>
</configuration>
@@ -1007,9 +1023,9 @@
<requireProperty>
<property>exo.projects.directory.dependencies</property>
<message>"
-You must define the property 'exo.projects.directory.dependencies'
-to specify the path to the directory where you store your application servers.
-"
+ You must define the property 'exo.projects.directory.dependencies'
+ to specify the path to the directory where you store your application servers.
+ "
</message>
</requireProperty>
</rules>
@@ -1026,9 +1042,9 @@
<requireProperty>
<property>exo.projects.app.jboss6.version</property>
<message>"
-You must define the property 'exo.projects.app.jboss6.version'
-to specify the name of the directory where JBoss AS is stored.
-"
+ You must define the property 'exo.projects.app.jboss6.version'
+ to specify the name of the directory where JBoss AS is stored.
+ "
</message>
</requireProperty>
</rules>
@@ -1049,13 +1065,15 @@
</file>
</files>
<message>"
-The following JBoss AS directory doesn't exist :
+ The following JBoss AS directory doesn't exist :
${exo.projects.directory.dependencies}/${exo.projects.app.jboss6.version}
-Make JBoss AS instance available at that location, or use -Dexo.projects.directory.dependencies=PATH to point to the correct location
-of servers directory and/or -Dexo.projects.app.jboss6.version=NAME to point to the correct directory under the servers directory.
-You can also use -Pdownload to automatically provide JBoss AS instance.
-"
+ Make JBoss AS instance available at that location, or use
+ -Dexo.projects.directory.dependencies=PATH to point to the correct location
+ of servers directory and/or -Dexo.projects.app.jboss6.version=NAME to point to the
+ correct directory under the servers directory.
+ You can also use -Pdownload to automatically provide JBoss AS instance.
+ "
</message>
</requireFilesExist>
</rules>
@@ -1108,35 +1126,37 @@
</goals>
<configuration>
<target>
- <available property="jbossas.dir.exists" type="dir" file="${jbossas.dir}" />
+ <available property="jbossas.dir.exists" type="dir" file="${jbossas.dir}"/>
<fail if="jbossas.dir.exists">"
-Destination JBossAS directory exists already:
+ Destination JBossAS directory exists already:
${jbossas.dir}
-Either rename it, delete it, or deactivate -Pdownload profile.
-"
+ Either rename it, delete it, or deactivate -Pdownload profile.
+ "
</fail>
- <property name="jbossas.zip" value="${jbossas.path}/jboss-as-distribution-${jbossas.dist.version}.zip" />
+ <property name="jbossas.zip"
+ value="${jbossas.path}/jboss-as-distribution-${jbossas.dist.version}.zip"/>
<!-- Autocreate servers.dir if necessary -->
- <mkdir dir="${jbossas.path}" />
+ <mkdir dir="${jbossas.path}"/>
<!-- Download JBossAS unless already downloaded -->
<ant antfile="${project.basedir}/download-jboss.xml">
- <target name="download-jboss" />
- <property name="url" value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbossas.version..." />
- <property name="dest" value="${jbossas.zip}" />
+ <target name="download-jboss"/>
+ <property name="url"
+ value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbossas.version..."/>
+ <property name="dest" value="${jbossas.zip}"/>
</ant>
<!-- Extract downloaded JBossAS to servers dir -->
- <unzip src="${jbossas.zip}" dest="${jbossas.path}" overwrite="false" />
+ <unzip src="${jbossas.zip}" dest="${jbossas.path}" overwrite="false"/>
<ant antfile="${project.basedir}/package.xml" inheritRefs="true">
- <target name="package" />
- <property name="maven.project.basedir" value="${project.basedir}" />
- <property name="maven.project.build.directory" value="${project.build.directory}" />
+ <target name="package"/>
+ <property name="maven.project.basedir" value="${project.basedir}"/>
+ <property name="maven.project.build.directory" value="${project.build.directory}"/>
</ant>
</target>
</configuration>
@@ -1164,8 +1184,10 @@
</goals>
<configuration>
<target>
- <zip destfile="${project.build.directory}/GateIn-${project.version}-jbossas6.zip" basedir="${jbossas.target.dir}" />
- <attachartifact file="${project.build.directory}/GateIn-${project.version}-jbossas6.zip" classifier="bundle" type="zip" />
+ <zip destfile="${project.build.directory}/GateIn-${project.version}-jbossas6.zip"
+ basedir="${jbossas.target.dir}"/>
+ <attachartifact file="${project.build.directory}/GateIn-${project.version}-jbossas6.zip"
+ classifier="bundle" type="zip"/>
</target>
</configuration>
</execution>
@@ -1221,7 +1243,7 @@
<!-- Copy CDI specific configuration -->
<copy todir="${jbossas.target.dir}" preservelastmodified="true" overwrite="true">
<fileset dir="${project.basedir}/src/main/resources/cdi/jboss">
- <include name="**/*.xml" />
+ <include name="**/*.xml"/>
</fileset>
</copy>
</target>
13 years, 5 months
gatein SVN: r6945 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-07-28 15:54:56 -0400 (Thu, 28 Jul 2011)
New Revision: 6945
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
Log:
- Added property management.
- Reworked how Lifecycle is handled based on API changes.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-07-28 19:52:33 UTC (rev 6944)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-07-28 19:54:56 UTC (rev 6945)
@@ -61,7 +61,6 @@
import org.gatein.api.util.IterableIdentifiableCollection;
import org.gatein.api.util.Type;
import org.gatein.common.util.ParameterValidation;
-import org.gatein.portal.api.impl.lifecycle.NoOpLifecycleManager;
import org.gatein.portal.api.impl.portal.DashboardSiteImpl;
import org.gatein.portal.api.impl.portal.GroupSiteImpl;
import org.gatein.portal.api.impl.portal.PageImpl;
@@ -73,7 +72,9 @@
import java.net.URI;
import java.util.Arrays;
import java.util.Collection;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.regex.Pattern;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
@@ -110,18 +111,38 @@
private ApplicationRegistryService registryService;
private GadgetRegistryService gadgetService;
private SourceStorage sourceStorage;
- private LifecycleManager lcManager = new NoOpLifecycleManager();
+ private Map<Type, Object> properties = new HashMap<Type, Object>(7);
+ private LifecycleManager lcManager = GateIn.NO_OP_MANAGER;
public GateInImpl(ExoContainerContext context, InitParams params, ConfigurationManager configurationManager)
{
container = context.getContainer();
}
- public void setLifecycleManager(LifecycleManager lcManager)
+ public <T> T getProperty(Type<T, GateIn> property)
{
- this.lcManager = lcManager;
+ if (property == null)
+ {
+ return null;
+ }
+
+ Class<T> type = property.getValueType();
+ Object o = properties.get(property);
+ return type.cast(o);
}
+ public <T> void setProperty(Type<T, GateIn> property, T value)
+ {
+ if (property != null)
+ {
+ if (GateIn.LIFECYCLE_MANAGER.equals(property))
+ {
+ lcManager = GateIn.LIFECYCLE_MANAGER.getValueType().cast(value);
+ }
+ properties.put(property, value);
+ }
+ }
+
public IterableIdentifiableCollection<Portal> getPortals()
{
try
13 years, 5 months
gatein SVN: r6944 - portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-07-28 15:52:33 -0400 (Thu, 28 Jul 2011)
New Revision: 6944
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
Log:
- Implemented getURI.
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-07-28 19:09:49 UTC (rev 6943)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/portal/NavigationImpl.java 2011-07-28 19:52:33 UTC (rev 6944)
@@ -41,6 +41,8 @@
import org.gatein.portal.api.impl.GateInImpl;
import org.gatein.portal.api.impl.util.AdaptedIterableIdentifiableCollection;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.Iterator;
import java.util.regex.Pattern;
@@ -51,6 +53,7 @@
private Id<? extends Site> site;
private Id<Navigation> id;
private final GateInImpl gateIn;
+ private URI uri;
private final static Context CONTEXT = GenericContext.builder().requiredComponent("navigation", Navigation.class, Pattern.compile("[a-z0-9]+")).build();
@@ -65,7 +68,7 @@
public String toString()
{
String pageRef = context.getState().getPageRef();
- StringBuilder s = new StringBuilder("Navigation@").append(getId());
+ StringBuilder s = new StringBuilder("Navigation@").append(getId()).append(" URI: ").append(getURI());
if (pageRef != null)
{
@@ -92,6 +95,46 @@
return context;
}
+ public URI getURI()
+ {
+ if (uri != null)
+ {
+ return uri;
+ }
+ else
+ {
+ try
+ {
+ uri = new URI(buildURI().toString());
+ }
+ catch (URISyntaxException e)
+ {
+ throw new RuntimeException(e);
+ }
+ return uri;
+ }
+ }
+
+
+ private StringBuilder buildURI()
+ {
+ NavigationImpl parent = context.getParentNode();
+ if (parent != null)
+ {
+ StringBuilder builder = parent.buildURI();
+ if (builder.length() > 0)
+ {
+ builder.append('/');
+ }
+ return builder.append(context.getName());
+ }
+ else
+ {
+ return new StringBuilder();
+ }
+ }
+
+
public Page getTargetPage()
{
String pageRef = context.getState().getPageRef();
13 years, 5 months
gatein SVN: r6943 - in portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management: operations/navigation and 1 other directory.
by do-not-reply@jboss.org
Author: nscavell
Date: 2011-07-28 15:09:49 -0400 (Thu, 28 Jul 2011)
New Revision: 6943
Modified:
portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java
Log:
Change scope to all when loading fragment navigation. Fix parent-uri for xml.
Modified: portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
===================================================================
--- portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-07-28 18:34:15 UTC (rev 6942)
+++ portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-07-28 19:09:49 UTC (rev 6943)
@@ -105,11 +105,8 @@
{
if (fragment.getParentURI() != null)
{
- String parentUri = fragment.getParentURI().trim();
- if (parentUri.length() > 0)
- {
- writer.writeElement(Element.PARENT_URI, parentUri);
- }
+ String parentUri = fragment.getParentURI();
+ writeOptionalElement(writer, Element.PARENT_URI, parentUri);
}
Collection<PageNode> nodes = fragment.getNodes();
@@ -201,7 +198,17 @@
next = fork.child();
if (next == Element.PARENT_URI)
{
- fragment.setParentURI(fork.getContent());
+ String parentUri = fork.getContent();
+ if (parentUri == null)
+ {
+ parentUri = "";
+ }
+ else if (parentUri.charAt(0) == '/')
+ {
+ parentUri = parentUri.substring(1, parentUri.length());
+ }
+ fragment.setParentURI(parentUri);
+
next = fork.sibling();
}
Modified: portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java
===================================================================
--- portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java 2011-07-28 18:34:15 UTC (rev 6942)
+++ portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java 2011-07-28 19:09:49 UTC (rev 6943)
@@ -28,7 +28,6 @@
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.mop.Described;
-import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.navigation.GenericScope;
import org.exoplatform.portal.mop.navigation.NavigationContext;
@@ -36,7 +35,6 @@
import org.exoplatform.portal.mop.navigation.NodeContext;
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
-import org.gatein.mop.api.workspace.Navigation;
import java.util.ArrayList;
import java.util.Date;
@@ -77,7 +75,7 @@
if (navUri != null)
{
String[] path = trim(navUri.split("/"));
- NodeContext<NodeContext<?>> node = navigationService.loadNode(NodeModel.SELF_MODEL, navigation, GenericScope.branchShape(path), null);
+ NodeContext<NodeContext<?>> node = navigationService.loadNode(NodeModel.SELF_MODEL, navigation, GenericScope.branchShape(path, Scope.ALL), null);
for (String name : path)
{
node = node.get(name);
13 years, 5 months