gatein SVN: r313 - in components/wsrp/trunk: producer/src/main/java/org/gatein/wsrp/producer and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-07 20:07:46 -0400 (Wed, 07 Oct 2009)
New Revision: 313
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPUtils.java
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/ServiceDescriptionHandler.java
Log:
- Changed WSRPTypeFactory.createPortletDescription to use a PortletContext instead of a portlet handle directly so that portlet handle creation can be encapsulated.
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2009-10-07 20:23:38 UTC (rev 312)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2009-10-08 00:07:46 UTC (rev 313)
@@ -303,9 +303,9 @@
*
* @return
*/
- public static PortletDescription createPortletDescription(String portletHandle, List<MarkupType> markupTypes)
+ public static PortletDescription createPortletDescription(org.gatein.pc.api.PortletContext portletContext, List<MarkupType> markupTypes)
{
- checkPortletHandle(portletHandle);
+ PortletContext context = WSRPUtils.convertToWSRPPortletContext(portletContext);
ParameterValidation.throwIllegalArgExceptionIfNull(markupTypes, "MarkupType");
if (markupTypes.isEmpty())
@@ -314,7 +314,7 @@
}
PortletDescription portletDescription = new PortletDescription();
- portletDescription.setPortletHandle(portletHandle);
+ portletDescription.setPortletHandle(context.getPortletHandle());
portletDescription.getMarkupTypes().addAll(markupTypes);
return portletDescription;
}
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPUtils.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPUtils.java 2009-10-07 20:23:38 UTC (rev 312)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPUtils.java 2009-10-08 00:07:46 UTC (rev 313)
@@ -23,17 +23,17 @@
package org.gatein.wsrp;
-import org.gatein.pc.api.Mode;
-import org.gatein.pc.api.WindowState;
import org.gatein.common.i18n.LocaleFormat;
import org.gatein.common.util.ConversionException;
import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.ActionURL;
+import org.gatein.pc.api.Mode;
import org.gatein.pc.api.PortletContext;
import org.gatein.pc.api.PortletStateType;
import org.gatein.pc.api.PortletURL;
import org.gatein.pc.api.RenderURL;
import org.gatein.pc.api.StatefulPortletContext;
+import org.gatein.pc.api.WindowState;
import org.gatein.pc.api.state.AccessMode;
import org.gatein.wsrp.registration.LocalizedString;
import org.gatein.wsrp.registration.RegistrationPropertyDescription;
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/ServiceDescriptionHandler.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/ServiceDescriptionHandler.java 2009-10-07 20:23:38 UTC (rev 312)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/ServiceDescriptionHandler.java 2009-10-08 00:07:46 UTC (rev 313)
@@ -191,9 +191,9 @@
*/
PortletDescription getPortletDescription(Portlet portlet, List<String> desiredLocales)
{
- String id = portlet.getContext().getId();
+ org.gatein.pc.api.PortletContext context = portlet.getContext();
PortletInfo info = portlet.getInfo();
- log.debug("Constructing portlet description for: " + id);
+ log.debug("Constructing portlet description for: " + context.getId());
CapabilitiesInfo capInfo = info.getCapabilities();
Collection<MediaType> allMediaTypes = capInfo.getMediaTypes();
@@ -206,10 +206,10 @@
markupTypes.add(markupType);
}
- //todo generate a valid and better portlet handle
- PortletDescription desc = WSRPTypeFactory.createPortletDescription(id, markupTypes);
+ PortletDescription desc = WSRPTypeFactory.createPortletDescription(context, markupTypes);
- // todo: group ID
+ // group ID
+ desc.setGroupID(info.getApplicationName());
MetaInfo metaInfo = info.getMeta();
15 years, 2 months
gatein SVN: r312 - in components/pc/trunk/api: src and 8 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-07 16:23:38 -0400 (Wed, 07 Oct 2009)
New Revision: 312
Added:
components/pc/trunk/api/src/test/
components/pc/trunk/api/src/test/java/
components/pc/trunk/api/src/test/java/org/
components/pc/trunk/api/src/test/java/org/gatein/
components/pc/trunk/api/src/test/java/org/gatein/pc/
components/pc/trunk/api/src/test/java/org/gatein/pc/api/
components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java
components/pc/trunk/api/src/test/resources/
components/pc/trunk/api/src/test/resources/jboss-unit.xml
Modified:
components/pc/trunk/api/pom.xml
components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletContext.java
Log:
- Added extraction of PortletContext components methods as these components are used in GateIn and internal implementation is leaked.
- Added related tests.
Modified: components/pc/trunk/api/pom.xml
===================================================================
--- components/pc/trunk/api/pom.xml 2009-10-07 15:32:46 UTC (rev 311)
+++ components/pc/trunk/api/pom.xml 2009-10-07 20:23:38 UTC (rev 312)
@@ -1,35 +1,68 @@
<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.pc</groupId>
- <artifactId>pc-parent</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-api</artifactId>
- <packaging>jar</packaging>
- <name>GateIn - Portlet Container (api)</name>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-parent</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-api</artifactId>
+ <packaging>jar</packaging>
+ <name>GateIn - Portlet Container (api)</name>
- <dependencies>
- <dependency>
- <groupId>org.gatein.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.wci</groupId>
- <artifactId>wci-wci</artifactId>
- </dependency>
-
- <dependency>
- <groupId>sun-jaxb</groupId>
- <artifactId>jaxb-api</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-wci</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </dependency>
+ <!--<dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>-->
+ <dependency>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-mc</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.unit</groupId>
+ <artifactId>jboss-unit-tooling-maven2</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <testsuites>
+ <testsuite>
+ <config>jboss-unit.xml</config>
+ </testsuite>
+ </testsuites>
+ <reports>
+ <xml>target/tests/reports/xml</xml>
+ <html>target/tests/reports/html</html>
+ </reports>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Modified: components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletContext.java
===================================================================
--- components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletContext.java 2009-10-07 15:32:46 UTC (rev 311)
+++ components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletContext.java 2009-10-07 20:23:38 UTC (rev 312)
@@ -37,11 +37,47 @@
/** . */
protected final String id;
+ private final String applicationName;
+ private final String portletName;
+ private static final String PREFIX = "/";
+ private static final char SEPARATOR = '.';
PortletContext(String id) throws IllegalArgumentException
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "portlet id", "PortletContext");
- this.id = id;
+
+ // components
+ String trimmedId = id.trim();
+ if (trimmedId.startsWith(PREFIX)) // only consider components if the id starts with '/'
+ {
+ String compound = trimmedId.substring(1); // exclude starting '/'
+
+ int separator = compound.indexOf(SEPARATOR); // find first separator, other separator are considered part of the portlet name
+ if (separator != -1)
+ {
+ portletName = compound.substring(separator + 1).trim();
+ applicationName = compound.substring(0, separator).trim();
+ }
+ else
+ {
+ portletName = null;
+ applicationName = null;
+ }
+ }
+ else
+ {
+ portletName = null;
+ applicationName = null;
+ }
+
+ if (portletName == null || applicationName == null)
+ {
+ this.id = trimmedId;
+ }
+ else
+ {
+ this.id = PREFIX + applicationName + SEPARATOR + portletName;
+ }
}
@@ -113,4 +149,14 @@
{
return createPortletContext(portletId, null);
}
+
+ public String getApplicationName()
+ {
+ return applicationName;
+ }
+
+ public String getPortletName()
+ {
+ return portletName;
+ }
}
Added: components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java
===================================================================
--- components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java (rev 0)
+++ components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java 2009-10-07 20:23:38 UTC (rev 312)
@@ -0,0 +1,96 @@
+/*
+* 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.pc.api;
+
+import static org.jboss.unit.api.Assert.*;
+import org.jboss.unit.api.pojo.annotations.Test;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class PortletContextTestCase
+{
+ @Test
+ public void testGetComponents()
+ {
+ PortletContext context = PortletContext.createPortletContext("/applicationName.portletName");
+ assertEquals("applicationName", context.getApplicationName());
+ assertEquals("portletName", context.getPortletName());
+ assertEquals("/applicationName.portletName", context.getId());
+
+ context = PortletContext.createPortletContext("\t\t\n /applicationName.portletName \t");
+ assertEquals("applicationName", context.getApplicationName());
+ assertEquals("portletName", context.getPortletName());
+ assertEquals("/applicationName.portletName", context.getId());
+
+ context = PortletContext.createPortletContext("/");
+ assertNull(context.getApplicationName());
+ assertNull(context.getPortletName());
+ assertEquals("/", context.getId());
+
+ context = PortletContext.createPortletContext("applicationName.portletName");
+ assertNull(context.getApplicationName());
+ assertNull(context.getPortletName());
+ assertEquals("applicationName.portletName", context.getId());
+
+ context = PortletContext.createPortletContext("/applicationName.portlet.Name");
+ assertEquals("applicationName", context.getApplicationName());
+ assertEquals("portlet.Name", context.getPortletName());
+ assertEquals("/applicationName.portlet.Name", context.getId());
+
+ context = PortletContext.createPortletContext("/.");
+ assertEquals("", context.getApplicationName());
+ assertEquals("", context.getPortletName());
+ assertEquals("/.", context.getId());
+
+ context = PortletContext.createPortletContext("/ applicationName\t. portlet Name");
+ assertEquals("applicationName", context.getApplicationName());
+ assertEquals("portlet Name", context.getPortletName());
+ assertEquals("/applicationName.portlet Name", context.getId());
+ }
+
+ @Test
+ public void testCreateFromNullOrEmpty()
+ {
+ try
+ {
+ PortletContext.createPortletContext(null);
+ fail("Attempting to create a PortletContext from null should have thrown an exception.");
+ }
+ catch (IllegalArgumentException e)
+ {
+ // expected
+ }
+
+ try
+ {
+ PortletContext.createPortletContext("");
+ fail("Attempting to create a PortletContext from empty String should have thrown an exception.");
+ }
+ catch (IllegalArgumentException e)
+ {
+ // expected
+ }
+ }
+}
Copied: components/pc/trunk/api/src/test/resources/jboss-unit.xml (from rev 305, components/pc/trunk/federation/src/test/resources/jboss-unit.xml)
===================================================================
--- components/pc/trunk/api/src/test/resources/jboss-unit.xml (rev 0)
+++ components/pc/trunk/api/src/test/resources/jboss-unit.xml 2009-10-07 20:23:38 UTC (rev 312)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-unit
+ xmlns="urn:jboss:jboss-unit:1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
+ <pojo>
+ <test>
+ <class name="org.gatein.pc.api.PortletContextTestCase"/>
+ </test>
+ </pojo>
+</jboss-unit>
15 years, 2 months
gatein SVN: r311 - 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: 2009-10-07 11:32:46 -0400 (Wed, 07 Oct 2009)
New Revision: 311
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/impl/FederatingPortletInvokerService.java
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
Log:
- Added getLocalPortlets and getRemotePortlets methods.
- Improved test case.
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 2009-10-07 07:32:15 UTC (rev 310)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java 2009-10-07 15:32:46 UTC (rev 311)
@@ -22,9 +22,12 @@
******************************************************************************/
package org.gatein.pc.federation;
+import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletInvoker;
+import org.gatein.pc.api.PortletInvokerException;
import java.util.Collection;
+import java.util.Set;
/**
* A portlet invoker that federates other invokers.
@@ -69,4 +72,18 @@
* @since 2.6
*/
void unregisterInvoker(String federatedId);
+
+ /**
+ * Return only the portlets from local federated invokers.
+ *
+ * @return a Set containing only the portlets from local federated invokers.
+ */
+ Set<Portlet> getLocalPortlets() throws PortletInvokerException;
+
+ /**
+ * Return only the portlets from remote federated invokers.
+ *
+ * @return a Set containing only the portlets from remote federated invokers.
+ */
+ Set<Portlet> getRemotePortlets() throws PortletInvokerException;
}
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 2009-10-07 07:32:15 UTC (rev 310)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2009-10-07 15:32:46 UTC (rev 311)
@@ -22,21 +22,21 @@
******************************************************************************/
package org.gatein.pc.federation.impl;
+import org.apache.log4j.Logger;
import org.gatein.pc.api.InvokerUnavailableException;
import org.gatein.pc.api.NoSuchPortletException;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.api.PortletInvokerException;
-import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.api.PortletStateType;
+import org.gatein.pc.api.invocation.PortletInvocation;
+import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.pc.api.state.DestroyCloneFailure;
+import org.gatein.pc.api.state.PropertyChange;
import org.gatein.pc.api.state.PropertyMap;
import org.gatein.pc.federation.FederatedPortletInvoker;
import org.gatein.pc.federation.FederatingPortletInvoker;
-import org.gatein.pc.api.invocation.PortletInvocation;
-import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
-import org.gatein.pc.api.state.PropertyChange;
-import org.gatein.pc.api.state.DestroyCloneFailure;
-import org.apache.log4j.Logger;
import java.util.Collection;
import java.util.Collections;
@@ -118,9 +118,20 @@
public Set<Portlet> getPortlets() throws PortletInvokerException
{
+ return getPortlets(false);
+ }
+
+ private Set<Portlet> getPortlets(boolean remoteOnly) throws PortletInvokerException
+ {
LinkedHashSet<Portlet> portlets = new LinkedHashSet<Portlet>();
for (FederatedPortletInvoker federated : registry.values())
{
+ // if we're only interested in remote portlets, skip the local invoker.
+ if (remoteOnly && LOCAL_PORTLET_INVOKER_ID.equals(federated.getId()))
+ {
+ continue;
+ }
+
try
{
Set<Portlet> offeredPortlets = federated.getPortlets();
@@ -137,6 +148,18 @@
return portlets;
}
+ public Set<Portlet> getLocalPortlets() throws PortletInvokerException
+ {
+ PortletInvoker local = registry.get(PortletInvoker.LOCAL_PORTLET_INVOKER_ID);
+
+ return local.getPortlets();
+ }
+
+ public Set<Portlet> getRemotePortlets() throws PortletInvokerException
+ {
+ return getPortlets(true);
+ }
+
public Portlet getPortlet(PortletContext compoundPortletContext) throws IllegalArgumentException, PortletInvokerException
{
FederatedPortletInvoker federated = getFederatedPortletInvokerFor(compoundPortletContext);
@@ -212,7 +235,7 @@
* @param compoundPortletContext the portlet context for which the invoker is to be retrieved
* @return the portlet invoker associated with the specified compound portlet id
* @throws IllegalArgumentException if the compound portlet id is not well formed or null
- * @throws NoSuchPortletException if not such portlet exist
+ * @throws NoSuchPortletException if not such portlet exist
*/
private FederatedPortletInvoker getFederatedPortletInvokerFor(PortletContext compoundPortletContext) throws IllegalArgumentException, NoSuchPortletException
{
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 2009-10-07 07:32:15 UTC (rev 310)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2009-10-07 15:32:46 UTC (rev 311)
@@ -22,28 +22,25 @@
******************************************************************************/
package org.gatein.pc.federation;
-import org.gatein.pc.federation.FederatedPortletInvoker;
-import org.gatein.pc.federation.FederatingPortletInvoker;
-import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
-import org.gatein.pc.portlet.support.PortletInvokerSupport;
-import org.gatein.pc.portlet.support.PortletSupport;
-import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.common.i18n.LocalizedString;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvoker;
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.info.MetaInfo;
import org.gatein.pc.api.info.PortletInfo;
-import org.gatein.pc.api.info.MetaInfo;
+import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
+import org.gatein.pc.portlet.support.PortletInvokerSupport;
import org.gatein.pc.portlet.support.info.PortletInfoSupport;
-import org.gatein.common.i18n.LocalizedString;
-
-import java.util.Collection;
-import java.util.Set;
-import java.util.Locale;
-
import static org.jboss.unit.api.Assert.*;
import org.jboss.unit.api.pojo.annotations.Create;
import org.jboss.unit.api.pojo.annotations.Destroy;
import org.jboss.unit.api.pojo.annotations.Test;
+import java.util.Collection;
+import java.util.Locale;
+import java.util.Set;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
@@ -56,11 +53,9 @@
/** . */
private PortletInvokerSupport federatedInvoker;
+ private PortletInvokerSupport localInvoker;
/** . */
- private PortletSupport federatedPortlet;
-
- /** . */
private Portlet portlet;
/** . */
@@ -70,46 +65,67 @@
public void setUp() throws Exception
{
federatingInvoker = new FederatingPortletInvokerService();
+
+ // Invokers
federatedInvoker = new PortletInvokerSupport();
+ localInvoker = new PortletInvokerSupport();
- // Configure
+ // Add portlets to invokers
PortletInfoSupport fooInfo = new PortletInfoSupport();
fooInfo.getMeta().setDisplayName("FooPortlet");
+ portlet = federatedInvoker.addPortlet("MyPortlet", fooInfo);
+ portletContext = portlet.getContext();
- // Wire
- federatedPortlet = federatedInvoker.addPortlet("MyPortlet", fooInfo);
+ PortletInfoSupport localInfo = new PortletInfoSupport();
+ fooInfo.getMeta().setDisplayName("LocalPortlet");
+ localInvoker.addPortlet("MyLocalPortlet", localInfo);
+
+ // Register invokers with federating service
federatingInvoker.registerInvoker("foo", federatedInvoker);
-
- // Basic setup
- Set portlets = federatingInvoker.getPortlets();
- assertNotNull(portlets);
- assertEquals(1, portlets.size());
- portlet = (Portlet)portlets.iterator().next();
- assertNotNull(portlet);
- portletContext = portlet.getContext();
- assertNotNull(portletContext);
+ federatingInvoker.registerInvoker(PortletInvoker.LOCAL_PORTLET_INVOKER_ID, localInvoker);
}
@Destroy
public void tearDown() throws Exception
{
- federatedPortlet = null;
federatedInvoker = null;
+ localInvoker = null;
federatingInvoker = null;
portlet = null;
portletContext = null;
}
@Test
+ public void testGetPortlets() throws PortletInvokerException
+ {
+ Set<Portlet> portlets = federatingInvoker.getPortlets();
+ assertNotNull(portlets);
+ assertEquals(2, portlets.size());
+
+ for (Portlet portlet : portlets)
+ {
+ PortletContext context = portlet.getContext();
+ String id = context.getId();
+ assertTrue("MyPortlet".equals(id) || "MyLocalPortlet".equals(id));
+ }
+ }
+
+ @Test
public void testFederation() throws PortletInvokerException
{
Collection federateds = federatingInvoker.getFederatedInvokers();
assertNotNull(federateds);
- assertEquals(1, federateds.size());
- FederatedPortletInvoker federated = (FederatedPortletInvoker)federateds.iterator().next();
+ assertEquals(2, federateds.size());
+
+ FederatedPortletInvoker federated = federatingInvoker.getFederatedInvoker("foo");
assertNotNull(federated);
assertEquals("foo", federated.getId());
assertEquals(federatedInvoker, federated.getPortletInvoker());
+
+ federated = federatingInvoker.getFederatedInvoker(PortletInvoker.LOCAL_PORTLET_INVOKER_ID);
+ assertNotNull(federated);
+ assertEquals(PortletInvoker.LOCAL_PORTLET_INVOKER_ID, federated.getId());
+ assertEquals(localInvoker, federated.getPortletInvoker());
}
@Test
@@ -133,6 +149,26 @@
assertEquals(samePortlet.getContext(), portletContext);
}
+ @Test
+ public void testGetLocalPortlets() throws PortletInvokerException
+ {
+ Set<Portlet> localPortlets = federatingInvoker.getLocalPortlets();
+ assertEquals(1, localPortlets.size());
+ Portlet localPortlet = localPortlets.iterator().next();
+ assertNotNull(localPortlet);
+ assertEquals("MyLocalPortlet", localPortlet.getContext().getId());
+ }
+
+ @Test
+ public void testGetRemotePortlets() throws PortletInvokerException
+ {
+ Set<Portlet> portlets = federatingInvoker.getRemotePortlets();
+ assertEquals(1, portlets.size());
+ Portlet portlet = portlets.iterator().next();
+ assertNotNull(portlet);
+ assertEquals("MyPortlet", portlet.getContext().getId());
+ }
+
public void testInvoke() throws PortletInvokerException
{
}
15 years, 2 months
gatein SVN: r310 - in components/common/trunk: common and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-10-07 03:32:15 -0400 (Wed, 07 Oct 2009)
New Revision: 310
Modified:
components/common/trunk/common/pom.xml
components/common/trunk/mc/pom.xml
components/common/trunk/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/common/trunk/common/pom.xml
===================================================================
--- components/common/trunk/common/pom.xml 2009-10-07 07:32:03 UTC (rev 309)
+++ components/common/trunk/common/pom.xml 2009-10-07 07:32:15 UTC (rev 310)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.common</groupId>
<artifactId>common-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common-common</artifactId>
Modified: components/common/trunk/mc/pom.xml
===================================================================
--- components/common/trunk/mc/pom.xml 2009-10-07 07:32:03 UTC (rev 309)
+++ components/common/trunk/mc/pom.xml 2009-10-07 07:32:15 UTC (rev 310)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.common</groupId>
<artifactId>common-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>common-mc</artifactId>
Modified: components/common/trunk/pom.xml
===================================================================
--- components/common/trunk/pom.xml 2009-10-07 07:32:03 UTC (rev 309)
+++ components/common/trunk/pom.xml 2009-10-07 07:32:15 UTC (rev 310)
@@ -6,7 +6,7 @@
<groupId>org.gatein.common</groupId>
<artifactId>common-parent</artifactId>
- <version>2.0.0-Beta03</version>
+ <version>2.0.0-CR1-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
@@ -16,9 +16,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/common/tags/2.0....</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/common/tags/2.0.0-B...</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/common/tags/2.0.0-Beta03</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/common/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/common/trunk/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/common/trunk/</url>
</scm>
<!-- Import dependency management configuration -->
15 years, 2 months
gatein SVN: r309 - components/common/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-10-07 03:32:03 -0400 (Wed, 07 Oct 2009)
New Revision: 309
Added:
components/common/tags/2.0.0-Beta03/
Log:
[maven-scm] copy for tag 2.0.0-Beta03
Copied: components/common/tags/2.0.0-Beta03 (from rev 308, components/common/trunk)
15 years, 2 months
gatein SVN: r308 - in components/common/trunk: common and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-10-07 03:31:40 -0400 (Wed, 07 Oct 2009)
New Revision: 308
Modified:
components/common/trunk/common/pom.xml
components/common/trunk/mc/pom.xml
components/common/trunk/pom.xml
Log:
[maven-release-plugin] prepare release 2.0.0-Beta03
Modified: components/common/trunk/common/pom.xml
===================================================================
--- components/common/trunk/common/pom.xml 2009-10-07 07:27:38 UTC (rev 307)
+++ components/common/trunk/common/pom.xml 2009-10-07 07:31:40 UTC (rev 308)
@@ -1,121 +1,120 @@
-<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.common</groupId>
- <artifactId>common-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>common-common</artifactId>
- <packaging>jar</packaging>
- <name>GateIn - Common component (common)</name>
-
- <dependencies>
-
- <dependency>
- <groupId>apache-log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.activation</groupId>
- <artifactId>activation</artifactId>
- </dependency>
-
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-j2ee</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-vfs</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- </dependency>
-
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-jmx</artifactId>
- </dependency>
-
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-junit</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-core-uberjar</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-launcher</artifactId>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <encoding>iso-8859-1</encoding>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!-- To use in conjonctin with
- export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
- -->
- <forkMode>never</forkMode>
- <argLine>-enableassertions</argLine>
- <excludes>
- <exclude>org/gatein/common/i18n/BundleNameParserTestCase*.java</exclude>
- <exclude>org/gatein/common/net/URLNavigatorTestCase.java</exclude>
- </excludes>
- </configuration>
- </plugin>
-
- </plugins>
-
- <testSourceDirectory>src/test/java</testSourceDirectory>
-
- <testResources>
- <testResource>
- <directory>src/test/resources</directory>
- <filtering>false</filtering>
- </testResource>
- </testResources>
- </build>
-
- <properties/>
-</project>
+<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.common</groupId>
+ <artifactId>common-parent</artifactId>
+ <version>2.0.0-Beta03</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>common-common</artifactId>
+ <packaging>jar</packaging>
+ <name>GateIn - Common component (common)</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-j2ee</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-vfs</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-jmx</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-core-uberjar</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <encoding>iso-8859-1</encoding>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- To use in conjonctin with
+ export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
+ -->
+ <forkMode>never</forkMode>
+ <argLine>-enableassertions</argLine>
+ <excludes>
+ <exclude>org/gatein/common/i18n/BundleNameParserTestCase*.java</exclude>
+ <exclude>org/gatein/common/net/URLNavigatorTestCase.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ </plugins>
+
+ <testSourceDirectory>src/test/java</testSourceDirectory>
+
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>false</filtering>
+ </testResource>
+ </testResources>
+ </build>
+
+ <properties />
+</project>
Modified: components/common/trunk/mc/pom.xml
===================================================================
--- components/common/trunk/mc/pom.xml 2009-10-07 07:27:38 UTC (rev 307)
+++ components/common/trunk/mc/pom.xml 2009-10-07 07:31:40 UTC (rev 308)
@@ -1,37 +1,36 @@
-<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.common</groupId>
- <artifactId>common-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>common-mc</artifactId>
- <packaging>jar</packaging>
- <name>GateIn - Common component (mc)</name>
-
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.man</groupId>
- <artifactId>jboss-managed</artifactId>
- </dependency>
-
- <dependency>
- <groupId>apache-log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
-
- </dependencies>
-
-</project>
+<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.common</groupId>
+ <artifactId>common-parent</artifactId>
+ <version>2.0.0-Beta03</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>common-mc</artifactId>
+ <packaging>jar</packaging>
+ <name>GateIn - Common component (mc)</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.man</groupId>
+ <artifactId>jboss-managed</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+
+ </dependencies>
+
+</project>
Modified: components/common/trunk/pom.xml
===================================================================
--- components/common/trunk/pom.xml 2009-10-07 07:27:38 UTC (rev 307)
+++ components/common/trunk/pom.xml 2009-10-07 07:31:40 UTC (rev 308)
@@ -1,68 +1,66 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <name>GateIn - Common component</name>
-
- <groupId>org.gatein.common</groupId>
- <artifactId>common-parent</artifactId>
- <version>2.0.0-Beta03-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <parent>
- <groupId>org.gatein</groupId>
- <artifactId>gatein-parent</artifactId>
- <version>1.0.0-Beta01</version>
- </parent>
-
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/common/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/common/trunk/</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/common/trunk/</url>
- </scm>
-
- <!-- Import dependency management configuration -->
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.gatein</groupId>
- <artifactId>gatein-dep</artifactId>
- <version>1.0.0-Beta01</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <layout>default</layout>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshots Repository</name>
- <layout>default</layout>
- <url>http://snapshots.jboss.org/maven2/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
-
- <modules>
- <module>common</module>
- <module>mc</module>
- </modules>
-
-</project>
+<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>
+
+ <name>GateIn - Common component</name>
+
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-parent</artifactId>
+ <version>2.0.0-Beta03</version>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.gatein</groupId>
+ <artifactId>gatein-parent</artifactId>
+ <version>1.0.0-Beta01</version>
+ </parent>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/common/tags/2.0....</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/common/tags/2.0.0-B...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/common/tags/2.0.0-Beta03</url>
+ </scm>
+
+ <!-- Import dependency management configuration -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.gatein</groupId>
+ <artifactId>gatein-dep</artifactId>
+ <version>1.0.0-Beta01</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <modules>
+ <module>common</module>
+ <module>mc</module>
+ </modules>
+
+</project>
15 years, 2 months
gatein SVN: r307 - components/common/trunk.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-10-07 03:27:38 -0400 (Wed, 07 Oct 2009)
New Revision: 307
Modified:
components/common/trunk/pom.xml
Log:
Cleanup
Modified: components/common/trunk/pom.xml
===================================================================
--- components/common/trunk/pom.xml 2009-10-06 16:30:40 UTC (rev 306)
+++ components/common/trunk/pom.xml 2009-10-07 07:27:38 UTC (rev 307)
@@ -23,14 +23,6 @@
<url>http://fisheye.jboss.org/browse/gatein/components/common/trunk/</url>
</scm>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
<!-- Import dependency management configuration -->
<dependencyManagement>
<dependencies>
15 years, 2 months
gatein SVN: r306 - in components/pc/trunk: federation/src/main/java/org/gatein/pc/federation and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-10-06 12:30:40 -0400 (Tue, 06 Oct 2009)
New Revision: 306
Modified:
components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletInvoker.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java
Log:
- Moved LOCAL_PORTLET_INVOKER_ID to PortletInvoker instead of FederatingPortletInvoker.
Modified: components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletInvoker.java
===================================================================
--- components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletInvoker.java 2009-10-06 09:47:30 UTC (rev 305)
+++ components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletInvoker.java 2009-10-06 16:30:40 UTC (rev 306)
@@ -24,10 +24,9 @@
import org.gatein.pc.api.invocation.PortletInvocation;
import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.pc.api.state.DestroyCloneFailure;
import org.gatein.pc.api.state.PropertyChange;
import org.gatein.pc.api.state.PropertyMap;
-import org.gatein.pc.api.state.DestroyCloneFailure;
-import org.gatein.pc.api.Portlet;
import java.util.List;
import java.util.Set;
@@ -38,6 +37,9 @@
*/
public interface PortletInvoker
{
+ /** The identifier assigned to the local PortletInvoker. */
+ String LOCAL_PORTLET_INVOKER_ID = "local";
+
/**
* Return the set of portlet exposed.
*
@@ -52,7 +54,7 @@
* @param portletContext the portlet context in the scope of this invoker
* @return the <code>PortletInfo</code> for the specified portlet
* @throws IllegalArgumentException if the portlet context is null
- * @throws PortletInvokerException a portlet invoker exception
+ * @throws PortletInvokerException a portlet invoker exception
*/
Portlet getPortlet(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException;
@@ -62,19 +64,19 @@
* @param invocation the portlet invocation
* @return the invocation response
* @throws IllegalArgumentException if the invocation is null
- * @throws PortletInvokerException a portlet invoker exception
+ * @throws PortletInvokerException a portlet invoker exception
*/
PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException;
/**
* Clone a portlet.
*
- * @param stateType the portle state type desired
+ * @param stateType the portle state type desired
* @param portletContext the portlet context to clone @return the clone id
* @return the cloned portlet context
* @throws IllegalArgumentException if the portletId is null
* @throws UnsupportedOperationException if the invoker does not support this operation
- * @throws PortletInvokerException a portlet invoker exception
+ * @throws PortletInvokerException a portlet invoker exception
*/
PortletContext createClone(PortletStateType stateType, PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
@@ -82,11 +84,10 @@
* Destroy a cloned portlet.
*
* @param portletContexts a list of portlet contexts to destroy
- * @return a list of {@link org.gatein.pc.api.state.DestroyCloneFailure}, one per clone that couldn't be
- * destroyed
+ * @return a list of {@link org.gatein.pc.api.state.DestroyCloneFailure}, one per clone that couldn't be destroyed
* @throws IllegalArgumentException if the portletContext is null
* @throws UnsupportedOperationException if the invoker does not support this operation
- * @throws PortletInvokerException a portlet invoker exception
+ * @throws PortletInvokerException a portlet invoker exception
*/
List<DestroyCloneFailure> destroyClones(List<PortletContext> portletContexts) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
@@ -98,7 +99,7 @@
* @return the properties
* @throws IllegalArgumentException if the portletContext or the keys arguments are null
* @throws UnsupportedOperationException if the invoker does not support this operation
- * @throws PortletInvokerException a portlet invoker exception
+ * @throws PortletInvokerException a portlet invoker exception
*/
PropertyMap getProperties(PortletContext portletContext, Set<String> keys) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
@@ -109,7 +110,7 @@
* @return the properties
* @throws IllegalArgumentException if the portletContext is null
* @throws UnsupportedOperationException if the invoker does not support this operation
- * @throws PortletInvokerException a portlet invoker exception
+ * @throws PortletInvokerException a portlet invoker exception
*/
PropertyMap getProperties(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
@@ -121,7 +122,7 @@
* @return the new portlet context
* @throws IllegalArgumentException if the portletContext or the properties is null
* @throws UnsupportedOperationException if the invoker does not support this operation
- * @throws PortletInvokerException a portlet invoker exception
+ * @throws PortletInvokerException a portlet invoker exception
*/
PortletContext setProperties(PortletContext portletContext, PropertyChange[] changes) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
}
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 2009-10-06 09:47:30 UTC (rev 305)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java 2009-10-06 16:30:40 UTC (rev 306)
@@ -36,13 +36,10 @@
public interface FederatingPortletInvoker extends PortletInvoker
{
- /** The identifier assigned to the local PortletInvoker. */
- String LOCAL_PORTLET_INVOKER_ID = "local";
-
/**
* Registers an invoker.
*
- * @param federatedId the invoker id to register
+ * @param federatedId the invoker id to register
* @param registeredInvoker the invoker to register
* @throws IllegalArgumentException if the invoker is null or already registered
*/
15 years, 2 months
gatein SVN: r305 - components/pc/trunk.
by do-not-reply@jboss.org
Author: mpodolin
Date: 2009-10-06 05:47:30 -0400 (Tue, 06 Oct 2009)
New Revision: 305
Modified:
components/pc/trunk/pom.xml
Log:
assembly:single bound to the package phase
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2009-10-06 03:53:12 UTC (rev 304)
+++ components/pc/trunk/pom.xml 2009-10-06 09:47:30 UTC (rev 305)
@@ -134,6 +134,18 @@
<artifactId>jboss-unit-tooling-maven2</artifactId>
<version>1.2.1</version>
</plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</pluginManagement>
</build>
15 years, 2 months
gatein SVN: r304 - in components/mop/trunk: api and 2 other directories.
by do-not-reply@jboss.org
Author: aheritier
Date: 2009-10-05 23:53:12 -0400 (Mon, 05 Oct 2009)
New Revision: 304
Modified:
components/mop/trunk/api/pom.xml
components/mop/trunk/core/pom.xml
components/mop/trunk/pom.xml
components/mop/trunk/spi/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/mop/trunk/api/pom.xml
===================================================================
--- components/mop/trunk/api/pom.xml 2009-10-06 03:53:01 UTC (rev 303)
+++ components/mop/trunk/api/pom.xml 2009-10-06 03:53:12 UTC (rev 304)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.0-Beta08</version>
+ <version>1.0.0-Beta09-SNAPSHOT</version>
</parent>
<!-- ****************** -->
Modified: components/mop/trunk/core/pom.xml
===================================================================
--- components/mop/trunk/core/pom.xml 2009-10-06 03:53:01 UTC (rev 303)
+++ components/mop/trunk/core/pom.xml 2009-10-06 03:53:12 UTC (rev 304)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.0-Beta08</version>
+ <version>1.0.0-Beta09-SNAPSHOT</version>
</parent>
<!-- ****************** -->
Modified: components/mop/trunk/pom.xml
===================================================================
--- components/mop/trunk/pom.xml 2009-10-06 03:53:01 UTC (rev 303)
+++ components/mop/trunk/pom.xml 2009-10-06 03:53:12 UTC (rev 304)
@@ -34,7 +34,7 @@
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.0-Beta08</version>
+ <version>1.0.0-Beta09-SNAPSHOT</version>
<packaging>pom</packaging>
<name>MOP</name>
@@ -54,9 +54,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/mop/tags/1.0.0-B...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/mop/tags/1.0.0-Beta08</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/mop/tags/1.0.0-Beta08</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/mop/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/mop/trunk/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/mop/trunk/</url>
</scm>
Modified: components/mop/trunk/spi/pom.xml
===================================================================
--- components/mop/trunk/spi/pom.xml 2009-10-06 03:53:01 UTC (rev 303)
+++ components/mop/trunk/spi/pom.xml 2009-10-06 03:53:12 UTC (rev 304)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.mop</groupId>
<artifactId>mop-parent</artifactId>
- <version>1.0.0-Beta08</version>
+ <version>1.0.0-Beta09-SNAPSHOT</version>
</parent>
<!-- ****************** -->
15 years, 2 months