[portal-commits] JBoss Portal SVN: r8835 - in branches/UIServer/uiserver/src: main/org/jboss/portal/uiserver/ajax/client/protocol and 4 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Tue Nov 6 13:11:32 EST 2007


Author: sohil.shah at jboss.com
Date: 2007-11-06 13:11:32 -0500 (Tue, 06 Nov 2007)
New Revision: 8835

Added:
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/layout/
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/Page.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/Window.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalEntryPoint.java
Removed:
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Page.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Window.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalRPCImpl.java
Modified:
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/AsyncPages.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PartialRefresh.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Portal.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortalLayout.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletService.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletServiceAsync.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletWindowPanel.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/service/PortalRPC.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/service/PortalRPCAsync.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/EntryPoint.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/EntryPointImpl.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/GWTClientFilter.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/PortalEntryPoint.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/HostedModeProxy.java
   branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortletServiceImpl.java
   branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml
Log:
some refactoring/documentation

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/AsyncPages.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/AsyncPages.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/AsyncPages.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client;
 
 
@@ -24,8 +46,14 @@
 import com.google.gwt.user.client.rpc.ServiceDefTarget;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 
+import org.jboss.portal.uiserver.ajax.client.protocol.Page;
+import org.jboss.portal.uiserver.ajax.client.protocol.Window;
+
 /**
- * Entry point classes define <code>onModuleLoad()</code>.
+ * Used for Prototyping Async Page Management
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
  */
 public class AsyncPages implements EntryPoint
 {   

Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Page.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Page.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Page.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,45 +0,0 @@
-package org.jboss.portal.uiserver.ajax.client;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-public class Page implements IsSerializable
-{
-   private String name = null;
-   private Window[] windows = null;
-   
-   /**
-    * 
-    * @return
-    */
-   public String getName()
-   {
-      return name;
-   }
-   
-   /**
-    * 
-    * @param name
-    */
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-   
-   /**
-    * 
-    * @return
-    */
-   public Window[] getWindows()
-   {
-      return windows;
-   }
-   
-   /**
-    * 
-    * @param windows
-    */
-   public void setWindows(Window[] windows)
-   {
-      this.windows = windows;
-   }   
-}

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PartialRefresh.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PartialRefresh.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PartialRefresh.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client;
 
 import com.google.gwt.core.client.GWT;
@@ -20,8 +42,14 @@
 import com.google.gwt.user.client.rpc.ServiceDefTarget;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 
+import org.jboss.portal.uiserver.ajax.client.protocol.Page;
+import org.jboss.portal.uiserver.ajax.client.protocol.Window;
+
 /**
- * Entry point classes define <code>onModuleLoad()</code>.
+ * Used for Prototyping Partial Refresh feature
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
  */
 public class PartialRefresh implements EntryPoint
 {

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Portal.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Portal.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Portal.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client;
 
 
@@ -17,15 +39,21 @@
 import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.FlexTable;
 
 import com.google.gwt.user.client.rpc.ServiceDefTarget;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 
 import org.jboss.portal.uiserver.ajax.client.service.PortalRPC;
 import org.jboss.portal.uiserver.ajax.client.service.PortalRPCAsync;
+import org.jboss.portal.uiserver.ajax.client.protocol.Page;
+import org.jboss.portal.uiserver.ajax.client.protocol.Window;
 
 /**
- * Entry point classes define <code>onModuleLoad()</code>.
+ * This is the Entry Point of the client-side Ajax agent of the Presentation Framework
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
  */
 public class Portal implements EntryPoint
 {   
@@ -34,8 +62,11 @@
     */
    public void onModuleLoad()
    { 
-      HorizontalPanel page = new HorizontalPanel();
+      //HorizontalPanel page = new HorizontalPanel();
+      //RootPanel.get("currentPage").add(page);
+      FlexTable page = new FlexTable();
       RootPanel.get("currentPage").add(page);
+            
       this.loadPortal();
    }
    
@@ -143,7 +174,7 @@
       
       //Dispalying the fully aggregated page
       Window[] windows = portalPage.getWindows();
-      HorizontalPanel page = (HorizontalPanel)RootPanel.get("currentPage").getWidget(0);
+      FlexTable page = (FlexTable)RootPanel.get("currentPage").getWidget(0);
       page.clear();
       for(int i=0; i<windows.length; i++)
       {
@@ -180,7 +211,7 @@
             windowContent.addClickListener(contentListener);*/
             
             //Add this window to the Page
-            page.add(window);            
+            page.setWidget(0,0,window);            
          }
       }      
    }   

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortalLayout.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortalLayout.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortalLayout.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client;
 
 import com.google.gwt.core.client.GWT;
@@ -15,7 +37,10 @@
 import com.google.gwt.user.client.rpc.AsyncCallback;
 
 /**
- * Entry point classes define <code>onModuleLoad()</code>.
+ * Prototyping some client side layout concepts
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
  */
 public class PortalLayout implements EntryPoint
 {

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletService.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletService.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletService.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client;
 
 import com.google.gwt.user.client.rpc.RemoteService;
@@ -2,3 +24,6 @@
 
+import org.jboss.portal.uiserver.ajax.client.protocol.Page;
+
 /**
+ * A Protototype RPC service
  * 

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletServiceAsync.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletServiceAsync.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletServiceAsync.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client;
 
 import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -2,2 +24,8 @@
 
+/**
+ * A Prototype RPC Service
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
+ */
 public interface PortletServiceAsync

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletWindowPanel.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletWindowPanel.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/PortletWindowPanel.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client;
 
 import com.google.gwt.user.client.ui.HTMLPanel;

Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Window.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Window.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/Window.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,108 +0,0 @@
-package org.jboss.portal.uiserver.ajax.client;
-
-import com.google.gwt.user.client.rpc.IsSerializable;
-
-public class Window implements IsSerializable
-{
-   public static final String NORMAL = "NORMAL";
-   public static final String MAXIMIZED = "MAXIMIZED";
-   public static final String MINIMIZED = "MINIMIZED";
-   public static final String EDIT = "EDIT";
-   public static final String VIEW = "VIEW";
-   
-   private String name = null;
-   private String content = null;
-   private String mode = VIEW;
-   private String state = NORMAL;
-   private boolean isVisible = true;
-   
-   /**
-    * 
-    * @return
-    */
-   public String getContent()
-   {
-      return content;
-   }
-   
-   /**
-    * 
-    * @param content
-    */
-   public void setContent(String content)
-   {
-      this.content = content;
-   }
-   
-   /**
-    * 
-    * @return
-    */
-   public boolean isVisible()
-   {
-      return isVisible;
-   }
-   
-   /**
-    * 
-    * @param isVisible
-    */
-   public void setVisible(boolean isVisible)
-   {
-      this.isVisible = isVisible;
-   }
-   
-   /**
-    * 
-    * @return
-    */
-   public String getMode()
-   {
-      return mode;
-   }
-   
-   /**
-    * 
-    * @param mode
-    */
-   public void setMode(String mode)
-   {
-      this.mode = mode;
-   }
-   
-   /**
-    * 
-    * @return
-    */
-   public String getName()
-   {
-      return name;
-   }
-   
-   /**
-    * 
-    * @param name
-    */
-   public void setName(String name)
-   {
-      this.name = name;
-   }
-   
-   /**
-    * 
-    * @return
-    */
-   public String getState()
-   {
-      return state;
-   }
-   
-   /**
-    * 
-    * @param state
-    */
-   public void setState(String state)
-   {
-      this.state = state;
-   }
-}

Added: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/Page.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/Page.java	                        (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/Page.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client.protocol;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Represents the concept of a Portal Page on the client-side Ajax agent
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
+ */
+public class Page implements IsSerializable
+{
+   private String name = null;
+   private Window[] windows = null;
+   
+   /**
+    * 
+    * @return
+    */
+   public String getName()
+   {
+      return name;
+   }
+   
+   /**
+    * 
+    * @param name
+    */
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   /**
+    * 
+    * @return
+    */
+   public Window[] getWindows()
+   {
+      return windows;
+   }
+   
+   /**
+    * 
+    * @param windows
+    */
+   public void setWindows(Window[] windows)
+   {
+      this.windows = windows;
+   }   
+}

Added: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/Window.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/Window.java	                        (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/protocol/Window.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -0,0 +1,136 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client.protocol;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Represents the concept of a Portal Window on the client-side Ajax agent
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
+ */
+public class Window implements IsSerializable
+{
+   public static final String NORMAL = "NORMAL";
+   public static final String MAXIMIZED = "MAXIMIZED";
+   public static final String MINIMIZED = "MINIMIZED";
+   public static final String EDIT = "EDIT";
+   public static final String VIEW = "VIEW";
+   
+   private String name = null;
+   private String content = null;
+   private String mode = VIEW;
+   private String state = NORMAL;
+   private boolean isVisible = true;
+   
+   /**
+    * 
+    * @return
+    */
+   public String getContent()
+   {
+      return content;
+   }
+   
+   /**
+    * 
+    * @param content
+    */
+   public void setContent(String content)
+   {
+      this.content = content;
+   }
+   
+   /**
+    * 
+    * @return
+    */
+   public boolean isVisible()
+   {
+      return isVisible;
+   }
+   
+   /**
+    * 
+    * @param isVisible
+    */
+   public void setVisible(boolean isVisible)
+   {
+      this.isVisible = isVisible;
+   }
+   
+   /**
+    * 
+    * @return
+    */
+   public String getMode()
+   {
+      return mode;
+   }
+   
+   /**
+    * 
+    * @param mode
+    */
+   public void setMode(String mode)
+   {
+      this.mode = mode;
+   }
+   
+   /**
+    * 
+    * @return
+    */
+   public String getName()
+   {
+      return name;
+   }
+   
+   /**
+    * 
+    * @param name
+    */
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   /**
+    * 
+    * @return
+    */
+   public String getState()
+   {
+      return state;
+   }
+   
+   /**
+    * 
+    * @param state
+    */
+   public void setState(String state)
+   {
+      this.state = state;
+   }
+}

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/service/PortalRPC.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/service/PortalRPC.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/service/PortalRPC.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client.service;
 
 import com.google.gwt.user.client.rpc.RemoteService;
@@ -2,5 +24,6 @@
 
-import org.jboss.portal.uiserver.ajax.client.Page;
+import org.jboss.portal.uiserver.ajax.client.protocol.Page;
 
 /**
+ * RPC service used for Asynchronous communication between the client-side agent and the Portal Server
  * 

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/service/PortalRPCAsync.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/service/PortalRPCAsync.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/ajax/client/service/PortalRPCAsync.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * 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.uiserver.ajax.client.service;
 
 import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -2,2 +24,8 @@
 
+/**
+ * RPC service used for Asynchronous communication between the client-side agent and the Portal Server
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ *
+ */
 public interface PortalRPCAsync

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/EntryPoint.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/EntryPoint.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/EntryPoint.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -27,6 +27,8 @@
 import org.jboss.portal.common.invocation.InterceptorStackFactory;
 
 /**
+ * A Utility Service used by different Portal Server Entry Points
+ * 
  * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
  *
  */

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/EntryPointImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/EntryPointImpl.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/EntryPointImpl.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -28,6 +28,8 @@
 import org.jboss.portal.jems.as.system.AbstractJBossService;
 
 /**
+ * Implementation of an Entry Point Utility
+ * 
  * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
  *
  */

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/GWTClientFilter.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/GWTClientFilter.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/GWTClientFilter.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -35,6 +35,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 /**
+ * This filter is activated or deactivated depending on whether the Portal needs to runs in Ajax mode or Classic Html mode
+ * 
  * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
  *
  */

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/PortalEntryPoint.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/PortalEntryPoint.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/PortalEntryPoint.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -72,6 +72,8 @@
 import org.jboss.portal.uiserver.processor.ProcessorResponse;
 
 /**
+ * The Portal Server Entry Point for classic html mode
+ * 
  * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
  *
  */

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/HostedModeProxy.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/HostedModeProxy.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/HostedModeProxy.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -36,7 +36,7 @@
 
 
 /**
- * This is a RPC Proxy Service that is used only during development. This lets the GWT client integrate with the Portal server while running in
+ * This is a RPC Proxy Service that is used only during development. This lets the GWT client-side agent integrate with the Portal server while running in
  * Hosted Mode. It is very efficient to debug/develop client side GWT code in Hosted Mode.
  * 
  * This service is never deployed in a production setting and Portal components *do not* have any compile time or run time dependency on this Proxy.

Copied: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalEntryPoint.java (from rev 8829, branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalRPCImpl.java)
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalEntryPoint.java	                        (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalEntryPoint.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -0,0 +1,224 @@
+package org.jboss.portal.uiserver.service.ajax;
+
+
+import java.util.Map;
+import java.util.List;
+import java.util.HashMap;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import javax.servlet.ServletException;
+import javax.servlet.UnavailableException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanServerLocator;
+
+import org.jboss.portal.common.invocation.InterceptorStackFactory;
+import org.jboss.portal.server.RequestControllerFactory;
+import org.jboss.portal.server.Server;
+import org.jboss.portal.server.ServerInvocationContext;
+import org.jboss.portal.server.impl.ServerInvocationContextImpl;
+import org.jboss.portal.server.request.URLContext;
+import org.jboss.portal.server.ServerRequest;
+import org.jboss.portal.server.ServerResponse;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.RequestController;
+import org.jboss.portal.server.RequestControllerDispatcher;
+
+import org.jboss.portal.uiserver.ajax.client.service.PortalRPC;
+import org.jboss.portal.uiserver.ajax.client.protocol.Page;
+import org.jboss.portal.uiserver.ajax.client.protocol.Window;
+import org.jboss.portal.uiserver.processor.ProcessorResponse;
+import org.jboss.portal.uiserver.service.EntryPoint;
+
+import com.google.gwt.user.client.rpc.SerializationException;
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+/**
+ * This serves as the Portal Entry Point for AJAX (Asynchronous) RPC calls being made by the
+ * client-side Ajax agent of the Presentation Framework
+ * 
+ * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
+ * 
+ */
+public class PortalEntryPoint extends RemoteServiceServlet implements 
+PortalRPC
+{
+   /** The logger. */
+   private Logger log = Logger.getLogger(getClass());
+
+   /**
+    * 
+    */
+   private EntryPoint entryPoint = null;
+
+   /** Configure the as default servlet. */
+   public void init() throws ServletException
+   {
+      try
+      {
+         MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
+         this.entryPoint = (EntryPoint) MBeanProxy.get(EntryPoint.class, new ObjectName(
+               this.getInitParameter("entryPointServiceName")),
+               mbeanServer);
+      }
+      catch (Exception e)
+      {
+         this.entryPoint = null;
+         String msg = "Portal Entry Point could not be created";
+         log.error(msg, e);
+         throw new UnavailableException(msg);
+      }
+   }
+   
+   /**
+    * 
+    */
+   public String processCall(String payload) throws SerializationException
+   {
+      HttpServletRequest request = this.getThreadLocalRequest();
+            
+      //Perform the remote procedure call
+      String returnVal =  super.processCall(payload);
+      
+      //Perform any post-processing after calling the actual remote method that will perform
+      //the functionality for this particular remote procedure call
+      if(request.getAttribute("processorResponse") != null)
+      {
+         ProcessorResponse processorResponse = (ProcessorResponse)request.getAttribute("processorResponse");
+         request.getSession().setAttribute("processorResponse", processorResponse);
+      }
+      
+      return returnVal;
+   }
+   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+   /**
+    * Loads the initial Portal Page at the start of a Portal session
+    * 
+    * @return The Initial Portal Page
+    */
+   public Page loadPortal()
+   {
+      try
+      {
+         Page display = null;
+         HttpServletRequest request = this.getThreadLocalRequest();
+         this.callPortalServer();
+         display = this.getDisplay((ProcessorResponse)request.getAttribute("processorResponse"));
+         return display;
+      }
+      catch(Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
+   /**
+    * @return The Page of the Portal that should be currently displayed
+    */
+   public Page getCurrentPage()
+   {
+      Page currentPage = null;
+
+      HttpServletRequest request = this.getThreadLocalRequest();
+
+      ProcessorResponse processorResponse = (ProcessorResponse) request.getSession().getAttribute("processorResponse");
+      
+      currentPage = this.getDisplay(processorResponse);
+
+      return currentPage;
+   } 
+   
+   /**
+    * 
+    * @param processorResponse
+    * @return
+    */
+   private Page getDisplay(ProcessorResponse processorResponse)
+   {
+      Page display = null;
+      
+      org.jboss.portal.uiserver.protocol.Page portalPage = processorResponse
+      .findDisplayedPage();
+
+      // Construct the ajax currentPage object from the portalPage that has been
+      // chosen to be displayed
+      if (portalPage != null)
+      {
+         display = new Page();
+         display.setName(portalPage.getName());
+         List pageWindows = portalPage.getWindows();
+         if(pageWindows != null && pageWindows.size()>0)
+         {
+            Window[] windows = new Window[pageWindows.size()];
+            display.setWindows(windows);
+            for(int i=0; i<pageWindows.size(); i++)
+            {
+               org.jboss.portal.uiserver.protocol.Window pageWindow = (org.jboss.portal.uiserver.protocol.Window)pageWindows.get(i);
+               Window window = new Window();
+               window.setName(pageWindow.getName());
+               window.setContent(pageWindow.getContent());
+               windows[i] = window;               
+            }
+         }
+      }
+      
+      return display;
+   }
+   
+   /**
+    * 
+    *
+    */
+   private void callPortalServer() throws Exception
+   {
+      HttpServletRequest req = this.getThreadLocalRequest();
+      HttpServletResponse resp = this.getThreadLocalResponse();
+      String requestURI = req.getRequestURI();
+      String contextPath = req.getContextPath();
+      String portalHost = req.getServerName();
+      String portalRequestPath = requestURI.substring(contextPath.length());
+      String portalContextPath = requestURI.substring(0, contextPath.length());
+      Map queryParameterMap = new HashMap();
+      URLContext urlContext = URLContext.newInstance(req.isSecure(), req.getRemoteUser() != null);
+
+      Server server = this.entryPoint.getPortalServer();
+
+      //
+      ServerInvocationContext invocationCtx = new ServerInvocationContextImpl(
+         req,
+         resp,
+         portalHost,
+         portalRequestPath,
+         portalContextPath,
+         queryParameterMap,
+         null, //body parameter map is not applicable for asynchronous RPC calls
+         urlContext,
+         null //media type information is not applicable for asynchronous RPC calls
+         );
+      
+      //
+      ServerRequest request = new ServerRequest(invocationCtx);
+      request.setServer(server);
+
+      //
+      ServerResponse response = new ServerResponse(request, invocationCtx);
+
+      //
+      ServerInvocation invocation = new ServerInvocation(invocationCtx);
+      invocation.setRequest(request);
+      invocation.setResponse(response);
+
+      //
+      RequestControllerFactory controllerFactory = this.entryPoint.getControllerFactory();
+      RequestController controller = controllerFactory.createRequestController(invocation);
+      invocation.setHandler(new RequestControllerDispatcher(controller));
+      
+      InterceptorStackFactory stack = this.entryPoint.getInterceptorStackFactory();      
+      invocation.invoke(stack.getInterceptorStack());
+   }
+}

Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalRPCImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalRPCImpl.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortalRPCImpl.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -1,224 +0,0 @@
-package org.jboss.portal.uiserver.service.ajax;
-
-
-import java.util.Map;
-import java.util.List;
-import java.util.HashMap;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import javax.servlet.ServletException;
-import javax.servlet.UnavailableException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.log4j.Logger;
-import org.jboss.mx.util.MBeanProxy;
-import org.jboss.mx.util.MBeanServerLocator;
-
-import org.jboss.portal.common.invocation.InterceptorStackFactory;
-import org.jboss.portal.server.RequestControllerFactory;
-import org.jboss.portal.server.Server;
-import org.jboss.portal.server.ServerInvocationContext;
-import org.jboss.portal.server.impl.ServerInvocationContextImpl;
-import org.jboss.portal.server.request.URLContext;
-import org.jboss.portal.server.ServerRequest;
-import org.jboss.portal.server.ServerResponse;
-import org.jboss.portal.server.ServerInvocation;
-import org.jboss.portal.server.RequestController;
-import org.jboss.portal.server.RequestControllerDispatcher;
-
-import org.jboss.portal.uiserver.ajax.client.service.PortalRPC;
-import org.jboss.portal.uiserver.ajax.client.Page;
-import org.jboss.portal.uiserver.ajax.client.Window;
-import org.jboss.portal.uiserver.processor.ProcessorResponse;
-import org.jboss.portal.uiserver.service.EntryPoint;
-
-import com.google.gwt.user.client.rpc.SerializationException;
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-
-/**
- * This serves as the Portal Entry Point for AJAX (Asynchronous) RPC calls being made by the
- * Ajax client of the Portal
- * 
- * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
- * 
- */
-public class PortalRPCImpl extends RemoteServiceServlet implements 
-PortalRPC
-{
-   /** The logger. */
-   private Logger log = Logger.getLogger(getClass());
-
-   /**
-    * 
-    */
-   private EntryPoint entryPoint = null;
-
-   /** Configure the as default servlet. */
-   public void init() throws ServletException
-   {
-      try
-      {
-         MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
-         this.entryPoint = (EntryPoint) MBeanProxy.get(EntryPoint.class, new ObjectName(
-               this.getInitParameter("entryPointServiceName")),
-               mbeanServer);
-      }
-      catch (Exception e)
-      {
-         this.entryPoint = null;
-         String msg = "Portal Entry Point could not be created";
-         log.error(msg, e);
-         throw new UnavailableException(msg);
-      }
-   }
-   
-   /**
-    * 
-    */
-   public String processCall(String payload) throws SerializationException
-   {
-      HttpServletRequest request = this.getThreadLocalRequest();
-            
-      //Perform the remote procedure call
-      String returnVal =  super.processCall(payload);
-      
-      //Perform any post-processing after calling the actual remote method that will perform
-      //the functionality for this particular remote procedure call
-      if(request.getAttribute("processorResponse") != null)
-      {
-         ProcessorResponse processorResponse = (ProcessorResponse)request.getAttribute("processorResponse");
-         request.getSession().setAttribute("processorResponse", processorResponse);
-      }
-      
-      return returnVal;
-   }
-   // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-   /**
-    * Loads the initial Portal Page at the start of a Portal session
-    * 
-    * @return The Initial Portal Page
-    */
-   public Page loadPortal()
-   {
-      try
-      {
-         Page display = null;
-         HttpServletRequest request = this.getThreadLocalRequest();
-         this.callPortalServer();
-         display = this.getDisplay((ProcessorResponse)request.getAttribute("processorResponse"));
-         return display;
-      }
-      catch(Exception e)
-      {
-         throw new RuntimeException(e);
-      }
-   }
-
-   /**
-    * @return The Page of the Portal that should be currently displayed
-    */
-   public Page getCurrentPage()
-   {
-      Page currentPage = null;
-
-      HttpServletRequest request = this.getThreadLocalRequest();
-
-      ProcessorResponse processorResponse = (ProcessorResponse) request.getSession().getAttribute("processorResponse");
-      
-      currentPage = this.getDisplay(processorResponse);
-
-      return currentPage;
-   } 
-   
-   /**
-    * 
-    * @param processorResponse
-    * @return
-    */
-   private Page getDisplay(ProcessorResponse processorResponse)
-   {
-      Page display = null;
-      
-      org.jboss.portal.uiserver.protocol.Page portalPage = processorResponse
-      .findDisplayedPage();
-
-      // Construct the ajax currentPage object from the portalPage that has been
-      // chosen to be displayed
-      if (portalPage != null)
-      {
-         display = new Page();
-         display.setName(portalPage.getName());
-         List pageWindows = portalPage.getWindows();
-         if(pageWindows != null && pageWindows.size()>0)
-         {
-            Window[] windows = new Window[pageWindows.size()];
-            display.setWindows(windows);
-            for(int i=0; i<pageWindows.size(); i++)
-            {
-               org.jboss.portal.uiserver.protocol.Window pageWindow = (org.jboss.portal.uiserver.protocol.Window)pageWindows.get(i);
-               Window window = new Window();
-               window.setName(pageWindow.getName());
-               window.setContent(pageWindow.getContent());
-               windows[i] = window;               
-            }
-         }
-      }
-      
-      return display;
-   }
-   
-   /**
-    * 
-    *
-    */
-   private void callPortalServer() throws Exception
-   {
-      HttpServletRequest req = this.getThreadLocalRequest();
-      HttpServletResponse resp = this.getThreadLocalResponse();
-      String requestURI = req.getRequestURI();
-      String contextPath = req.getContextPath();
-      String portalHost = req.getServerName();
-      String portalRequestPath = requestURI.substring(contextPath.length());
-      String portalContextPath = requestURI.substring(0, contextPath.length());
-      Map queryParameterMap = new HashMap();
-      URLContext urlContext = URLContext.newInstance(req.isSecure(), req.getRemoteUser() != null);
-
-      Server server = this.entryPoint.getPortalServer();
-
-      //
-      ServerInvocationContext invocationCtx = new ServerInvocationContextImpl(
-         req,
-         resp,
-         portalHost,
-         portalRequestPath,
-         portalContextPath,
-         queryParameterMap,
-         null, //body parameter map is not applicable for asynchronous RPC calls
-         urlContext,
-         null //media type information is not applicable for asynchronous RPC calls
-         );
-      
-      //
-      ServerRequest request = new ServerRequest(invocationCtx);
-      request.setServer(server);
-
-      //
-      ServerResponse response = new ServerResponse(request, invocationCtx);
-
-      //
-      ServerInvocation invocation = new ServerInvocation(invocationCtx);
-      invocation.setRequest(request);
-      invocation.setResponse(response);
-
-      //
-      RequestControllerFactory controllerFactory = this.entryPoint.getControllerFactory();
-      RequestController controller = controllerFactory.createRequestController(invocation);
-      invocation.setHandler(new RequestControllerDispatcher(controller));
-      
-      InterceptorStackFactory stack = this.entryPoint.getInterceptorStackFactory();      
-      invocation.invoke(stack.getInterceptorStack());
-   }
-}

Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortletServiceImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortletServiceImpl.java	2007-11-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/service/ajax/PortletServiceImpl.java	2007-11-06 18:11:32 UTC (rev 8835)
@@ -5,8 +5,8 @@
 import javax.servlet.http.HttpServletRequest;
 
 import org.jboss.portal.uiserver.ajax.client.PortletService;
-import org.jboss.portal.uiserver.ajax.client.Page;
-import org.jboss.portal.uiserver.ajax.client.Window;
+import org.jboss.portal.uiserver.ajax.client.protocol.Page;
+import org.jboss.portal.uiserver.ajax.client.protocol.Window;
 
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
 
@@ -14,8 +14,7 @@
  * This is just a STUB server side component to test the client side components
  * of the GWT-based AJAX UI
  * 
- * In real implementation this functionality will be provided by the UIServer
- * interfacing with the Portal Core
+ * Only used for Prototyping stuff
  * 
  * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
  * 

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-06 15:05:30 UTC (rev 8834)
+++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml	2007-11-06 18:11:32 UTC (rev 8835)
@@ -73,8 +73,8 @@
       
    <!-- Asynchronous service request processor -->
    <servlet>
-      <servlet-name>PortalRPC</servlet-name>
-      <servlet-class>org.jboss.portal.uiserver.service.ajax.PortalRPCImpl</servlet-class>
+      <servlet-name>AjaxPortalEntryPoint</servlet-name>
+      <servlet-class>org.jboss.portal.uiserver.service.ajax.PortalEntryPoint</servlet-class>
       <init-param>
          <param-name>asDefaultServlet</param-name>
          <param-value>false</param-value>
@@ -88,7 +88,7 @@
       <load-on-startup>0</load-on-startup>
    </servlet>      
    <servlet-mapping>
-      <servlet-name>PortalRPC</servlet-name>
+      <servlet-name>AjaxPortalEntryPoint</servlet-name>
       <url-pattern>/portalrpc/*</url-pattern>
    </servlet-mapping>      
 </web-app>




More information about the portal-commits mailing list