Author: chris.laprun(a)jboss.com
Date: 2011-04-12 10:11:23 -0400 (Tue, 12 Apr 2011)
New Revision: 6195
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/StatefulPortletContext.java
components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatedPortletInvokerService.java
Log:
- GTNPC-58:
+ Re-implemented reference and dereference methods. Added test cases and fixed a couple
of issues.
+ Added internal PCComponents interface.
+ Removed id parameter from dereference method.
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 2011-04-12
10:12:33 UTC (rev 6194)
+++ components/pc/trunk/api/src/main/java/org/gatein/pc/api/PortletContext.java 2011-04-12
14:11:23 UTC (rev 6195)
@@ -56,7 +56,7 @@
public final static PortletContext LOCAL_CONSUMER_CLONE =
PortletContext.createPortletContext(PortletInvoker.LOCAL_PORTLET_INVOKER_ID +
INVOKER_SEPARATOR + CONSUMER_CLONE_ID);
public static final String INVALID_PORTLET_CONTEXT = "Invalid portlet context:
";
- private final PortletContextComponents components;
+ private final PCComponents components;
protected PortletContext(String id) throws IllegalArgumentException
{
@@ -67,169 +67,188 @@
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "portlet
id", "PortletContext");
- PortletContextComponents components = null;
- boolean isSimpleAppPortlet = false;
- boolean isOpaquePortlet = false;
- boolean isCompoundAppPortlet = false;
- boolean isCloned = false;
+ PCComponents components;
// components
if (interpret)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "portlet
id", "PortletContext");
- String trimmedId = id.trim();
+ components = interpretIntoComponents(id);
+ }
+ else
+ {
+ components = new UninterpretedPortletContextComponents(id);
+ }
- try
+ this.components = components;
+ }
+
+ private PCComponents interpretIntoComponents(String id)
+ {
+ String trimmedId = id.trim();
+ try
+ {
+ if (trimmedId.startsWith(PREFIX))
{
- if (trimmedId.startsWith(PREFIX))
+ // check the case: /application.portlet
+ int separator = trimmedId.indexOf(SEPARATOR); // find first separator, other
separator are considered part of the portlet name
+ String portletName = trimmedId.substring(separator + 1).trim();
+ String appName = trimmedId.substring(1, separator).trim();
+ if (separator != -1 && appName.length() > 0 &&
portletName.length() > 0)
{
- // check the case: /application.portlet
- int separator = trimmedId.indexOf(SEPARATOR); // find first separator,
other separator are considered part of the portlet name
- String portletName = trimmedId.substring(separator + 1).trim();
- String appName = trimmedId.substring(1, separator).trim();
- isSimpleAppPortlet = separator != -1 && appName.length() > 0
&& portletName.length() > 0;
- if (isSimpleAppPortlet)
- {
- components = new InterpretedPortletContextComponents(null, appName,
portletName, null);
- }
+ return new InterpretedPortletContextComponents(null, appName, portletName,
null);
}
else
{
- if (!(trimmedId.startsWith(PRODUCER_CLONE_ID_PREFIX) ||
trimmedId.startsWith(CONSUMER_CLONE_ID_PREFIX)))
+ throw new IllegalArgumentException("Application name and portlet
names were both empty.");
+ }
+ }
+ else
+ {
+ if (!(trimmedId.startsWith(PRODUCER_CLONE_ID_PREFIX) ||
trimmedId.startsWith(CONSUMER_CLONE_ID_PREFIX)))
+ {
+ int invoker = trimmedId.indexOf(INVOKER_SEPARATOR);
+ int prefix = trimmedId.indexOf(PREFIX);
+
+ boolean isCompoundAppPortlet = false;
+ if (prefix != -1)
{
- int invoker = trimmedId.indexOf(INVOKER_SEPARATOR);
- int prefix = trimmedId.indexOf(PREFIX);
+ // check if we have the case: invokerId./something
+ if (invoker > 0 && invoker < prefix)
+ {
+ String invokerId = trimmedId.substring(0, invoker).trim();
- if (prefix != -1)
- {
- // check if we have the case: invokerId./something
- if (invoker > 0 && invoker < prefix)
+ int separator = trimmedId.indexOf(SEPARATOR, prefix);
+ // check the case: invokerId./application.portlet
+ if (separator != -1)
{
- String invokerId = trimmedId.substring(0, invoker).trim();
-
- int separator = trimmedId.indexOf(SEPARATOR, prefix);
- // check the case: invokerId./application.portlet
- if (separator != -1)
+ String portletName = trimmedId.substring(separator + 1).trim();
+ trimmedId = trimmedId.substring(invoker + 1).trim();
+ String applicationName = trimmedId.substring(1,
trimmedId.indexOf(SEPARATOR)).trim();
+ isCompoundAppPortlet = invokerId.length() > 0 &&
applicationName.length() > 0 && portletName.length() > 0;
+ if (isCompoundAppPortlet)
{
- String portletName = trimmedId.substring(separator +
1).trim();
- trimmedId = trimmedId.substring(invoker + 1).trim();
- String applicationName = trimmedId.substring(1,
trimmedId.indexOf(SEPARATOR)).trim();
- isCompoundAppPortlet = invokerId.length() > 0 &&
applicationName.length() > 0 && portletName.length() > 0;
- if (isCompoundAppPortlet)
- {
- components = new
InterpretedPortletContextComponents(invokerId, applicationName, portletName, null);
- }
+ return new InterpretedPortletContextComponents(invokerId,
applicationName, portletName, null);
}
}
}
+ }
- // check if we have the case: invokerId.something
- if (!isCompoundAppPortlet && invoker > 0)
+ // check if we have the case: invokerId.something
+ if (!isCompoundAppPortlet && invoker > 0)
+ {
+ String invokerId = trimmedId.substring(0, invoker).trim();
+
+ if (invokerId.length() > 0)
{
- String invokerId = trimmedId.substring(0, invoker).trim();
+ String portletNameOrStateId = trimmedId.substring(invoker +
1).trim();
- if (invokerId.length() > 0)
+ if (portletNameOrStateId.length() > 0)
{
- String portletNameOrStateId = trimmedId.substring(invoker +
1).trim();
-
- if (portletNameOrStateId.length() > 0)
+ boolean isProducerClone =
portletNameOrStateId.startsWith(PRODUCER_CLONE_ID_PREFIX);
+ boolean isConsumerClone =
portletNameOrStateId.startsWith(CONSUMER_CLONE_ID_PREFIX);
+ if (isProducerClone || isConsumerClone)
{
- boolean isProducerClone =
portletNameOrStateId.startsWith(PRODUCER_CLONE_ID_PREFIX);
- boolean isConsumerClone =
portletNameOrStateId.startsWith(CONSUMER_CLONE_ID_PREFIX);
- if (isProducerClone || isConsumerClone)
+ int prefixLength = isProducerClone ?
PRODUCER_CLONE_PREFIX_LENGTH : CONSUMER_CLONE_PREFIX_LENGTH;
+ portletNameOrStateId =
portletNameOrStateId.substring(prefixLength).trim();
+ if (portletNameOrStateId.length() > 0)
{
- int prefixLength = isProducerClone ?
PRODUCER_CLONE_PREFIX_LENGTH : CONSUMER_CLONE_PREFIX_LENGTH;
- portletNameOrStateId =
portletNameOrStateId.substring(prefixLength).trim();
- if (portletNameOrStateId.length() > 0)
- {
- isCloned = true;
- components = new
InterpretedPortletContextComponents(invokerId, null, portletNameOrStateId,
isProducerClone);
- }
+ return new InterpretedPortletContextComponents(invokerId,
null, portletNameOrStateId, isProducerClone);
}
- else
- {
- isOpaquePortlet = true;
- components = new
InterpretedPortletContextComponents(invokerId, null, portletNameOrStateId, null);
- }
}
+ else
+ {
+ return new InterpretedPortletContextComponents(invokerId,
null, portletNameOrStateId, null);
+ }
}
}
}
- else
+
+ // we're in the case where we have an arbitrary string
+ throw new IllegalArgumentException("'" + trimmedId +
"' doesn't fit any known PortletContext formats");
+ }
+ else
+ {
+ boolean isProducerClone = trimmedId.startsWith(PRODUCER_CLONE_ID_PREFIX);
+ boolean isConsumerClone = trimmedId.startsWith(CONSUMER_CLONE_ID_PREFIX);
+ if (isProducerClone || isConsumerClone)
{
- boolean isProducerClone =
trimmedId.startsWith(PRODUCER_CLONE_ID_PREFIX);
- boolean isConsumerClone =
trimmedId.startsWith(CONSUMER_CLONE_ID_PREFIX);
- if (isProducerClone || isConsumerClone)
+ int prefixLength = isProducerClone ? PRODUCER_CLONE_PREFIX_LENGTH :
CONSUMER_CLONE_PREFIX_LENGTH;
+ trimmedId = trimmedId.substring(prefixLength).trim();
+ if (trimmedId.length() > 0)
{
- int prefixLength = isProducerClone ? PRODUCER_CLONE_PREFIX_LENGTH :
CONSUMER_CLONE_PREFIX_LENGTH;
- trimmedId = trimmedId.substring(prefixLength).trim();
- if (trimmedId.length() > 0)
- {
- isCloned = true;
- components = new InterpretedPortletContextComponents(null, null,
trimmedId, isProducerClone);
- }
+ return new InterpretedPortletContextComponents(null, null,
trimmedId, isProducerClone);
}
}
+
+ // we're in the case where we have an arbitrary string
+ throw new IllegalArgumentException("'" + trimmedId +
"' doesn't fit any known PortletContext formats");
}
}
- catch (Exception e)
- {
- throw new IllegalArgumentException(INVALID_PORTLET_CONTEXT + id, e);
- }
}
- else
+ catch (Exception e)
{
- components = new UninterpretedPortletContextComponents(id);
+ throw new IllegalArgumentException(INVALID_PORTLET_CONTEXT + id, e);
}
-
- if (interpret && !(isSimpleAppPortlet || isCompoundAppPortlet ||
isOpaquePortlet || isCloned))
- {
- throw new IllegalArgumentException(INVALID_PORTLET_CONTEXT + id);
- }
-
- this.components = components;
}
- protected PortletContext(PortletContextComponents components)
+ protected PortletContext(PCComponents components)
{
ParameterValidation.throwIllegalArgExceptionIfNull(components, "portlet
context components");
this.components = components;
}
- public static PortletContext dereference(String invokerId, PortletContext
compoundPortletContext)
+ public static PortletContext dereference(PortletContext compoundPortletContext)
{
- String portletId = compoundPortletContext.getId().substring(invokerId.length() +
INVOKER_SEPARATOR.length());
- if (compoundPortletContext instanceof StatefulPortletContext)
+ ParameterValidation.throwIllegalArgExceptionIfNull(compoundPortletContext,
"PortletContext to dereference");
+
+ PCComponents components = compoundPortletContext.getInternalComponents();
+ if (!components.isInterpreted())
{
- StatefulPortletContext<?> compoundStatefulPortletContext =
(StatefulPortletContext<?>)compoundPortletContext;
- return StatefulPortletContext.create(portletId,
compoundStatefulPortletContext);
+ try
+ {
+ // try interpretation to see if we can extract an invoker id from the
components
+ components = compoundPortletContext.interpret();
+ }
+ catch (IllegalArgumentException e)
+ {
+ // we couldn't interpret the given portlet context so return it as is
+ return compoundPortletContext;
+ }
}
- else
- {
- return createPortletContext(portletId);
- }
+
+ return createCopyWithNewComponents(compoundPortletContext,
components.createCopyWithoutInvoker());
}
+ protected PCComponents interpret()
+ {
+ return interpretIntoComponents(components.getId());
+ }
+
public static PortletContext reference(String invokerId, PortletContext
portletContext)
{
- String compoundPortletId = reference(portletContext.getId(), invokerId);
- if (portletContext instanceof StatefulPortletContext)
+ ParameterValidation.throwIllegalArgExceptionIfNull(portletContext,
"PortletContext to reference");
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(invokerId, "Invoker
id to reference with", null);
+
+ final PCComponents newComponents =
portletContext.getInternalComponents().createCopyWithInvoker(invokerId);
+
+ return createCopyWithNewComponents(portletContext, newComponents);
+ }
+
+ private static PortletContext createCopyWithNewComponents(PortletContext
portletContextToCopy, PCComponents newComponents)
+ {
+ if (portletContextToCopy instanceof StatefulPortletContext)
{
- StatefulPortletContext<?> statefulPortletContext =
(StatefulPortletContext<?>)portletContext;
- return StatefulPortletContext.create(compoundPortletId,
statefulPortletContext);
+ StatefulPortletContext<?> compoundStatefulPortletContext =
(StatefulPortletContext<?>)portletContextToCopy;
+ return StatefulPortletContext.create(newComponents,
compoundStatefulPortletContext);
}
else
{
- return createPortletContext(compoundPortletId);
+ return new PortletContext(newComponents);
}
}
- private static String reference(String portletId, String invokerId)
- {
- return invokerId + INVOKER_SEPARATOR + portletId;
- }
-
public boolean equals(Object o)
{
if (this == o)
@@ -334,39 +353,51 @@
public PortletContextComponents getComponents()
{
+ return getInternalComponents();
+ }
+
+ private PCComponents getInternalComponents()
+ {
return components;
}
public static interface PortletContextComponents
{
- public String getApplicationName();
+ String getApplicationName();
- public String getPortletName();
+ String getPortletName();
- public String getInvokerName();
+ String getInvokerName();
- public boolean isCloned();
+ boolean isCloned();
- public boolean isProducerCloned();
+ boolean isProducerCloned();
- public boolean isConsumerCloned();
+ boolean isConsumerCloned();
- public String getStateId();
+ String getStateId();
- public String getId();
+ String getId();
- public boolean isInterpreted();
+ boolean isInterpreted();
}
- private static class InterpretedPortletContextComponents implements
PortletContextComponents
+ protected static interface PCComponents extends PortletContextComponents
{
+ PCComponents createCopyWithoutInvoker();
+
+ PCComponents createCopyWithInvoker(String invoker);
+ }
+
+ private static class InterpretedPortletContextComponents implements PCComponents
+ {
private final String applicationName;
private final String portletName;
private final String invokerName;
private final Boolean producerCloned;
private final String id;
- public InterpretedPortletContextComponents(String invokerName, String
applicationName, String portletNameOrStateId, Boolean producerCloned)
+ InterpretedPortletContextComponents(String invokerName, String applicationName,
String portletNameOrStateId, Boolean producerCloned)
{
this.producerCloned = producerCloned;
@@ -428,9 +459,19 @@
{
return true;
}
+
+ public PCComponents createCopyWithoutInvoker()
+ {
+ return new InterpretedPortletContextComponents(null, applicationName,
portletName, producerCloned);
+ }
+
+ public PCComponents createCopyWithInvoker(String invoker)
+ {
+ return new InterpretedPortletContextComponents(invoker, applicationName,
portletName, producerCloned);
+ }
}
- private static class UninterpretedPortletContextComponents implements
PortletContextComponents
+ private static class UninterpretedPortletContextComponents implements PCComponents
{
private static final String ERROR = "This PortletContext was not intepreted,
only the portlet name is available!";
private final String portletName;
@@ -484,5 +525,15 @@
{
return false;
}
+
+ public PCComponents createCopyWithoutInvoker()
+ {
+ throw new IllegalStateException(ERROR);
+ }
+
+ public PCComponents createCopyWithInvoker(String invoker)
+ {
+ return new InterpretedPortletContextComponents(invoker, null, portletName,
null);
+ }
}
}
Modified:
components/pc/trunk/api/src/main/java/org/gatein/pc/api/StatefulPortletContext.java
===================================================================
---
components/pc/trunk/api/src/main/java/org/gatein/pc/api/StatefulPortletContext.java 2011-04-12
10:12:33 UTC (rev 6194)
+++
components/pc/trunk/api/src/main/java/org/gatein/pc/api/StatefulPortletContext.java 2011-04-12
14:11:23 UTC (rev 6195)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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. *
- ******************************************************************************/
+/*
+ * 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.
+ */
package org.gatein.pc.api;
import org.gatein.common.util.ParameterValidation;
@@ -40,6 +40,11 @@
return new StatefulPortletContext<S>(id, spc.type, spc.state);
}
+ static <S extends Serializable> StatefulPortletContext<S>
create(PortletContext.PCComponents components, StatefulPortletContext<S> spc)
+ {
+ return new StatefulPortletContext<S>(components, spc.type, spc.state);
+ }
+
public static <S extends Serializable> StatefulPortletContext<S> create(
String id,
PortletStateType<S> type,
@@ -58,15 +63,24 @@
{
super(id);
- //
ParameterValidation.throwIllegalArgExceptionIfNull(type, "Portlet
type");
ParameterValidation.throwIllegalArgExceptionIfNull(state, "Portlet
state");
- //
this.type = type;
this.state = state;
}
+ StatefulPortletContext(PCComponents components, PortletStateType<S> type, S
state)
+ {
+ super(components);
+
+ ParameterValidation.throwIllegalArgExceptionIfNull(type, "Portlet
type");
+ ParameterValidation.throwIllegalArgExceptionIfNull(state, "Portlet
state");
+
+ this.type = type;
+ this.state = state;
+ }
+
public PortletStateType<S> getType()
{
return type;
Modified:
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 2011-04-12
10:12:33 UTC (rev 6194)
+++
components/pc/trunk/api/src/test/java/org/gatein/pc/api/PortletContextTestCase.java 2011-04-12
14:11:23 UTC (rev 6195)
@@ -31,6 +31,27 @@
*/
public class PortletContextTestCase extends TestCase
{
+ public void testSimple()
+ {
+ try
+ {
+ PortletContext.createPortletContext("foo");
+ fail("Invalid by default");
+ }
+ catch (Exception e)
+ {
+ // expected
+ }
+
+ final PortletContext foo = PortletContext.createPortletContext("foo",
false);
+ assertEquals("foo", foo.getId());
+ final PortletContext.PortletContextComponents components = foo.getComponents();
+ assertNotNull(components);
+ assertFalse(components.isInterpreted());
+ assertEquals("foo", components.getId());
+ assertEquals("foo", components.getPortletName());
+ }
+
public void testGetComponents()
{
PortletContext context =
PortletContext.createPortletContext("/applicationName.portletName");
@@ -65,6 +86,16 @@
// expected
}
+ try
+ {
+ PortletContext.createPortletContext("/app");
+ fail("invalid");
+ }
+ catch (IllegalArgumentException e)
+ {
+ // expected
+ }
+
String portletId = "applicationName" + PortletContext.INVOKER_SEPARATOR +
"portletName";
context = PortletContext.createPortletContext(portletId);
assertEquals(portletId, context.getId());
@@ -363,4 +394,55 @@
// expected
}
}
+
+ public void testReference()
+ {
+ final String invoker = "invoker";
+ final PortletContext context = PortletContext.createPortletContext("app",
"portlet");
+
+ final PortletContext referenced = PortletContext.reference(invoker, context);
+ final PortletContext.PortletContextComponents components =
referenced.getComponents();
+ assertTrue(components.isInterpreted());
+
+ assertEquals(invoker, components.getInvokerName());
+
+ final PortletContext.PortletContextComponents originalComponents =
context.getComponents();
+ assertEquals(originalComponents.getApplicationName(),
components.getApplicationName());
+ assertEquals(originalComponents.getPortletName(), components.getPortletName());
+ assertEquals(originalComponents.isCloned(), components.isCloned());
+ assertEquals(originalComponents.isConsumerCloned(),
components.isConsumerCloned());
+ assertEquals(originalComponents.isProducerCloned(),
components.isProducerCloned());
+ }
+
+ public void testDereferenceDoesNotAffectNonReferencedPortletContexts()
+ {
+ final PortletContext foo = PortletContext.createPortletContext("foo",
false);
+ assertEquals(foo, PortletContext.dereference(foo));
+ }
+
+ public void testDereferenceWorksOnValidUninterpretedPortletContexts()
+ {
+ final String invoker = "foo";
+ final PortletContext referenced = PortletContext.createPortletContext(invoker +
PortletContext.INVOKER_SEPARATOR + "portlet", false);
+ final PortletContext dereferenced = PortletContext.dereference(referenced);
+
+ // force interpretation of referenced
+ final PortletContext.PortletContextComponents referencedComponents =
referenced.interpret();
+ assertTrue(referencedComponents.isInterpreted());
+ assertEquals(invoker, referencedComponents.getInvokerName());
+
+ final PortletContext.PortletContextComponents dereferencedComponents =
dereferenced.getComponents();
+ assertTrue(dereferencedComponents.isInterpreted());
+
+ assertEquals(referencedComponents.getPortletName(),
dereferencedComponents.getPortletName());
+ assertNull(dereferencedComponents.getInvokerName());
+ assertFalse(dereferenced.getId().contains(invoker));
+ }
+
+ public void testReferencingRoundtrip()
+ {
+ final PortletContext context = PortletContext.createPortletContext("app",
"portlet");
+ final PortletContext referencedContext =
PortletContext.reference("invoker", context);
+ assertEquals(context, PortletContext.dereference(referencedContext));
+ }
}
Modified:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatedPortletInvokerService.java
===================================================================
---
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatedPortletInvokerService.java 2011-04-12
10:12:33 UTC (rev 6194)
+++
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatedPortletInvokerService.java 2011-04-12
14:11:23 UTC (rev 6195)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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. *
- ******************************************************************************/
+/*
+ * 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.
+ */
package org.gatein.pc.federation.impl;
import org.gatein.pc.api.Portlet;
@@ -242,7 +242,7 @@
private PortletContext dereference(PortletContext compoundPortletContext)
{
- return PortletContext.dereference(id, compoundPortletContext);
+ return PortletContext.dereference(compoundPortletContext);
}
private PortletContext reference(PortletContext portletContext)