gatein SVN: r7284 - in portal/branches/api/component/api-impl/src: main/java/org/gatein/portal/api/impl/content and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-09-01 13:22:57 -0400 (Thu, 01 Sep 2011)
New Revision: 7284
Removed:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/AbstractPortlet.java
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/content/ContentRegistryImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/GadgetImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ManagedContentImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/PortletImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/WSRPImpl.java
portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java
Log:
start to unit test portlet content
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-09-01 17:20:20 UTC (rev 7283)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-09-01 17:22:57 UTC (rev 7284)
@@ -496,7 +496,7 @@
final IterableIdentifiableCollection<Site> portals = getPortals();
for (Site portal : portals)
{
- result = ((Portal)portal).getContentRegistry().get((Content.Id)(Id)id);
+ result = ((Portal)portal).getContentRegistry().getContent((Content.Id)(Id)id);
if (result != null)
{
break;
Deleted: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/AbstractPortlet.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/AbstractPortlet.java 2011-09-01 17:20:20 UTC (rev 7283)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/AbstractPortlet.java 2011-09-01 17:22:57 UTC (rev 7284)
@@ -1,47 +0,0 @@
-/*
-* 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.content;
-
-import org.gatein.api.content.Content;
-import org.gatein.api.id.Id;
-import org.gatein.portal.api.impl.GateInImpl;
-import org.gatein.portal.api.impl.IdentifiableImpl;
-
-/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
-public abstract class AbstractPortlet extends IdentifiableImpl<Content, Content.Id> implements Content
-{
- private final org.gatein.pc.api.Portlet portlet;
-
- public AbstractPortlet(Content.Id id, org.gatein.pc.api.Portlet application, GateInImpl gateIn)
- {
- super(id, application.getInfo().getName(), gateIn);
- this.portlet = application;
- }
-
- @Override
- public String toString()
- {
- return getType().getName() + " Portlet '" + getName() + "' @" + getId();
- }
-
-}
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-09-01 17:20:20 UTC (rev 7283)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-09-01 17:22:57 UTC (rev 7284)
@@ -34,14 +34,8 @@
import org.gatein.api.content.Portlet;
import org.gatein.api.content.WSRP;
import org.gatein.api.id.Id;
-import org.gatein.api.util.IterableIdentifiableCollection;
-import org.gatein.pc.api.PortletContext;
-import org.gatein.pc.api.PortletInvokerException;
-import org.gatein.pc.federation.FederatingPortletInvoker;
import org.gatein.portal.api.impl.GateInImpl;
import org.gatein.portal.api.impl.portal.PortalImpl;
-import org.gatein.portal.api.impl.util.AdaptedIterableIdentifiableCollection;
-import org.gatein.portal.api.impl.util.AggregatedIterableIdentifiableCollection;
import java.util.ArrayList;
import java.util.Collection;
@@ -187,6 +181,33 @@
}
}
+ public <C extends Content<C>> C getContent(Content.Id<C> id)
+ {
+ if (id == null)
+ {
+ throw new NullPointerException("No null id accepted");
+ }
+
+ //
+ Class<C> type = id.getIdentifiableType();
+ if (Portlet.class.equals(type))
+ {
+ throw new UnsupportedOperationException("todo for portlet");
+ }
+ if (WSRP.class.equals(type))
+ {
+ throw new UnsupportedOperationException("todo for wsrp");
+ }
+ if (Gadget.class.equals(type))
+ {
+ throw new UnsupportedOperationException("todo for gadget");
+ }
+
+ //
+ throw new IllegalArgumentException("Illegal content type " + type.getSimpleName());
+ }
+
+/*
public Content get(Id<Content> id)
{
Class<Content> type = id.getIdentifiableType();
@@ -220,12 +241,13 @@
gateIn.end();
}
}
+*/
+/*
private Object getPortletFrom(Id<Content> id) throws PortletInvokerException
{
PortletContext portletContext;
Object regitryItem;
-/*
if (!id.knowsComponent(GateInImpl.INVOKER_COMPONENT))
{
portletContext = PortletContext.createPortletContext(id.getComponent(GateInImpl.APPLICATION_COMPONENT), id.getComponent(GateInImpl.PORTLET_COMPONENT));
@@ -237,16 +259,16 @@
regitryItem = gateIn.getPortletInvoker().getPortlet(portletContext);
}
return regitryItem;
-*/
throw new UnsupportedOperationException("disabled for now");
}
+*/
private <T extends Content> Content newContentFrom(Id id, Object registryItem, Class<T> wanted)
{
Object result;
if (Portlet.class.equals(wanted))
{
- result = new PortletImpl((Portlet.Id)id, (org.gatein.pc.api.Portlet)registryItem, gateIn);
+ result = new PortletImpl((org.gatein.pc.api.Portlet)registryItem, gateIn);
}
else if (Gadget.class.equals(wanted))
{
@@ -296,6 +318,7 @@
}
}
+/*
public IterableIdentifiableCollection<Content> getAll()
{
try
@@ -320,7 +343,9 @@
gateIn.end();
}
}
+*/
+/*
public IterableIdentifiableCollection<Content> getLocalPortlets()
{
try
@@ -432,16 +457,5 @@
gateIn.end();
}
}
-
- public int size()
- {
- // todo: optimize
- return getAll().size();
- }
-
- public boolean contains(Id<Content> id)
- {
- // todo: optimize
- return get(id) != null;
- }
+*/
}
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/GadgetImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/GadgetImpl.java 2011-09-01 17:20:20 UTC (rev 7283)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/GadgetImpl.java 2011-09-01 17:22:57 UTC (rev 7284)
@@ -32,13 +32,15 @@
import java.net.URI;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
-public class GadgetImpl extends IdentifiableImpl<org.gatein.api.content.Content, org.gatein.api.content.Content.Id> implements org.gatein.api.content.Gadget
+public class GadgetImpl extends IdentifiableImpl<org.gatein.api.content.Gadget, org.gatein.api.content.Gadget.Id> implements org.gatein.api.content.Gadget
{
private final Gadget gadget;
public GadgetImpl(org.gatein.api.content.Gadget.Id id, Gadget gadget, GateInImpl gateIn)
{
super(id, gadget.getName(), gateIn);
+
+ //
this.gadget = gadget;
}
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ManagedContentImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ManagedContentImpl.java 2011-09-01 17:20:20 UTC (rev 7283)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ManagedContentImpl.java 2011-09-01 17:22:57 UTC (rev 7284)
@@ -96,7 +96,7 @@
{
if (content == null)
{
- content = category.getRegistry().get(contentId);
+ content = category.getRegistry().getContent(contentId);
}
return content;
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/PortletImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/PortletImpl.java 2011-09-01 17:20:20 UTC (rev 7283)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/PortletImpl.java 2011-09-01 17:22:57 UTC (rev 7284)
@@ -24,16 +24,26 @@
import org.gatein.api.content.Content;
import org.gatein.api.content.Portlet;
-import org.gatein.api.id.Id;
import org.gatein.api.util.Type;
import org.gatein.portal.api.impl.GateInImpl;
+import org.gatein.portal.api.impl.IdentifiableImpl;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
-public class PortletImpl extends AbstractPortlet implements Portlet
+public class PortletImpl extends IdentifiableImpl<Portlet, Portlet.Id> implements Portlet
{
- public PortletImpl(Portlet.Id id, org.gatein.pc.api.Portlet application, GateInImpl gateIn)
+
+ /** . */
+ private final org.gatein.pc.api.Portlet portlet;
+
+ public PortletImpl(org.gatein.pc.api.Portlet portlet, GateInImpl gateIn)
{
- super(id, application, gateIn);
+ super(
+ new Id(portlet.getInfo().getApplicationName(), portlet.getInfo().getName()),
+ "todo?",
+ gateIn);
+
+ //
+ this.portlet = portlet;
}
public Type<Portlet> getType()
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/WSRPImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/WSRPImpl.java 2011-09-01 17:20:20 UTC (rev 7283)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/WSRPImpl.java 2011-09-01 17:22:57 UTC (rev 7284)
@@ -23,17 +23,26 @@
package org.gatein.portal.api.impl.content;
import org.gatein.api.content.Content;
+import org.gatein.api.content.Portlet;
import org.gatein.api.content.WSRP;
import org.gatein.api.id.Id;
import org.gatein.api.util.Type;
import org.gatein.portal.api.impl.GateInImpl;
+import org.gatein.portal.api.impl.IdentifiableImpl;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
-public class WSRPImpl extends AbstractPortlet implements WSRP
+public class WSRPImpl extends IdentifiableImpl<WSRP, WSRP.Id> implements WSRP
{
- public WSRPImpl(WSRP.Id id, org.gatein.pc.api.Portlet application, GateInImpl gateIn)
+
+ /** . */
+ private final org.gatein.pc.api.Portlet portlet;
+
+ public WSRPImpl(WSRP.Id id, org.gatein.pc.api.Portlet portlet, GateInImpl gateIn)
{
- super(id, application, gateIn);
+ super(id, "todo???", gateIn);
+
+ //
+ this.portlet = portlet;
}
public Type<WSRP> getType()
Modified: portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java
===================================================================
--- portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java 2011-09-01 17:20:20 UTC (rev 7283)
+++ portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java 2011-09-01 17:22:57 UTC (rev 7284)
@@ -3,6 +3,7 @@
import org.exoplatform.portal.mop.SiteType;
import org.gatein.api.content.Category;
import org.gatein.api.content.ContentRegistry;
+import org.gatein.api.content.Portlet;
import org.gatein.portal.api.impl.AbstractAPITestCase;
import java.util.Collections;
@@ -32,4 +33,15 @@
Category.Id id = administration.getId();
assertEquals("administration", id.getName());
}
+
+ public void testGetContent()
+ {
+ createSite(SiteType.PORTAL, "classic");
+
+ //
+ ContentRegistry registry = gatein.getDefaultPortal().getContentRegistry();
+
+ //
+ registry.getContent(new Portlet.Id("foo", "bar"));
+ }
}
13 years, 1 month
gatein SVN: r7283 - in components/wsrp/branches/clustering: admin-gui and 20 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-01 13:20:20 -0400 (Thu, 01 Sep 2011)
New Revision: 7283
Modified:
components/wsrp/branches/clustering/
components/wsrp/branches/clustering/admin-gui/pom.xml
components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
components/wsrp/branches/clustering/api/pom.xml
components/wsrp/branches/clustering/common/pom.xml
components/wsrp/branches/clustering/consumer/pom.xml
components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
components/wsrp/branches/clustering/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
components/wsrp/branches/clustering/hibernate-impl/pom.xml
components/wsrp/branches/clustering/jcr-impl/pom.xml
components/wsrp/branches/clustering/pom.xml
components/wsrp/branches/clustering/producer/pom.xml
components/wsrp/branches/clustering/test/pom.xml
components/wsrp/branches/clustering/ws-security/jboss5/pom.xml
components/wsrp/branches/clustering/ws-security/pom.xml
components/wsrp/branches/clustering/ws-security/wsrp-producer-jb5wss-producer-war/pom.xml
components/wsrp/branches/clustering/ws-security/wss/pom.xml
components/wsrp/branches/clustering/wsrp-producer-war/pom.xml
components/wsrp/branches/clustering/wsrp-producer-war/src/test/assembly/test-producer.xml
components/wsrp/branches/clustering/wsrp-producer-war/src/test/producer-sar/portlet-container.war/WEB-INF/jboss-beans.xml
components/wsrp/branches/clustering/wsrp-producer-war/src/test/test-portlets/test-basic-portlet-war/WEB-INF/portlet.xml
components/wsrp/branches/clustering/wsrp1-ws/pom.xml
components/wsrp/branches/clustering/wsrp2-ws/pom.xml
Log:
- Merged changes from trunk (r7210 through r7282)
Property changes on: components/wsrp/branches/clustering
___________________________________________________________________
Added: svn:mergeinfo
+ /components/wsrp/trunk:7210-7282
Modified: components/wsrp/branches/clustering/admin-gui/pom.xml
===================================================================
--- components/wsrp/branches/clustering/admin-gui/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/admin-gui/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-admin-gui</artifactId>
Modified: components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, 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.
@@ -24,7 +24,6 @@
package org.gatein.wsrp.admin.ui;
import org.gatein.common.util.ParameterValidation;
-import org.gatein.pc.api.PortletInvokerException;
import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.RefreshResult;
@@ -311,7 +310,7 @@
}
return result;
}
- catch (PortletInvokerException e)
+ catch (Exception e)
{
beanContext.createErrorMessageFrom(e);
return null;
Modified: components/wsrp/branches/clustering/api/pom.xml
===================================================================
--- components/wsrp/branches/clustering/api/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/api/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-integration-api</artifactId>
Modified: components/wsrp/branches/clustering/common/pom.xml
===================================================================
--- components/wsrp/branches/clustering/common/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/common/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-common</artifactId>
Modified: components/wsrp/branches/clustering/consumer/pom.xml
===================================================================
--- components/wsrp/branches/clustering/consumer/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/consumer/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-consumer</artifactId>
Modified: components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
===================================================================
--- components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java 2011-09-01 17:20:20 UTC (rev 7283)
@@ -622,6 +622,7 @@
{
log.debug("Using default registration data for producer '" + producerId + "'");
registrationData = WSRPTypeFactory.createDefaultRegistrationData();
+ registrationData.setConsumerName(getConsumerName());
result.setStatus(RefreshResult.Status.SUCCESS);
}
}
Modified: components/wsrp/branches/clustering/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
===================================================================
--- components/wsrp/branches/clustering/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, 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.
@@ -248,7 +248,6 @@
return false;
}
- @Override
public boolean isWSSAvailable()
{
return false;
Modified: components/wsrp/branches/clustering/hibernate-impl/pom.xml
===================================================================
--- components/wsrp/branches/clustering/hibernate-impl/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/hibernate-impl/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -22,13 +22,14 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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/xsd/maven-4.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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/branches/clustering/jcr-impl/pom.xml
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/jcr-impl/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -22,11 +22,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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/xsd/maven-4.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/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>wsrp-parent</artifactId>
<groupId>org.gatein.wsrp</groupId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/branches/clustering/pom.xml
===================================================================
--- components/wsrp/branches/clustering/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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>
@@ -29,7 +30,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -46,7 +47,7 @@
</scm>
<properties>
- <org.gatein.pc.version>2.3.0-Beta03</org.gatein.pc.version>
+ <org.gatein.pc.version>2.3.0-Beta05</org.gatein.pc.version>
<org.gatein.common.version>2.0.4-Beta02</org.gatein.common.version>
<org.gatein.wci.version>2.1.0-Beta01</org.gatein.wci.version>
Modified: components/wsrp/branches/clustering/producer/pom.xml
===================================================================
--- components/wsrp/branches/clustering/producer/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/producer/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-lib</artifactId>
Modified: components/wsrp/branches/clustering/test/pom.xml
===================================================================
--- components/wsrp/branches/clustering/test/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/test/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -22,11 +22,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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/xsd/maven-4.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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/branches/clustering/ws-security/jboss5/pom.xml
===================================================================
--- components/wsrp/branches/clustering/ws-security/jboss5/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/ws-security/jboss5/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-wss-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wss-jboss5</artifactId>
Modified: components/wsrp/branches/clustering/ws-security/pom.xml
===================================================================
--- components/wsrp/branches/clustering/ws-security/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/ws-security/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -21,13 +21,14 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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>
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<artifactId>wsrp-wss-parent</artifactId>
Modified: components/wsrp/branches/clustering/ws-security/wsrp-producer-jb5wss-producer-war/pom.xml
===================================================================
--- components/wsrp/branches/clustering/ws-security/wsrp-producer-jb5wss-producer-war/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/ws-security/wsrp-producer-jb5wss-producer-war/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-wss-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-jb5wss</artifactId>
@@ -59,12 +60,12 @@
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
- <overlays>
- <overlay>
- <groupId>org.gatein.wsrp</groupId>
- <artifactId>wsrp-producer</artifactId>
- </overlay>
- </overlays>
+ <overlays>
+ <overlay>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-producer</artifactId>
+ </overlay>
+ </overlays>
</configuration>
</plugin>
</plugins>
Modified: components/wsrp/branches/clustering/ws-security/wss/pom.xml
===================================================================
--- components/wsrp/branches/clustering/ws-security/wss/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/ws-security/wss/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-wss-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wss</artifactId>
Modified: components/wsrp/branches/clustering/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/branches/clustering/wsrp-producer-war/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/wsrp-producer-war/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -22,11 +22,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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/xsd/maven-4.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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -328,11 +329,12 @@
<scope>test</scope>
<version>${org.gatein.pc.version}</version>
</dependency>
+ <!-- Staxnav needed for PC -->
<dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-mc</artifactId>
+ <groupId>org.staxnav</groupId>
+ <artifactId>staxnav.core</artifactId>
+ <version>0.9.4</version>
<scope>test</scope>
- <version>${org.gatein.pc.version}</version>
</dependency>
<dependency>
Modified: components/wsrp/branches/clustering/wsrp-producer-war/src/test/assembly/test-producer.xml
===================================================================
--- components/wsrp/branches/clustering/wsrp-producer-war/src/test/assembly/test-producer.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/wsrp-producer-war/src/test/assembly/test-producer.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,3 +1,26 @@
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2011, 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.
+ -->
+
<assembly>
<id>producer</id>
<formats>
@@ -46,7 +69,7 @@
<include>javax.portlet:portlet-api</include>
<include>org.gatein.pc:pc-controller</include>
- <include>org.gatein.pc:pc-mc</include>
+ <include>org.staxnav:staxnav.core</include>
<include>org.gatein.common:common-common</include>
<include>org.gatein.common:common-logging</include>
Modified: components/wsrp/branches/clustering/wsrp-producer-war/src/test/producer-sar/portlet-container.war/WEB-INF/jboss-beans.xml
===================================================================
--- components/wsrp/branches/clustering/wsrp-producer-war/src/test/producer-sar/portlet-container.war/WEB-INF/jboss-beans.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/wsrp-producer-war/src/test/producer-sar/portlet-container.war/WEB-INF/jboss-beans.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -23,7 +23,7 @@
-->
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="PortletApplicationDeployer" class="org.gatein.pc.mc.PortletApplicationDeployer">
+ <bean name="PortletApplicationDeployer" class="org.gatein.pc.portlet.impl.deployment.PortletApplicationDeployer">
<alias>PortletApplicationRegistry</alias>
<property name="servletContainerFactory">
<inject bean="ServletContainerFactory"/>
Modified: components/wsrp/branches/clustering/wsrp-producer-war/src/test/test-portlets/test-basic-portlet-war/WEB-INF/portlet.xml
===================================================================
--- components/wsrp/branches/clustering/wsrp-producer-war/src/test/test-portlets/test-basic-portlet-war/WEB-INF/portlet.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/wsrp-producer-war/src/test/test-portlets/test-basic-portlet-war/WEB-INF/portlet.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -50,15 +50,15 @@
<value>prefValue2</value>
</preference>
</portlet-preferences>
+ <supported-processing-event>
+ <qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:ZipEvent</qname>
+ </supported-processing-event>
<supported-publishing-event>
<qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:ZipEvent</qname>
</supported-publishing-event>
<supported-publishing-event>
<qname xmlns:gtn='urn:jboss:gatein'>gtn:foo</qname>
</supported-publishing-event>
- <supported-processing-event>
- <qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:ZipEvent</qname>
- </supported-processing-event>
<supported-public-render-parameter>zipcode</supported-public-render-parameter>
<supported-public-render-parameter>foo</supported-public-render-parameter>
</portlet>
@@ -69,9 +69,9 @@
</event-definition>
<event-definition>
<qname xmlns:gtn='urn:jboss:gatein'>gtn:foo</qname>
- <value-type>java.lang.String</value-type>
<alias xmlns:gtn='urn:jboss:gatein'>gtn:bar</alias>
<alias xmlns:gtn='urn:jboss:gatein'>gtn:baz</alias>
+ <value-type>java.lang.String</value-type>
</event-definition>
<public-render-parameter>
@@ -79,9 +79,9 @@
<qname xmlns:g='urn:jboss:portal:simple:google'>g:zipcode</qname>
</public-render-parameter>
<public-render-parameter>
+ <description>Foo param</description>
<identifier>foo</identifier>
<qname xmlns:gtn='urn:jboss:gatein'>gtn:fooparam</qname>
- <description>Foo param</description>
<alias xmlns:gtn='urn:jboss:gatein'>gtn:barparam</alias>
<alias xmlns:gtn='urn:jboss:gatein'>gtn:bazparam</alias>
</public-render-parameter>
Modified: components/wsrp/branches/clustering/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/branches/clustering/wsrp1-ws/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/wsrp1-ws/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -21,11 +21,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp1-ws</artifactId>
Modified: components/wsrp/branches/clustering/wsrp2-ws/pom.xml
===================================================================
--- components/wsrp/branches/clustering/wsrp2-ws/pom.xml 2011-09-01 16:44:04 UTC (rev 7282)
+++ components/wsrp/branches/clustering/wsrp2-ws/pom.xml 2011-09-01 17:20:20 UTC (rev 7283)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2011, 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.
@@ -22,11 +22,12 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<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/xsd/maven-4.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/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>wsrp-parent</artifactId>
<groupId>org.gatein.wsrp</groupId>
- <version>2.1.0-CR01-SNAPSHOT</version>
+ <version>2.1.0-Beta06-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp2-ws</artifactId>
13 years, 1 month
gatein SVN: r7282 - components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-01 12:44:04 -0400 (Thu, 01 Sep 2011)
New Revision: 7282
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
Log:
- Removed improper @Override annotation.
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2011-09-01 16:43:24 UTC (rev 7281)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2011-09-01 16:44:04 UTC (rev 7282)
@@ -248,7 +248,6 @@
return false;
}
- @Override
public boolean isWSSAvailable()
{
return false;
13 years, 1 month
gatein SVN: r7281 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-01 12:43:24 -0400 (Thu, 01 Sep 2011)
New Revision: 7281
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
Log:
- Default registration should still properly set the consumer name.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java 2011-09-01 16:26:40 UTC (rev 7280)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java 2011-09-01 16:43:24 UTC (rev 7281)
@@ -577,6 +577,7 @@
{
log.debug("Using default registration data for producer '" + producerId + "'");
registrationData = WSRPTypeFactory.createDefaultRegistrationData();
+ registrationData.setConsumerName(getConsumerName());
result.setStatus(RefreshResult.Status.SUCCESS);
}
}
13 years, 1 month
gatein SVN: r7280 - in epp/portal/branches/EPP_5_2_Branch: component/portal/src/main/java/org/exoplatform/portal/config and 5 other directories.
by do-not-reply@jboss.org
Author: theute
Date: 2011-09-01 12:26:40 -0400 (Thu, 01 Sep 2011)
New Revision: 7280
Added:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport0-configuration.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
Log:
JBEPP-1129: Navigation is not being imported on fresh installation for multiple extensions targeting the same site's navigation.
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7210
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7210,7262
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-09-01 16:13:48 UTC (rev 7279)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-09-01 16:26:40 UTC (rev 7280)
@@ -40,7 +40,6 @@
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.UnmarshalledObject;
-import org.exoplatform.portal.config.model.Version;
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.exoplatform.portal.pom.config.POMSession;
@@ -70,6 +69,9 @@
{
/** . */
+ private final UserPortalConfigService owner_;
+
+ /** . */
private ConfigurationManager cmanager_;
/** . */
@@ -115,6 +117,7 @@
private DescriptionService descriptionService_;
public NewPortalConfigListener(
+ UserPortalConfigService owner,
POMSessionManager pomMgr,
DataStorage dataStorage,
ConfigurationManager cmanager,
@@ -123,6 +126,7 @@
DescriptionService descriptionService)
throws Exception
{
+ owner_ = owner;
cmanager_ = cmanager;
dataStorage_ = dataStorage;
navigationService_ = navigationService;
@@ -538,7 +542,6 @@
//
PageNavigation navigation = obj.getObject();
- boolean extendedNavigation = obj.getVersion() == Version.V_1_2;
//
ImportMode importMode;
@@ -548,7 +551,7 @@
}
else
{
- importMode = ImportMode.CONSERVE;
+ importMode = owner_.getDefaultImportMode();
}
//
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java 2011-09-01 16:13:48 UTC (rev 7279)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfigService.java 2011-09-01 16:26:40 UTC (rev 7280)
@@ -31,6 +31,7 @@
import org.exoplatform.portal.config.model.TransientApplicationState;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.description.DescriptionService;
+import org.exoplatform.portal.mop.importer.ImportMode;
import org.exoplatform.portal.mop.navigation.NavigationContext;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.exoplatform.portal.mop.navigation.NavigationState;
@@ -71,6 +72,9 @@
/** . */
boolean destroyUserPortal;
+ /** . */
+ private final ImportMode defaultImportMode;
+
private Log log = ExoLogger.getLogger("Portal:UserPortalConfigService");
public UserPortalConfigService(
@@ -91,6 +95,10 @@
boolean destroyUserPortal = destroyUserPortalParam == null || destroyUserPortalParam.getValue().toLowerCase().trim().equals("true");
//
+ ValueParam defaultImportModeParam = params == null ? null : params.getValueParam("default.import.mode");
+ ImportMode defaultImportMode = defaultImportModeParam == null ? ImportMode.CONSERVE : ImportMode.valueOf(defaultImportModeParam.getValue().toUpperCase().trim());
+
+ //
this.storage_ = storage;
this.orgService_ = orgService;
this.userACL_ = userACL;
@@ -98,8 +106,14 @@
this.descriptionService = descriptionService;
this.createUserPortal = createUserPortal;
this.destroyUserPortal = destroyUserPortal;
+ this.defaultImportMode = defaultImportMode;
}
+ public ImportMode getDefaultImportMode()
+ {
+ return defaultImportMode;
+ }
+
public boolean getCreateUserPortal()
{
return createUserPortal;
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2011-09-01 16:13:48 UTC (rev 7279)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2011-09-01 16:26:40 UTC (rev 7280)
@@ -195,15 +195,15 @@
{
if (model == null)
{
- throw new NullPointerException();
+ throw new NullPointerException("No null model accepted");
}
if (navigation == null)
{
- throw new NullPointerException();
+ throw new NullPointerException("No null navigation accepted");
}
if (scope == null)
{
- throw new NullPointerException();
+ throw new NullPointerException("No null scope accepted");
}
String nodeId = navigation.data.rootId;
if (navigation.data.rootId != null)
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java 2011-09-01 16:13:48 UTC (rev 7279)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java 2011-09-01 16:26:40 UTC (rev 7280)
@@ -24,10 +24,19 @@
import org.exoplatform.component.test.KernelBootstrap;
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.component.RequestLifeCycle;
+import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.importer.Imported;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.mop.navigation.Node;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.mop.api.workspace.Workspace;
+import java.io.File;
+import java.util.Collection;
+
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
*/
@@ -59,4 +68,35 @@
RequestLifeCycle.end();
bootstrap.dispose();
}
+
+ public void testDefaultMode() throws Exception
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ bootstrap.addConfiguration(ContainerScope.PORTAL, "conf/exo.portal.component.test.jcr-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL, "conf/exo.portal.component.identity-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL, "conf/exo.portal.component.portal-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL, "org/exoplatform/portal/config/TestImport0-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL, "org/exoplatform/portal/config/TestImport1-configuration.xml");
+ System.setProperty("import.portal.0", "navigation2");
+ System.setProperty("override.1", "false");
+ System.setProperty("import.mode.1", "merge");
+ System.setProperty("import.portal.1", "navigation1");
+
+ //
+ bootstrap.boot();
+
+ //
+ PortalContainer container = bootstrap.getContainer();
+ NavigationService service = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
+ RequestLifeCycle.begin(container);
+ NavigationContext nav = service.loadNavigation(SiteKey.portal("classic"));
+ NodeContext<Node> root = service.loadNode(Node.MODEL, nav, Scope.ALL, null);
+ Collection<Node> c = root.getNodes();
+ assertEquals(3, c.size());
+ assertNotNull(root.get("foo"));
+ assertNotNull(root.get("daa"));
+ assertNotNull(root.get("bar"));
+ RequestLifeCycle.end();
+ bootstrap.dispose();
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-09-01 16:13:48 UTC (rev 7279)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-09-01 16:26:40 UTC (rev 7280)
@@ -114,6 +114,12 @@
<component>
<key>org.exoplatform.portal.config.UserPortalConfigService</key>
<type>org.exoplatform.portal.config.UserPortalConfigService</type>
+ <init-params>
+ <value-param>
+ <name>default.import.mode</name>
+ <value>merge</value>
+ </value-param>
+ </init-params>
</component>
<external-component-plugins>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport0-configuration.xml (from rev 7262, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport0-configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport0-configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport0-configuration.xml 2011-09-01 16:26:40 UTC (rev 7280)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 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
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
+ <component-plugin>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <priority>1</priority>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <value>classic</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>classic</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/portal/config/${import.portal.0}-conf</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-09-01 16:13:48 UTC (rev 7279)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-09-01 16:26:40 UTC (rev 7280)
@@ -226,6 +226,10 @@
<name>destroy.user.portal</name>
<value>${gatein.portal.idm.destroyserportal}</value>
</value-param>
+ <value-param>
+ <name>default.import.mode</name>
+ <value>merge</value>
+ </value-param>
</init-params>
</component>
13 years, 1 month
gatein SVN: r7279 - in components/pc/trunk/federation/src: main/java/org/gatein/pc/federation/impl and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-01 12:13:48 -0400 (Thu, 01 Sep 2011)
New Revision: 7279
Modified:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/NoInvokersTestCase.java
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/OneInvokerNoPortletsTestCase.java
Log:
- GTNPC-71: first steps towards making FederatingPortletInvoker work in a distributed context: make it go through NullInvokerHandler (which should be renamed to something more appropriate) to resolve non-locally present invokers. Might replace Map by distributed cache at some point, though it might not be needed with appropriate implementation of NullInvokerHandler.
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java 2011-09-01 14:51:53 UTC (rev 7278)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java 2011-09-01 16:13:48 UTC (rev 7279)
@@ -49,7 +49,10 @@
FederatedPortletInvoker registerInvoker(String federatedId, PortletInvoker registeredInvoker) throws IllegalArgumentException;
/**
- * Return a portlet invoker registered or null if not found
+ * Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to the {@link
+ * NullInvokerHandler} specified using {@link #setNullInvokerHandler(NullInvokerHandler)} if it's not initially
+ * resolved or returns <code>null</code> if a FederatedPortletInvoker is not found after going through the specified
+ * NullInvokerHandler resolution mechanism.
*
* @param federatedId the id
* @return the invoker
@@ -58,13 +61,34 @@
FederatedPortletInvoker getFederatedInvoker(String federatedId) throws IllegalArgumentException;
/**
- * Return the registered portlet invokers.
+ * Returns the known portlet invoker identifiers, including resolvable ones (though they might not have been already
+ * resolved).
*
- * @return a collection that contains the portlet invokers
+ * @return a collection of all the resolvable portlet invoker identifiers
*/
- Collection<FederatedPortletInvoker> getFederatedInvokers();
+ Collection<String> getFederatedInvokerIds();
/**
+ * Returns only the portlet invoker identifiers of the currently resolved invokers, which might be different from
+ * the
+ * set potentially resolvable invokers as returned by {@link #getFederatedInvokerIds()}.
+ *
+ * @return a collection of the currently resolved portlet invoker identifiers
+ */
+ Collection<String> getResolvedInvokerIds();
+
+ /**
+ * Determines whether the FederatedPortletInvoker with the specified identifier has already been resolved.
+ *
+ * @param federatedId the identifier of the FederatedPortletInvoker to test for resolution status
+ * @return <code>true</code> if the specified invoker is already resolved, <code>false</code> otherwise
+ * @throws IllegalArgumentException if the specified invoker identifier is not among the known resolvable
+ * identifiers
+ * as returned by {@link #getFederatedInvokerIds()}
+ */
+ boolean isResolved(String federatedId) throws IllegalArgumentException;
+
+ /**
* Unregisters the invoker associated with the specified identifier.
*
* @param federatedId the identifier of the invoker to unregister
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java 2011-09-01 14:51:53 UTC (rev 7278)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java 2011-09-01 16:13:48 UTC (rev 7279)
@@ -25,6 +25,9 @@
import org.gatein.pc.api.NoSuchPortletException;
+import java.util.Collection;
+import java.util.Collections;
+
/**
* Encapsulates behavior to resolve FederatedPortletInvokers in the context of a FederatingPortletInvoker when the
* default resolution mechanism fails to retrieve an associated FederatedPortletInvoker.
@@ -40,25 +43,47 @@
*/
NullInvokerHandler DEFAULT_HANDLER = new NullInvokerHandler()
{
- public FederatedPortletInvoker resolvePortletInvokerFor(String compoundPortletId, String invokerId,
- FederatingPortletInvoker callingInvoker) throws NoSuchPortletException
+ public FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException
{
- throw new NoSuchPortletException(compoundPortletId);
+ if (compoundPortletId != null)
+ {
+ throw new NoSuchPortletException(compoundPortletId);
+ }
+ else
+ {
+ return null;
+ }
}
+
+ public boolean knows(String invokerId)
+ {
+ return false;
+ }
+
+ public Collection<String> getKnownInvokerIds()
+ {
+ return Collections.emptyList();
+ }
};
/**
- * Attempts to resolve a FederatedPortletInvoker for the specified compound portlet id in the context of the
- * specified calling FederatingPortletInvoker.
+ * Attempts to resolve a FederatedPortletInvoker with the specified identifier in the context of the specified
+ * calling FederatingPortletInvoker, optionally trying to perform resolution to invoke an action on the specified
+ * portlet identifier.
*
- * @param compoundPortletId the portlet identifier for which we're trying to resolve a FederatedPortletInvoker
- * @param invokerId the identifier of the FederatedPortletInvoker to be retrieved as parsed from the compound
- * portlet id by the calling FederatingPortletInvoker
+ * @param invokerId the identifier of the FederatedPortletInvoker to be retrieved. Should match the optional
+ * compound portlet identifier if one is specified.
* @param callingInvoker the calling FederatingPortletInvoker which failed to resolve a FederatedPortletInvoker
- * for the specified portlet id
+ * for the specified invoker identifier
+ * @param compoundPortletId an optional portlet identifier for which we are trying to resolve an invoker, if no such
+ * portlet identifier is required for the resolution, this argument should be
+ * <code>null</code> and implementations should be prepared for that case.
* @return
* @throws NoSuchPortletException
*/
- FederatedPortletInvoker resolvePortletInvokerFor(String compoundPortletId, String invokerId,
- FederatingPortletInvoker callingInvoker) throws NoSuchPortletException;
+ FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException;
+
+ boolean knows(String invokerId);
+
+ Collection<String> getKnownInvokerIds();
}
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-09-01 14:51:53 UTC (rev 7278)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-09-01 16:13:48 UTC (rev 7279)
@@ -32,7 +32,6 @@
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.pc.api.PortletStateType;
import org.gatein.pc.api.PortletStatus;
-import org.gatein.pc.api.StatefulPortletContext;
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
import org.gatein.pc.api.state.DestroyCloneFailure;
@@ -45,6 +44,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
@@ -63,7 +63,7 @@
private static final Logger log = LoggerFactory.getLogger(FederatingPortletInvokerService.class);
/** The registred FederatedPortletInvokers. */
- private volatile Map<String, FederatedPortletInvoker> registry = new HashMap<String, FederatedPortletInvoker>();
+ private volatile Map<String, FederatedPortletInvoker> invokerCache = new HashMap<String, FederatedPortletInvoker>();
private NullInvokerHandler nullHandler = NullInvokerHandler.DEFAULT_HANDLER;
@@ -77,14 +77,15 @@
{
throw new IllegalArgumentException("No null invoker");
}
- if (registry.containsKey(federatedId))
+ if (invokerCache.containsKey(federatedId))
{
throw new IllegalArgumentException("Attempting dual registration of " + federatedId);
}
- Map<String, FederatedPortletInvoker> copy = new HashMap<String, FederatedPortletInvoker>(registry);
+
+ Map<String, FederatedPortletInvoker> copy = new HashMap<String, FederatedPortletInvoker>(invokerCache);
FederatedPortletInvokerService invoker = new FederatedPortletInvokerService(this, federatedId, federatedInvoker);
copy.put(federatedId, invoker);
- registry = copy;
+ invokerCache = copy;
return invoker;
}
@@ -94,13 +95,13 @@
{
throw new IllegalArgumentException("No null id accepted");
}
- if (!registry.containsKey(federatedId))
+ if (!invokerCache.containsKey(federatedId) && !nullHandler.knows(federatedId))
{
throw new IllegalArgumentException("Attempting to unregister unknown invoker " + federatedId);
}
- Map<String, FederatedPortletInvoker> copy = new HashMap<String, FederatedPortletInvoker>(registry);
+ Map<String, FederatedPortletInvoker> copy = new HashMap<String, FederatedPortletInvoker>(invokerCache);
copy.remove(federatedId);
- registry = copy;
+ invokerCache = copy;
}
public FederatedPortletInvoker getFederatedInvoker(String federatedId) throws IllegalArgumentException
@@ -109,31 +110,83 @@
{
throw new IllegalArgumentException("No null id provided");
}
- return registry.get(federatedId);
+
+ try
+ {
+ return getOrResolveFederatedInvoker(federatedId, null);
+ }
+ catch (NoSuchPortletException e)
+ {
+ return null;
+ }
}
- public Collection<FederatedPortletInvoker> getFederatedInvokers()
+ private FederatedPortletInvoker getOrResolveFederatedInvoker(String federatedId, String compoundPortletId) throws NoSuchPortletException
{
- return registry.values();
+ // check cache first and then see if we can resolve the invoker if we didn't hit the cache
+ FederatedPortletInvoker federatedPortletInvoker = invokerCache.get(federatedId);
+ if (federatedPortletInvoker == null)
+ {
+ federatedPortletInvoker = nullHandler.resolvePortletInvokerFor(federatedId, this, compoundPortletId);
+ synchronized (this)
+ {
+ invokerCache.put(federatedId, federatedPortletInvoker); // put newly resolved invoker in cache
+ }
+ }
+ return federatedPortletInvoker;
}
+ public Collection<String> getFederatedInvokerIds()
+ {
+ final Collection<String> ids = getResolvedInvokerIds();
+ ids.addAll(nullHandler.getKnownInvokerIds());
+
+ return ids;
+ }
+
+ public Collection<String> getResolvedInvokerIds()
+ {
+ Set<String> ids = new HashSet<String>(invokerCache.size() * 2);
+ ids.addAll(invokerCache.keySet());
+
+ return ids;
+ }
+
+ public boolean isResolved(String federatedId) throws IllegalArgumentException
+ {
+ return invokerCache.containsKey(federatedId);
+ }
+
// PortletInvoker implementation ************************************************************************************
public Set<Portlet> getPortlets() throws PortletInvokerException
{
- return getPortlets(false);
+ return getPortlets(true, true);
}
- private Set<Portlet> getPortlets(boolean remoteOnly) throws PortletInvokerException
+ private Set<Portlet> getPortlets(boolean includeRemotePortlets, boolean includeLocalPortlets) throws PortletInvokerException
{
LinkedHashSet<Portlet> portlets = new LinkedHashSet<Portlet>();
- for (FederatedPortletInvoker federated : registry.values())
+ for (String invokerId : getFederatedInvokerIds())
{
- // if we're only interested in remote portlets, skip the local invoker.
- if (remoteOnly && LOCAL_PORTLET_INVOKER_ID.equals(federated.getId()))
+ final FederatedPortletInvoker federated = getFederatedInvoker(invokerId);
+
+ if (LOCAL_PORTLET_INVOKER_ID.equals(federated.getId()))
{
- continue;
+ // skip invoker if it's local and we don't want local portlets
+ if (!includeLocalPortlets)
+ {
+ continue;
+ }
}
+ else
+ {
+ // skip invoker if it's remote and we don't want remote portlets
+ if (!includeRemotePortlets)
+ {
+ continue;
+ }
+ }
try
{
@@ -144,23 +197,22 @@
{
Throwable cause = e.getCause();
log.debug(e.fillInStackTrace());
- log.warn("PortletInvoker with id: " + federated.getId() + " is not available.\nReason: " + e.getMessage()
+ log.warn("PortletInvoker with id: " + invokerId + " is not available.\nReason: " + e.getMessage()
+ "\nCaused by:\n" + (cause == null ? e : cause));
}
}
+
return portlets;
}
public Set<Portlet> getLocalPortlets() throws PortletInvokerException
{
- PortletInvoker local = registry.get(PortletInvoker.LOCAL_PORTLET_INVOKER_ID);
-
- return local.getPortlets();
+ return getPortlets(false, true);
}
public Set<Portlet> getRemotePortlets() throws PortletInvokerException
{
- return getPortlets(true);
+ return getPortlets(true, false);
}
public Portlet getPortlet(PortletContext compoundPortletContext) throws IllegalArgumentException, PortletInvokerException
@@ -294,13 +346,6 @@
throw new IllegalArgumentException("Bad portlet id format " + compoundPortletId);
}
- FederatedPortletInvoker federated = registry.get(invokerId);
- if (federated == null)
- {
- return nullHandler.resolvePortletInvokerFor(compoundPortletId, invokerId, this);
- }
-
- //
- return federated;
+ return getOrResolveFederatedInvoker(invokerId, compoundPortletId);
}
}
Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2011-09-01 14:51:53 UTC (rev 7278)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2011-09-01 16:13:48 UTC (rev 7279)
@@ -37,6 +37,7 @@
import org.gatein.pc.portlet.support.info.PortletInfoSupport;
import java.util.Collection;
+import java.util.Collections;
import java.util.Locale;
import java.util.Set;
@@ -126,7 +127,7 @@
public void testFederation() throws PortletInvokerException
{
- Collection federateds = federatingInvoker.getFederatedInvokers();
+ Collection federateds = federatingInvoker.getFederatedInvokerIds();
assertNotNull(federateds);
assertEquals(2, federateds.size());
@@ -209,11 +210,21 @@
federatingInvoker.setNullInvokerHandler(new NullInvokerHandler()
{
- public FederatedPortletInvoker resolvePortletInvokerFor(String compoundPortletId, String invokerId, FederatingPortletInvoker callingInvoker) throws NoSuchPortletException
+ public FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException
{
assertEquals(federatingInvoker, callingInvoker);
return remote;
}
+
+ public boolean knows(String invokerId)
+ {
+ return federatedId.equals(invokerId);
+ }
+
+ public Collection<String> getKnownInvokerIds()
+ {
+ return Collections.singletonList(federatedId);
+ }
});
assertEquals(portlet, federatingInvoker.getPortlet(PortletContext.createPortletContext(federatedId + PortletContext.INVOKER_SEPARATOR + context.getId())));
Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/NoInvokersTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/NoInvokersTestCase.java 2011-09-01 14:51:53 UTC (rev 7278)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/NoInvokersTestCase.java 2011-09-01 16:13:48 UTC (rev 7279)
@@ -26,8 +26,8 @@
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
+import java.util.ArrayList;
import java.util.HashSet;
-import java.util.ArrayList;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -43,6 +43,6 @@
assertEquals(new HashSet(), federating.getPortlets());
//
- assertEquals(new ArrayList(), new ArrayList(federating.getFederatedInvokers()));
+ assertEquals(new ArrayList(), new ArrayList(federating.getFederatedInvokerIds()));
}
}
Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/OneInvokerNoPortletsTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/OneInvokerNoPortletsTestCase.java 2011-09-01 14:51:53 UTC (rev 7278)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/OneInvokerNoPortletsTestCase.java 2011-09-01 16:13:48 UTC (rev 7279)
@@ -24,11 +24,11 @@
import junit.framework.TestCase;
import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
import org.gatein.pc.portlet.support.PortletInvokerSupport;
-import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
+import java.util.Collection;
import java.util.HashSet;
-import java.util.Collection;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -47,11 +47,12 @@
assertEquals(new HashSet(), federating.getPortlets());
//
- Collection federateds = federating.getFederatedInvokers();
+ Collection<String> federateds = federating.getFederatedInvokerIds();
assertNotNull(federateds);
assertEquals(1, federateds.size());
- FederatedPortletInvoker federated = (FederatedPortletInvoker)federateds.iterator().next();
- assertEquals("foo", federated.getId());
- assertEquals(support, federated.getPortletInvoker());
+
+ String id = federateds.iterator().next();
+ assertEquals("foo", id);
+ assertEquals(support, federating.getFederatedInvoker(id).getPortletInvoker());
}
}
13 years, 1 month
gatein SVN: r7278 - in portal/branches/api/component/api-impl/src/test: resources/org/gatein/portal/api/impl and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-09-01 10:51:53 -0400 (Thu, 01 Sep 2011)
New Revision: 7278
Modified:
portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java
portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/configuration.xml
Log:
improve unit test for content
Modified: portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java
===================================================================
--- portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java 2011-09-01 14:42:08 UTC (rev 7277)
+++ portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java 2011-09-01 14:51:53 UTC (rev 7278)
@@ -1,6 +1,7 @@
package org.gatein.portal.api.impl.content;
import org.exoplatform.portal.mop.SiteType;
+import org.gatein.api.content.Category;
import org.gatein.api.content.ContentRegistry;
import org.gatein.portal.api.impl.AbstractAPITestCase;
@@ -11,14 +12,24 @@
public class ContentRegistryTestCase extends AbstractAPITestCase
{
- public void testFoo()
+ public void testCategory()
{
createSite(SiteType.PORTAL, "classic");
//
ContentRegistry registry = gatein.getDefaultPortal().getContentRegistry();
+
+ //
Set<String> names = registry.getCategoryNames();
assertEquals(Collections.singleton("administration"), names);
+
+ //
+ Category administration = registry.getCategory("administration");
+ assertNotNull(administration);
+ assertEquals("administration", administration.getName());
+ assertEquals("Administration", administration.getDisplayName());
+ assertEquals("Application for administration", administration.getDescription());
+ Category.Id id = administration.getId();
+ assertEquals("administration", id.getName());
}
-
}
Modified: portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/configuration.xml
===================================================================
--- portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/configuration.xml 2011-09-01 14:42:08 UTC (rev 7277)
+++ portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/configuration.xml 2011-09-01 14:51:53 UTC (rev 7278)
@@ -41,10 +41,10 @@
<string>administration</string>
</field>
<field name="displayName">
- <string>administration</string>
+ <string>Administration</string>
</field>
<field name="description">
- <string>application for administration</string>
+ <string>Application for administration</string>
</field>
<field name="accessPermissions">
<collection type="java.util.ArrayList" item-type="java.lang.String">
13 years, 1 month
gatein SVN: r7277 - in portal/branches/api/component/api-impl/src: test and 8 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-09-01 10:42:08 -0400 (Thu, 01 Sep 2011)
New Revision: 7277
Added:
portal/branches/api/component/api-impl/src/test/resources/
portal/branches/api/component/api-impl/src/test/resources/org/
portal/branches/api/component/api-impl/src/test/resources/org/gatein/
portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/
portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/
portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/
portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/configuration.xml
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/AbstractAPITestCase.java
portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java
Log:
basic unit test for content registry
Modified: portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java
===================================================================
--- portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-09-01 14:23:07 UTC (rev 7276)
+++ portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/content/ContentRegistryImpl.java 2011-09-01 14:42:08 UTC (rev 7277)
@@ -34,17 +34,18 @@
import org.gatein.api.content.Portlet;
import org.gatein.api.content.WSRP;
import org.gatein.api.id.Id;
-import org.gatein.api.util.IterableCollection;
import org.gatein.api.util.IterableIdentifiableCollection;
import org.gatein.pc.api.PortletContext;
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.pc.federation.FederatingPortletInvoker;
import org.gatein.portal.api.impl.GateInImpl;
import org.gatein.portal.api.impl.portal.PortalImpl;
-import org.gatein.portal.api.impl.util.AdaptedIterableCollection;
import org.gatein.portal.api.impl.util.AdaptedIterableIdentifiableCollection;
import org.gatein.portal.api.impl.util.AggregatedIterableIdentifiableCollection;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -89,24 +90,18 @@
}
}
- public IterableCollection<String> getCategoryNames()
+ public Set<String> getCategoryNames()
{
try
{
gateIn.begin();
- final List<ApplicationCategory> categories = gateIn.getRegistryService().getApplicationCategories();
- return new AdaptedIterableCollection<ApplicationCategory, String>(categories.size(), categories.iterator())
+ List<ApplicationCategory> categories = gateIn.getRegistryService().getApplicationCategories();
+ HashSet<String> names = new HashSet<String>();
+ for (ApplicationCategory category : categories)
{
- public String adapt(ApplicationCategory old)
- {
- return old.getName();
- }
-
- public boolean contains(String s)
- {
- return doesCategoryExist(s);
- }
- };
+ names.add(category.getName());
+ }
+ return names;
}
catch (Exception e)
{
@@ -118,24 +113,17 @@
}
}
- public IterableIdentifiableCollection<Category> getAllCategories()
+ public Collection<Category> getAllCategories()
{
try
{
gateIn.begin();
- final List<ApplicationCategory> categories = gateIn.getRegistryService().getApplicationCategories();
- return new AdaptedIterableIdentifiableCollection<ApplicationCategory, Category>(categories.size(), categories.iterator())
+ List<Category> categories = new ArrayList<Category>();
+ for (ApplicationCategory category : gateIn.getRegistryService().getApplicationCategories())
{
- public Category adapt(ApplicationCategory old)
- {
- return new CategoryImpl(old, ContentRegistryImpl.this, gateIn);
- }
-
- public boolean contains(Id<Category> t)
- {
- return doesCategoryExist(t.toString());
- }
- };
+ categories.add(new CategoryImpl(category, ContentRegistryImpl.this, gateIn));
+ }
+ return categories;
}
catch (Exception e)
{
Modified: portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/AbstractAPITestCase.java
===================================================================
--- portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/AbstractAPITestCase.java 2011-09-01 14:23:07 UTC (rev 7276)
+++ portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/AbstractAPITestCase.java 2011-09-01 14:42:08 UTC (rev 7277)
@@ -25,7 +25,8 @@
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.jcr-configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.identity-configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration.xml"),
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.application-registry-configuration.xml")
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.application-registry-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/gatein/portal/api/impl/configuration.xml")
})
public abstract class AbstractAPITestCase extends AbstractPortalTest
{
Modified: portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java
===================================================================
--- portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java 2011-09-01 14:23:07 UTC (rev 7276)
+++ portal/branches/api/component/api-impl/src/test/java/org/gatein/portal/api/impl/content/ContentRegistryTestCase.java 2011-09-01 14:42:08 UTC (rev 7277)
@@ -4,6 +4,9 @@
import org.gatein.api.content.ContentRegistry;
import org.gatein.portal.api.impl.AbstractAPITestCase;
+import java.util.Collections;
+import java.util.Set;
+
/** @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> */
public class ContentRegistryTestCase extends AbstractAPITestCase
{
@@ -14,10 +17,8 @@
//
ContentRegistry registry = gatein.getDefaultPortal().getContentRegistry();
-
- //
- registry.getCategoryNames();
-
+ Set<String> names = registry.getCategoryNames();
+ assertEquals(Collections.singleton("administration"), names);
}
}
Added: portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/configuration.xml
===================================================================
--- portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/configuration.xml (rev 0)
+++ portal/branches/api/component/api-impl/src/test/resources/org/gatein/portal/api/impl/configuration.xml 2011-09-01 14:42:08 UTC (rev 7277)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd
+ http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.application.registry.ApplicationRegistryService</target-component>
+ <component-plugin>
+ <name>new.portal.portlets.registry</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
+ <description>this listener init the portlets are registered in PortletRegister</description>
+ <init-params>
+ <object-param>
+ <name>administration</name>
+ <description>description</description>
+ <object type="org.exoplatform.application.registry.ApplicationCategory">
+ <field name="name">
+ <string>administration</string>
+ </field>
+ <field name="displayName">
+ <string>administration</string>
+ </field>
+ <field name="description">
+ <string>application for administration</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/administrators</string>
+ </value>
+ <value>
+ <string>*:/organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName">
+ <string>ApplicationRegistryPortlet</string>
+ </field>
+ <field name="categoryName">
+ <string>administration</string>
+ </field>
+ <field name="displayName">
+ <string>Application Registry</string>
+ </field>
+ <field name="description">
+ <string>Application Registry</string>
+ </field>
+ <field name="type">
+ <string>portlet</string>
+ </field>
+ <field name="contentId">
+ <string>exoadmin/ApplicationRegistryPortlet</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/administrators</string>
+ </value>
+ <value>
+ <string>*:/organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName">
+ <string>OrganizationPortlet</string>
+ </field>
+ <field name="categoryName">
+ <string>administration</string>
+ </field>
+ <field name="displayName">
+ <string>Organization Management</string>
+ </field>
+ <field name="description">
+ <string>Organization Management</string>
+ </field>
+ <field name="type">
+ <string>portlet</string>
+ </field>
+ <field name="contentId">
+ <string>exoadmin/OrganizationPortlet</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/administrators</string>
+ </value>
+ <value>
+ <string>*:/organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.application.registry.Application">
+ <field name="applicationName">
+ <string>AccountPortlet</string>
+ </field>
+ <field name="categoryName">
+ <string>administration</string>
+ </field>
+ <field name="displayName">
+ <string>New Account</string>
+ </field>
+ <field name="description">
+ <string>New Account</string>
+ </field>
+ <field name="type">
+ <string>portlet</string>
+ </field>
+ <field name="contentId">
+ <string>exoadmin/AccountPortlet</string>
+ </field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList" item-type="java.lang.String">
+ <value>
+ <string>*:/platform/administrators</string>
+ </value>
+ <value>
+ <string>*:/organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
\ No newline at end of file
13 years, 1 month
gatein SVN: r7276 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator.
by do-not-reply@jboss.org
Author: tkobayas(a)redhat.com
Date: 2011-09-01 10:23:07 -0400 (Thu, 01 Sep 2011)
New Revision: 7276
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
Log:
GTNPORTAL-1502 DateTimeValidator validates incorrect with particular languages
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2011-09-01 14:03:40 UTC (rev 7275)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/DateTimeValidator.java 2011-09-01 14:23:07 UTC (rev 7276)
@@ -42,9 +42,6 @@
{
static private final String SPLIT_REGEX = "/|\\s+|:";
- static private final String DATETIME_REGEX =
- "^(\\d{1,2}\\/\\d{1,2}\\/\\d{1,4})\\s*(\\s+\\d{1,2}:\\d{1,2}:\\d{1,2})?$";
-
public void validate(UIFormInput uiInput) throws Exception
{
if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)
@@ -76,9 +73,5 @@
{
throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args, ApplicationMessage.WARNING));
}
- if (s.matches(DATETIME_REGEX))
- return;
-
- throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args, ApplicationMessage.WARNING));
}
}
13 years, 1 month
gatein SVN: r7275 - epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-09-01 10:03:40 -0400 (Thu, 01 Sep 2011)
New Revision: 7275
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js
Log:
JBEPP-1053: merge in patch from GTNPORTAL-2034 (r7270) which fixes the menu rendering issues.
Modified: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js 2011-09-01 13:59:00 UTC (rev 7274)
+++ epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortalNavigation.js 2011-09-01 14:03:40 UTC (rev 7275)
@@ -263,9 +263,12 @@
if (eXo.portal.UIPortalNavigation.currentOpenedMenu) eXo.portal.UIPortalNavigation.hideMenu();
eXo.portal.UIPortalNavigation.superClass.pushVisibleContainer(menuItemContainer.id);
- var offParent = item.offsetParent ;
- var y = item.offsetHeight + item.offsetTop;
- var x = item.offsetLeft + 2;
+ //Need this code to make menuItemContainer.offsetParent works correctly
+ menuItemContainer.style.display = "block";
+ menuItemContainer.style.position = "absolute";
+ var offParent = menuItemContainer.offsetParent ;
+ var y = item.offsetHeight + eXo.core.Browser.findPosYInContainer(item, offParent);
+ var x = eXo.core.Browser.findPosXInContainer(item, offParent) + 2;
if(eXo.core.I18n.isRT()) {
x = eXo.core.Browser.findPosX(offParent) + offParent.offsetWidth - eXo.core.Browser.findPosX(item) - item.offsetWidth;
// if(eXo.core.Browser.isIE6()) x += parseInt(document.getElementById("UIWorkingWorkspace").style.marginRight) ;
13 years, 1 month