JBoss Portal SVN: r8998 - branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/bundles.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2007-11-17 19:22:37 -0500 (Sat, 17 Nov 2007)
New Revision: 8998
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties
Log:
new update for italian language
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties 2007-11-17 22:27:52 UTC (rev 8997)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/bundles/Resource_it.properties 2007-11-18 00:22:37 UTC (rev 8998)
@@ -21,8 +21,8 @@
# 02110-1301 USA, or see the FSF site: http://www.fsf.org. #
################################################################################
-# This file is deprecated, use the display-name on objects directly
+# Navigation Portlet
PAGENAME_default=Home
PAGENAME_Admin=Amministrazione
PAGENAME_Test=Test
-PAGENAME_News=Novita'
+PAGENAME_News=Novit\u00e0
16 years, 7 months
JBoss Portal SVN: r8997 - branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-11-17 17:27:52 -0500 (Sat, 17 Nov 2007)
New Revision: 8997
Modified:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
Log:
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 22:21:58 UTC (rev 8996)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 22:27:52 UTC (rev 8997)
@@ -333,10 +333,13 @@
if(cour instanceof UIWindow)
{
org.jboss.portal.presentation.impl.model.UIWindowImpl window = (org.jboss.portal.presentation.impl.model.UIWindowImpl)cour;
- responseBuffer.append("<div>");
- responseBuffer.append("<div id=\"title\">"+window.getContent().getTitle()+"</div>");
- responseBuffer.append("<div id=\"content\">"+window.getContent().getMarkup()+"</div>");
- responseBuffer.append("</div><br/><br/>");
+ if(window.getContent() != null)
+ {
+ responseBuffer.append("<div>");
+ responseBuffer.append("<div id=\"title\">"+window.getContent().getTitle()+"</div>");
+ responseBuffer.append("<div id=\"content\">"+window.getContent().getMarkup()+"</div>");
+ responseBuffer.append("</div><br/><br/>");
+ }
}
}
}
16 years, 7 months
JBoss Portal SVN: r8996 - in branches/UIServer: uiserver/src/main/org/jboss/portal/presentation and 4 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 17:21:58 -0500 (Sat, 17 Nov 2007)
New Revision: 8996
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/CreateUIObjectAction.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/DestroyUIObjectAction.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ErrorResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/GetActivation.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/LinkActivation.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/PostActivation.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/RedirectResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/RenameUIObjectAction.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ServerAction.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ServerResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ShowUIObjectResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/StreamResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/UIObjectAction.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/UIObjectResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ViewUIObjectAction.java
Removed:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorRequest.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java
Log:
move action.server actions to protocol package
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-17 22:07:58 UTC (rev 8995)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -22,39 +22,21 @@
******************************************************************************/
package org.jboss.portal.core.presentation.server;
-import java.util.List;
-import java.util.Map;
-import java.util.Iterator;
-import java.util.ArrayList;
-
-import java.io.InputStream;
-
import org.apache.log4j.Logger;
-import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.jems.as.system.AbstractJBossService;
-import org.jboss.portal.server.RequestControllerDispatcher;
import org.jboss.portal.server.ServerException;
import org.jboss.portal.server.RequestController;
-import org.jboss.portal.server.ServerInvocation;
-import org.jboss.portal.theme.page.PageResult;
import org.jboss.portal.presentation.RequestContext;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
+import org.jboss.portal.presentation.protocol.ServerAction;
import org.jboss.portal.presentation.server.Processor;
import org.jboss.portal.presentation.server.ProcessorRequest;
import org.jboss.portal.presentation.server.ProcessorResponse;
-import org.jboss.portal.presentation.action.server.ServerAction;
-import org.jboss.portal.presentation.action.server.ViewUIObjectAction;
-import org.jboss.portal.presentation.action.server.ShowUIObjectResponse;
-import org.jboss.portal.presentation.action.server.ErrorResponse;
-import org.jboss.portal.presentation.action.server.RedirectResponse;
-import org.jboss.portal.presentation.action.server.StreamResponse;
-import org.jboss.portal.presentation.model.*;
-import org.jboss.portal.theme.page.WindowContext;
-import org.jboss.portal.theme.page.WindowResult;
-
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java 2007-11-17 22:07:58 UTC (rev 8995)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -22,9 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation;
-import org.jboss.portal.presentation.action.server.ServerAction;
+import org.jboss.portal.presentation.protocol.ServerAction;
import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.state.ModelLoader;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.web.ServletContextDispatcher;
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 22:07:58 UTC (rev 8995)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -24,28 +24,23 @@
import java.io.PrintWriter;
import java.util.List;
-import java.util.StringTokenizer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jboss.portal.presentation.RequestContext;
+import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
import org.jboss.portal.presentation.impl.RequestContextImpl;
import org.jboss.portal.presentation.server.ProcessorRequest;
import org.jboss.portal.presentation.server.ProcessorResponse;
import org.jboss.portal.presentation.server.PresentationServer;
-import org.jboss.portal.presentation.action.server.ServerAction;
-import org.jboss.portal.presentation.action.server.ServerResponse;
-import org.jboss.portal.presentation.action.server.GetActivation;
-import org.jboss.portal.presentation.action.server.PostActivation;
-import org.jboss.portal.presentation.action.server.ViewUIObjectAction;
-import org.jboss.portal.presentation.action.server.ShowUIObjectResponse;
+import org.jboss.portal.presentation.protocol.ServerAction;
+import org.jboss.portal.presentation.protocol.ServerResponse;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.model.UIContext;
-import org.jboss.portal.presentation.model.UIPortal;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIPage;
import org.jboss.portal.presentation.model.UIWindow;
-import org.jboss.portal.presentation.model.state.ObjectState;
import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.server.RequestController;
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java 2007-11-17 22:07:58 UTC (rev 8995)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -25,7 +25,7 @@
import javax.servlet.http.HttpSession;
import org.jboss.portal.presentation.RequestContext;
-import org.jboss.portal.presentation.action.server.ServerAction;
+import org.jboss.portal.presentation.protocol.ServerAction;
import org.jboss.portal.presentation.model.UIContext;
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.impl.model.UIContextImpl;
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/CreateUIObjectAction.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/CreateUIObjectAction.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/CreateUIObjectAction.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/CreateUIObjectAction.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class CreateUIObjectAction extends UIObjectAction
+{
+ public CreateUIObjectAction(String targetId)
+ {
+ super(targetId);
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/DestroyUIObjectAction.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/DestroyUIObjectAction.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/DestroyUIObjectAction.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/DestroyUIObjectAction.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class DestroyUIObjectAction extends UIObjectAction
+{
+ public DestroyUIObjectAction(String targetId)
+ {
+ super(targetId);
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ErrorResponse.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ErrorResponse.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ErrorResponse.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ErrorResponse.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ErrorResponse extends ServerResponse
+{
+ /**
+ *
+ */
+ private int errorCode = 0;
+
+ /**
+ *
+ * @param errorCode
+ */
+ public ErrorResponse(int errorCode)
+ {
+ this.errorCode = errorCode;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public int getErrorCode()
+ {
+ return this.errorCode;
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/GetActivation.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/GetActivation.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/GetActivation.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/GetActivation.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,32 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class GetActivation extends LinkActivation
+{
+
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/LinkActivation.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/LinkActivation.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/LinkActivation.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/LinkActivation.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,150 @@
+/******************************************************************************
+ * 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;
+
+import java.util.Map;
+
+import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.model.UIObject;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public abstract class LinkActivation extends ServerAction
+{
+ /**
+ *
+ */
+ protected String contentType = null;
+
+ /**
+ *
+ */
+ protected String url = null;
+
+ /**
+ *
+ */
+ protected Map queryParameters = null;
+
+ /**
+ * The Portal that the target object belongs to
+ */
+ protected UIPortal portal = null;
+
+ /**
+ * Target object where action needs to be performed
+ */
+ protected UIObject target = null;
+
+ /**
+ *
+ * @return
+ */
+ public String getContentType()
+ {
+ return contentType;
+ }
+
+ /**
+ *
+ * @param contentType
+ */
+ public void setContentType(String contentType)
+ {
+ this.contentType = contentType;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public Map getQueryParameters()
+ {
+ return queryParameters;
+ }
+
+ /**
+ *
+ * @param queryParameters
+ */
+ public void setQueryParameters(Map queryParameters)
+ {
+ this.queryParameters = queryParameters;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getUrl()
+ {
+ return url;
+ }
+
+ /**
+ *
+ * @param url
+ */
+ public void setUrl(String url)
+ {
+ this.url = url;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public UIPortal getPortal()
+ {
+ return portal;
+ }
+
+ /**
+ *
+ * @param portal
+ */
+ public void setPortal(UIPortal portal)
+ {
+ this.portal = portal;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public UIObject getTarget()
+ {
+ return target;
+ }
+
+ /**
+ *
+ * @param target
+ */
+ public void setTarget(UIObject target)
+ {
+ this.target = target;
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/MoveUIObjectAction.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class MoveUIObjectAction extends UIObjectAction
+{
+ public MoveUIObjectAction(String targetId)
+ {
+ super(targetId);
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/PostActivation.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/PostActivation.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/PostActivation.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/PostActivation.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * 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;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PostActivation extends LinkActivation
+{
+ private Map bodyParameters = null;
+
+ /**
+ *
+ * @return
+ */
+ public Map getBodyParameters()
+ {
+ return bodyParameters;
+ }
+
+ /**
+ *
+ * @param bodyParameters
+ */
+ public void setBodyParameters(Map bodyParameters)
+ {
+ this.bodyParameters = bodyParameters;
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/RedirectResponse.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/RedirectResponse.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/RedirectResponse.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/RedirectResponse.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class RedirectResponse extends ServerResponse
+{
+
+ /** . */
+ private final String location;
+
+ public RedirectResponse(String location)
+ {
+ this.location = location;
+ }
+
+ public String getLocation()
+ {
+ return location;
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/RenameUIObjectAction.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/RenameUIObjectAction.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/RenameUIObjectAction.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/RenameUIObjectAction.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class RenameUIObjectAction extends UIObjectAction
+{
+
+ /** . */
+ private String name;
+
+ public RenameUIObjectAction(String targetId, String name)
+ {
+ super(targetId);
+
+ //
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ServerAction.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ServerAction.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ServerAction.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ServerAction.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public abstract class ServerAction
+{
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ServerResponse.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ServerResponse.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ServerResponse.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ServerResponse.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class ServerResponse
+{
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ShowUIObjectResponse.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ShowUIObjectResponse.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ShowUIObjectResponse.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ShowUIObjectResponse.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * Tell the client to show a particular page.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ShowUIObjectResponse extends UIObjectResponse
+{
+ public ShowUIObjectResponse(String targetId)
+ {
+ super(targetId);
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/StreamResponse.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/StreamResponse.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/StreamResponse.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/StreamResponse.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * 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;
+
+import java.io.InputStream;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class StreamResponse extends ServerResponse
+{
+ /**
+ *
+ */
+ private String contentType = null;
+
+ /**
+ *
+ */
+ private InputStream is = null;
+
+ /**
+ *
+ * @param contentType
+ * @param is
+ */
+ public StreamResponse(String contentType, InputStream is)
+ {
+ this.contentType = contentType;
+ this.is = is;
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/UIObjectAction.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/UIObjectAction.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/UIObjectAction.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/UIObjectAction.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class UIObjectAction extends ServerAction
+{
+
+ /** . */
+ private final String targetId;
+
+ public UIObjectAction(String targetId)
+ {
+ this.targetId = targetId;
+ }
+
+ public String getTargetId()
+ {
+ return targetId;
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/UIObjectResponse.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/UIObjectResponse.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/UIObjectResponse.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/UIObjectResponse.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class UIObjectResponse extends ServerResponse
+{
+
+ /** . */
+ private final String targetId;
+
+ public UIObjectResponse(String targetId)
+ {
+ this.targetId = targetId;
+ }
+
+ public String getTargetId()
+ {
+ return targetId;
+ }
+}
Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ViewUIObjectAction.java (from rev 8994, branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ViewUIObjectAction.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ViewUIObjectAction.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/protocol/ViewUIObjectAction.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * Shows a page.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ViewUIObjectAction extends UIObjectAction
+{
+ public ViewUIObjectAction(String targetId)
+ {
+ super(targetId);
+ }
+}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorRequest.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorRequest.java 2007-11-17 22:07:58 UTC (rev 8995)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorRequest.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -24,7 +24,7 @@
import java.io.Serializable;
-import org.jboss.portal.presentation.action.server.ServerAction;
+import org.jboss.portal.presentation.protocol.ServerAction;
/**
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java 2007-11-17 22:07:58 UTC (rev 8995)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java 2007-11-17 22:21:58 UTC (rev 8996)
@@ -24,7 +24,7 @@
import java.io.Serializable;
-import org.jboss.portal.presentation.action.server.ServerResponse;
+import org.jboss.portal.presentation.protocol.ServerResponse;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
16 years, 7 months
JBoss Portal SVN: r8995 - in branches/UIServer: tools/etc/buildfragments and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 17:07:58 -0500 (Sat, 17 Nov 2007)
New Revision: 8995
Modified:
branches/UIServer/build/ide/intellij/idea60/modules/core/core.iml
branches/UIServer/tools/etc/buildfragments/defaults.ent
Log:
1.5 for uiserver
Modified: branches/UIServer/build/ide/intellij/idea60/modules/core/core.iml
===================================================================
--- branches/UIServer/build/ide/intellij/idea60/modules/core/core.iml 2007-11-17 21:51:55 UTC (rev 8994)
+++ branches/UIServer/build/ide/intellij/idea60/modules/core/core.iml 2007-11-17 22:07:58 UTC (rev 8995)
@@ -270,6 +270,7 @@
</library>
</orderEntry>
<orderEntry type="module" module-name="web" />
+ <orderEntry type="module" module-name="uiserver" />
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: branches/UIServer/tools/etc/buildfragments/defaults.ent
===================================================================
--- branches/UIServer/tools/etc/buildfragments/defaults.ent 2007-11-17 21:51:55 UTC (rev 8994)
+++ branches/UIServer/tools/etc/buildfragments/defaults.ent 2007-11-17 22:07:58 UTC (rev 8995)
@@ -118,8 +118,8 @@
<property name="javac.depend.cachedir" value="${build.cache}/depends"/>
- <property name="javac.source" value="1.4"/>
- <property name="javac.target" value="1.4"/>
+ <property name="javac.source" value="1.5"/>
+ <property name="javac.target" value="1.5"/>
<property name="rmic.stubVersion" value="1.2"/>
<!-- classpath and local.classpath must have a value using with a path -->
16 years, 7 months
JBoss Portal SVN: r8994 - in branches/UIServer: core/src/main/org/jboss/portal/core/presentation/server and 2 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-11-17 16:51:55 -0500 (Sat, 17 Nov 2007)
New Revision: 8994
Added:
branches/UIServer/core/src/main/org/jboss/portal/core/controller/ControllerContextFactory.java
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/controller/Controller.java
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/UIServer/server/src/main/org/jboss/portal/server/RequestController.java
Log:
render hack
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/controller/Controller.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-11-17 21:17:04 UTC (rev 8993)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/controller/Controller.java 2007-11-17 21:51:55 UTC (rev 8994)
@@ -56,7 +56,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class Controller extends AbstractJBossService implements RequestController
+public class Controller extends AbstractJBossService implements RequestController, ControllerContextFactory
{
/** . */
@@ -209,6 +209,11 @@
{
this.pageControlPolicy = pageControlPolicy;
}
+
+ public ControllerContext getControllerContext(ServerInvocation invocation) throws ServerException
+ {
+ return new ControllerContext(invocation, this);
+ }
public final void handle(ServerInvocation invocation) throws ServerException
{
Added: branches/UIServer/core/src/main/org/jboss/portal/core/controller/ControllerContextFactory.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/controller/ControllerContextFactory.java (rev 0)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/controller/ControllerContextFactory.java 2007-11-17 21:51:55 UTC (rev 8994)
@@ -0,0 +1,9 @@
+package org.jboss.portal.core.controller;
+
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.ServerException;
+
+public interface ControllerContextFactory
+{
+ public ControllerContext getControllerContext(ServerInvocation invocation) throws ServerException;
+}
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17 21:17:04 UTC (rev 8993)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17 21:51:55 UTC (rev 8994)
@@ -30,10 +30,12 @@
import org.jboss.portal.presentation.model.state.ModelLoader;
import org.jboss.portal.core.controller.Controller;
import org.jboss.portal.core.controller.ControllerContext;
+import org.jboss.portal.core.controller.ControllerContextFactory;
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.model.portal.command.render.RenderWindowCommand;
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.content.WindowRendition;
/**
@@ -45,7 +47,7 @@
/** . */
- private Controller controller;
+ private ControllerContextFactory controllerContextFactory;
/**
*
@@ -117,12 +119,31 @@
{
this.processor = processor;
}
+
+ /**
+ *
+ * @return
+ */
+ public ControllerContextFactory getControllerContextFactory()
+ {
+ return controllerContextFactory;
+ }
+ /**
+ *
+ * @param controllerContextFactory
+ */
+ public void setControllerContextFactory(
+ ControllerContextFactory controllerContextFactory)
+ {
+ this.controllerContextFactory = controllerContextFactory;
+ }
+
public WindowContent render(RequestContext context, UIWindow window) throws Exception
{
- /*PortalObjectId windowId = null;
+ PortalObjectId windowId = PortalObjectId.parse(window.getId(), PortalObjectPath.CANONICAL_FORMAT);
RenderWindowCommand rwc = new RenderWindowCommand(windowId);
- ControllerContext ctx = new ControllerContext(context.getInvocation(), controller);
+ ControllerContext ctx = this.controllerContextFactory.getControllerContext(context.getInvocation());
WindowRendition rendition = rwc.render(ctx);
if (rendition != null)
{
@@ -143,8 +164,8 @@
}
}
- return null;*/
+ return null;
- return new WindowContent(-1, "MockTitle", "<div>Mock Content</div>");
+ //return new WindowContent(-1, "MockTitle", "<div>Mock Content</div>");
}
}
Modified: branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-11-17 21:17:04 UTC (rev 8993)
+++ branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-11-17 21:51:55 UTC (rev 8994)
@@ -1099,6 +1099,7 @@
<xmbean/>
<depends optional-attribute-name="Processor" proxy-type="attribute">portal:service=Processor</depends>
<depends optional-attribute-name="ModelLoader" proxy-type="attribute">portal:container=ModelLoader</depends>
+ <depends optional-attribute-name="ControllerContextFactory" proxy-type="attribute">portal:service=RequestController</depends>
<depends>portal:service=PageService</depends>
<depends>portal:commandFactory=DefaultPortal</depends>
<depends>portal:urlFactory=Delegating</depends>
Modified: branches/UIServer/server/src/main/org/jboss/portal/server/RequestController.java
===================================================================
--- branches/UIServer/server/src/main/org/jboss/portal/server/RequestController.java 2007-11-17 21:17:04 UTC (rev 8993)
+++ branches/UIServer/server/src/main/org/jboss/portal/server/RequestController.java 2007-11-17 21:51:55 UTC (rev 8994)
@@ -36,5 +36,5 @@
*
* @param invocation the server invocation
*/
- void handle(ServerInvocation invocation) throws ServerException;
+ void handle(ServerInvocation invocation) throws ServerException;
}
16 years, 7 months
JBoss Portal SVN: r8993 - in branches/UIServer: core/src/main/org/jboss/portal/test/core/presentation/model and 6 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-11-17 16:17:04 -0500 (Sat, 17 Nov 2007)
New Revision: 8993
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java
branches/UIServer/core/src/main/org/jboss/portal/test/core/presentation/model/UIModelTester.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIObject.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/model/MockModelLoaderImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/model/UIModelTester.java
Log:
integrating classic usecase with new model implementation
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -39,6 +39,8 @@
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalContainer;
import org.jboss.portal.core.model.portal.PortalObject;
+import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.Portal;
@@ -87,16 +89,9 @@
ObjectState objectState = null;
//Get the PortalObject corresponding to this objectId from the PortalObjectContainer
- PortalContainer portalContainer = this.portalObjectContainer.getContext();
-
- StringTokenizer st = new StringTokenizer(objectId, "/");
- PortalObject portalObject = portalContainer.getChild(st.nextToken());
- while(st.hasMoreTokens())
- {
- String token = st.nextToken();
- portalObject = portalObject.getChild(token);
- }
-
+ PortalObject portalObject = this.portalObjectContainer.getObject(PortalObjectId.parse(objectId,
+ PortalObjectPath.CANONICAL_FORMAT));
+
if(portalObject == null)
{
//Object by this id was not found in the Portal
@@ -113,10 +108,10 @@
Map<String, String> properties = portalObject.getDeclaredProperties();
//Parent Id
- String parentId = portalObject.getParent().getId().toString();
- if(parentId.equals("/"))
+ String parentId = "";
+ if(portalObject.getParent() != null)
{
- parentId = "";
+ parentId = portalObject.getParent().getId().toString();
}
//Children Ids
Modified: branches/UIServer/core/src/main/org/jboss/portal/test/core/presentation/model/UIModelTester.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/test/core/presentation/model/UIModelTester.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/core/src/main/org/jboss/portal/test/core/presentation/model/UIModelTester.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -70,8 +70,7 @@
super.setUp();
ModelLoaderImpl modelLoader = new ModelLoaderImpl();
modelLoader.setPortalObjectContainer(this.container);
- this.uiContext = new UIContextImpl();
- ((UIContextImpl)this.uiContext).setModelLoader(modelLoader);
+ this.uiContext = new UIContextImpl(modelLoader);
this.loadPortalObjectContainer();
}
@@ -88,7 +87,7 @@
*
* @throws Exception
*/
- public void testModelLoading() throws Exception
+ /*public void testModelLoading() throws Exception
{
TransactionAssert.beginTransaction();
@@ -129,7 +128,7 @@
TransactionAssert.commitTransaction();
- }
+ }*/
/**
*
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -22,10 +22,12 @@
******************************************************************************/
package org.jboss.portal.presentation.controller;
+import java.io.PrintWriter;
import java.util.List;
import java.util.StringTokenizer;
import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import org.jboss.portal.presentation.RequestContext;
import org.jboss.portal.presentation.impl.RequestContextImpl;
@@ -38,6 +40,7 @@
import org.jboss.portal.presentation.action.server.PostActivation;
import org.jboss.portal.presentation.action.server.ViewUIObjectAction;
import org.jboss.portal.presentation.action.server.ShowUIObjectResponse;
+import org.jboss.portal.presentation.model.UIContext;
import org.jboss.portal.presentation.model.UIPortal;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIPage;
@@ -94,21 +97,12 @@
*/
RequestContext requestContext = new RequestContextImpl(this.presentationServer,
invocation);
- request.setAttribute("requestContext", requestContext);
+ request.setAttribute("requestContext", requestContext);
- String portalRequestPath = invocation.getServerContext().getPortalRequestPath();
- if(portalRequestPath == null || portalRequestPath.equals("") || portalRequestPath.equals("/") || portalRequestPath.equals("/index.html"))
- {
- portalRequestPath = "/default/default";
- }
-
- UIPortal targetPortal = this.getTargetPortal(requestContext,portalRequestPath);
- UIObject targetPortalObject = this.getTargetPortalObject(requestContext,portalRequestPath);
-
/**
* TODO: move this functionality to another component like a UIPresenter etc
*/
- ServerAction serverAction = this.getServerAction(requestContext, targetPortal, targetPortalObject);
+ ServerAction serverAction = this.getServerAction(requestContext);
ProcessorRequest processorRequest = new ProcessorRequest(serverAction);
ProcessorResponse processorResponse = this.presentationServer.getProcessor().process(requestContext,
@@ -116,7 +110,7 @@
//Process the response from the Processor
ServerResponse serverResponse = processorResponse.getResponse();
- this.handle(requestContext, targetPortal, targetPortalObject, serverResponse);
+ this.handle(requestContext, serverResponse);
}
catch(Exception e)
{
@@ -129,36 +123,46 @@
* @param serverResponse
* @throws ServerException
*/
- private void handle(RequestContext requestContext, UIPortal targetPortal, UIObject targetPortalObject, ServerResponse serverResponse) throws ServerException
+ private void handle(RequestContext requestContext, ServerResponse serverResponse) throws ServerException
{
try
{
+ HttpServletResponse response = requestContext.getInvocation().getServerContext().getClientResponse();
if(serverResponse instanceof ShowUIObjectResponse)
- {
- if(targetPortalObject instanceof UIPage)
- {
- //Load the objects in the UITree
- UIPortal portal = (UIPortal)requestContext.getUIContext().getChild(targetPortal.getName());
- UIPage page = (UIPage)portal.getChild(targetPortalObject.getName());
-
+ {
+ ShowUIObjectResponse show = (ShowUIObjectResponse)serverResponse;
+ String targetId = show.getTargetId();
+
+ //Load the objects in the UITree
+ UIObject uiObject = requestContext.getUIContext().getObject(targetId);
+
+ if(uiObject instanceof UIPage)
+ {
+ UIPage page = (UIPage)uiObject;
//Populate the state of the Windows in the Page that is being displayed
//inside the UITree
- List<UIWindow> windows = page.getChildren(UIWindow.class);
+ List<UIObject> windows = page.getChildren();
if(windows != null)
{
for(int i=0; i<windows.size(); i++)
{
- UIWindow window = windows.get(i);
- WindowContent windowContent = this.presentationServer.render(requestContext, window);
+ UIObject cour = windows.get(i);
- /**
- * TODO: decouple this from the model implementation by moving the functinality
- * to another component like a UIPresenter etc
- */
- ((org.jboss.portal.presentation.impl.model.UIWindowImpl)window).
- setContent(windowContent);
+ if(cour instanceof UIWindow)
+ {
+ UIWindow window = (UIWindow)cour;
+ WindowContent windowContent = this.presentationServer.render(requestContext, window);
+
+ /**
+ * TODO: decouple this from the model implementation by moving the functinality
+ * to another component like a UIPresenter etc
+ */
+ ((org.jboss.portal.presentation.impl.model.UIWindowImpl)window).
+ setContent(windowContent);
+ }
}
- }
+ }
+ this.render(response.getWriter(), requestContext.getUIContext(), targetId);
}
}
}
@@ -206,7 +210,7 @@
/**
*
*/
- private ServerAction getServerAction(RequestContext requestContext, UIPortal targetPortal, UIObject targetPortalObject)
+ private ServerAction getServerAction(RequestContext requestContext)
{
ServerAction serverAction = null;
@@ -214,7 +218,11 @@
ServerInvocationContext invocationContext = invocation.getServerContext();
HttpServletRequest request = invocationContext.getClientRequest();
- if(targetPortalObject instanceof UIPage)
+ //Just use ViewUIObject command for now until URL interpretation/mapping
+ //to ServiceAction is implemented
+ serverAction = new ViewUIObjectAction("/default/default");
+
+ /*if(targetPortalObject instanceof UIPage)
{
serverAction = new ViewUIObjectAction(targetPortalObject.getId());
}
@@ -241,7 +249,7 @@
post.setTarget(targetPortalObject);
serverAction = post;
}
- }
+ }*/
return serverAction;
}
@@ -251,7 +259,7 @@
* @param portalRequestPath
* @return
*/
- private UIPortal getTargetPortal(RequestContext requestContext,String portalRequestPath)
+ /*private UIPortal getTargetPortal(RequestContext requestContext,String portalRequestPath)
{
UIPortal targetPortal = null;
@@ -273,14 +281,14 @@
}
return targetPortal;
- }
+ }*/
/**
*
* @param portalRequestPath
* @return
*/
- private UIObject getTargetPortalObject(RequestContext requestContext,String portalRequestPath)
+ /*private UIObject getTargetPortalObject(RequestContext requestContext,String portalRequestPath)
{
UIObject targetPortalObject = null;
@@ -297,16 +305,56 @@
{
if(objectState.getType() == UIPage.class)
{
- targetPortalObject = requestContext.getUIContext().getObject(id);
+ targetPortalObject = (UIPage)requestContext.getUIContext().getObject(id);
}
else if(objectState.getType() == UIWindow.class)
{
- targetPortalObject = requestContext.getUIContext().getObject(id);
+ targetPortalObject = (UIWindow)requestContext.getUIContext().getObject(id);
}
}
buffer.append("/");
}
return targetPortalObject;
+ }*/
+ //-----------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ * TODO: this should be used only in classic UI case...eventually when Controller is abstracted, this will be moved to
+ * the ClassicController implementation
+ */
+ private void render(PrintWriter clientConnection, UIContext uiContext, String targetId)
+ {
+ StringBuffer responseBuffer = new StringBuffer();
+ UIObject uiObject = (UIObject)uiContext.getObject(targetId);
+
+ //Display the page to the client
+ if(uiObject instanceof UIPage)
+ {
+ UIPage page = (UIPage)uiObject;
+ List<UIObject> windows = page.getChildren();
+ for(int i=0; i<windows.size(); i++)
+ {
+ UIObject cour = windows.get(i);
+ if(cour instanceof UIWindow)
+ {
+ org.jboss.portal.presentation.impl.model.UIWindowImpl window = (org.jboss.portal.presentation.impl.model.UIWindowImpl)cour;
+ responseBuffer.append("<div>");
+ responseBuffer.append("<div id=\"title\">"+window.getContent().getTitle()+"</div>");
+ responseBuffer.append("<div id=\"content\">"+window.getContent().getMarkup()+"</div>");
+ responseBuffer.append("</div><br/><br/>");
+ }
+ }
+ }
+
+ //Create the final output...Also hardcoded without any preprocessing/postprocessing etc
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>JBoss Portal UIServer</title><link rel=\"stylesheet\" id=\"dyna_css\" href=\"/portal-ajax/dyna/style.css\" type=\"text/css\"/><link rel=\"stylesheet\" type=\"text/css\" id=\"main_css\" href=\"/portal-core/themes/renaissance/portal_style.css\"/><link rel=\"shortcut icon\" href=\"/portal-core/themes/renaissance/images/favicon.ico\" /><link rel=\"icon\" type=\"image/gif\" href=\"/portal-core/themes/renaissance/images/animated_favicon1.gif\" /></head><body id=\"body\">\n");
+ buffer.append(responseBuffer.toString());
+ buffer.append("</body></html>\n");
+
+
+ //Sending the results back to the Client
+ clientConnection.write(buffer.toString());
+ clientConnection.flush();
}
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -69,8 +69,7 @@
/**
* TODO: decouple the implementation via factory pattern
*/
- uiContext = new UIContextImpl();
- ((UIContextImpl)uiContext).setModelLoader(this.presentationServer.getModelLoader());
+ uiContext = new UIContextImpl(this.presentationServer.getModelLoader());
session.setAttribute("uicontext", uiContext);
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -69,7 +69,8 @@
import org.jboss.portal.presentation.server.ProcessorResponse;
import org.jboss.portal.presentation.entry.EntryPoint;
import org.jboss.portal.presentation.RequestContext;
-import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.model.*;
+import org.jboss.portal.presentation.model.content.WindowContent;
/**
* The Portal Server Entry Point for classic html mode
@@ -336,11 +337,7 @@
try
{
InterceptorStackFactory stack = this.entryPoint.getInterceptorStackFactory();
- invocation.invoke(stack.getInterceptorStack());
-
- //Iterate through the UIContext Tree
- RequestContext requestContext = (RequestContext)req.getAttribute("requestContext");
- UIContext uiContext = requestContext.getUIContext();
+ invocation.invoke(stack.getInterceptorStack());
}
catch (ServerException e)
{
@@ -396,47 +393,10 @@
}
}
// ---------All these are just helper methods for the prototype-----------------------------------------------------------------------------------------------
- //----It containts mostly hard coded logic for the prototype-------------------------------------------------------------------------------------------------
+ //----It containts mostly hard coded logic for the prototype-------------------------------------------------------------------------------------------------
/**
- * Based on the latest design discussion, this method is not needed.
*
- * This will be an implementation detail of the UIServer processing the Response that is sent back to it
- * from the Core Portal Processor
- *
- * @param clientConnection
- * @param page
*/
- /*private void render(PrintWriter clientConnection, Page pageResult)
- {
- //Some flexible grid layout testing code
- Object[] gridData = this.getFlexibleGridLayoutManager(pageResult);
- Page page = (Page)gridData[0];
- LayoutManager layoutManager = (LayoutManager)gridData[1];
-
- //Some region layout testing code
- //Object[] regionData = this.getRegionBasedLayoutManager(pageResult);
- //Page page = (Page)regionData[0];
- //LayoutManager layoutManager = (LayoutManager)regionData[1];
-
- //Peform Page Layout
- String output = layoutManager.doLayout(page);
-
-
- //Create the final output...Also hardcoded without any preprocessing/postprocessing etc
- StringBuffer buffer = new StringBuffer();
- buffer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>JBoss Portal UIServer</title><link rel=\"stylesheet\" id=\"dyna_css\" href=\"/portal-ajax/dyna/style.css\" type=\"text/css\"/><link rel=\"stylesheet\" type=\"text/css\" id=\"main_css\" href=\"/portal-core/themes/renaissance/portal_style.css\"/><link rel=\"shortcut icon\" href=\"/portal-core/themes/renaissance/images/favicon.ico\" /><link rel=\"icon\" type=\"image/gif\" href=\"/portal-core/themes/renaissance/images/animated_favicon1.gif\" /></head><body id=\"body\">\n");
- buffer.append(output);
- buffer.append("</body></html>\n");
-
-
- //Sending the results back to the Client
- clientConnection.write(buffer.toString());
- clientConnection.flush();
- }*/
-
- /**
- *
- */
/*private Object[] getFlexibleGridLayoutManager(Page pageResult)
{
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -79,9 +79,9 @@
public UIObjectImpl(UIContextImpl context, String id, ObjectState state)
{
this.id = id;
- this.parentId = state.getParentId();
- this.name = state.getName();
this.state = state;
+ this.parentId = state.getParentId();
+ this.name = state.getName();
this.context = context;
this.children = new UIObjectList(this.context, state.getChildrenIds());
}
@@ -92,9 +92,9 @@
public UIObjectImpl(String id, ObjectState state)
{
this.id = id;
- this.parentId = state.getParentId();
- this.name = state.getName();
this.state = state;
+ this.parentId = state.getParentId();
+ this.name = state.getName();
this.context = (UIContextImpl)this;
this.children = new UIObjectList(this.context, state.getChildrenIds());
}
@@ -175,7 +175,7 @@
// throw new RuntimeException(e);
// }
throw new UnsupportedOperationException("todo");
- }
+ }
/**
*
@@ -298,15 +298,11 @@
// return newId;
// }
- /**
- *
- * @return
- */
+/*
private String generateChildId(String childName)
- {
- String newId = null;
-
- String myName = "";
+ {
+ String newId = null;
+ String myName = "";
if(this.getName() != null && this.getName().trim().length()>0)
{
myName = this.getName();
@@ -337,11 +333,9 @@
return newId;
}
+*/
- /**
- *
- * @return
- */
+/*
private UIContext getUIContext()
{
UIContext uiContext = null;
@@ -362,4 +356,5 @@
return uiContext;
}
+*/
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIObject.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIObject.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIObject.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -78,5 +78,5 @@
* @param type
* @return
*/
- public <T extends UIObject> List<T> getChildren(Class<T> type);
+ public <T extends UIObject> List<T> getChildren(Class<T> type);
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/model/MockModelLoaderImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/model/MockModelLoaderImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/model/MockModelLoaderImpl.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -66,4 +66,12 @@
return state;
}
+
+ /**
+ *
+ */
+ public String getRootId()
+ {
+ return null;
+ }
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/model/UIModelTester.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/model/UIModelTester.java 2007-11-17 18:43:51 UTC (rev 8992)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/model/UIModelTester.java 2007-11-17 21:17:04 UTC (rev 8993)
@@ -46,8 +46,7 @@
*/
protected void setUp() throws Exception
{
- this.uiContext = new UIContextImpl();
- ((UIContextImpl)this.uiContext).setModelLoader(new MockModelLoaderImpl());
+ this.uiContext = new UIContextImpl(new MockModelLoaderImpl());
}
/**
@@ -62,7 +61,7 @@
*
* @throws Exception
*/
- public void testCreateChild() throws Exception
+ /*public void testCreateChild() throws Exception
{
//Adding a UIContext...this should result in an IllegalArgumentException
try
@@ -97,13 +96,13 @@
assertEquals(window.getName(), "defaultWindow");
assertEquals(window.getId(), "/defaultPortal/defaultPage/defaultContainer/defaultWindow");
assertTrue(window.getParent() instanceof UIContainer);
- }
+ }*/
/**
*
* @throws Exception
*/
- public void testDestroyChild() throws Exception
+ /*public void testDestroyChild() throws Exception
{
//Assert the state of UIPortal added to the UIObject tree
UIPortal portal = this.uiContext.createChild("defaultPortal", UIPortal.class);
@@ -121,13 +120,13 @@
page.destroyChild(container.getName());
List<UIObject> pageChildren = page.getChildren();
assertTrue(pageChildren == null || pageChildren.size() == 0);
- }
+ }*/
/**
*
* @throws Exception
*/
- public void testModelLoading() throws Exception
+ /*public void testModelLoading() throws Exception
{
//Setup rootChildrenInfo
Map rootChildrenInfo = new HashMap();
@@ -142,13 +141,13 @@
assertEquals(defaultPortal.getId(), "/defaultPortal");
assertEquals(someOtherPortal.getName(), "someOtherPortal");
assertEquals(someOtherPortal.getId(), "/someOtherPortal");
- }
+ }*/
/**
*
* @throws Exception
*/
- public void testParentLoading() throws Exception
+ /*public void testParentLoading() throws Exception
{
//Setup rootChildrenInfo
Map rootChildrenInfo = new HashMap();
@@ -161,13 +160,13 @@
assertEquals(parent.getName(), "defaultPortal");
assertEquals(parent.getId(), "/defaultPortal");
- }
+ }*/
/**
*
* @throws Exception
*/
- public void testLazyLoading() throws Exception
+ /*public void testLazyLoading() throws Exception
{
Map rootChildrenInfo = new HashMap();
rootChildrenInfo.put("testingLazyLoading", UIPortal.class);
@@ -186,5 +185,5 @@
assertEquals(child.getParent().getId(), "/testingLazyLoading");
}
logger.info("--------------------------------------------------------");
- }
+ }*/
}
16 years, 7 months
JBoss Portal SVN: r8992 - in branches/UIServer: uiserver/src/main/org/jboss/portal/presentation/controller and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 13:43:51 -0500 (Sat, 17 Nov 2007)
New Revision: 8992
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectList.java
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContainerImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIPageImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIPortalImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIContext.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIObject.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/state/ModelLoader.java
Log:
udpates
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -72,7 +72,13 @@
{
this.portalObjectContainer = portalObjectContainer;
}
-
+
+
+ public String getRootId()
+ {
+ return portalObjectContainer.getContext().getId().toString();
+ }
+
/**
*
*/
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -138,8 +138,8 @@
if(targetPortalObject instanceof UIPage)
{
//Load the objects in the UITree
- UIPortal portal = requestContext.getUIContext().createChild(targetPortal.getName(), UIPortal.class);
- UIPage page = portal.createChild(targetPortalObject.getName(), UIPage.class);
+ UIPortal portal = (UIPortal)requestContext.getUIContext().getChild(targetPortal.getName());
+ UIPage page = (UIPage)portal.getChild(targetPortalObject.getName());
//Populate the state of the Windows in the Page that is being displayed
//inside the UITree
@@ -266,7 +266,7 @@
ObjectState objectState = this.presentationServer.getModelLoader().loadState(id);
if(objectState != null && objectState.getType() == UIPortal.class)
{
- targetPortal = requestContext.getUIContext().getObject(id, UIPortal.class);
+ targetPortal = (UIPortal)requestContext.getUIContext().getObject(id);
break;
}
buffer.append("/");
@@ -297,11 +297,11 @@
{
if(objectState.getType() == UIPage.class)
{
- targetPortalObject = requestContext.getUIContext().getObject(id, UIPage.class);
+ targetPortalObject = requestContext.getUIContext().getObject(id);
}
else if(objectState.getType() == UIWindow.class)
{
- targetPortalObject = requestContext.getUIContext().getObject(id, UIWindow.class);
+ targetPortalObject = requestContext.getUIContext().getObject(id);
}
}
buffer.append("/");
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContainerImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContainerImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContainerImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -25,6 +25,7 @@
import org.jboss.portal.presentation.model.UIContainer;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.state.ObjectState;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -32,6 +33,12 @@
*/
public class UIContainerImpl extends UIObjectImpl implements UIContainer
{
+
+ public UIContainerImpl(UIContextImpl context, String id, ObjectState state)
+ {
+ super(context, id, state);
+ }
+
/**
*
* @param <T>
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIContextImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -23,11 +23,14 @@
package org.jboss.portal.presentation.impl.model;
import java.util.Map;
-import java.util.Iterator;
-import java.util.List;
+import java.util.HashMap;
+
import org.jboss.portal.presentation.model.UIContext;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.model.UIPage;
+import org.jboss.portal.presentation.model.UIContainer;
+import org.jboss.portal.presentation.model.UIWindow;
import org.jboss.portal.presentation.model.state.ModelLoader;
import org.jboss.portal.presentation.model.state.ObjectState;
@@ -37,64 +40,84 @@
*/
public class UIContextImpl extends UIObjectImpl implements UIContext
{
+
+ /** . */
+ Map<String, UIObject> objects = new HashMap<String, UIObject>();
+
/**
*
*/
private ModelLoader modelLoader = null;
-
- /**
- *
- *
- */
- public UIContextImpl()
+
+ private static String getRootId(ModelLoader loader)
{
+ return loader.getRootId();
}
-
+
+ private static ObjectState getRootState(ModelLoader loader)
+ {
+ return loader.loadState(loader.getRootId());
+ }
+
+ public UIContextImpl(ModelLoader modelLoader)
+ {
+ super(getRootId(modelLoader), getRootState(modelLoader));
+
+ //
+ this.modelLoader = modelLoader;
+ }
+
/**
*
*/
- public <T extends UIObject> T getObject(String id, Class<T> type)
+ public UIObject getObject(String id)
{
try
{
- T uiObject = null;
-
- //Fetch the state of the UIObject in question
- ObjectState objectState = this.modelLoader.loadState(id);
-
- uiObject = this.getImplementationClass(type).newInstance();
- ((UIObjectImpl)uiObject).setState(this,objectState, true);
-
- return uiObject;
+ UIObject object = objects.get(id);
+ if (object == null)
+ {
+ //Fetch the state of the UIObject in question
+ ObjectState objectState = this.modelLoader.loadState(id);
+ object = getImplementation(id, objectState);
+ objects.put(id, object);
+ }
+ return object;
}
- catch(Exception e)
+ catch (Exception e)
{
throw new RuntimeException(e);
- }
+ }
}
-
+
/**
- *
+ * @return
*/
- public UIContext initUIObjectTree(Map<String,Class<? extends UIObject>> rootChildrenInfo)
+ protected UIObject getImplementation(String id, ObjectState state) throws Exception
{
- UIContext uiContext = new UIContextImpl();
- ((UIContextImpl)uiContext).setModelLoader(this.getModelLoader());
-
- //load the children of the UIContext
- Iterator<String> childrenNames = rootChildrenInfo.keySet().iterator();
- while(childrenNames.hasNext())
+ Class type = state.getType();
+ if(type == UIPortal.class)
{
- String childName = childrenNames.next();
- Class<? extends UIObject> type = rootChildrenInfo.get(childName);
- UIObject child = uiContext.createChild(childName, type);
- ObjectState objectState = this.modelLoader.loadState(child.getId());
- ((UIObjectImpl)child).setState(this,objectState, false);
- }
-
- return uiContext;
+ return new UIPortalImpl(this, id, state);
+ }
+ else if(type == UIPage.class)
+ {
+ return new UIPageImpl(this, id, state);
+ }
+ else if(type == UIContainer.class)
+ {
+ return new UIContainerImpl(this, id, state);
+ }
+ else if(type == UIWindow.class)
+ {
+ return new UIWindowImpl(this, id, state);
+ }
+ else
+ {
+ throw new IllegalArgumentException();
+ }
}
-
+
/**
*
*/
@@ -102,18 +125,9 @@
{
return this.modelLoader;
}
-
+
/**
*
- * @param modelLoader
- */
- public void setModelLoader(ModelLoader modelLoader)
- {
- this.modelLoader = modelLoader;
- }
-
- /**
- *
* @param <T>
* @param type
* @return
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -41,45 +41,64 @@
*/
public abstract class UIObjectImpl implements UIObject, Serializable
{
+
/**
- *
+ *
*/
- protected String id = null;
-
+ protected final UIContextImpl context;
+
/**
*
*/
- protected String name = null;
+ protected final String id;
/**
*
*/
- protected UIObject parent = null;
+ protected final String name;
/**
- *
+ *
*/
- protected List<UIObject> children = new ArrayList<UIObject>(); //Lazy loaded
-
+ protected final String parentId;
+
/**
- * used to see if the children of this UIObject are fully loaded or not. Used for helping with lazy loading
+ *
*/
- private boolean childrenFullyLoaded = false;
-
-
+ protected final UIObjectList children;
+
/**
* This is used to assist with data needed during lazy loading, other state related data etc
*/
- private ObjectState state = null;
+ private final ObjectState state;
+
-
/**
- *
+ *
*/
- public UIObjectImpl()
- {
+ public UIObjectImpl(UIContextImpl context, String id, ObjectState state)
+ {
+ this.id = id;
+ this.parentId = state.getParentId();
+ this.name = state.getName();
+ this.state = state;
+ this.context = context;
+ this.children = new UIObjectList(this.context, state.getChildrenIds());
}
-
+
+ /**
+ *
+ */
+ public UIObjectImpl(String id, ObjectState state)
+ {
+ this.id = id;
+ this.parentId = state.getParentId();
+ this.name = state.getName();
+ this.state = state;
+ this.context = (UIContextImpl)this;
+ this.children = new UIObjectList(this.context, state.getChildrenIds());
+ }
+
//UIObject interface implementation-----------------------------------------------------------------------------------------------------------------------------
/**
*
@@ -88,7 +107,19 @@
{
return this.id;
}
-
+
+ public UIObject getChild(String name)
+ {
+ for (UIObject child : getChildren())
+ {
+ if (child.getName().equals(name))
+ {
+ return child;
+ }
+ }
+ return null;
+ }
+
/**
*
*/
@@ -102,7 +133,7 @@
*/
public UIObject getParent()
{
- return this.parent;
+ return context.getObject(parentId);
}
/**
@@ -110,26 +141,6 @@
*/
public List<UIObject> getChildren()
{
- if(!this.childrenFullyLoaded)
- {
- //Lazy Load just the children of this UIObject. Don't load the children of each child though
- if(this.state != null)
- {
- List<String> childrenIds = this.state.getChildrenIds();
- if(childrenIds != null)
- {
- for(int i=0; i<childrenIds.size(); i++)
- {
- String childId = childrenIds.get(i);
- ObjectState childState = this.getUIContext().getModelLoader().loadState(childId);
- this.createChild(childState.getName(), childState.getType());
- }
- }
- }
-
- this.childrenFullyLoaded = true;
- }
-
return this.children;
}
@@ -138,68 +149,36 @@
*/
public <T extends UIObject> List<T> getChildren(Class<T> type)
{
- try
- {
- List<T> filteredList = new ArrayList<T>();
-
- //Making sure all children are fully loaded
- List<UIObject> allChildren = this.getChildren();
-
- Class<T> implementationClass = this.getImplementationClass(type);
- if(allChildren != null)
- {
- for(int i=0; i<allChildren.size(); i++)
- {
- UIObject child = allChildren.get(i);
- if(implementationClass == child.getClass())
- {
- filteredList.add((T)child);
- }
- }
- }
- return filteredList;
- }
- catch(Exception e)
- {
- throw new RuntimeException(e);
- }
+// try
+// {
+// List<T> filteredList = new ArrayList<T>();
+//
+// //Making sure all children are fully loaded
+// List<UIObject> allChildren = this.getChildren();
+//
+// Class<T> implementationClass = this.getImplementationClass(type);
+// if(allChildren != null)
+// {
+// for(int i=0; i<allChildren.size(); i++)
+// {
+// UIObject child = allChildren.get(i);
+// if(implementationClass == child.getClass())
+// {
+// filteredList.add((T)child);
+// }
+// }
+// }
+// return filteredList;
+// }
+// catch(Exception e)
+// {
+// throw new RuntimeException(e);
+// }
+ throw new UnsupportedOperationException("todo");
}
/**
*
- * @param type
- * @return
- */
- protected <T extends UIObject> Class<T> getImplementationClass(Class<T> type) throws Exception
- {
- Class<T> uiobjectClass = null;
-
- if(type == UIContext.class)
- {
- uiobjectClass = (Class<T>)UIContextImpl.class;
- }
- else if(type == UIPortal.class)
- {
- uiobjectClass = (Class<T>)UIPortalImpl.class;
- }
- else if(type == UIPage.class)
- {
- uiobjectClass = (Class<T>)UIPageImpl.class;
- }
- else if(type == UIContainer.class)
- {
- uiobjectClass = (Class<T>)UIContainerImpl.class;
- }
- else if(type == UIWindow.class)
- {
- uiobjectClass = (Class<T>)UIWindowImpl.class;
- }
-
- return uiobjectClass;
- }
-
- /**
- *
* @param <T>
* @param type
* @return
@@ -210,115 +189,114 @@
/**
*
*/
- public <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException
- {
- if(!this.isAllowedAsChild(type))
- {
- throw new IllegalArgumentException(type.getName()+" cannot be added as a child to this parent");
- }
- try
- {
- T child = this.getImplementationClass(type).newInstance();
-
- //Name
- ((UIObjectImpl)child).name = name;
-
- //Parent
- ((UIObjectImpl)child).parent = this;
-
- //Id
- ((UIObjectImpl)child).id = this.generateChildId(name);
-
- //State
- ((UIObjectImpl)child).state = this.getUIContext().getModelLoader().loadState(((UIObjectImpl)child).id);
-
- this.children.add(child);
-
- return child;
- }
- catch(Exception e)
- {
- throw new RuntimeException(e);
- }
- }
+// public <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException
+// {
+// if(!this.isAllowedAsChild(type))
+// {
+// throw new IllegalArgumentException(type.getName()+" cannot be added as a child to this parent");
+// }
+// try
+// {
+// T child = this.getImplementationClass(type).newInstance();
+//
+// //Name
+// ((UIObjectImpl)child).name = name;
+//
+// //Id
+// ((UIObjectImpl)child).id = this.generateChildId(name);
+//
+// //State
+// ((UIObjectImpl)child).state = this.getUIContext().getModelLoader().loadState(((UIObjectImpl)child).id);
+//
+// this.children.add(child);
+//
+// return child;
+// }
+// catch(Exception e)
+// {
+// throw new RuntimeException(e);
+// }
+// }
+//
+// /**
+// *
+// */
+// public void destroyChild(String name)
+// {
+// //Make sure all children are loaded
+// this.getChildren();
+// if(this.children != null)
+// {
+// for(int i=0; i<this.children.size(); i++)
+// {
+// UIObject child = this.children.get(i);
+// if(child.getName().equals(name))
+// {
+// this.children.remove(child);
+// break;
+// }
+// }
+// }
+// }
- /**
- *
- */
- public void destroyChild(String name)
- {
- //Make sure all children are loaded
- this.getChildren();
- if(this.children != null)
- {
- for(int i=0; i<this.children.size(); i++)
- {
- UIObject child = this.children.get(i);
- if(child.getName().equals(name))
- {
- this.children.remove(child);
- break;
- }
- }
- }
- }
//-----UIObjectImpl implementation specific methods------------------------------------------------------------------------------------------------------------
- protected void setState(UIContext uiContext, ObjectState state, boolean loadParent)
- {
- //Name
- this.name = state.getName();
-
- //Parent..load using parentId from state being used
- if(loadParent && state.getParentId() != null && state.getParentId().trim().length()>0)
- {
- ObjectState parentState = uiContext.getModelLoader().loadState(state.getParentId());
- this.parent = uiContext.getObject(state.getParentId(), parentState.getType());
- }
-
- //Id
- this.id = this.generateId();
-
- //State
- this.state = state;
- }
+// protected void setState(UIContext uiContext, ObjectState state, boolean loadParent)
+// {
+// //Name
+// this.name = state.getName();
+//
+// //Parent..load using parentId from state being used
+// if(loadParent && state.getParentId() != null && state.getParentId().trim().length()>0)
+// {
+// ObjectState parentState = uiContext.getModelLoader().loadState(state.getParentId());
+// this.parent = uiContext.getObject(state.getParentId(), parentState.getType());
+// }
+//
+// //Id
+// this.id = this.generateId();
+//
+// //State
+// this.state = state;
+// }
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
- /**
- *
- * @return
- */
- private String generateId()
- {
- String newId = null;
-
- String myName = "";
- if(this.getName() != null && this.getName().trim().length()>0)
- {
- myName = this.getName();
- }
-
- //Generate a new id concatenating its entire path in the UIObject tree
- StringBuffer buffer = new StringBuffer();
- if(this.getParent() != null && !(this.getParent() instanceof UIContext))
- {
- buffer.append("/"+this.getParent().getId().substring(1)+"/");
- if(myName.trim().length()>0)
- {
- buffer.append(myName);
- }
- newId = buffer.toString();
- }
- else
- {
- buffer.append("/");
- if(myName.trim().length()>0)
- {
- buffer.append(myName);
- }
- newId = buffer.toString();
- }
-
- return newId;
- }
+
+// /**
+// *
+// * @return
+// */
+// private String generateId()
+// {
+// String newId = null;
+//
+// String myName = "";
+// if(this.getName() != null && this.getName().trim().length()>0)
+// {
+// myName = this.getName();
+// }
+//
+// //Generate a new id concatenating its entire path in the UIObject tree
+// StringBuffer buffer = new StringBuffer();
+// if(this.getParent() != null && !(this.getParent() instanceof UIContext))
+// {
+// buffer.append("/"+this.getParent().getId().substring(1)+"/");
+// if(myName.trim().length()>0)
+// {
+// buffer.append(myName);
+// }
+// newId = buffer.toString();
+// }
+// else
+// {
+// buffer.append("/");
+// if(myName.trim().length()>0)
+// {
+// buffer.append(myName);
+// }
+// newId = buffer.toString();
+// }
+//
+// return newId;
+// }
/**
*
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectList.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectList.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIObjectList.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.impl.model;
+
+import org.jboss.portal.presentation.model.UIObject;
+
+import java.util.AbstractList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class UIObjectList extends AbstractList<UIObject>
+{
+
+ /** . */
+ private final UIContextImpl context;
+
+ /** . */
+ private final List<String> ids;
+
+ public UIObjectList(UIContextImpl context, List<String> ids)
+ {
+ this.context = context;
+ this.ids = ids;
+ }
+
+ public UIObject get(int i)
+ {
+ return context.getObject(ids.get(i));
+ }
+
+ public int size()
+ {
+ return ids.size();
+ }
+}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIPageImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIPageImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIPageImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -26,13 +26,20 @@
import org.jboss.portal.presentation.model.UIContainer;
import org.jboss.portal.presentation.model.UIPage;
import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.state.ObjectState;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*
*/
public class UIPageImpl extends UIObjectImpl implements UIPage
-{
+{
+
+ public UIPageImpl(UIContextImpl context, String id, ObjectState state)
+ {
+ super(context, id, state);
+ }
+
/**
*
* @param <T>
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIPortalImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIPortalImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIPortalImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -25,6 +25,7 @@
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIPortal;
import org.jboss.portal.presentation.model.UIPage;
+import org.jboss.portal.presentation.model.state.ObjectState;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -32,6 +33,12 @@
*/
public class UIPortalImpl extends UIObjectImpl implements UIPortal
{
+
+ public UIPortalImpl(UIContextImpl context, String id, ObjectState state)
+ {
+ super(context, id, state);
+ }
+
/**
*
* @param <T>
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -26,6 +26,7 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.state.ObjectState;
import org.jboss.portal.presentation.model.content.WindowContent;
/**
@@ -49,6 +50,11 @@
*/
private WindowContent content = null;
+ public UIWindowImpl(UIContextImpl context, String id, ObjectState state)
+ {
+ super(context, id, state);
+ }
+
/**
*
* @return
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIContext.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIContext.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIContext.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -36,19 +36,11 @@
* @param id
* @return
*/
- public <T extends UIObject> T getObject(String id, Class<T> type);
+ public UIObject getObject(String id);
/**
*
- * @param <T>
- * @param childrenInfo
* @return
*/
- public UIContext initUIObjectTree(Map<String,Class<? extends UIObject>> rootChildrenInfo);
-
- /**
- *
- * @return
- */
public ModelLoader getModelLoader();
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIObject.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIObject.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIObject.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -48,6 +48,8 @@
*/
public UIObject getParent();
+ public UIObject getChild(String name);
+
/**
* Create a child with a specified type.
*
@@ -56,13 +58,13 @@
* @return the newly created child
* @throws IllegalArgumentException if the name is null, already exists or this kind of object does not accept children of the specified type
*/
- public <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException;
+// public <T extends UIObject> T createChild(String name, Class<T> type) throws IllegalArgumentException;
/**
*
* @param name
*/
- public void destroyChild(String name);
+// public void destroyChild(String name);
/**
*
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/state/ModelLoader.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/state/ModelLoader.java 2007-11-17 16:12:44 UTC (rev 8991)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/state/ModelLoader.java 2007-11-17 18:43:51 UTC (rev 8992)
@@ -40,4 +40,6 @@
*/
ObjectState loadState(String objectId) throws IllegalArgumentException;
+ String getRootId();
+
}
16 years, 7 months
JBoss Portal SVN: r8991 - in branches/UIServer: core/src/resources/portal-core-sar/META-INF and 6 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-11-17 11:12:44 -0500 (Sat, 17 Nov 2007)
New Revision: 8991
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java
branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml
Log:
integration
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17 15:37:56 UTC (rev 8990)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
@@ -120,7 +120,7 @@
public WindowContent render(RequestContext context, UIWindow window) throws Exception
{
- PortalObjectId windowId = null;
+ /*PortalObjectId windowId = null;
RenderWindowCommand rwc = new RenderWindowCommand(windowId);
ControllerContext ctx = new ControllerContext(context.getInvocation(), controller);
WindowRendition rendition = rwc.render(ctx);
@@ -143,6 +143,8 @@
}
}
- return null;
+ return null;*/
+
+ return new WindowContent(-1, "MockTitle", "<div>Mock Content</div>");
}
}
Modified: branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-11-17 15:37:56 UTC (rev 8990)
+++ branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2007-11-17 16:12:44 UTC (rev 8991)
@@ -1096,9 +1096,9 @@
name="portal:service=PresentationServer"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
+ <xmbean/>
<depends optional-attribute-name="Processor" proxy-type="attribute">portal:service=Processor</depends>
- <depends optional-attribute-name="ModelLoader" proxy-type="attribute">portal:container=ModelLoader</depends>
+ <depends optional-attribute-name="ModelLoader" proxy-type="attribute">portal:container=ModelLoader</depends>
<depends>portal:service=PageService</depends>
<depends>portal:commandFactory=DefaultPortal</depends>
<depends>portal:urlFactory=Delegating</depends>
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 15:37:56 UTC (rev 8990)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-17 16:12:44 UTC (rev 8991)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.presentation.controller;
+import java.util.List;
import java.util.StringTokenizer;
import javax.servlet.http.HttpServletRequest;
@@ -42,6 +43,7 @@
import org.jboss.portal.presentation.model.UIPage;
import org.jboss.portal.presentation.model.UIWindow;
import org.jboss.portal.presentation.model.state.ObjectState;
+import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.server.RequestController;
import org.jboss.portal.server.ServerException;
@@ -85,20 +87,36 @@
{
try
{
+ HttpServletRequest request = invocation.getServerContext().getClientRequest();
+
/**
* TODO: decouple the implementation via factory pattern
*/
RequestContext requestContext = new RequestContextImpl(this.presentationServer,
invocation);
+ request.setAttribute("requestContext", requestContext);
- ServerAction serverAction = this.getServerAction(requestContext,invocation);
+ String portalRequestPath = invocation.getServerContext().getPortalRequestPath();
+ if(portalRequestPath == null || portalRequestPath.equals("") || portalRequestPath.equals("/") || portalRequestPath.equals("/index.html"))
+ {
+ portalRequestPath = "/default/default";
+ }
+
+ UIPortal targetPortal = this.getTargetPortal(requestContext,portalRequestPath);
+ UIObject targetPortalObject = this.getTargetPortalObject(requestContext,portalRequestPath);
+
+ /**
+ * TODO: move this functionality to another component like a UIPresenter etc
+ */
+ ServerAction serverAction = this.getServerAction(requestContext, targetPortal, targetPortalObject);
+
ProcessorRequest processorRequest = new ProcessorRequest(serverAction);
ProcessorResponse processorResponse = this.presentationServer.getProcessor().process(requestContext,
processorRequest);
//Process the response from the Processor
ServerResponse serverResponse = processorResponse.getResponse();
- this.handle(serverResponse);
+ this.handle(requestContext, targetPortal, targetPortalObject, serverResponse);
}
catch(Exception e)
{
@@ -111,16 +129,43 @@
* @param serverResponse
* @throws ServerException
*/
- private void handle(ServerResponse serverResponse) throws ServerException
+ private void handle(RequestContext requestContext, UIPortal targetPortal, UIObject targetPortalObject, ServerResponse serverResponse) throws ServerException
{
- if(serverResponse instanceof ShowUIObjectResponse)
+ try
{
- ShowUIObjectResponse response = (ShowUIObjectResponse)serverResponse;
-
- //Setup the objects in the UIObjectTree
-
- //Populate the state of the Windows in the Page that is being displayed
+ if(serverResponse instanceof ShowUIObjectResponse)
+ {
+ if(targetPortalObject instanceof UIPage)
+ {
+ //Load the objects in the UITree
+ UIPortal portal = requestContext.getUIContext().createChild(targetPortal.getName(), UIPortal.class);
+ UIPage page = portal.createChild(targetPortalObject.getName(), UIPage.class);
+
+ //Populate the state of the Windows in the Page that is being displayed
+ //inside the UITree
+ List<UIWindow> windows = page.getChildren(UIWindow.class);
+ if(windows != null)
+ {
+ for(int i=0; i<windows.size(); i++)
+ {
+ UIWindow window = windows.get(i);
+ WindowContent windowContent = this.presentationServer.render(requestContext, window);
+
+ /**
+ * TODO: decouple this from the model implementation by moving the functinality
+ * to another component like a UIPresenter etc
+ */
+ ((org.jboss.portal.presentation.impl.model.UIWindowImpl)window).
+ setContent(windowContent);
+ }
+ }
+ }
+ }
}
+ catch(Exception e)
+ {
+ throw new ServerException(e);
+ }
}
/**
@@ -161,22 +206,14 @@
/**
*
*/
- private ServerAction getServerAction(RequestContext requestContext,ServerInvocation invocation)
+ private ServerAction getServerAction(RequestContext requestContext, UIPortal targetPortal, UIObject targetPortalObject)
{
ServerAction serverAction = null;
+ ServerInvocation invocation = requestContext.getInvocation();
ServerInvocationContext invocationContext = invocation.getServerContext();
HttpServletRequest request = invocationContext.getClientRequest();
-
- String portalRequestPath = invocation.getServerContext().getPortalRequestPath();
- if(portalRequestPath == null || portalRequestPath.equals("") || portalRequestPath.equals("/") || portalRequestPath.equals("/index.html"))
- {
- portalRequestPath = "/default/default";
- }
-
- UIPortal targetPortal = this.getTargetPortal(requestContext,portalRequestPath);
- UIObject targetPortalObject = this.getTargetPortalObject(requestContext,portalRequestPath);
-
+
if(targetPortalObject instanceof UIPage)
{
serverAction = new ViewUIObjectAction(targetPortalObject.getId());
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java 2007-11-17 15:37:56 UTC (rev 8990)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java 2007-11-17 16:12:44 UTC (rev 8991)
@@ -68,6 +68,8 @@
import org.jboss.portal.presentation.impl.classic.layout.RegionLayoutManager;
import org.jboss.portal.presentation.server.ProcessorResponse;
import org.jboss.portal.presentation.entry.EntryPoint;
+import org.jboss.portal.presentation.RequestContext;
+import org.jboss.portal.presentation.model.UIContext;
/**
* The Portal Server Entry Point for classic html mode
@@ -334,7 +336,11 @@
try
{
InterceptorStackFactory stack = this.entryPoint.getInterceptorStackFactory();
- invocation.invoke(stack.getInterceptorStack());
+ invocation.invoke(stack.getInterceptorStack());
+
+ //Iterate through the UIContext Tree
+ RequestContext requestContext = (RequestContext)req.getAttribute("requestContext");
+ UIContext uiContext = requestContext.getUIContext();
}
catch (ServerException e)
{
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 15:37:56 UTC (rev 8990)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 16:12:44 UTC (rev 8991)
@@ -43,22 +43,25 @@
*
*/
private WindowState windowState = null;
-
+
/**
*
*/
- private String markup = null;
+ private WindowContent content = null;
/**
*
+ * @return
*/
- private WindowContent content = null;
-
public WindowContent getContent()
{
return content;
}
+ /**
+ *
+ * @param content
+ */
public void setContent(WindowContent content)
{
this.content = content;
@@ -94,26 +97,10 @@
public void setWindowState(WindowState windowState)
{
this.windowState = windowState;
- }
-
- /**
- *
- */
- public String getMarkup()
- {
- return markup;
- }
+ }
/**
*
- */
- public void setMarkup(String markup)
- {
- this.markup = markup;
- }
-
- /**
- *
* @param <T>
* @param type
* @return
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java 2007-11-17 15:37:56 UTC (rev 8990)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/UIWindow.java 2007-11-17 16:12:44 UTC (rev 8991)
@@ -54,16 +54,4 @@
* @param mode
*/
public void setMode(Mode mode);
-
- /**
- *
- * @return
- */
- public String getMarkup();
-
- /**
- *
- * @param markup
- */
- public void setMarkup(String markup);
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java 2007-11-17 15:37:56 UTC (rev 8990)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java 2007-11-17 16:12:44 UTC (rev 8991)
@@ -53,5 +53,5 @@
*
* @return
*/
- ModelLoader getModelLoader();
+ ModelLoader getModelLoader();
}
Modified: branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml 2007-11-17 15:37:56 UTC (rev 8990)
+++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml 2007-11-17 16:12:44 UTC (rev 8991)
@@ -27,6 +27,7 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Add the GWT Client Filter to run the Portal in full Web 2.0 Ajax Mode. In turn, to run in Classic Html Mode, turn this filter off -->
+ <!--
<filter>
<filter-name>GWTClientFilter</filter-name>
<filter-class>org.jboss.portal.presentation.entry.GWTClientFilter</filter-class>
@@ -35,6 +36,7 @@
<filter-name>GWTClientFilter</filter-name>
<servlet-name>PortalEntryPoint</servlet-name>
</filter-mapping>
+ -->
<!-- The portal servlet is the main entrance point -->
<servlet>
16 years, 7 months
JBoss Portal SVN: r8990 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-11-17 10:37:56 -0500 (Sat, 17 Nov 2007)
New Revision: 8990
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
Log:
Initial Richfaces documentation
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2007-11-17 14:02:15 UTC (rev 8989)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2007-11-17 15:37:56 UTC (rev 8990)
@@ -82,6 +82,39 @@
using our <ulink url="http://jboss.org/index.html?module=bb&op=viewforum&f=215">JBoss Portal User
Forums</ulink> for user-to-user help, when needed.
</para>
+ <!--<sect2 id="build_instructions">
+ <title>
+ Building and deploying the tutorials
+ </title>
+ <sect3>
+ <title id="ant_build">Ant based tutorials</title>
+ <para>
+ For projects that are Ant based you can execute the build.xml with ant or inside your IDE.
+ Executing <literal>ant</literal> will compile all source files and produce a
+ artifact file auch as a .war.
+ <sbr/>
+ Before you run your first tutorial build, you must download <ulink url="http://ant.apache.org/bindownload.cgi">Apache Ant</ulink>
+ and add it to your classpath.
+ </para>
+ <para>
+ The <literal>explode</literal> target will produce the following:
+
+ </para>
+ <para>
+ Deploying the portlet is as easy as copying/moving the <literal>helloworldjspportlet.war</literal> file
+ to the server <literal>deploy</literal> directory. We can then see our portlet on the Portal default
+ page (<ulink url="http://localhost:8080/portal/">http://localhost:8080/portal/</ulink>):
+
+ </para>
+ </sect3>
+ <sect3>
+ <title id="maven_build">Maven based tutorials</title>
+ <para>
+
+ </para>
+ </sect3>
+ </sect2>-->
+
<sect2>
<title>Deploying your first portlet</title>
<sect3>
@@ -890,6 +923,51 @@
</para>
</sect3>
</sect2>
+ <!--<sect2 id="sunri_42x_301">
+ <title>Portal and JSF RI: A basic demonstration using common components</title>
+ <sect3>
+ <para>JSF portlets are now possible using the MyFaces 301 implementation of the JSR-301 specification.
+ This does NOT mean that you are using the MyFaces implementation of JSF, it only means that you are
+ using the 301 bridge implementation (which was initially donated by Oracle). The 301 spec or bridge is
+ a subsystem that allows a JavaServer Faces resource to execute and satisfy a portlet request. You can
+ read more about the specification details <ulink url="http://jcp.org/en/jsr/detail?id=301">here</ulink>.
+ </para>
+ </sect3>
+ <sect3>
+ <title>Downloading The Project Source</title>
+ <para>
+ You have 2 options for getting started.
+ <sbr/>
+ 1) Download the binary distribution in a zip file. This will
+ include all the source files along with a deployable war file.
+ <sbr/>
+ 2) Use subversion to checkout the source
+ code. If you plan on making changes to the source or possibly using it as a template for future development,
+ it is recommended that you checkout the project and use maven to build the war.
+ <para>
+ For instructions on setting up Subversion and/or Maven 2 see <xref linkend="first_portlet_descriptors"/>
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ You can download all the project files in one zip file here:
+ <sbr/>
+ <ulink url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/JSFRIPort...">http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/JSFRIPort...</ulink>.
+ <sbr/>
+ Once you extract the zip archive, the deployable war file is located in the target/ directory.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The source code:
+ <sbr/>
+ <ulink url="http://anonsvn.jboss.org/repos/portletswap/portlets/src/framework/JSFRIPo...">http://anonsvn.jboss.org/repos/portletswap/portlets/src/framework/JSFRIPo...</ulink>.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect3>
+ </sect2>-->
<sect2 id="myfaces_40x">
<title>A simple MyFaces JSF Portlet on JBoss AS 4.0.5+</title>
<sect3>
@@ -1071,5 +1149,140 @@
</mediaobject>
</para>
</sect2>
+ <sect2 id="richfaces">
+ <title>Portal and RichFaces: A basic demonstration using Ajax4JSF and RichFaces components</title>
+ <sect3>
+ <para>
+ RichFaces is currently in technology preview mode and not fully supported in Jboss Portal.
+ </para>
+ </sect3>
+ <sect3>
+ <title>Downloading The Binaries or Project Source</title>
+ <para>
+ You have 2 options for getting started.
+ <!--<para>
+ For instructions on setting up Subversion and/or Maven 2 see <xref linkend="build_instructions"/>
+ </para>-->
+ <itemizedlist>
+ <listitem>
+ <para>
+ 1) Download the binary distribution in a zip file. This will
+ include all the source files along with a deployable war file.
+ <sbr/>
+ <ulink url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/RichFaces...">http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/RichFaces...</ulink>.
+ <sbr/>
+ Once you extract the zip archive, the deployable war file is located in the target/ directory.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ 2) Use subversion to checkout the source code.
+ If you plan on making changes to the source or possibly using it as a template for future development,
+ it is recommended that you checkout the project and use maven to build the war.
+ <sbr/>
+ <ulink url="http://anonsvn.jboss.org/repos/portletswap/portlets/src/framework/RichFac...">http://anonsvn.jboss.org/repos/portletswap/portlets/src/framework/RichFac...</ulink>.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect3>
+ <sect3>
+ <title>Project Configuration</title>
+ <para>
+ The following configurations must be made to use RichFaces in your portlet.
+ </para>
+ <para>
+ Here we use javax.portlet.faces.GenericFacesPortlet which is part of the JSR-301 specification. We also
+ must declare the view, edit, and help modes as shown below.
+ <itemizedlist>
+ <listitem>
+ <literal>portlet.xml</literal>
+<programlisting>
+ <![CDATA[<portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
+ xmlns="http://java.sun.com/xml/ns/portlet">
+ <portlet>
+ <portlet-name>ajaxPortlet</portlet-name>
+ <portlet-class>
+ javax.portlet.faces.GenericFacesPortlet
+ </portlet-class>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.view</name>
+ <value>/jsf/start.xhtml</value>
+ </init-param>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.edit</name>
+ <value>/jsf/edit.xhtml</value>
+ </init-param>
+
+ <init-param>
+ <name>javax.portlet.faces.defaultViewId.help</name>
+ <value>/jsf/help.xhtml</value>
+ </init-param>
+
+ <expiration-cache>-0</expiration-cache>
+ <portlet-info>
+ <title>Ajax Portlet</title>
+ </portlet-info>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
+ <portlet-mode>HELP</portlet-mode>
+ </supports>
+ </portlet>
+ </portlet-app>]]>
+</programlisting>
+ </listitem>
+ <listitem>
+ <literal>faces-config.xml</literal>
+<programlisting>
+ <![CDATA[...
+ <application>
+ <view-handler>
+ org.ajax4jsf.portlet.application.PortletViewHandler
+ </view-handler>
+ <state-manager>
+ org.ajax4jsf.portlet.application.PortalStateManager
+ </state-manager>
+ </application>
+ <factory>
+ <faces-context-factory>
+ org.ajax4jsf.portlet.context.FacesContextFactoryImpl
+ </faces-context-factory>
+ </factory>
+ ...]]>
+</programlisting>
+ </listitem>
+ <listitem>
+ <literal>web.xml</literal>
+<programlisting>
+ <![CDATA[...
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>FacesServlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ ...]]>
+</programlisting>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect3>
+ </sect2>
</sect1>
</chapter>
\ No newline at end of file
16 years, 7 months
JBoss Portal SVN: r8989 - branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-17 09:02:15 -0500 (Sat, 17 Nov 2007)
New Revision: 8989
Modified:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
Log:
improve get markup of window
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 13:53:13 UTC (rev 8988)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/model/UIWindowImpl.java 2007-11-17 14:02:15 UTC (rev 8989)
@@ -26,6 +26,7 @@
import org.jboss.portal.WindowState;
import org.jboss.portal.presentation.model.UIObject;
import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.content.WindowContent;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -47,10 +48,25 @@
*
*/
private String markup = null;
-
+
/**
*
*/
+ private WindowContent content = null;
+
+ public WindowContent getContent()
+ {
+ return content;
+ }
+
+ public void setContent(WindowContent content)
+ {
+ this.content = content;
+ }
+
+ /**
+ *
+ */
public Mode getMode()
{
return this.mode;
16 years, 7 months