JBoss Portal SVN: r10467 - in modules/presentation/trunk/presentation/src: main/java/org/jboss/portal/presentation/client/controller and 4 other directories.
by portal-commits@lists.jboss.org
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)
{
16 years, 1 month
JBoss Portal SVN: r10466 - modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-01 17:38:03 -0400 (Tue, 01 Apr 2008)
New Revision: 10466
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/CreateUIObjectAction.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/GetActivation.java
Log:
update of protocol objects
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/CreateUIObjectAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/CreateUIObjectAction.java 2008-04-01 21:33:11 UTC (rev 10465)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/CreateUIObjectAction.java 2008-04-01 21:38:03 UTC (rev 10466)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.protocol;
-import org.jboss.portal.presentation.model.UIObject;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
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:33:11 UTC (rev 10465)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ErrorResponse.java 2008-04-01 21:38:03 UTC (rev 10466)
@@ -23,19 +23,20 @@
package org.jboss.portal.presentation.protocol;
/**
+ * Error response.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
public class ErrorResponse extends ServerResponse
{
- /**
- *
- */
+ /** The error code. */
private int errorCode = 0;
/**
- *
- * @param errorCode
+ * Build a new error response.
+ *
+ * @param errorCode the error code
*/
public ErrorResponse(int errorCode)
{
@@ -43,8 +44,9 @@
}
/**
- *
- * @return
+ * Returns the error code.
+ *
+ * @return the error code
*/
public int getErrorCode()
{
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java 2008-04-01 21:33:11 UTC (rev 10465)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/GetActivation.java 2008-04-01 21:38:03 UTC (rev 10466)
@@ -31,14 +31,12 @@
*/
public class GetActivation extends LinkActivation
{
+
public GetActivation(String targetId, Map queryParameters)
{
super(targetId, queryParameters);
}
- /**
- *
- */
public String toString()
{
StringBuffer buffer = new StringBuffer();
16 years, 1 month
JBoss Portal SVN: r10465 - modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-01 17:33:11 -0400 (Tue, 01 Apr 2008)
New Revision: 10465
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/ShowUIObjectResponse.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/ViewUIObjectAction.java
Log:
update of protocol objects
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:03:57 UTC (rev 10464)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/RedirectResponse.java 2008-04-01 21:33:11 UTC (rev 10465)
@@ -23,6 +23,8 @@
package org.jboss.portal.presentation.protocol;
/**
+ * Instruct the client to show a new URL to the end user.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
@@ -32,8 +34,20 @@
/** . */
private final String location;
- public RedirectResponse(String location)
+ /**
+ * Build a new redirect response object.
+ *
+ * @param location the new location
+ * @throws IllegalArgumentException if the location argument is null
+ */
+ public RedirectResponse(String location) throws IllegalArgumentException
{
+ if (location == null)
+ {
+ throw new IllegalArgumentException("No null location argument accepted");
+ }
+
+ //
this.location = location;
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ShowUIObjectResponse.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ShowUIObjectResponse.java 2008-04-01 21:03:57 UTC (rev 10464)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ShowUIObjectResponse.java 2008-04-01 21:33:11 UTC (rev 10465)
@@ -23,7 +23,7 @@
package org.jboss.portal.presentation.protocol;
/**
- * Tell the client to show a particular page.
+ * Tell the client to show a particular user interface object to the end user.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
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:03:57 UTC (rev 10464)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/StreamResponse.java 2008-04-01 21:33:11 UTC (rev 10465)
@@ -22,30 +22,53 @@
******************************************************************************/
package org.jboss.portal.presentation.protocol;
+import org.jboss.portal.common.net.media.ContentType;
+
import java.io.InputStream;
/**
+ * Build a stream response.
+ *
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*/
public class StreamResponse extends ServerResponse
{
/** . */
- private String contentType = null;
+ private ContentType contentType = null;
/** . */
- private InputStream is = null;
+ private InputStream stream = null;
/**
- *
- * @param contentType
- * @param is
+ * Build a new stream response object.
+ *
+ * @param contentType the content type
+ * @param stream the media type
+ * @throws IllegalArgumentException if an argument is null
*/
- public StreamResponse(String contentType, InputStream is)
+ public StreamResponse(ContentType contentType, InputStream stream) throws IllegalArgumentException
{
-
+ if (contentType == null)
+ {
+ throw new IllegalArgumentException("No content type provided");
+ }
+ if (stream == null)
+ {
+ throw new IllegalArgumentException("No input stream provided");
+ }
this.contentType = contentType;
- this.is = is;
+ this.stream = stream;
}
+
+ public ContentType getContentType()
+ {
+ return contentType;
+ }
+
+ public InputStream getStream()
+ {
+ return stream;
+ }
}
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ViewUIObjectAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ViewUIObjectAction.java 2008-04-01 21:03:57 UTC (rev 10464)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ViewUIObjectAction.java 2008-04-01 21:33:11 UTC (rev 10465)
@@ -23,7 +23,7 @@
package org.jboss.portal.presentation.protocol;
/**
- * Shows a page.
+ * The client wants to display a user interface object.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
16 years, 1 month
JBoss Portal SVN: r10464 - in modules/presentation/trunk: build and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-01 17:03:57 -0400 (Tue, 01 Apr 2008)
New Revision: 10464
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIPage.java
Modified:
modules/presentation/trunk/build/pom.xml
modules/presentation/trunk/pom.xml
Log:
minor pom update
Modified: modules/presentation/trunk/build/pom.xml
===================================================================
--- modules/presentation/trunk/build/pom.xml 2008-04-01 20:55:11 UTC (rev 10463)
+++ modules/presentation/trunk/build/pom.xml 2008-04-01 21:03:57 UTC (rev 10464)
@@ -32,9 +32,9 @@
<version.gwt>1.4.60</version.gwt>
<version.mygwt>0.3.0</version.mygwt>
- <version.jboss.portal.common>1.2.0.Beta2</version.jboss.portal.common>
- <version.jboss.portal.portlet>2.0.0.CR1</version.jboss.portal.portlet>
- <version.jboss.portal.web>1.2.0.Beta2</version.jboss.portal.web>
+ <version.jboss.portal.common>1.2.0.Beta3</version.jboss.portal.common>
+ <version.jboss.portal.portlet>2.0.0.CR2</version.jboss.portal.portlet>
+ <version.jboss.portal.web>1.2.0.Beta3</version.jboss.portal.web>
<version.jboss.unit>1.2.0.SNAPSHOT</version.jboss.unit>
<!--
Modified: modules/presentation/trunk/pom.xml
===================================================================
--- modules/presentation/trunk/pom.xml 2008-04-01 20:55:11 UTC (rev 10463)
+++ modules/presentation/trunk/pom.xml 2008-04-01 21:03:57 UTC (rev 10464)
@@ -26,6 +26,7 @@
</distributionManagement>
<modules>
+ <module>build</module>
<module>presentation</module>
</modules>
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIPage.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIPage.java 2008-04-01 20:55:11 UTC (rev 10463)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIPage.java 2008-04-01 21:03:57 UTC (rev 10464)
@@ -1,33 +0,0 @@
-/******************************************************************************
- * 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.model2;
-
-import org.jboss.portal.presentation.model.UIObject;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIPage extends UIObject
-{
-}
\ No newline at end of file
16 years, 1 month
JBoss Portal SVN: r10463 - in modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation: protocol and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-01 16:55:11 -0400 (Tue, 01 Apr 2008)
New Revision: 10463
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java
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/ServerResponse.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
Log:
minor tweaks
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java 2008-04-01 20:48:27 UTC (rev 10462)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java 2008-04-01 20:55:11 UTC (rev 10463)
@@ -32,7 +32,7 @@
public interface UIWindow extends UIObject
{
/**
- * Returns the window state of the window or null if it does not exist.
+ * Returns the window state of the window or null if it does not exist. It is a convenient wrapper
*
* @return the window state
*/
Modified: 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/ServerAction.java 2008-04-01 20:48:27 UTC (rev 10462)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ServerAction.java 2008-04-01 20:55:11 UTC (rev 10463)
@@ -23,8 +23,10 @@
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 ServerAction
{
Modified: 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/ServerResponse.java 2008-04-01 20:48:27 UTC (rev 10462)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/ServerResponse.java 2008-04-01 20:55:11 UTC (rev 10463)
@@ -23,6 +23,8 @@
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 $
*/
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 20:48:27 UTC (rev 10462)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/StreamResponse.java 2008-04-01 20:55:11 UTC (rev 10463)
@@ -26,18 +26,14 @@
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
*/
public class StreamResponse extends ServerResponse
{
- /**
- *
- */
+
+ /** . */
private String contentType = null;
- /**
- *
- */
+ /** . */
private InputStream is = null;
/**
@@ -47,6 +43,8 @@
*/
public StreamResponse(String contentType, InputStream is)
{
+
+
this.contentType = contentType;
this.is = is;
}
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 20:48:27 UTC (rev 10462)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectAction.java 2008-04-01 20:55:11 UTC (rev 10463)
@@ -23,20 +23,39 @@
package org.jboss.portal.presentation.protocol;
/**
+ * An abstract class that defines an action that targets a user interface object.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class UIObjectAction extends ServerAction
+public abstract class UIObjectAction extends ServerAction
{
- /** . */
+ /** The id of the target object. */
private final String targetId;
- public UIObjectAction(String targetId)
+ /**
+ * Constructor for an user interface object action.
+ *
+ * @param targetId the id of the target user interface object
+ * @throws IllegalArgumentException if the target id is null
+ */
+ public UIObjectAction(String targetId) throws IllegalArgumentException
{
+ if (targetId == null)
+ {
+ throw new IllegalArgumentException("The target user interface object must not be null");
+ }
+
+ //
this.targetId = targetId;
}
+ /**
+ * The user interface target id.
+ *
+ * @return the target id
+ */
public String getTargetId()
{
return targetId;
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 20:48:27 UTC (rev 10462)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/UIObjectResponse.java 2008-04-01 20:55:11 UTC (rev 10463)
@@ -23,20 +23,39 @@
package org.jboss.portal.presentation.protocol;
/**
+ * An abstract class that defines a response that targets a user interface object.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class UIObjectResponse extends ServerResponse
+public abstract class UIObjectResponse extends ServerResponse
{
- /** . */
+ /** The id of the target object. */
private final String targetId;
- public UIObjectResponse(String targetId)
+ /**
+ * Constructor for an user interface object response.
+ *
+ * @param targetId the id of the target user interface object
+ * @throws IllegalArgumentException if the target id is null
+ */
+ public UIObjectResponse(String targetId) throws IllegalArgumentException
{
+ if (targetId == null)
+ {
+ throw new IllegalArgumentException("The target user interface object must not be null");
+ }
+
+ //
this.targetId = targetId;
}
+ /**
+ * The user interface target id.
+ *
+ * @return the target id
+ */
public String getTargetId()
{
return targetId;
16 years, 1 month
JBoss Portal SVN: r10462 - modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-01 16:48:27 -0400 (Tue, 01 Apr 2008)
New Revision: 10462
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java
Log:
remove setters from UIWindow
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java 2008-04-01 20:04:12 UTC (rev 10461)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIWindow.java 2008-04-01 20:48:27 UTC (rev 10462)
@@ -39,23 +39,9 @@
WindowState getWindowState();
/**
- * Update the window state of the window.
- *
- * @param windowState the new window state
- */
- void setWindowState(WindowState windowState);
-
- /**
* Returns the mode of the window or null if it does not exist.
*
* @return the mode
*/
Mode getMode();
-
- /**
- * Update the mode of the window.
- *
- * @param mode the new mode
- */
- void setMode(Mode mode);
}
\ No newline at end of file
16 years, 1 month
JBoss Portal SVN: r10461 - in modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2: ui and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-01 16:04:12 -0400 (Tue, 01 Apr 2008)
New Revision: 10461
Added:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java
Removed:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIAction.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIContainer.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIContext.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIWindow.java
Log:
minor changes (some stuff should have been deleted but are still there)
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIAction.java 2008-04-01 20:02:48 UTC (rev 10460)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIAction.java 2008-04-01 20:04:12 UTC (rev 10461)
@@ -1,57 +0,0 @@
-/******************************************************************************
- * 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.model2;
-
-import org.jboss.portal.presentation.model.UIObject;
-
-/**
- * An action that can be triggered.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public interface UIAction extends UIObject
-{
-
- /**
- * Returns the action display name.
- *
- * @return the display name
- */
- String getDisplayName();
-
- /**
- * Returns the action icon URL.
- *
- * @return the icon URL
- */
- String getIconURL();
-
- /**
- * Returns the action URL.
- *
- * @return the url
- */
- String getURL();
-
-}
\ No newline at end of file
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIContainer.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIContainer.java 2008-04-01 20:02:48 UTC (rev 10460)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIContainer.java 2008-04-01 20:04:12 UTC (rev 10461)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * 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.model2;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIContainer extends UIObject
-{
-}
\ No newline at end of file
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIContext.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIContext.java 2008-04-01 20:02:48 UTC (rev 10460)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIContext.java 2008-04-01 20:04:12 UTC (rev 10461)
@@ -1,31 +0,0 @@
-/******************************************************************************
- * 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.model2;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIContext extends UIObject
-{
-}
\ No newline at end of file
Deleted: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIWindow.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIWindow.java 2008-04-01 20:02:48 UTC (rev 10460)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIWindow.java 2008-04-01 20:04:12 UTC (rev 10461)
@@ -1,61 +0,0 @@
-/******************************************************************************
- * 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.model2;
-
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public interface UIWindow extends UIObject
-{
- /**
- * Returns the window state of the window or null if it does not exist.
- *
- * @return the window state
- */
- WindowState getWindowState();
-
- /**
- * Update the window state of the window.
- *
- * @param windowState the new window state
- */
- void setWindowState(WindowState windowState);
-
- /**
- * Returns the mode of the window or null if it does not exist.
- *
- * @return the mode
- */
- Mode getMode();
-
- /**
- * Update the mode of the window.
- *
- * @param mode the new mode
- */
- void setMode(Mode mode);
-}
\ No newline at end of file
Copied: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java (from rev 10454, modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/UIPage.java)
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java (rev 0)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/model2/ui/UIPage.java 2008-04-01 20:04:12 UTC (rev 10461)
@@ -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.model2.ui;
+
+import org.jboss.portal.presentation.model.UIObject;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface UIPage extends UIObject
+{
+}
\ No newline at end of file
16 years, 1 month
JBoss Portal SVN: r10460 - in branches/JBoss_Portal_2_6_4_JBPB: core-admin/src/resources/portal-admin-war/jsf and 1 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-04-01 16:02:48 -0400 (Tue, 01 Apr 2008)
New Revision: 10460
Modified:
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
Log:
admin migration to portlet bridge - enhance component to allow nested forms and normal portlet operation
Modified: branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
--- branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-04-01 17:53:30 UTC (rev 10459)
+++ branches/JBoss_Portal_2_6_4_JBPB/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2008-04-01 20:02:48 UTC (rev 10460)
@@ -29,13 +29,34 @@
var domTT_maxWidth = false;
//]]>
- function submitForm(elem,actionUrl){
- while (elem.parentNode && elem.parentNode.tagName.toLowerCase() != "form"){
- elem = elem.parentNode;
+ //This function checks for a previousSibling in the DOM and it must be a form
+ //generated by JSF. otherwise the actionURL will be treated as a regular link
+ //for non-JSF environment
+ //
+ //For JSF use:
+ //<h:form></h:form>
+ //<jbp:portlet
+ //...
+ function submitForm(actionUrl){
+ var jsfForm;
+ try{
+ //ie is normal
+ if(document.getElementById('bilto').previousSibling.nodeName.toLowerCase() == 'form'){
+ jsfForm = document.getElementById('bilto').previousSibling;
+ }else{
+ //firefox adds that extra text node
+ jsfForm = document.getElementById('bilto').previousSibling.previousSibling;
+ }
+ }catch(e){
+
}
- var oForm = elem.parentNode;
- oForm.action = actionUrl;
- oForm.submit();
+
+ if (jsfForm.nodeName.toLowerCase() == 'form'){
+ jsfForm.action = actionUrl;
+ jsfForm.submit();
+ }else{
+ window.location = actionUrl;
+ }
}
</script>
@@ -99,6 +120,7 @@
<td>
<div style="height:300px; width:500px; overflow: auto; overflow-x: hidden; border: 1px solid #333;">
+
<table style="width:100%;" cellspacing="0" cellpadding="0">
<%
for (IteratorStatus i = new IteratorStatus(instances); i.hasNext();)
@@ -144,7 +166,7 @@
<tr class="<%= rowClass %>" >
<td >
<img src="<%= iconLocation %>" align="middle" style="margin:0 4px 0 0"/>
- <span onmouseover="domTT_activate(this, event, 'content', document.getElementById('info-container-<%= displayName %>'),'delay', 0, 'trail', false, 'fade', 'both', 'fadeMax', 95, 'styleClass', 'none');"><a href="javascript:void(0);" onclick="submitForm(this,'<%= test %>');return false" id="portlet-instance-link"><%= displayName %></a></span>
+ <span onmouseover="domTT_activate(this, event, 'content', document.getElementById('info-container-<%= displayName %>'),'delay', 0, 'trail', false, 'fade', 'both', 'fadeMax', 95, 'styleClass', 'none');"><a href="javascript:void(0);" onclick="submitForm('<%= test %>');return false" id="portlet-instance-link"><%= displayName %></a></span>
</td>
</tr>
<%
Modified: branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml
===================================================================
--- branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-04-01 17:53:30 UTC (rev 10459)
+++ branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/common/editPageLayout.xhtml 2008-04-01 20:02:48 UTC (rev 10460)
@@ -63,7 +63,7 @@
</tr>
<tr>
<td colspan="2" valign="top">
- <h:form>
+ <h:form></h:form>
<jbp:portlet
portletId="#{pageManager.selectedEditorPortletId}"
portletInvoker="#{pageManager.portletInvoker}"
@@ -74,7 +74,6 @@
initialWindowState="normal"
renderParameters="#{pageManager.selectedRenderParameters}"
onClick="url.setParameter('windowName', document.getElementById('windowForm:windowName').value);"/>
- </h:form>
</td>
</tr>
</table>
Modified: branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml
===================================================================
--- branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-04-01 17:53:30 UTC (rev 10459)
+++ branches/JBoss_Portal_2_6_4_JBPB/core-admin/src/resources/portal-admin-war/jsf/editWindow.xhtml 2008-04-01 20:02:48 UTC (rev 10460)
@@ -10,8 +10,8 @@
<ui:define name="content">
<!-- -->
- <h:form>
<div class="clear">
+ <h:form></h:form>
<jbp:portlet
actionListener="#{portalobjectmgr.processEvent}"
portletId="#{portalobjectmgr.selectedContentEditorInstance}"
@@ -22,7 +22,7 @@
initialMode="edit_content"
initialWindowState="normal"/>
</div>
- </h:form>
+
</ui:define>
</ui:composition>
16 years, 1 month
JBoss Portal SVN: r10458 - branches/JBoss_Portal_2_6_4_JBPB/core/src/main/org/jboss/portal/core/impl/model/portal.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-04-01 09:15:43 -0400 (Tue, 01 Apr 2008)
New Revision: 10458
Modified:
branches/JBoss_Portal_2_6_4_JBPB/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java
Log:
admin migration to portlet bridge - back to normal
Modified: branches/JBoss_Portal_2_6_4_JBPB/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java
===================================================================
--- branches/JBoss_Portal_2_6_4_JBPB/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java 2008-04-01 11:30:01 UTC (rev 10457)
+++ branches/JBoss_Portal_2_6_4_JBPB/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java 2008-04-01 13:15:43 UTC (rev 10458)
@@ -36,7 +36,6 @@
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
import javax.naming.InitialContext;
-import javax.naming.NamingException;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -248,17 +247,9 @@
}
}
-
protected ObjectNode getObjectNode(PortalObjectId path)
{
- Session session;
- try{
- session = sessionFactory.getCurrentSession();
- }catch(Exception e){
- session = sessionFactory.openSession();
- }
-
- return getObjectNode(session, path);
+ return getObjectNode(sessionFactory.getCurrentSession(), path);
}
private ObjectNode getObjectNodeNoCache(Session session, PortalObjectId id)
16 years, 1 month
JBoss Portal SVN: r10457 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2008-04-01 07:30:01 -0400 (Tue, 01 Apr 2008)
New Revision: 10457
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml
Log:
JBPORTAL-1754 - remove duplicated part
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml 2008-04-01 10:08:28 UTC (rev 10456)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml 2008-04-01 11:30:01 UTC (rev 10457)
@@ -146,36 +146,6 @@
throws IdentityException;
/** Get all the roles */
-Set findRoles()
- throws IdentityException;/** Retrieves a role by its name*/
-Role findRoleByName(String name)
- throws IdentityException, IllegalArgumentException;
-
-/**Retrieve a collection of role from the role names.*/
-Set findRolesByNames(String[] names)
- throws IdentityException, IllegalArgumentException;
-
-/** Retrieves a role by its id.*/
-Role findRoleById(Object id)
- throws IdentityException, IllegalArgumentException;
-
-/** Retrieves a role by its id.*/
-Role findRoleById(String id)
- throws IdentityException, IllegalArgumentException;
-
-/** Create a new role with the specified name.*/
-Role createRole(String name, String displayName)
- throws IdentityException, IllegalArgumentException;
-
-/** Remove a role.*/
-void removeRole(Object id)
- throws IdentityException, IllegalArgumentException;
-
-/** Returns the number of roles. */
-int getRolesCount()
- throws IdentityException;
-
-/** Get all the roles */
Set findRoles() throws IdentityException;
]]></programlisting>
</listitem>
16 years, 1 month