Author: julien(a)jboss.com
Date: 2007-04-23 08:58:04 -0400 (Mon, 23 Apr 2007)
New Revision: 7028
Modified:
trunk/api/build.xml
trunk/bridge/build.xml
trunk/common/src/main/org/jboss/portal/common/invocation/AbstractInvocationContext.java
trunk/core-admin/build.xml
trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java
trunk/core/src/main/org/jboss/portal/core/controller/Controller.java
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/AbstractCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactory.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactoryDelegate.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingCommandFactoryService.java
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/DashboardCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java
trunk/jems/build.xml
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/WindowStatesInterceptor.java
trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletContainer.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
trunk/registration/build.xml
trunk/search/build.xml
trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java
trunk/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java
trunk/test/build.xml
trunk/tools/etc/buildfragments/buildmagic.ent
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java
Log:
- fix for JBPORTAL-1315 : Portlets "forget" that they are in EDIT mode
- added modules-package-tests so it is possible to package tests all modules with the
build/build.xml file
- remove the nav state scope from the server module
- pass the ControllerContext as part of the doMapping(...) in CommandFactories so they can
retrieve the nav state scope correctly
- updated fix that Thomas did for the prb with the maximized/normal window issue
Modified: trunk/api/build.xml
===================================================================
--- trunk/api/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/api/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -181,4 +181,6 @@
<target name="most" depends="_default:most"/>
<target name="help" depends="_default:help"/>
+ <target name="package-tests"></target>
+
</project>
Modified: trunk/bridge/build.xml
===================================================================
--- trunk/bridge/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/bridge/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -188,4 +188,7 @@
<!-- ================================================================== -->
<!-- Test. -->
<!-- ================================================================== -->
+
+ <target name="package-tests"/>
+
</project>
Modified:
trunk/common/src/main/org/jboss/portal/common/invocation/AbstractInvocationContext.java
===================================================================
---
trunk/common/src/main/org/jboss/portal/common/invocation/AbstractInvocationContext.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/common/src/main/org/jboss/portal/common/invocation/AbstractInvocationContext.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -63,7 +63,7 @@
{
throw new IllegalArgumentException();
}
- resolvers.put(resolverScope, new AttributeResolverRegistration(resolver));
+ resolvers.put(resolverScope, new AttributeResolverRegistration(resolver));
}
public AttributeResolver getAttributeResolver(Scope attrScope) throws
IllegalArgumentException
Modified: trunk/core/src/main/org/jboss/portal/core/controller/Controller.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-04-23
04:30:32 UTC (rev 7027)
+++ trunk/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -195,8 +195,11 @@
public final void handle(ServerInvocation invocation) throws ServerException
{
+ // Create controller context
+ ControllerContext controllerContext = new ControllerContext(invocation, this);
+
// Invoke the chain that creates the initial command
- ControllerCommand cmd = commandFactory.doMapping(invocation,
invocation.getServerContext().getPortalHost(),
invocation.getServerContext().getPortalContextPath(),
invocation.getServerContext().getPortalRequestPath());
+ ControllerCommand cmd = commandFactory.doMapping(controllerContext, invocation,
invocation.getServerContext().getPortalHost(),
invocation.getServerContext().getPortalContextPath(),
invocation.getServerContext().getPortalRequestPath());
//
if (cmd == null)
@@ -205,9 +208,6 @@
throw new ServerException("No command was produced by the command
factory");
}
- // Create controller context
- ControllerContext controllerContext = new ControllerContext(invocation, this);
-
// Handle the command created
processCommand(controllerContext, cmd);
}
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -24,6 +24,7 @@
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.command.action.MoveWindowCommand;
import org.jboss.portal.server.ServerInvocation;
@@ -36,7 +37,7 @@
*/
public class AjaxCommandFactory extends AbstractCommandFactory
{
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
HttpServletRequest req = invocation.getServerContext().getClientRequest();
String action = req.getParameter("action");
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/AbstractCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/AbstractCommandFactory.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/AbstractCommandFactory.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.server.ServerInvocation;
@@ -34,7 +35,7 @@
{
public abstract ControllerCommand doMapping(
- ServerInvocation invocation,
+ ControllerContext controllerContext, ServerInvocation invocation,
String host, String contextPath,
String requestPath);
}
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactory.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactory.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -37,13 +38,14 @@
/**
* Create a command.
*
- * @param invocation the invocation
+ * @param controllerContext the controller context
+ * @param invocation the server invocation
* @param host the host
* @param contextPath the context path
- * @param requestPath the request path
- * @return the command or null if no command is recognized
+ * @param requestPath the request path @return the command or null if no command is
recognized
*/
ControllerCommand doMapping(
+ ControllerContext controllerContext,
ServerInvocation invocation,
String host,
String contextPath,
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactoryDelegate.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactoryDelegate.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/CommandFactoryDelegate.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -81,8 +82,8 @@
delegatingFactory.unregister(path);
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
- return delegateFactory.doMapping(invocation, host, contextPath, requestPath);
+ return delegateFactory.doMapping(controllerContext, invocation, host, contextPath,
requestPath);
}
}
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingCommandFactoryService.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingCommandFactoryService.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/DelegatingCommandFactoryService.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.servlet.PathMapping;
import org.jboss.portal.server.servlet.PathMappingResult;
@@ -122,7 +123,7 @@
}
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
//
if (requestPath.length() == 0)
@@ -138,13 +139,13 @@
{
CommandFactory delegate = (CommandFactory)target;
String remainingPath = result.getRemainingPath();
- cmd = delegate.doMapping(invocation, host, contextPath +
result.getMatchedPath(), remainingPath);
+ cmd = delegate.doMapping(controllerContext, invocation, host, contextPath +
result.getMatchedPath(), remainingPath);
}
//
if (cmd == null && nextFactory != null)
{
- cmd = nextFactory.doMapping(invocation, host, contextPath, requestPath);
+ cmd = nextFactory.doMapping(controllerContext, invocation, host, contextPath,
requestPath);
}
return cmd;
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleCommandFactory.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/controller/command/mapper/SimpleCommandFactory.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.controller.command.mapper;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.server.ServerInvocation;
/**
@@ -66,7 +67,7 @@
commandClass = null;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
try
{
Modified:
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.model.instance;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import
org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceActionCommand;
import
org.jboss.portal.core.model.instance.command.action.InvokePortletInstanceRenderCommand;
@@ -49,7 +50,7 @@
this.instanceId = instanceId;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
PortletRequestDecoder decoder = new PortletRequestDecoder();
decoder.decode(invocation.getServerContext().getQueryParameterMap(),
invocation.getServerContext().getBodyParameterMap());
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/DashboardCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/DashboardCommandFactory.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/DashboardCommandFactory.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.model.portal;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.command.view.ViewDashboardCommand;
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.server.ServerInvocation;
@@ -33,7 +34,7 @@
*/
public class DashboardCommandFactory extends AbstractCommandFactory
{
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
return new ViewDashboardCommand();
}
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/DefaultPortalCommandFactory.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -23,6 +23,7 @@
package org.jboss.portal.core.model.portal;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.command.view.ViewPageCommand;
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.core.controller.command.mapper.CommandFactory;
@@ -63,9 +64,9 @@
this.nextFactory = nextFactory;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
- ControllerCommand cmd = nextFactory.doMapping(invocation, host, contextPath,
requestPath);
+ ControllerCommand cmd = nextFactory.doMapping(controllerContext, invocation, host,
contextPath, requestPath);
if (cmd == null)
{
Portal portal = (Portal)container.getObject(defaultPortalPath);
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -26,6 +26,7 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowActionCommand;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.core.model.portal.command.action.ImportPageToDashboardCommand;
@@ -85,7 +86,7 @@
this.container = container;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
if (requestPath == null)
{
@@ -120,21 +121,20 @@
// Get the window navigational state
NavigationalStateKey nsKey = new
NavigationalStateKey(WindowNavigationalState.class, window.getId());
- WindowNavigationalState windowNavState =
(WindowNavigationalState)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
nsKey);
+ WindowNavigationalState windowNavState =
(WindowNavigationalState)controllerContext.getAttribute(ControllerCommand.NAVIGATIONAL_STATE_SCOPE,
nsKey);
if (windowNavState == null)
{
windowNavState = new WindowNavigationalState();
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, nsKey,
windowNavState);
+ controllerContext.setAttribute(ControllerCommand.NAVIGATIONAL_STATE_SCOPE,
nsKey, windowNavState);
}
//
WindowState windowState = decoder.getWindowState();
-/*
if (windowState == null)
{
windowState = windowNavState.getWindowState();
}
-*/
+
//
Mode mode = decoder.getMode();
if (mode == null)
Modified: trunk/core-admin/build.xml
===================================================================
--- trunk/core-admin/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/core-admin/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -272,5 +272,7 @@
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
<delete
file="${jboss.home}/server/${portal.deploy.dir}/portal-admin.sar"/>
</target>
+
+ <target name="package-tests"/>
</project>
Modified:
trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java
===================================================================
---
trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/core-cms/src/main/org/jboss/portal/core/cms/CMSObjectCommandFactoryService.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -24,6 +24,7 @@
import org.jboss.portal.core.controller.command.mapper.AbstractCommandFactory;
import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.model.portal.PortalObjectId;
import
org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.core.cms.command.StreamContentCommand;
@@ -124,7 +125,7 @@
return file;
}
- public ControllerCommand doMapping(ServerInvocation invocation, String host, String
contextPath, String requestPath)
+ public ControllerCommand doMapping(ControllerContext controllerContext,
ServerInvocation invocation, String host, String contextPath, String requestPath)
{
try
{
Modified: trunk/jems/build.xml
===================================================================
--- trunk/jems/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/jems/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -207,4 +207,7 @@
<!-- ================================================================== -->
<!-- Deployment -->
<!-- ================================================================== -->
+
+ <target name="package-tests"/>
+
</project>
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/WindowStatesInterceptor.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/WindowStatesInterceptor.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/aspects/portlet/WindowStatesInterceptor.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -40,12 +40,10 @@
protected Object invoke(PortletInvocation invocation) throws Exception,
InvocationException
{
- /*
if (invocation.getPortletContext().getWindowState() == null)
{
throw new InvocationException("No window state has been provided");
}
- */
// Compute the supported window states
Set windowStates = getWindowStates(invocation);
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletContainer.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletContainer.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/container/PortletContainer.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -52,8 +52,20 @@
*/
PortletInfo getInfo();
+ /**
+ * todo : remove that and have rather a way to expose runtime information meta data �
la PortletInfo.
+ *
+ * Return specific JBoss Portlet buildtime meta data.
+ *
+ * @return the JBoss specific buildtime meta data
+ */
JBossPortletMetaData getJBossMetaData();
+ /**
+ * Return the content types understood by the container.
+ *
+ * @return the content types
+ */
ContentTypes getContentTypes();
/**
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -133,7 +133,13 @@
public PortletInfo getInfo()
{
- return info;
+ if (started)
+ {
+ return info;
+ }
+
+ //
+ throw new IllegalStateException("Portlet " + metaData.getName() + "
is not started");
}
public String getId()
Modified:
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java
===================================================================
---
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -28,6 +28,7 @@
import org.jboss.portal.test.framework.portlet.PortletTestParameters;
import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.invocation.EmptyAttributeResolver;
+import org.jboss.portal.common.invocation.Scope;
import org.jboss.portal.common.invocation.resolver.MapAttributeResolver;
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.common.util.URLTools;
@@ -95,6 +96,9 @@
{
/** . */
+ private static final Scope NAVIGATIONAL_STATE_SCOPE = ServerInvocation.SESSION_SCOPE;
+
+ /** . */
protected boolean redirectAfterAction;
/** . */
@@ -141,7 +145,7 @@
if (decoder.getType() == PortletRequestDecoder.ACTION_TYPE)
{
// Get the navigational state if it exist
- PortletParametersStateString navigationalState =
(PortletParametersStateString)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId());
+ PortletParametersStateString navigationalState =
(PortletParametersStateString)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId());
//
ActionContextImpl actionContext = new ActionContextImpl(
@@ -194,7 +198,7 @@
}
else
{
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId(), renderResult.getNavigationalState());
+ invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId(), renderResult.getNavigationalState());
}
}
if (response instanceof HTTPRedirectionResponse)
@@ -228,7 +232,7 @@
else
{
//
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId(), decoder.getNavigationalState());
+ invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId(), decoder.getNavigationalState());
//
Mode mode = decoder.getMode();
@@ -236,7 +240,7 @@
{
mode = Mode.VIEW;
}
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext() + "_mode", mode);
+ invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() +
"_mode", mode);
//
WindowState windowState = decoder.getWindowState();
@@ -244,7 +248,7 @@
{
windowState = WindowState.NORMAL;
}
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext() + "_windowstate", windowState);
+ invocation.setAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() +
"_windowstate", windowState);
}
}
@@ -258,17 +262,17 @@
Portlet portlet = (Portlet)i.next();
// Get the navigational state
- StateString ns =
(StateString)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId());
+ StateString ns =
(StateString)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId());
// Get the mode
- Mode mode =
(Mode)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext() + "_mode");
+ Mode mode = (Mode)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE,
portlet.getContext() + "_mode");
if (mode == null)
{
mode = Mode.VIEW;
}
// Get the window state
- WindowState windowState =
(WindowState)invocation.getAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext() + "_windowstate");
+ WindowState windowState =
(WindowState)invocation.getAttribute(NAVIGATIONAL_STATE_SCOPE, portlet.getContext() +
"_windowstate");
if (windowState == null)
{
windowState = WindowState.NORMAL;
Modified: trunk/registration/build.xml
===================================================================
--- trunk/registration/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/registration/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -229,4 +229,7 @@
<target name="tests" depends="clean-test">
<antcall target="registration-test"/>
</target>
+
+ <target name="package-tests"/>
+
</project>
Modified: trunk/search/build.xml
===================================================================
--- trunk/search/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/search/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -192,4 +192,6 @@
</execute-tests>
</target>
+ <target name="package-tests"/>
+
</project>
Modified: trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java 2007-04-23
04:30:32 UTC (rev 7027)
+++ trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -42,9 +42,6 @@
/** . */
public static final Scope REQUEST_SCOPE = Scope.REQUEST_SCOPE;
- /** . */
- public static final Scope NAVIGATIONAL_STATE_SCOPE = new
Scope("navigationalstate");
-
/** The request. */
private ServerRequest req;
Modified:
trunk/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java
===================================================================
---
trunk/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java 2007-04-23
04:30:32 UTC (rev 7027)
+++
trunk/server/src/main/org/jboss/portal/server/impl/ServerInvocationContextImpl.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -143,7 +143,6 @@
addResolver(ServerInvocation.REQUEST_SCOPE, new RequestAttributeResolver(req));
addResolver(ServerInvocation.SESSION_SCOPE, new SessionAttributeResolver(req,
PortalConstants.PORTAL_SESSION_MAP_KEY));
addResolver(ServerInvocation.PRINCIPAL_SCOPE, new
PrincipalAttributeResolver(req));
- addResolver(ServerInvocation.NAVIGATIONAL_STATE_SCOPE, new
SessionAttributeResolver(req, PortalConstants.NAVIGATIONAL_STATE_MAP_KEY));
}
public HttpServletRequest getClientRequest()
Modified: trunk/test/build.xml
===================================================================
--- trunk/test/build.xml 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/test/build.xml 2007-04-23 12:58:04 UTC (rev 7028)
@@ -346,4 +346,7 @@
</target>
+ <target name="package-tests">
+ </target>
+
</project>
Modified: trunk/tools/etc/buildfragments/buildmagic.ent
===================================================================
--- trunk/tools/etc/buildfragments/buildmagic.ent 2007-04-23 04:30:32 UTC (rev 7027)
+++ trunk/tools/etc/buildfragments/buildmagic.ent 2007-04-23 12:58:04 UTC (rev 7028)
@@ -293,6 +293,20 @@
</execmodules>
</target>
+<!-- Invoke the 'main' on all configured modules -->
+<target name="_buildmagic:modules:package-tests"
depends="_buildmagic:init">
+ <execmodules target="package-tests"
+ modules="${modules}"
+ root="${project.root}/@MODULE@"
+ exportproperties="${executemodules.exportproperties}">
+ <header message="${executemodules.header}"/>
+ <footer message="${executemodules.footer}"/>
+ <before target="_module-@MODULE@-@TARGET@-prepare"/>
+ <after target="_module-@MODULE@-@TARGET@"/>
+ <property name="init.have-parent" value="true"/>
+ </execmodules>
+</target>
+
<!-- Invoke the 'release' on all configured modules -->
<target name="_buildmagic:modules:release"
depends="_buildmagic:init">
<execmodules target="release"
@@ -1107,4 +1121,4 @@
name="undeploy"
classname="org.jboss.portal.common.ant.Undeploy"
classpathref="portal.task.classpath"/>
-</target>
\ No newline at end of file
+</target>
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java 2007-04-23
04:30:32 UTC (rev 7027)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/portlet/WSRPPortlet.java 2007-04-23
12:58:04 UTC (rev 7028)
@@ -72,7 +72,7 @@
{
if (info == null)
{
- throw new IllegalStateException("No PortletInfo was set for WSRPPortler
'" + portletContext.getId() + "'");
+ throw new IllegalStateException("No PortletInfo was set for WSRPPortlet
'" + portletContext.getId() + "'");
}
return info;
}