Author: julien(a)jboss.com
Date: 2008-04-01 17:53:41 -0400 (Tue, 01 Apr 2008)
New Revision: 10467
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ProtocolAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ProtocolResponse.java
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/AjaxUIController.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/PresentationContextImpl.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ErrorResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/RedirectResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/StreamResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectResponse.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
Log:
rename ServerAction/ServerResponse to ProtocolAction/ProtocolResponse
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/PresentationContext.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -22,7 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.client;
-import org.jboss.portal.presentation.protocol.ServerAction;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.ajax.client.model.AjaxUIContext;
import org.jboss.portal.presentation.model.UIContext;
import org.jboss.portal.web.ServletContextDispatcher;
@@ -43,7 +43,7 @@
* @return the rendition of the server action
* @throws IllegalArgumentException if the action cannot be rendered
*/
- String render(ServerAction action) throws IllegalArgumentException;
+ String render(ProtocolAction action) throws IllegalArgumentException;
/**
* Returns the root UI context provided by the portal.
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/AjaxUIController.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/AjaxUIController.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/AjaxUIController.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -28,8 +28,8 @@
import org.jboss.portal.presentation.model.UIPage;
import org.jboss.portal.presentation.model.UIWindow;
import org.jboss.portal.presentation.model.content.WindowContent;
-import org.jboss.portal.presentation.protocol.ServerAction;
-import org.jboss.portal.presentation.protocol.ServerResponse;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ProtocolResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.server.PresentationServer;
@@ -88,14 +88,14 @@
/**
* TODO: move this functionality to another component like a UIPresenter etc
*/
- ServerAction serverAction = this.getServerAction(presentationContext,
invocation);
+ ProtocolAction serverAction = this.getServerAction(presentationContext,
invocation);
ProcessorRequest processorRequest = new ProcessorRequest(serverAction);
ProcessorResponse processorResponse =
this.presentationServer.getProcessor().process(presentationContext,
processorRequest);
//Process the response from the Processor
- ServerResponse serverResponse = processorResponse.getResponse();
+ ProtocolResponse serverResponse = processorResponse.getResponse();
this.handle(presentationContext, serverResponse, invocation);
}
catch(Exception e)
@@ -109,7 +109,7 @@
* @param serverResponse
* @throws ServerException
*/
- private void handle(PresentationContext presentationContext, ServerResponse
serverResponse, PresentationInvocation invocation) throws ServerException
+ private void handle(PresentationContext presentationContext, ProtocolResponse
serverResponse, PresentationInvocation invocation) throws ServerException
{
try
{
@@ -245,12 +245,12 @@
/**
*
*/
- private ServerAction getServerAction(PresentationContext presentationContext,
PresentationInvocation invocation)
+ private ProtocolAction getServerAction(PresentationContext presentationContext,
PresentationInvocation invocation)
{
- ServerAction action = null;
+ ProtocolAction action = null;
//Process any window state change incoming requests
- action =
(ServerAction)invocation.getRequest().getAttribute("serverAction");
+ action =
(ProtocolAction)invocation.getRequest().getAttribute("serverAction");
//Just use ViewUIObject command for now until URL interpretation/mapping
//to ServiceAction is implemented
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/client/controller/UIController.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -30,8 +30,8 @@
import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.protocol.ServerAction;
-import org.jboss.portal.presentation.protocol.ServerResponse;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ProtocolResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.server.PresentationServer;
@@ -90,14 +90,14 @@
/**
* TODO: move this functionality to another component like a UIPresenter etc
*/
- ServerAction serverAction = this.getServerAction(presentationContext,
invocation);
+ ProtocolAction serverAction = this.getServerAction(presentationContext,
invocation);
ProcessorRequest processorRequest = new ProcessorRequest(serverAction);
ProcessorResponse processorResponse =
this.presentationServer.getProcessor().process(presentationContext,
processorRequest);
//Process the response from the Processor
- ServerResponse serverResponse = processorResponse.getResponse();
+ ProtocolResponse serverResponse = processorResponse.getResponse();
this.handle(presentationContext, serverResponse, invocation);
}
catch(Exception e)
@@ -111,7 +111,7 @@
* @param serverResponse
* @throws ServerException
*/
- private void handle(PresentationContext presentationContext, ServerResponse
serverResponse, PresentationInvocation invocation) throws ServerException
+ private void handle(PresentationContext presentationContext, ProtocolResponse
serverResponse, PresentationInvocation invocation) throws ServerException
{
try
{
@@ -174,7 +174,7 @@
/**
*
*/
- private ServerAction getServerAction(PresentationContext presentationContext,
PresentationInvocation invocation)
+ private ProtocolAction getServerAction(PresentationContext presentationContext,
PresentationInvocation invocation)
{
String requestPath = invocation.getPortalRequestPath();
WebRequest webReq = invocation.getRequest();
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/PresentationContextImpl.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/PresentationContextImpl.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/PresentationContextImpl.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -31,7 +31,7 @@
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.state.navigational.NavigationalStateContext;
import org.jboss.portal.presentation.protocol.LinkActivation;
-import org.jboss.portal.presentation.protocol.ServerAction;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.UIObjectAction;
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.invocation.PresentationInvocation;
@@ -131,7 +131,7 @@
* @return
* @throws IllegalArgumentException
*/
- public String render(ServerAction action) throws IllegalArgumentException
+ public String render(ProtocolAction action) throws IllegalArgumentException
{
if (action instanceof UIObjectAction)
{
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ErrorResponse.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ErrorResponse.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ErrorResponse.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -28,7 +28,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class ErrorResponse extends ServerResponse
+public class ErrorResponse extends ProtocolResponse
{
/** The error code. */
private int errorCode = 0;
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ProtocolAction.java
(from rev 10463,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ServerAction.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ProtocolAction.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ProtocolAction.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.protocol;
+
+/**
+ * The base class for an action on the server.
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ */
+public abstract class ProtocolAction
+{
+}
Copied:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ProtocolResponse.java
(from rev 10463,
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ServerResponse.java)
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ProtocolResponse.java
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ProtocolResponse.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.protocol;
+
+/**
+ * The base class for a response from the server.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class ProtocolResponse
+{
+}
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/RedirectResponse.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/RedirectResponse.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/RedirectResponse.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -28,7 +28,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class RedirectResponse extends ServerResponse
+public class RedirectResponse extends ProtocolResponse
{
/** . */
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/StreamResponse.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/StreamResponse.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/StreamResponse.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -31,7 +31,7 @@
*
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*/
-public class StreamResponse extends ServerResponse
+public class StreamResponse extends ProtocolResponse
{
/** . */
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectAction.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectAction.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectAction.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -28,7 +28,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public abstract class UIObjectAction extends ServerAction
+public abstract class UIObjectAction extends ProtocolAction
{
/** The id of the target object. */
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectResponse.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectResponse.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectResponse.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -28,7 +28,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public abstract class UIObjectResponse extends ServerResponse
+public abstract class UIObjectResponse extends ProtocolResponse
{
/** The id of the target object. */
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorRequest.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -24,7 +24,7 @@
import java.io.Serializable;
-import org.jboss.portal.presentation.protocol.ServerAction;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
/**
@@ -40,13 +40,13 @@
/**
* The Portal action to be performed
*/
- private ServerAction action = null;
+ private ProtocolAction action = null;
/**
*
*
*/
- public ProcessorRequest(ServerAction action)
+ public ProcessorRequest(ProtocolAction action)
{
this.action = action;
}
@@ -55,7 +55,7 @@
*
* @return
*/
- public ServerAction getAction()
+ public ProtocolAction getAction()
{
return action;
}
@@ -64,7 +64,7 @@
*
* @param action
*/
- public void setAction(ServerAction action)
+ public void setAction(ProtocolAction action)
{
this.action = action;
}
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/server/ProcessorResponse.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -24,7 +24,7 @@
import java.io.Serializable;
-import org.jboss.portal.presentation.protocol.ServerResponse;
+import org.jboss.portal.presentation.protocol.ProtocolResponse;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -45,14 +45,14 @@
/**
* The ServerResponse generated by processing the ProcessorRequest by the Processor
*/
- private ServerResponse response = null;
+ private ProtocolResponse response = null;
/**
*
* @param dispatcher
* @param updatedPages
*/
- public ProcessorResponse(ServerResponse response)
+ public ProcessorResponse(ProtocolResponse response)
{
this.response = response;
}
@@ -61,7 +61,7 @@
*
* @return
*/
- public ServerResponse getResponse()
+ public ProtocolResponse getResponse()
{
return response;
}
@@ -70,7 +70,7 @@
*
* @param response
*/
- public void setResponse(ServerResponse response)
+ public void setResponse(ProtocolResponse response)
{
this.response = response;
}
Modified:
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java
===================================================================
---
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-01
21:38:03 UTC (rev 10466)
+++
modules/presentation/trunk/presentation/src/test/java/org/jboss/portal/presentation/test/portal/plugin/MainProcessor.java 2008-04-01
21:53:41 UTC (rev 10467)
@@ -42,8 +42,8 @@
import org.jboss.portal.presentation.protocol.LinkActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
-import org.jboss.portal.presentation.protocol.ServerAction;
-import org.jboss.portal.presentation.protocol.ServerResponse;
+import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.ProtocolResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
@@ -70,9 +70,9 @@
try
{
- ServerAction serverAction = request.getAction();
+ ProtocolAction serverAction = request.getAction();
- ServerResponse response = null;
+ ProtocolResponse response = null;
if(serverAction instanceof ViewUIObjectAction)
{