Author: julien(a)jboss.com
Date: 2008-02-03 20:27:57 -0500 (Sun, 03 Feb 2008)
New Revision: 9724
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ConsumerCacheInterceptor.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletRequestParameterMap.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/ResourceRequestParameterMap.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventRequestImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventResponseImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceRequestImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceResponseImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceURLImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractActionContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractEventContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractPortletInvocationContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractRenderContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractResourceContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/ActionInvocation.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/EventInvocation.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/PortletInvocation.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/ResourceInvocation.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ActionContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/EventContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/PortletInvocationContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ResourceInvocationContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/ActionContextSupport.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/PortletInvocationContextSupport.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/RenderContextSupport.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PropagateDoFilterArgsFilter1.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PropagateDoFilterArgsFilter2.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/state/ActionContextImpl.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ResourceTestContext.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestActionContext.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestEventContext.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestRenderContext.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequestHandler.java
Log:
- refactor input data for a portlet invocation to be on the invocation instead of being on
the invocation context
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ConsumerCacheInterceptor.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ConsumerCacheInterceptor.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ConsumerCacheInterceptor.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -33,7 +33,6 @@
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ParametersStateString;
import org.jboss.portal.portlet.cache.CacheControl;
-import org.jboss.portal.portlet.spi.RenderContext;
import org.jboss.portal.common.invocation.InvocationException;
import org.jboss.portal.common.invocation.AttributeResolver;
import org.jboss.portal.WindowState;
@@ -62,12 +61,12 @@
//
if (invocation instanceof RenderInvocation)
{
- RenderContext renderCtx = (RenderContext)invocation.getContext();
+ RenderInvocation renderInvocation = (RenderInvocation)invocation;
//
- StateString navState = renderCtx.getNavigationalState();
- WindowState windowState = renderCtx.getWindowState();
- Mode mode = renderCtx.getMode();
+ StateString navState = renderInvocation.getNavigationalState();
+ WindowState windowState = renderInvocation.getWindowState();
+ Mode mode = renderInvocation.getMode();
//
CacheEntry cachedEntry = (CacheEntry)resolver.getAttribute(scopeKey);
@@ -123,12 +122,10 @@
// If no valid fragment we must invoke
if (fragment == null || cachedEntry.expirationTimeMillis <
System.currentTimeMillis())
{
- RenderInvocation render = (RenderInvocation)invocation;
-
// Set validation token for revalidation only we have have a fragment
if (fragment != null)
{
- render.setValidationToken(cachedEntry.validationToken);
+ renderInvocation.setValidationToken(cachedEntry.validationToken);
}
// Invoke
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -222,8 +222,18 @@
for (LifeCyclePhase phase : filterInfo.getLifeCycles())
{
Class<? extends PortletFilter> type = phaseToType.get(phase);
- FilterKey key = new FilterKey(filterInfo.getName(), type);
- filters.put(key, lifeCycle);
+
+ //
+ if (type.isInstance(lifeCycle.getInstance()))
+ {
+ FilterKey key = new FilterKey(filterInfo.getName(), type);
+ filters.put(key, lifeCycle);
+ }
+ else
+ {
+ log.error("Cannot realize filter mapping on phase " + phase +
" for filter " + filterInfo.getName() +
+ " with class " + className + " that does not
implement the interface " + type.getName());
+ }
}
}
catch (PortletInitializationException e)
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletRequestParameterMap.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletRequestParameterMap.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletRequestParameterMap.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -23,13 +23,13 @@
package org.jboss.portal.portlet.impl.jsr168;
import org.jboss.portal.common.util.ParameterMap;
-import org.jboss.portal.portlet.spi.ActionContext;
-import org.jboss.portal.portlet.spi.EventContext;
-import org.jboss.portal.portlet.spi.RenderContext;
-import org.jboss.portal.portlet.spi.ResourceInvocationContext;
-import org.jboss.portal.portlet.spi.PortletInvocationContext;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ParametersStateString;
+import org.jboss.portal.portlet.invocation.PortletInvocation;
+import org.jboss.portal.portlet.invocation.EventInvocation;
+import org.jboss.portal.portlet.invocation.RenderInvocation;
+import org.jboss.portal.portlet.invocation.ActionInvocation;
+import org.jboss.portal.portlet.invocation.ResourceInvocation;
import org.jboss.portal.portlet.info.NavigationInfo;
import java.util.Iterator;
@@ -50,33 +50,33 @@
/**
* Factory method that will chose the right builder according to the context argument
type.
*/
- public static PortletRequestParameterMap create(NavigationInfo navigationInfo,
PortletInvocationContext context)
+ public static PortletRequestParameterMap create(NavigationInfo navigationInfo,
PortletInvocation invocation)
{
- if (context instanceof EventContext)
+ if (invocation instanceof EventInvocation)
{
- return create(navigationInfo, (EventContext)context);
+ return create(navigationInfo, (EventInvocation)invocation);
}
- else if (context instanceof ActionContext)
+ else if (invocation instanceof ActionInvocation)
{
- return create(navigationInfo, (ActionContext)context);
+ return create(navigationInfo, (ActionInvocation)invocation);
}
- else if (context instanceof RenderContext)
+ else if (invocation instanceof RenderInvocation)
{
- return create(navigationInfo, (RenderContext)context);
+ return create(navigationInfo, (RenderInvocation)invocation);
}
else
{
- return ResourceRequestParameterMap.create(navigationInfo,
(ResourceInvocationContext)context);
+ return ResourceRequestParameterMap.create(navigationInfo,
(ResourceInvocation)invocation);
}
}
- public static PortletRequestParameterMap create(NavigationInfo navigationInfo,
EventContext context)
+ public static PortletRequestParameterMap create(NavigationInfo navigationInfo,
EventInvocation invocation)
{
// Build public parameters
- ParameterMap publicParameters = safeBuildPublicParameters(navigationInfo,
context.getPublicNavigationalState());
+ ParameterMap publicParameters = safeBuildPublicParameters(navigationInfo,
invocation.getPublicNavigationalState());
// Get render parameters
- ParameterMap privateParameters =
safeBuildParameters(context.getNavigationalState());
+ ParameterMap privateParameters =
safeBuildParameters(invocation.getNavigationalState());
// Build combined map
ParameterMap parameters = safeCombine(privateParameters, publicParameters);
@@ -85,7 +85,7 @@
return new PortletRequestParameterMap(parameters, privateParameters,
publicParameters);
}
- public static PortletRequestParameterMap create(NavigationInfo navigationInfo,
RenderContext context)
+ public static PortletRequestParameterMap create(NavigationInfo navigationInfo,
RenderInvocation context)
{
// Build public parameters
ParameterMap publicParameters = safeBuildPublicParameters(navigationInfo,
context.getPublicNavigationalState());
@@ -109,16 +109,16 @@
* - getPrivateParameterMap() : the interaction parameter + form parameter
* - getPublicParameterMap() : public render parameter
*/
- public static PortletRequestParameterMap create(NavigationInfo navigationInfo,
ActionContext context)
+ public static PortletRequestParameterMap create(NavigationInfo navigationInfo,
ActionInvocation invocation)
{
// Build public parameters
- ParameterMap publicParameters = safeBuildPublicParameters(navigationInfo,
context.getPublicNavigationalState());
+ ParameterMap publicParameters = safeBuildPublicParameters(navigationInfo,
invocation.getPublicNavigationalState());
// The private parameters
- ParameterMap privateParameters =
safeBuildParameters(context.getInteractionState());
+ ParameterMap privateParameters =
safeBuildParameters(invocation.getInteractionState());
// Combine form if we have one
- privateParameters = safeCombine(privateParameters, context.getForm());
+ privateParameters = safeCombine(privateParameters, invocation.getForm());
// Combine to get shared map
ParameterMap parameters = safeCombine(privateParameters, publicParameters);
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/ResourceRequestParameterMap.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/ResourceRequestParameterMap.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/ResourceRequestParameterMap.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -25,6 +25,7 @@
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.info.NavigationInfo;
import org.jboss.portal.portlet.spi.ResourceInvocationContext;
+import org.jboss.portal.portlet.invocation.ResourceInvocation;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -70,19 +71,19 @@
* - getPublicParameterMap() : public render parameter
* - getPrivateRenderParameterMap() : render parameter
*/
- public static ResourceRequestParameterMap create(NavigationInfo navigationInfo,
ResourceInvocationContext context)
+ public static ResourceRequestParameterMap create(NavigationInfo navigationInfo,
ResourceInvocation invocation)
{
// Build public parameters
- ParameterMap publicParameters = safeBuildPublicParameters(navigationInfo,
context.getPublicNavigationalState());
+ ParameterMap publicParameters = safeBuildPublicParameters(navigationInfo,
invocation.getPublicNavigationalState());
// Combine private render parameters if any
- ParameterMap privateRenderParameters =
safeBuildParameters(context.getNavigationalState());
+ ParameterMap privateRenderParameters =
safeBuildParameters(invocation.getNavigationalState());
// The private parameters
- ParameterMap privateParameters = safeBuildParameters(context.getResourceState());
+ ParameterMap privateParameters =
safeBuildParameters(invocation.getResourceState());
// Combine form if we have one
- privateParameters = safeCombine(privateParameters, context.getForm());
+ privateParameters = safeCombine(privateParameters, invocation.getForm());
// Combien with private render parameters
privateParameters = safeCombine(privateParameters, privateRenderParameters);
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.jsr168.api;
-import org.jboss.portal.portlet.spi.EventContext;
+import org.jboss.portal.portlet.invocation.EventInvocation;
import javax.portlet.Event;
import javax.xml.namespace.QName;
@@ -36,25 +36,25 @@
{
/** . */
- private final EventContext context;
+ private final EventInvocation invocation;
- public EventImpl(EventContext context)
+ public EventImpl(EventInvocation invocation)
{
- this.context = context;
+ this.invocation = invocation;
}
public QName getQName()
{
- return context.getName();
+ return invocation.getName();
}
public String getName()
{
- return context.getName().getLocalPart();
+ return invocation.getName().getLocalPart();
}
public Serializable getValue()
{
- return context.getPayload();
+ return invocation.getPayload();
}
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventRequestImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventRequestImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventRequestImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -23,7 +23,6 @@
package org.jboss.portal.portlet.impl.jsr168.api;
import org.jboss.portal.portlet.invocation.EventInvocation;
-import org.jboss.portal.portlet.spi.EventContext;
import javax.portlet.EventRequest;
import javax.portlet.Event;
@@ -38,16 +37,22 @@
/** . */
private EventImpl event;
+ /** . */
+ private EventInvocation eventInvocation;
+
public EventRequestImpl(EventInvocation invocation)
{
super(invocation);
+
+ //
+ this.eventInvocation = invocation;
}
public Event getEvent()
{
if (event == null)
{
- event = new EventImpl((EventContext)invocation.getContext());
+ event = new EventImpl(eventInvocation);
}
//
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventResponseImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventResponseImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/EventResponseImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -23,8 +23,6 @@
package org.jboss.portal.portlet.impl.jsr168.api;
import org.jboss.portal.portlet.invocation.EventInvocation;
-import org.jboss.portal.portlet.spi.PortletInvocationContext;
-import org.jboss.portal.portlet.ParametersStateString;
import javax.portlet.EventResponse;
import javax.portlet.EventRequest;
@@ -54,12 +52,9 @@
}
//
- PortletInvocationContext context = invocation.getContext();
-
- //
WantUpdate update = wantUpdate();
- update.mode = context.getMode();
- update.windowState = context.getWindowState();
+ update.mode = invocation.getMode();
+ update.windowState = invocation.getWindowState();
// update.navigationalState =
ParametersStateString.create(context.getNavigationalState()).getParameters();
// update.publicNavigationalState = context.getPublicNavigationalState();
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/PortletRequestImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -163,7 +163,7 @@
this.attributes = new PortletRequestAttributes(container, userContext, realReq);
this.preferences = new PortletPreferencesImpl(prefs, containerPrefs, validator,
mode);
this.navigationInfo = navigationInfo;
- this.requestParameterMap = PortletRequestParameterMap.create(navigationInfo,
invocation.getContext());
+ this.requestParameterMap = PortletRequestParameterMap.create(navigationInfo,
invocation);
this.supportedModes = buildSupportedModes();
this.supportedWindowStates = buildSupportedWindowState();
}
@@ -223,13 +223,13 @@
public WindowState getWindowState()
{
- String s = invocation.getContext().getWindowState().toString();
+ String s = invocation.getWindowState().toString();
return PortletUtils.decodeWindowState(s);
}
public PortletMode getPortletMode()
{
- String s = invocation.getContext().getMode().toString();
+ String s = invocation.getMode().toString();
return PortletUtils.decodePortletMode(s);
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceRequestImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceRequestImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceRequestImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -23,7 +23,6 @@
package org.jboss.portal.portlet.impl.jsr168.api;
import org.jboss.portal.portlet.invocation.ResourceInvocation;
-import org.jboss.portal.portlet.spi.ResourceInvocationContext;
import org.jboss.portal.portlet.impl.jsr168.ResourceRequestParameterMap;
import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.common.util.ParameterMap;
@@ -40,23 +39,19 @@
{
/** . */
- private final ResourceInvocationContext resourceContext;
+ private final ResourceInvocation resourceInvocation;
- /** . */
- private final String validationToken;
-
public ResourceRequestImpl(ResourceInvocation invocation)
{
super(invocation);
//
- this.resourceContext = invocation.getContext();
- this.validationToken = invocation.getValidationToken();
+ this.resourceInvocation = invocation;
}
public String getResourceID()
{
- return resourceContext.getResourceId();
+ return resourceInvocation.getResourceId();
}
public Map<String, String[]> getPrivateRenderParameterMap()
@@ -76,19 +71,19 @@
public String getCacheability()
{
- return ResourceURLImpl.toJSR168(resourceContext.getCacheLevel());
+ return ResourceURLImpl.toJSR168(resourceInvocation.getCacheLevel());
}
public String getETag()
{
- return validationToken;
+ return resourceInvocation.getValidationToken();
}
protected void initProperties(MultiValuedPropertyMap<String> properties)
{
- if (validationToken != null)
+ if (resourceInvocation.getValidationToken() != null)
{
- properties.setValue(ETAG, validationToken);
+ properties.setValue(ETAG, resourceInvocation.getValidationToken());
}
}
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceResponseImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceResponseImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceResponseImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -44,7 +44,7 @@
super(invocation, preq);
//
- this.cacheability = invocation.getContext().getCacheLevel();
+ this.cacheability = invocation.getCacheLevel();
}
public void setLocale(Locale locale)
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceURLImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceURLImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/ResourceURLImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -81,7 +81,7 @@
//
if (invocation instanceof ResourceInvocation)
{
- url.parentCacheLevel =
((ResourceInvocation)invocation).getContext().getCacheLevel();
+ url.parentCacheLevel = ((ResourceInvocation)invocation).getCacheLevel();
}
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractActionContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractActionContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractActionContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -23,11 +23,7 @@
package org.jboss.portal.portlet.impl.spi;
import org.jboss.portal.portlet.spi.ActionContext;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -35,37 +31,8 @@
*/
public abstract class AbstractActionContext extends AbstractPortletInvocationContext
implements ActionContext
{
-
- /** . */
- protected StateString interactionState;
-
- /** . */
- protected ParameterMap form;
-
-
- protected AbstractActionContext(
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- MarkupInfo markupInfo,
- StateString interactionState,
- ParameterMap form)
+ protected AbstractActionContext(MarkupInfo markupInfo)
{
- super(mode, windowState, navigationalState, publicNavigationalState, markupInfo);
-
- //
- this.interactionState = interactionState;
- this.form = form;
+ super(markupInfo);
}
-
- public StateString getInteractionState()
- {
- return interactionState;
- }
-
- public ParameterMap getForm()
- {
- return form;
- }
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractEventContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractEventContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractEventContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,17 +22,9 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.spi;
-import org.jboss.portal.portlet.spi.RenderContext;
import org.jboss.portal.portlet.spi.EventContext;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
-import javax.xml.namespace.QName;
-import java.io.Serializable;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
@@ -40,35 +32,8 @@
public abstract class AbstractEventContext extends AbstractPortletInvocationContext
implements EventContext
{
- /** . */
- protected QName name;
-
- /** . */
- protected Serializable payload;
-
- protected AbstractEventContext(
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- MarkupInfo markupInfo,
- QName name,
- Serializable payload)
+ protected AbstractEventContext(MarkupInfo markupInfo)
{
- super(mode, windowState, navigationalState, publicNavigationalState, markupInfo);
-
- //
- this.name = name;
- this.payload = payload;
+ super(markupInfo);
}
-
- public QName getName()
- {
- return name;
- }
-
- public Serializable getPayload()
- {
- return payload;
- }
}
\ No newline at end of file
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractPortletInvocationContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractPortletInvocationContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractPortletInvocationContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -24,11 +24,7 @@
import org.jboss.portal.common.invocation.AbstractInvocationContext;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -45,29 +41,8 @@
/** . */
protected final MarkupInfo markupInfo;
- /** . */
- protected final Mode mode;
-
- /** . */
- protected final WindowState windowState;
-
- /** . */
- protected final StateString navigationalState;
-
- /** . */
- protected final ParameterMap publicNavigationalState;
-
- protected AbstractPortletInvocationContext(
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- MarkupInfo markupInfo)
+ protected AbstractPortletInvocationContext(MarkupInfo markupInfo)
{
- this.mode = mode;
- this.windowState = windowState;
- this.navigationalState = navigationalState;
- this.publicNavigationalState = publicNavigationalState;
this.markupInfo = markupInfo;
}
@@ -105,26 +80,6 @@
throw new IllegalArgumentException("Invalid URL " + url);
}
- public Mode getMode()
- {
- return mode;
- }
-
- public WindowState getWindowState()
- {
- return windowState;
- }
-
- public ParameterMap getPublicNavigationalState()
- {
- return publicNavigationalState;
- }
-
- public StateString getNavigationalState()
- {
- return navigationalState;
- }
-
public MarkupInfo getMarkupInfo()
{
return markupInfo;
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractRenderContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractRenderContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractRenderContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -23,11 +23,7 @@
package org.jboss.portal.portlet.impl.spi;
import org.jboss.portal.portlet.spi.RenderContext;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -36,13 +32,8 @@
public abstract class AbstractRenderContext extends AbstractPortletInvocationContext
implements RenderContext
{
- protected AbstractRenderContext(
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- MarkupInfo markupInfo)
+ protected AbstractRenderContext(MarkupInfo markupInfo)
{
- super(mode, windowState, navigationalState, publicNavigationalState, markupInfo);
+ super(markupInfo);
}
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractResourceContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractResourceContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/spi/AbstractResourceContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,12 +22,7 @@
******************************************************************************/
package org.jboss.portal.portlet.impl.spi;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.cache.CacheLevel;
import org.jboss.portal.portlet.spi.ResourceInvocationContext;
/**
@@ -37,55 +32,8 @@
public abstract class AbstractResourceContext extends AbstractPortletInvocationContext
implements ResourceInvocationContext
{
- /** . */
- protected final String resourceId;
-
- /** . */
- protected final StateString resourceState;
-
- /** . */
- protected final ParameterMap form;
-
- /** . */
- protected final CacheLevel cacheLevel;
-
- public AbstractResourceContext(
- String resourceId,
- CacheLevel cacheLevel,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- StateString resourceState,
- ParameterMap form,
- MarkupInfo markupInfo)
+ public AbstractResourceContext(MarkupInfo markupInfo)
{
- super(mode, windowState, navigationalState, publicNavigationalState, markupInfo);
-
- //
- this.resourceId = resourceId;
- this.resourceState = resourceState;
- this.form = form;
- this.cacheLevel = cacheLevel;
+ super(markupInfo);
}
-
- public String getResourceId()
- {
- return resourceId;
- }
-
- public StateString getResourceState()
- {
- return resourceState;
- }
-
- public ParameterMap getForm()
- {
- return form;
- }
-
- public CacheLevel getCacheLevel()
- {
- return cacheLevel;
- }
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/ActionInvocation.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/ActionInvocation.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/ActionInvocation.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -24,6 +24,8 @@
import org.jboss.portal.portlet.spi.ActionContext;
import org.jboss.portal.portlet.spi.RequestContext;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.common.util.ParameterMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -38,6 +40,12 @@
/** The request context. */
protected RequestContext requestContext;
+ /** . */
+ protected StateString interactionState;
+
+ /** . */
+ protected ParameterMap form;
+
public ActionInvocation(ActionContext ctx) throws IllegalArgumentException
{
super(ctx);
@@ -46,6 +54,26 @@
this.ctx = ctx;
}
+ public StateString getInteractionState()
+ {
+ return interactionState;
+ }
+
+ public void setInteractionState(StateString interactionState)
+ {
+ this.interactionState = interactionState;
+ }
+
+ public ParameterMap getForm()
+ {
+ return form;
+ }
+
+ public void setForm(ParameterMap form)
+ {
+ this.form = form;
+ }
+
public ActionContext getContext()
{
return ctx;
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/EventInvocation.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/EventInvocation.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/EventInvocation.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -24,6 +24,9 @@
import org.jboss.portal.portlet.spi.EventContext;
+import javax.xml.namespace.QName;
+import java.io.Serializable;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
@@ -34,6 +37,12 @@
/** . */
private final EventContext ctx;
+ /** . */
+ private QName name;
+
+ /** . */
+ private Serializable payload;
+
public EventInvocation(EventContext ctx) throws IllegalArgumentException
{
super(ctx);
@@ -46,4 +55,24 @@
{
return ctx;
}
+
+ public QName getName()
+ {
+ return name;
+ }
+
+ public void setName(QName name)
+ {
+ this.name = name;
+ }
+
+ public Serializable getPayload()
+ {
+ return payload;
+ }
+
+ public void setPayload(Serializable payload)
+ {
+ this.payload = payload;
+ }
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/PortletInvocation.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/PortletInvocation.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/PortletInvocation.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -24,6 +24,7 @@
import org.jboss.portal.common.invocation.Invocation;
import org.jboss.portal.common.invocation.Scope;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.portlet.spi.InstanceContext;
import org.jboss.portal.portlet.spi.PortalContext;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
@@ -33,6 +34,9 @@
import org.jboss.portal.portlet.spi.WindowContext;
import org.jboss.portal.portlet.spi.ClientContext;
import org.jboss.portal.portlet.PortletContext;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -61,9 +65,24 @@
/** The response properties. */
public static final Scope RESPONSE_PROPERTIES_SCOPE = new
Scope("response_properties");
+ /** . */
+ protected StateString navigationalState;
+
+ /** . */
+ protected ParameterMap publicNavigationalState;
+
+ /** . */
+ protected Mode mode;
+
+ /** . */
+ protected WindowState windowState;
+
/** The target portlet. */
protected PortletContext target;
+ /** The invocation context. */
+ protected PortletInvocationContext ctx;
+
/** The portal context. */
protected PortalContext portalContext;
@@ -91,9 +110,6 @@
/** The dispatched response. */
protected HttpServletResponse dresp;
- /** The invocation context. */
- protected PortletInvocationContext ctx;
-
/**
* Create an invocation to a portlet.
*
@@ -166,6 +182,46 @@
this.dreq = dreq;
}
+ public StateString getNavigationalState()
+ {
+ return navigationalState;
+ }
+
+ public void setNavigationalState(StateString navigationalState)
+ {
+ this.navigationalState = navigationalState;
+ }
+
+ public ParameterMap getPublicNavigationalState()
+ {
+ return publicNavigationalState;
+ }
+
+ public void setPublicNavigationalState(ParameterMap publicNavigationalState)
+ {
+ this.publicNavigationalState = publicNavigationalState;
+ }
+
+ public Mode getMode()
+ {
+ return mode;
+ }
+
+ public void setMode(Mode mode)
+ {
+ this.mode = mode;
+ }
+
+ public WindowState getWindowState()
+ {
+ return windowState;
+ }
+
+ public void setWindowState(WindowState windowState)
+ {
+ this.windowState = windowState;
+ }
+
public PortalContext getPortalContext()
{
return portalContext;
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/ResourceInvocation.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/ResourceInvocation.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/invocation/ResourceInvocation.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -24,6 +24,9 @@
import org.jboss.portal.portlet.spi.ResourceInvocationContext;
import org.jboss.portal.portlet.spi.RequestContext;
+import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.cache.CacheLevel;
+import org.jboss.portal.common.util.ParameterMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -41,6 +44,18 @@
/** . */
private String validationToken;
+ /** . */
+ private String resourceId;
+
+ /** . */
+ private StateString resourceState;
+
+ /** . */
+ private ParameterMap form;
+
+ /** . */
+ private CacheLevel cacheLevel;
+
public ResourceInvocation(ResourceInvocationContext ctx) throws
IllegalArgumentException
{
super(ctx);
@@ -64,6 +79,46 @@
this.validationToken = validationToken;
}
+ public String getResourceId()
+ {
+ return resourceId;
+ }
+
+ public void setResourceId(String resourceId)
+ {
+ this.resourceId = resourceId;
+ }
+
+ public StateString getResourceState()
+ {
+ return resourceState;
+ }
+
+ public void setResourceState(StateString resourceState)
+ {
+ this.resourceState = resourceState;
+ }
+
+ public ParameterMap getForm()
+ {
+ return form;
+ }
+
+ public void setForm(ParameterMap form)
+ {
+ this.form = form;
+ }
+
+ public CacheLevel getCacheLevel()
+ {
+ return cacheLevel;
+ }
+
+ public void setCacheLevel(CacheLevel cacheLevel)
+ {
+ this.cacheLevel = cacheLevel;
+ }
+
public RequestContext getRequestContext()
{
return requestContext;
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ActionContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ActionContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ActionContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,9 +22,6 @@
******************************************************************************/
package org.jboss.portal.portlet.spi;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.common.util.ParameterMap;
-
/**
* Extends the generic invocation context to provide action invocation specific
input/services.
*
@@ -33,17 +30,4 @@
*/
public interface ActionContext extends PortletInvocationContext
{
- /**
- * Returns the interaction state of the request.
- *
- * @return the interaction state
- */
- StateString getInteractionState();
-
- /**
- * Returns the form parameters of the request or null if no form could be decoded by
the caller.
- *
- * @return the request form
- */
- ParameterMap getForm();
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/EventContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/EventContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/EventContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,18 +22,10 @@
******************************************************************************/
package org.jboss.portal.portlet.spi;
-import javax.xml.namespace.QName;
-import java.io.Serializable;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
public interface EventContext extends PortletInvocationContext
{
-
- QName getName();
-
- Serializable getPayload();
-
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/PortletInvocationContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/PortletInvocationContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/PortletInvocationContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -38,35 +38,8 @@
*/
public interface PortletInvocationContext extends InvocationContext
{
- /**
- * Returns the navigational state provided to the portlet.
- *
- * @return the navigational state
- */
- StateString getNavigationalState();
/**
- * Returns the public navigational state provided to the portlet.
- *
- * @return the public navigational state
- */
- ParameterMap getPublicNavigationalState();
-
- /**
- * Returns the mode provided to the portlet.
- *
- * @return the mode
- */
- Mode getMode();
-
- /**
- * Returns the window state provided to the portlet.
- *
- * @return the window state
- */
- WindowState getWindowState();
-
- /**
* Return information about the underlying http wire this invocation is performed.
*
* @return the stream info
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ResourceInvocationContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ResourceInvocationContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/spi/ResourceInvocationContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,42 +22,10 @@
******************************************************************************/
package org.jboss.portal.portlet.spi;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.cache.CacheLevel;
-import org.jboss.portal.common.util.ParameterMap;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
public interface ResourceInvocationContext extends PortletInvocationContext
{
-
- /**
- * Returns the resource id. It may be a null value.
- *
- * @return the resource id
- */
- String getResourceId();
-
- /**
- * Returns the resource state of the request.
- *
- * @return the resource state
- */
- StateString getResourceState();
-
- /**
- * Returns the form parameters of the request or null if no form could be decoded by
the caller.
- *
- * @return the request form
- */
- ParameterMap getForm();
-
- /**
- * Returns the cache level.
- *
- * @return the cache level
- */
- CacheLevel getCacheLevel();
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/ActionContextSupport.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/ActionContextSupport.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/ActionContextSupport.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,53 +22,12 @@
******************************************************************************/
package org.jboss.portal.portlet.support.spi;
-import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.spi.ActionContext;
-import org.jboss.portal.common.util.ParameterMap;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 5976 $
*/
public class ActionContextSupport extends PortletInvocationContextSupport implements
ActionContext
{
-
- public String getCharacterEncoding()
- {
- throw new UnsupportedOperationException();
- }
-
- public int getContentLength()
- {
- throw new UnsupportedOperationException();
- }
-
- public BufferedReader getReader() throws IOException
- {
- throw new UnsupportedOperationException();
- }
-
- public InputStream getInputStream() throws IOException
- {
- throw new UnsupportedOperationException();
- }
-
- public String getContentType()
- {
- throw new UnsupportedOperationException();
- }
-
- public StateString getInteractionState()
- {
- throw new UnsupportedOperationException();
- }
-
- public ParameterMap getForm()
- {
- throw new UnsupportedOperationException();
- }
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/PortletInvocationContextSupport.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/PortletInvocationContextSupport.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/PortletInvocationContextSupport.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -38,26 +38,6 @@
public class PortletInvocationContextSupport extends AbstractInvocationContext implements
PortletInvocationContext
{
- public StateString getNavigationalState()
- {
- throw new UnsupportedOperationException();
- }
-
- public Mode getMode()
- {
- throw new UnsupportedOperationException();
- }
-
- public WindowState getWindowState()
- {
- throw new UnsupportedOperationException();
- }
-
- public ParameterMap getPublicNavigationalState()
- {
- throw new UnsupportedOperationException();
- }
-
public MarkupInfo getMarkupInfo()
{
throw new UnsupportedOperationException();
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/RenderContextSupport.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/RenderContextSupport.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/support/spi/RenderContextSupport.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -30,5 +30,4 @@
*/
public class RenderContextSupport extends PortletInvocationContextSupport implements
RenderContext
{
-
}
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PropagateDoFilterArgsFilter1.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PropagateDoFilterArgsFilter1.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PropagateDoFilterArgsFilter1.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -43,13 +43,17 @@
import javax.portlet.ResourceResponse;
import javax.portlet.filter.FilterChain;
import javax.portlet.filter.RenderFilter;
+import javax.portlet.filter.ResourceFilter;
+import javax.portlet.filter.ActionFilter;
+import javax.portlet.filter.EventFilter;
import java.io.IOException;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public class PropagateDoFilterArgsFilter1 extends AbstractPortletFilter implements
RenderFilter
+public class PropagateDoFilterArgsFilter1 extends AbstractPortletFilter
+ implements RenderFilter, ResourceFilter, ActionFilter, EventFilter
{
/** . */
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PropagateDoFilterArgsFilter2.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PropagateDoFilterArgsFilter2.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portletfilter/PropagateDoFilterArgsFilter2.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -44,13 +44,17 @@
import javax.portlet.EventRequest;
import javax.portlet.filter.FilterChain;
import javax.portlet.filter.RenderFilter;
+import javax.portlet.filter.ResourceFilter;
+import javax.portlet.filter.ActionFilter;
+import javax.portlet.filter.EventFilter;
import java.io.IOException;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public class PropagateDoFilterArgsFilter2 extends AbstractPortletFilter implements
RenderFilter
+public class PropagateDoFilterArgsFilter2 extends AbstractPortletFilter
+ implements RenderFilter, ResourceFilter, ActionFilter, EventFilter
{
/** . */
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/state/ActionContextImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/state/ActionContextImpl.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/state/ActionContextImpl.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.test.portlet.state;
-import org.jboss.portal.Mode;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.support.spi.ActionContextSupport;
@@ -33,26 +32,9 @@
*/
public class ActionContextImpl extends ActionContextSupport
{
-
- /** . */
- private final Mode mode;
-
- public ActionContextImpl(Mode mode)
+ public ActionContextImpl()
{
- this.mode = mode;
-
- //
addResolver(PortletInvocation.REQUEST_SCOPE, new MapAttributeResolver());
addResolver(PortletInvocation.INVOCATION_SCOPE, new MapAttributeResolver());
}
-
- public ActionContextImpl()
- {
- this(Mode.EDIT);
- }
-
- public Mode getMode()
- {
- return mode;
- }
}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ResourceTestContext.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ResourceTestContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ResourceTestContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,15 +22,10 @@
******************************************************************************/
package org.jboss.portal.portlet.test;
-import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ContainerURL;
-import org.jboss.portal.portlet.cache.CacheLevel;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.impl.spi.AbstractResourceContext;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
@@ -47,28 +42,9 @@
/** . */
private final PortletURLRenderer urlRenderer;
- public ResourceTestContext(
- String resourceId,
- CacheLevel resourceCacheLevel,
- PortletURLRenderer urlRenderer,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- StateString resourceState,
- ParameterMap form,
- MarkupInfo markupInfo)
+ public ResourceTestContext(PortletURLRenderer urlRenderer, MarkupInfo markupInfo)
{
- super(
- resourceId,
- resourceCacheLevel,
- mode,
- windowState,
- navigationalState,
- publicNavigationalState,
- resourceState,
- form,
- markupInfo);
+ super(markupInfo);
//
this.urlRenderer = urlRenderer;
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestActionContext.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestActionContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestActionContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,14 +22,10 @@
******************************************************************************/
package org.jboss.portal.portlet.test;
-import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ContainerURL;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.impl.spi.AbstractActionContext;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
@@ -46,17 +42,9 @@
/** . */
private final PortletURLRenderer urlRenderer;
- public TestActionContext(
- PortletURLRenderer urlRenderer,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- MarkupInfo markupInfo,
- StateString interactionState,
- ParameterMap form)
+ public TestActionContext(PortletURLRenderer urlRenderer, MarkupInfo markupInfo)
{
- super(mode, windowState, navigationalState, publicNavigationalState, markupInfo,
interactionState, form);
+ super(markupInfo);
//
this.urlRenderer = urlRenderer;
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestEventContext.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestEventContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestEventContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -48,17 +48,9 @@
/** . */
private final PortletURLRenderer urlRenderer;
- public TestEventContext(
- PortletURLRenderer urlRenderer,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- MarkupInfo markupInfo,
- QName name,
- Serializable payload)
+ public TestEventContext(PortletURLRenderer urlRenderer, MarkupInfo markupInfo)
{
- super(mode, windowState, navigationalState, publicNavigationalState, markupInfo,
name, payload);
+ super(markupInfo);
//
this.urlRenderer = urlRenderer;
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestRenderContext.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestRenderContext.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/TestRenderContext.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -22,14 +22,10 @@
******************************************************************************/
package org.jboss.portal.portlet.test;
-import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ContainerURL;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.impl.spi.AbstractRenderContext;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.common.invocation.resolver.PrincipalAttributeResolver;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
@@ -46,15 +42,9 @@
/** . */
private final PortletURLRenderer urlRenderer;
- public TestRenderContext(
- PortletURLRenderer urlRenderer,
- Mode mode,
- WindowState windowState,
- StateString navigationalState,
- ParameterMap publicNavigationalState,
- MarkupInfo markupInfo)
+ public TestRenderContext(PortletURLRenderer urlRenderer, MarkupInfo markupInfo)
{
- super(mode, windowState, navigationalState, publicNavigationalState, markupInfo);
+ super(markupInfo);
//
this.urlRenderer = urlRenderer;
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -176,12 +176,18 @@
//
TestInstanceContext instanceContext = new TestInstanceContext(req,
portlet.getContext(), false);
- TestRenderContext renderContext = new TestRenderContext(renderer, mode,
windowState, portletNS, publicNS, MARKUP_INFO);
+ TestRenderContext renderContext = new TestRenderContext(renderer,
MARKUP_INFO);
//
RenderInvocation render = new RenderInvocation(renderContext);
//
+ render.setMode(mode);
+ render.setWindowState(windowState);
+ render.setNavigationalState(portletNS);
+ render.setPublicNavigationalState(publicNS);
+
+ //
render.setClientContext(new AbstractClientContext(req,
pageProperties.getCookies()));
render.setServerContext(new AbstractServerContext(req, resp));
render.setInstanceContext(instanceContext);
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -261,18 +261,18 @@
//
TestInstanceContext instanceContext = new TestInstanceContext(req,
portlet.getContext(), true);
- TestActionContext actionContext = new TestActionContext(
- renderer,
- mode,
- windowState,
- portletActionRequest.windowNavigationalState.getPortletNavigationalState(),
- publicNS,
- MARKUP_INFO,
- portletActionRequest.interactionState,
- portletActionRequest.bodyParameters != null ?
ParameterMap.clone(portletActionRequest.bodyParameters) : null);
+ TestActionContext actionContext = new TestActionContext(renderer, MARKUP_INFO);
ActionInvocation actionInvocation = new ActionInvocation(actionContext);
//
+ actionInvocation.setMode(mode);
+ actionInvocation.setWindowState(windowState);
+
actionInvocation.setNavigationalState(portletActionRequest.windowNavigationalState.getPortletNavigationalState());
+ actionInvocation.setPublicNavigationalState(publicNS);
+ actionInvocation.setInteractionState(portletActionRequest.interactionState);
+ actionInvocation.setForm(portletActionRequest.bodyParameters != null ?
ParameterMap.clone(portletActionRequest.bodyParameters) : null);
+
+ //
actionInvocation.setClientContext(new AbstractClientContext(req));
actionInvocation.setServerContext(new AbstractServerContext(req, resp));
actionInvocation.setInstanceContext(instanceContext);
@@ -316,18 +316,18 @@
//
TestInstanceContext instanceContext = new TestInstanceContext(req,
portlet.getContext(), true);
- TestEventContext actionContext = new TestEventContext(
- renderer,
- windowNS.getMode(),
- windowNS.getWindowState(),
- windowNS.getPortletNavigationalState(),
- publicNS,
- MARKUP_INFO,
- event.getName(),
- event.getPayload());
+ TestEventContext actionContext = new TestEventContext(renderer, MARKUP_INFO);
EventInvocation eventInvocation = new EventInvocation(actionContext);
//
+ eventInvocation.setMode(windowNS.getMode());
+ eventInvocation.setWindowState(windowNS.getWindowState());
+ eventInvocation.setNavigationalState(windowNS.getPortletNavigationalState());
+ eventInvocation.setPublicNavigationalState(publicNS);
+ eventInvocation.setName(event.getName());
+ eventInvocation.setPayload(event.getPayload());
+
+ //
eventInvocation.setClientContext(new AbstractClientContext(req, requestCookies));
eventInvocation.setServerContext(new AbstractServerContext(req, resp));
eventInvocation.setInstanceContext(instanceContext);
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequestHandler.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequestHandler.java 2008-02-03
17:17:14 UTC (rev 9723)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletResourceRequestHandler.java 2008-02-04
01:27:57 UTC (rev 9724)
@@ -196,18 +196,18 @@
//
TestInstanceContext instanceContext = new TestInstanceContext(req,
portlet.getContext(), true);
- ResourceInvocationContext resourceInvocationContext = new ResourceTestContext(
- portletResourceRequest.resourceId,
- cacheability,
- renderer,
- mode,
- windowState,
- portletNS,
- publicNS,
- portletResourceRequest.resourceState,
- portletResourceRequest.bodyParameters != null ?
ParameterMap.clone(portletResourceRequest.bodyParameters) : null,
- MARKUP_INFO);
+ ResourceInvocationContext resourceInvocationContext = new
ResourceTestContext(renderer, MARKUP_INFO);
ResourceInvocation resourceInvocation = new
ResourceInvocation(resourceInvocationContext);
+
+ //
+ resourceInvocation.setResourceId(portletResourceRequest.resourceId);
+ resourceInvocation.setCacheLevel(cacheability);
+ resourceInvocation.setMode(mode);
+ resourceInvocation.setWindowState(windowState);
+ resourceInvocation.setNavigationalState(portletNS);
+ resourceInvocation.setPublicNavigationalState(publicNS);
+ resourceInvocation.setResourceState(portletResourceRequest.resourceState);
+ resourceInvocation.setForm(portletResourceRequest.bodyParameters != null ?
ParameterMap.clone(portletResourceRequest.bodyParameters) : null);
//
resourceInvocation.setClientContext(new AbstractClientContext(req));