Author: sohil.shah(a)jboss.com
Date: 2007-12-13 13:24:13 -0500 (Thu, 13 Dec 2007)
New Revision: 9339
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Session.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContainer.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContext.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIObject.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPage.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPortal.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIWindow.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java
Removed:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/
Modified:
branches/JBoss_Portal_Branch_2_6/build/build.xml
branches/presentation/
branches/presentation/core-presentation/
branches/presentation/core-presentation/src/resources/presentation-sar/META-INF/jboss-service.xml
branches/presentation/presentation/build.xml
branches/presentation/presentation/gwt-dev-env/MyGWT(uiserver).launch
branches/presentation/presentation/gwt-dev-env/Portal(uiserver).launch
branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components/xpti.dat
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Page.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Window.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java
branches/presentation/presentation/src/resources/presentation-war/WEB-INF/web.xml
Log:
ajax user agent integration
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-12-13 18:24:13 UTC (rev 9339)
@@ -108,9 +108,7 @@
<!-- Sets up the module configuration. -->
<moduleconfig property="modules" selected="${groups}">
-
<!-- Modules -->
-
<module name="jems"/>
<module name="security"/>
<module name="faces"/>
@@ -118,27 +116,48 @@
<module name="server"/>
<module name="portlet-server"/>
<module name="theme"/>
- <module name="cms"/>
- <module name="format"/>
- <module name="core"/>
- <module name="core-cms"/>
+ <module name="format"/>
+ <module name="core"/>
+ <module name="registration"/>
+ <module name="presentation"/>
+ <module name="core-presentation"/>
+ <module name="core-samples"/>
+
+ <!--
+ <module name="search"/>
+ <module name="workflow"/>
+ <module name="cms"/>
+ <module name="core-cms"/>
+ -->
+ <!--
<module name="core-management"/>
<module name="core-identity"/>
<module name="core-admin"/>
+ -->
+ <!--
<module name="core-wsrp"/>
+ -->
+ <!--
<module name="search"/>
+ -->
+ <!--
<module name="core-samples"/>
+ -->
+ <!--
<module name="wsrp"/>
- <module name="registration"/>
+ -->
+ <!--
<module name="workflow"/>
+ -->
+ <!--
<module name="widget"/>
+ -->
<!--<module name="core-admin"/>-->
<!-- Module groups -->
-
<group name="portal">
<include
- modules="api, jems, server, security, search, format, portlet-server,
faces, theme, workflow, cms, registration, core, wsrp, core-admin, core-cms,
core-management, core-identity, core-samples, widget"/>
+ modules="api, jems, server, security, format, portlet-server, faces,
theme,registration, presentation, core, core-presentation, core-samples"/>
</group>
<group name="cms">
Property changes on: branches/presentation
___________________________________________________________________
Name: svn:ignore
+ thirdparty
.classpath
.project
.settings
core-samples
Property changes on: branches/presentation/core-presentation
___________________________________________________________________
Name: svn:ignore
+ output
Modified:
branches/presentation/core-presentation/src/resources/presentation-sar/META-INF/jboss-service.xml
===================================================================
---
branches/presentation/core-presentation/src/resources/presentation-sar/META-INF/jboss-service.xml 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/core-presentation/src/resources/presentation-sar/META-INF/jboss-service.xml 2007-12-13
18:24:13 UTC (rev 9339)
@@ -33,6 +33,14 @@
<depends optional-attribute-name="PresentationServer"
proxy-type="attribute">portal:service=PresentationServer</depends>
</mbean>
<mbean
+ code="org.jboss.portal.presentation.client.controller.AjaxUIController"
+ name="portal:service=Controller,type=Ajax/Presentation"
+ xmbean-dd=""
+
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="PresentationServer"
proxy-type="attribute">portal:service=PresentationServer</depends>
+ </mbean>
+ <mbean
code="org.jboss.portal.server.impl.RequestControllerFactoryImpl"
name="portal:service=ControllerFactory,type=Presentation"
xmbean-dd=""
@@ -43,6 +51,16 @@
proxy-type="attribute">portal:service=Controller,type=Presentation</depends>
</mbean>
<mbean
+ code="org.jboss.portal.server.impl.RequestControllerFactoryImpl"
+ name="portal:service=ControllerFactory,type=Ajax/Presentation"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends
+ optional-attribute-name="Controller"
+
proxy-type="attribute">portal:service=Controller,type=Ajax/Presentation</depends>
+ </mbean>
+ <mbean
code="org.jboss.portal.core.presentation.server.PresentationServerImpl"
name="portal:service=PresentationServer"
xmbean-dd=""
Modified: branches/presentation/presentation/build.xml
===================================================================
--- branches/presentation/presentation/build.xml 2007-12-12 17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/build.xml 2007-12-13 18:24:13 UTC (rev 9339)
@@ -246,24 +246,19 @@
<path refid="gwt.gwt.classpath"/>
<path refid="mygwt.mygwt.classpath"/>
</path>
- <delete
dir="${build.resources}/presentation-war/org.jboss.portal.presentation.ajax.Portal"/>
+ <delete dir="${build.lib}/ajax"/>
<java classpathref="full.gwt.classpath" fork="true"
classname="com.google.gwt.dev.GWTCompiler">
<classpath>
<pathelement path="src/main"/>
<pathelement path="src/resources/client/ajax/src"/>
</classpath>
- <arg line="-out ${build.resources}/presentation-war/"/>
+ <arg line="-out ${build.lib}/ajax/"/>
<arg line="org.jboss.portal.presentation.ajax.Portal"/>
</java>
<jar jarfile="${build.lib}/presentation.war">
<fileset
dir="${build.resources}/presentation-war"></fileset>
- </jar>
- <copy todir="${build.resources}/presentation-war">
- <fileset
dir="${build.resources}/presentation-war/org.jboss.portal.presentation.ajax.Portal"/>
- </copy>
- <delete
dir="${build.resources}/presentation-war/org.jboss.portal.presentation.ajax.Portal"/>
-
-
+ <fileset
dir="${build.lib}/ajax/org.jboss.portal.presentation.ajax.Portal"></fileset>
+ </jar>
</target>
<target name="output" depends="artifacts">
Modified: branches/presentation/presentation/gwt-dev-env/MyGWT(uiserver).launch
===================================================================
--- branches/presentation/presentation/gwt-dev-env/MyGWT(uiserver).launch 2007-12-12
17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/gwt-dev-env/MyGWT(uiserver).launch 2007-12-13
18:24:13 UTC (rev 9339)
@@ -6,22 +6,22 @@
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
containerPath="org.eclipse.jdt.launching.JRE_CONTAINER"
javaProject="UIServer" path="1"
type="4"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/src/main" path="3"
type="2"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/gwt-dev-env/src"
path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/src/resources/client/ajax/src"
path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento
exportedEntriesOnly="false"
project="UIServer"/> </runtimeClasspathEntry> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar"
path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/gwt-dev-env/mygwt.jar"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
containerPath="org.eclipse.jdt.launching.JRE_CONTAINER"
javaProject="PresentationServer" path="1"
type="4"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/src/main"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/gwt-dev-env/src"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/src/resources/client/ajax/src"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento
exportedEntriesOnly="false"
project="PresentationServer"/> </runtimeClasspathEntry> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/gwt-dev-env/gwt-dev-linux.jar"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/gwt-dev-env/mygwt.jar"
path="3" type="2"/> "/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-out www org.jboss.portal.presentation.ajax.MyGWT/mygwt.html"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="UIServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="PresentationServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/UIServer"/>
+<listEntry value="/PresentationServer"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="GWT_EXTERNAL_BROWSER"
value="/home/soshah/firefox/firefox"/>
</mapAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY"
value="${workspace_loc:UIServer/uiserver/gwt-dev-env}"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY"
value="${workspace_loc:PresentationServer/presentation/gwt-dev-env}"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables"
value="true"/>
</launchConfiguration>
Modified: branches/presentation/presentation/gwt-dev-env/Portal(uiserver).launch
===================================================================
--- branches/presentation/presentation/gwt-dev-env/Portal(uiserver).launch 2007-12-12
17:54:17 UTC (rev 9338)
+++ branches/presentation/presentation/gwt-dev-env/Portal(uiserver).launch 2007-12-13
18:24:13 UTC (rev 9339)
@@ -6,21 +6,21 @@
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
containerPath="org.eclipse.jdt.launching.JRE_CONTAINER"
javaProject="UIServer" path="1"
type="4"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/src/main" path="3"
type="2"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/src/resources/client/ajax/src"
path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/gwt-dev-env/src"
path="3" type="2"/> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento
exportedEntriesOnly="false"
project="UIServer"/> </runtimeClasspathEntry> "/>
-<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
containerPath="org.eclipse.jdt.launching.JRE_CONTAINER"
javaProject="PresentationServer" path="1"
type="4"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/src/main"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/src/resources/client/ajax/src"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/gwt-dev-env/src"
path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento
exportedEntriesOnly="false"
project="PresentationServer"/> </runtimeClasspathEntry> "/>
+<listEntry value="<?xml version="1.0"
encoding="UTF-8"?> <runtimeClasspathEntry
internalArchive="/PresentationServer/presentation/gwt-dev-env/gwt-dev-linux.jar"
path="3" type="2"/> "/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-out www org.jboss.portal.presentation.ajax.Portal/index.html"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="UIServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="PresentationServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/UIServer"/>
+<listEntry value="/PresentationServer"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="GWT_EXTERNAL_BROWSER"
value="/home/soshah/firefox/firefox"/>
</mapAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY"
value="${workspace_loc:UIServer/uiserver/gwt-dev-env}"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY"
value="${workspace_loc:PresentationServer/presentation/gwt-dev-env}"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables"
value="true"/>
</launchConfiguration>
Modified:
branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components/xpti.dat
===================================================================
---
branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components/xpti.dat 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components/xpti.dat 2007-12-13
18:24:13 UTC (rev 9339)
@@ -2,152 +2,152 @@
[Header,2]
0,Version,2,0
-1,AppDir,/home/soshah/projects/jboss-portal/UIServer/uiserver/gwt-dev-env/mozilla-1.7.12
+1,AppDir,/home/soshah/projects/jboss-portal/branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12
[Directories,3]
-0,/home/soshah/projects/jboss-portal/UIServer/uiserver/gwt-dev-env/mozilla-1.7.12/components
+0,/home/soshah/projects/jboss-portal/branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/components
1,/home/soshah/.mozilla/plugins
-2,/home/soshah/projects/jboss-portal/UIServer/uiserver/gwt-dev-env/mozilla-1.7.12/plugins
+2,/home/soshah/projects/jboss-portal/branches/presentation/presentation/gwt-dev-env/mozilla-1.7.12/plugins
[Files,139]
-0,msgbase.xpt,0,32371,1191268627000
-1,dom_html.xpt,0,17387,1191268629000
-2,msgimap.xpt,0,15733,1191268627000
-3,addrbook.xpt,0,15591,1191268627000
-4,websrvcs.xpt,0,14664,1191268628000
-5,necko.xpt,0,12564,1191268631000
-6,msgcompose.xpt,0,11998,1191268627000
-7,dom_css.xpt,0,11187,1191268629000
-8,editor.xpt,0,10902,1191268630000
-9,pipnss.xpt,0,10289,1191268627000
-10,msgsearch.xpt,0,9543,1191268630000
-11,accessibility.xpt,0,8851,1191268630000
-12,docshell.xpt,0,8837,1191268627000
-13,gfx.xpt,0,8771,1191268628000
-14,xpcom_ds.xpt,0,8634,1191268627000
-15,dom_base.xpt,0,7775,1191268630000
-16,content_base.xpt,0,6900,1191268627000
-17,xpconnect.xpt,0,6834,1191268629000
-18,msgdb.xpt,0,6716,1191268630000
-19,xpcom_io.xpt,0,6515,1191268630000
-20,dom_core.xpt,0,6377,1191268628000
-21,dom_xul.xpt,0,6231,1191268628000
-22,dom_events.xpt,0,5979,1191268630000
-23,jsdservice.xpt,0,5953,1191268631000
-24,msgnews.xpt,0,5519,1191268627000
-25,widget.xpt,0,5401,1191268630000
-26,webBrowser_core.xpt,0,5287,1191268627000
-27,rdf.xpt,0,4533,1191268629000
-28,msglocal.xpt,0,4244,1191268629000
-29,mozldap.xpt,0,3929,1191268627000
-30,caps.xpt,0,3921,1191268628000
-31,appshell.xpt,0,3645,1191268630000
-32,xpcom_components.xpt,0,3624,1191268631000
-33,xpcom_obsolete.xpt,0,3399,1191268627000
-34,import.xpt,0,3234,1191268628000
-35,pref.xpt,0,3145,1191268629000
-36,uriloader.xpt,0,3095,1191268627000
-37,mime.xpt,0,3076,1191268630000
-38,inspector.xpt,0,2980,1191268628000
-39,layout_xul_tree.xpt,0,2797,1191268629000
-40,xpcom_threads.xpt,0,2664,1191268627000
-41,dom_loadsave.xpt,0,2621,1191268627000
-42,xpcom_base.xpt,0,2543,1191268628000
-43,accessibility-atk.xpt,0,2500,1191268627000
-44,shistory.xpt,0,2257,1191268627000
-45,necko_cache.xpt,0,2180,1191268631000
-46,windowwatcher.xpt,0,2167,1191268627000
-47,layout_xul.xpt,0,2154,1191268627000
-48,imglib2.xpt,0,2152,1191268631000
-49,necko_http.xpt,0,2081,1191268627000
-50,locale.xpt,0,1959,1191268631000
-51,webbrowserpersist.xpt,0,1876,1191268627000
-52,profile.xpt,0,1860,1191268631000
-53,autocomplete.xpt,0,1835,1191268631000
-54,commandhandler.xpt,0,1789,1191268627000
-55,necko_cookie.xpt,0,1666,1191268629000
-56,xpcom_xpti.xpt,0,1560,1191268632000
-57,mimetype.xpt,0,1467,1191268630000
-58,xmlextras.xpt,0,1458,1191268628000
-59,necko_strconv.xpt,0,1409,1191268627000
-60,dom_range.xpt,0,1397,1191268631000
-61,xultmpl.xpt,0,1376,1191268631000
-62,uconv.xpt,0,1339,1191268629000
-63,dom_xpath.xpt,0,1312,1191268630000
-64,dom_traversal.xpt,0,1282,1191268627000
-65,xuldoc.xpt,0,1269,1191268631000
-66,txmgr.xpt,0,1258,1191268627000
-67,webshell_idls.xpt,0,1191,1191268628000
-68,exthandler.xpt,0,1147,1191268631000
-69,unicharutil.xpt,0,1146,1191268629000
-70,xpinstall.xpt,0,1137,1191268627000
-71,oji.xpt,0,1120,1191268627000
-72,search.xpt,0,1119,1191268630000
-73,spellchecker.xpt,0,1060,1191268627000
-74,downloadmanager.xpt,0,1050,1191268627000
-75,find.xpt,0,1036,1191268631000
-76,bookmarks.xpt,0,992,1191268628000
-77,xml-rpc.xpt,0,989,1191268629000
-78,necko_socket.xpt,0,980,1191268627000
-79,wallet.xpt,0,968,1191268631000
-80,jar.xpt,0,941,1191268630000
-81,mozfind.xpt,0,845,1191268632000
-82,necko_dns.xpt,0,793,1191268627000
-83,content_xslt.xpt,0,766,1191268629000
-84,msgsmime.xpt,0,766,1191268627000
-85,dom_stylesheets.xpt,0,728,1191268627000
-86,cookie.xpt,0,705,1191268629000
-87,content_xmldoc.xpt,0,693,1191268627000
-88,composer.xpt,0,690,1191268628000
-89,chardet.xpt,0,676,1191268630000
-90,intl.xpt,0,645,1191268631000
-91,pipboot.xpt,0,628,1191268627000
-92,p3p.xpt,0,625,1191268628000
-93,dom.xpt,0,604,1191268631000
-94,content_html.xpt,0,564,1191268631000
-95,mailview.xpt,0,550,1191268627000
-96,prefmigr.xpt,0,505,1191268627000
-97,dom_xbl.xpt,0,498,1191268628000
-98,necko_jar.xpt,0,485,1191268627000
-99,filepicker.xpt,0,482,1191268631000
-100,mozbrwsr.xpt,0,463,1191268630000
-101,content_htmldoc.xpt,0,449,1191268627000
-102,typeaheadfind.xpt,0,426,1191268627000
-103,htmlparser.xpt,0,416,1191268631000
-104,ipcd.xpt,0,413,1191268629000
-105,necko_file.xpt,0,408,1191268631000
-106,embed_base.xpt,0,390,1191268628000
-107,proxyObjInst.xpt,0,388,1191268631000
-108,pippki.xpt,0,377,1191268630000
-109,directory.xpt,0,373,1191268630000
-110,necko_about.xpt,0,357,1191268628000
-111,xremoteservice.xpt,0,342,1191268629000
-112,history.xpt,0,336,1191268628000
-113,autoconfig.xpt,0,334,1191268629000
-114,layout_base.xpt,0,303,1191268628000
-115,helperAppDlg.xpt,0,292,1191268631000
-116,necko_ftp.xpt,0,287,1191268630000
-117,progressDlg.xpt,0,286,1191268628000
-118,necko_res.xpt,0,285,1191268630000
-119,signonviewer.xpt,0,252,1191268627000
-120,jsurl.xpt,0,237,1191268630000
-121,dom_views.xpt,0,226,1191268631000
-122,walletpreview.xpt,0,223,1191268627000
-123,walleteditor.xpt,0,215,1191268630000
-124,windowds.xpt,0,212,1191268627000
-125,sidebar.xpt,0,207,1191268628000
-126,mailnews.xpt,0,205,1191268630000
-127,profilesharingsetup.xpt,0,203,1191268629000
-128,prefetch.xpt,0,192,1191268627000
-129,necko_viewsource.xpt,0,188,1191268632000
-130,txtsvc.xpt,0,188,1191268630000
-131,jsconsole.xpt,0,186,1191268628000
-132,urlbarhistory.xpt,0,183,1191268627000
-133,impComm4xMail.xpt,0,178,1191268627000
-134,lwbrk.xpt,0,174,1191268630000
-135,related.xpt,0,159,1191268630000
-136,qfaservices.xpt,0,144,1191268631000
-137,necko_data.xpt,0,122,1191268627000
+0,msgbase.xpt,0,32371,1196044679000
+1,dom_html.xpt,0,17387,1196044679000
+2,msgimap.xpt,0,15733,1196044679000
+3,addrbook.xpt,0,15591,1196044679000
+4,websrvcs.xpt,0,14664,1196044679000
+5,necko.xpt,0,12564,1196044679000
+6,msgcompose.xpt,0,11998,1196044679000
+7,dom_css.xpt,0,11187,1196044679000
+8,editor.xpt,0,10902,1196044679000
+9,pipnss.xpt,0,10289,1196044679000
+10,msgsearch.xpt,0,9543,1196044679000
+11,accessibility.xpt,0,8851,1196044679000
+12,docshell.xpt,0,8837,1196044679000
+13,gfx.xpt,0,8771,1196044679000
+14,xpcom_ds.xpt,0,8634,1196044679000
+15,dom_base.xpt,0,7775,1196044679000
+16,content_base.xpt,0,6900,1196044679000
+17,xpconnect.xpt,0,6834,1196044679000
+18,msgdb.xpt,0,6716,1196044679000
+19,xpcom_io.xpt,0,6515,1196044679000
+20,dom_core.xpt,0,6377,1196044679000
+21,dom_xul.xpt,0,6231,1196044679000
+22,dom_events.xpt,0,5979,1196044679000
+23,jsdservice.xpt,0,5953,1196044679000
+24,msgnews.xpt,0,5519,1196044679000
+25,widget.xpt,0,5401,1196044679000
+26,webBrowser_core.xpt,0,5287,1196044679000
+27,rdf.xpt,0,4533,1196044679000
+28,msglocal.xpt,0,4244,1196044679000
+29,mozldap.xpt,0,3929,1196044679000
+30,caps.xpt,0,3921,1196044679000
+31,appshell.xpt,0,3645,1196044679000
+32,xpcom_components.xpt,0,3624,1196044679000
+33,xpcom_obsolete.xpt,0,3399,1196044679000
+34,import.xpt,0,3234,1196044679000
+35,pref.xpt,0,3145,1196044679000
+36,uriloader.xpt,0,3095,1196044679000
+37,mime.xpt,0,3076,1196044679000
+38,inspector.xpt,0,2980,1196044679000
+39,layout_xul_tree.xpt,0,2797,1196044679000
+40,xpcom_threads.xpt,0,2664,1196044679000
+41,dom_loadsave.xpt,0,2621,1196044679000
+42,xpcom_base.xpt,0,2543,1196044679000
+43,accessibility-atk.xpt,0,2500,1196044679000
+44,shistory.xpt,0,2257,1196044679000
+45,necko_cache.xpt,0,2180,1196044679000
+46,windowwatcher.xpt,0,2167,1196044679000
+47,layout_xul.xpt,0,2154,1196044679000
+48,imglib2.xpt,0,2152,1196044679000
+49,necko_http.xpt,0,2081,1196044679000
+50,locale.xpt,0,1959,1196044679000
+51,webbrowserpersist.xpt,0,1876,1196044679000
+52,profile.xpt,0,1860,1196044679000
+53,autocomplete.xpt,0,1835,1196044679000
+54,commandhandler.xpt,0,1789,1196044679000
+55,necko_cookie.xpt,0,1666,1196044679000
+56,xpcom_xpti.xpt,0,1560,1196044679000
+57,mimetype.xpt,0,1467,1196044679000
+58,xmlextras.xpt,0,1458,1196044679000
+59,necko_strconv.xpt,0,1409,1196044679000
+60,dom_range.xpt,0,1397,1196044679000
+61,xultmpl.xpt,0,1376,1196044679000
+62,uconv.xpt,0,1339,1196044679000
+63,dom_xpath.xpt,0,1312,1196044679000
+64,dom_traversal.xpt,0,1282,1196044679000
+65,xuldoc.xpt,0,1269,1196044679000
+66,txmgr.xpt,0,1258,1196044679000
+67,webshell_idls.xpt,0,1191,1196044679000
+68,exthandler.xpt,0,1147,1196044679000
+69,unicharutil.xpt,0,1146,1196044679000
+70,xpinstall.xpt,0,1137,1196044679000
+71,oji.xpt,0,1120,1196044679000
+72,search.xpt,0,1119,1196044679000
+73,spellchecker.xpt,0,1060,1196044679000
+74,downloadmanager.xpt,0,1050,1196044679000
+75,find.xpt,0,1036,1196044679000
+76,bookmarks.xpt,0,992,1196044679000
+77,xml-rpc.xpt,0,989,1196044679000
+78,necko_socket.xpt,0,980,1196044679000
+79,wallet.xpt,0,968,1196044679000
+80,jar.xpt,0,941,1196044679000
+81,mozfind.xpt,0,845,1196044679000
+82,necko_dns.xpt,0,793,1196044679000
+83,content_xslt.xpt,0,766,1196044679000
+84,msgsmime.xpt,0,766,1196044679000
+85,dom_stylesheets.xpt,0,728,1196044679000
+86,cookie.xpt,0,705,1196044679000
+87,content_xmldoc.xpt,0,693,1196044679000
+88,composer.xpt,0,690,1196044679000
+89,chardet.xpt,0,676,1196044679000
+90,intl.xpt,0,645,1196044679000
+91,pipboot.xpt,0,628,1196044679000
+92,p3p.xpt,0,625,1196044679000
+93,dom.xpt,0,604,1196044679000
+94,content_html.xpt,0,564,1196044679000
+95,mailview.xpt,0,550,1196044679000
+96,prefmigr.xpt,0,505,1196044679000
+97,dom_xbl.xpt,0,498,1196044679000
+98,necko_jar.xpt,0,485,1196044679000
+99,filepicker.xpt,0,482,1196044679000
+100,mozbrwsr.xpt,0,463,1196044679000
+101,content_htmldoc.xpt,0,449,1196044679000
+102,typeaheadfind.xpt,0,426,1196044679000
+103,htmlparser.xpt,0,416,1196044679000
+104,ipcd.xpt,0,413,1196044679000
+105,necko_file.xpt,0,408,1196044679000
+106,embed_base.xpt,0,390,1196044679000
+107,proxyObjInst.xpt,0,388,1196044679000
+108,pippki.xpt,0,377,1196044679000
+109,directory.xpt,0,373,1196044679000
+110,necko_about.xpt,0,357,1196044679000
+111,xremoteservice.xpt,0,342,1196044679000
+112,history.xpt,0,336,1196044679000
+113,autoconfig.xpt,0,334,1196044679000
+114,layout_base.xpt,0,303,1196044679000
+115,helperAppDlg.xpt,0,292,1196044679000
+116,necko_ftp.xpt,0,287,1196044679000
+117,progressDlg.xpt,0,286,1196044679000
+118,necko_res.xpt,0,285,1196044679000
+119,signonviewer.xpt,0,252,1196044679000
+120,jsurl.xpt,0,237,1196044679000
+121,dom_views.xpt,0,226,1196044679000
+122,walletpreview.xpt,0,223,1196044679000
+123,walleteditor.xpt,0,215,1196044679000
+124,windowds.xpt,0,212,1196044679000
+125,sidebar.xpt,0,207,1196044679000
+126,mailnews.xpt,0,205,1196044679000
+127,profilesharingsetup.xpt,0,203,1196044679000
+128,prefetch.xpt,0,192,1196044679000
+129,necko_viewsource.xpt,0,188,1196044679000
+130,txtsvc.xpt,0,188,1196044679000
+131,jsconsole.xpt,0,186,1196044679000
+132,urlbarhistory.xpt,0,183,1196044679000
+133,impComm4xMail.xpt,0,178,1196044679000
+134,lwbrk.xpt,0,174,1196044679000
+135,related.xpt,0,159,1196044679000
+136,qfaservices.xpt,0,144,1196044679000
+137,necko_data.xpt,0,122,1196044679000
138,flashplayer.xpt,1,856,1166208660000
[ArchiveItems,0]
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -50,8 +50,8 @@
import net.mygwt.ui.client.event.Listener;
import net.mygwt.ui.client.event.BaseEvent;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.Page;
+import org.jboss.portal.presentation.ajax.client.model.Window;
/**
* Used for Prototyping Async Page Management
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -42,8 +42,8 @@
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.AsyncCallback;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.Page;
+import org.jboss.portal.presentation.ajax.client.model.Window;
/**
* Used for Prototyping Partial Refresh feature
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Portal.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -33,10 +33,13 @@
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
import org.jboss.portal.presentation.ajax.client.widget.PortletWindow;
import org.jboss.portal.presentation.ajax.client.layout.LayoutManager;
+import org.jboss.portal.presentation.ajax.client.model.UIContext;
+import org.jboss.portal.presentation.ajax.client.model.UIPage;
+import org.jboss.portal.presentation.ajax.client.model.UIPortal;
+import org.jboss.portal.presentation.ajax.client.model.UIWindow;
+import org.jboss.portal.presentation.ajax.client.model.UIObject;
/**
* This is the Entry Point of the client-side Ajax agent of the Presentation Framework
@@ -57,31 +60,32 @@
{
public void onSuccess(Object result)
{
- Page portalPage = (Page)result;
- displayPortalPage(portalPage);
+ UIObject uiObject = (UIObject)result;
+ Session.getInstance().getUiContext().addObject(uiObject);
+ displayPortalPage((UIPage)uiObject);
}
public void onFailure(Throwable caught)
{
}
};
- portalRPC.loadPortal(callback);
+ portalRPC.loadObject("/default/default", callback);
}
/**
*
* @param portalPage
*/
- private void displayPortalPage(Page portalPage)
+ private void displayPortalPage(UIPage portalPage)
{
//Dispalying the fully aggregated page
- Window[] windows = portalPage.getWindows();
- if(windows != null && windows.length>0)
+ List windows = portalPage.getChildren();
+ if(windows != null)
{
List displayWindows = new ArrayList();
- for(int i=0; i<windows.length; i++)
+ for(int i=0; i<windows.size(); i++)
{
- Window pageWindow = windows[i];
+ UIWindow pageWindow = (UIWindow)windows.get(i);
if(pageWindow.isVisible())
{
PortletWindow portletWindow = new PortletWindow(pageWindow);
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -24,7 +24,7 @@
import com.google.gwt.user.client.rpc.RemoteService;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.model.Page;
/**
* A Protototype RPC service
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Session.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Session.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/Session.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * 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.ajax.client;
+
+import org.jboss.portal.presentation.ajax.client.model.UIContext;
+
+/**
+ * This is the client side Session. This is a singleton since there should only be one
session for each client
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class Session
+{
+ /**
+ *
+ */
+ private static Session singleton = null;
+
+ /**
+ *
+ */
+ private UIContext uiContext = null;
+
+ /**
+ *
+ *
+ */
+ private Session()
+ {
+ this.uiContext = new UIContext();
+ }
+
+ /**
+ *
+ * @return
+ */
+ public static Session getInstance()
+ {
+ if(Session.singleton == null)
+ {
+ Session.singleton = new Session();
+ }
+ return Session.singleton;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public UIContext getUiContext()
+ {
+ return this.uiContext;
+ }
+
+ /**
+ *
+ * @param uiContext
+ */
+ public void setUiContext(UIContext uiContext)
+ {
+ this.uiContext = uiContext;
+ }
+}
Copied:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model
(from rev 9312,
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol)
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Page.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/Page.java 2007-12-06
15:59:09 UTC (rev 9312)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Page.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -20,7 +20,7 @@
* 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.ajax.client.protocol;
+package org.jboss.portal.presentation.ajax.client.model;
import com.google.gwt.user.client.rpc.IsSerializable;
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContainer.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContainer.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContainer.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -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.ajax.client.model;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIContainer extends UIObject
+{
+
+}
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContext.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContext.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIContext.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * 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.ajax.client.model;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIContext extends UIObject
+{
+ /**
+ * @gwt.typeArgs <java.lang.String,
org.jboss.portal.presentation.ajax.client.model.UIObject>
+ */
+ private Map objectTree = new HashMap();
+
+ /**
+ *
+ * @param id
+ * @return
+ */
+ public UIObject getObject(String id)
+ {
+ UIObject object = null;
+
+ if(this.objectTree.containsKey(id))
+ {
+ object = (UIObject)this.objectTree.get(id);
+ }
+
+ return object;
+ }
+
+ /**
+ *
+ * @param id
+ */
+ public void addObject(UIObject object)
+ {
+ object.setContext(this);
+ this.objectTree.put(object.getId(), object);
+ }
+
+ /**
+ *
+ * @return
+ */
+ public Map getObjectTree()
+ {
+ return objectTree;
+ }
+
+ /**
+ *
+ * @param objectTree
+ */
+ public void setObjectTree(Map objectTree)
+ {
+ this.objectTree = objectTree;
+ }
+}
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIObject.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIObject.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIObject.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * 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.ajax.client.model;
+
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public abstract class UIObject implements IsSerializable
+{
+ /**
+ *
+ */
+ public static final int STATUS_VALID = 0;
+ public static final int STATUS_INVALID = 1;
+ public static final int STATUS_STALE = 2;
+
+ /**
+ *
+ */
+ protected String id = null;
+
+ /**
+ *
+ */
+ protected String name = null;
+
+ /**
+ *
+ */
+ protected int status = STATUS_VALID;
+
+ /**
+ *
+ */
+ protected UIObject parent = null;
+
+ /**
+ * @gwt.typeArgs <org.jboss.portal.presentation.ajax.client.model.UIObject>
+ */
+ protected List children = null;
+
+ /**
+ *
+ */
+ protected UIContext context = null;
+
//----------------------------------------------------------------------------------------------------------------------------------------------------------
+
+ /**
+ *
+ * @return
+ */
+ public String getId()
+ {
+ return this.id;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getName()
+ {
+ return this.name;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public int getStatus()
+ {
+ return this.status;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public UIObject getParent()
+ {
+ return this.parent;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public List getChildren()
+ {
+ return this.children;
+ }
+
+ /**
+ *
+ * @param name
+ * @return
+ */
+ public UIObject getChild(String name)
+ {
+ UIObject child = null;
+
+ if(this.children != null)
+ {
+ for(int i=0; i<this.children.size(); i++)
+ {
+ UIObject cour = (UIObject)this.children.get(i);
+ if(cour.getName().equals(name))
+ {
+ child = cour;
+ break;
+ }
+ }
+ }
+
+ return child;
+ }
+
+ public UIContext getContext()
+ {
+ return context;
+ }
+
+ public void setContext(UIContext context)
+ {
+ this.context = context;
+ }
+
+ /**
+ *
+ * @param children
+ */
+ public void setChildren(List children)
+ {
+ this.children = children;
+ }
+
+ public void setId(String id)
+ {
+ this.id = id;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void setParent(UIObject parent)
+ {
+ this.parent = parent;
+ }
+
+ public void setStatus(int status)
+ {
+ this.status = status;
+ }
+}
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPage.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPage.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPage.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.model;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIPage extends UIObject
+{
+}
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPortal.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPortal.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIPortal.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -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.ajax.client.model;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIPortal extends UIObject
+{
+
+}
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIWindow.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIWindow.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/UIWindow.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -0,0 +1,117 @@
+/******************************************************************************
+ * 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.ajax.client.model;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public final class UIWindow extends UIObject
+{
+ 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 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 getState()
+ {
+ return state;
+ }
+
+ /**
+ *
+ * @param state
+ */
+ public void setState(String state)
+ {
+ this.state = state;
+ }
+}
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Window.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/protocol/Window.java 2007-12-06
15:59:09 UTC (rev 9312)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/model/Window.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -20,7 +20,7 @@
* 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.ajax.client.protocol;
+package org.jboss.portal.presentation.ajax.client.model;
import com.google.gwt.user.client.rpc.IsSerializable;
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -24,7 +24,7 @@
import com.google.gwt.user.client.rpc.RemoteService;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.model.UIObject;
/**
* RPC service used for Asynchronous communication between the client-side agent and the
Portal Server
@@ -35,14 +35,9 @@
public interface PortalRPC extends RemoteService
{
/**
- * Loads the initial Portal Page at the start of a Portal session
+ * Asynchronously loads the specified object from the server
*
- * @return The Initial Portal Page
+ * @return
*/
- public Page loadPortal();
-
- /**
- * @return The Page of the Portal that should be currently displayed
- */
- public Page getCurrentPage();
+ public UIObject loadObject(String objectId);
}
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -33,12 +33,7 @@
public interface PortalRPCAsync
{
/**
- * Loads the initial Portal Page at the start of a Portal session
+ * Asynchronously loads the specified object from the server
*/
- public void loadPortal(AsyncCallback callback);
-
- /**
- * Loads the Page of the Portal that should be currently displayed
- */
- public void getCurrentPage(AsyncCallback callback);
+ public void loadObject(String objectId, AsyncCallback callback);
}
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -47,7 +47,7 @@
import net.mygwt.ui.client.event.Listener;
import net.mygwt.ui.client.event.BaseEvent;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.UIWindow;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -58,13 +58,13 @@
/**
*
*/
- private Window window = null;
+ private UIWindow window = null;
/**
*
*
*/
- public PortletWindow(Window window)
+ public PortletWindow(UIWindow window)
{
this.window = window;
}
Added:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java
(rev 0)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/client/controller/AjaxUIController.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -0,0 +1,329 @@
+/******************************************************************************
+ * 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.client.controller;
+
+import org.jboss.portal.presentation.client.PresentationContext;
+import org.jboss.portal.presentation.impl.PresentationContextImpl;
+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.content.WindowContent;
+import org.jboss.portal.presentation.protocol.GetActivation;
+import org.jboss.portal.presentation.protocol.PostActivation;
+import org.jboss.portal.presentation.protocol.ServerAction;
+import org.jboss.portal.presentation.protocol.ServerResponse;
+import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.server.ProcessorRequest;
+import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.server.RequestController;
+import org.jboss.portal.server.ServerException;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.ServerInvocationContext;
+import org.jboss.portal.server.impl.ServerInvocationContextImpl;
+import org.jboss.portal.web.WebRequest;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * The UIServer is responsible for generating the output that is sent back to the client
based on the Portal state of a particular Portal Request
+ *
+ * The UIServer provides various UI level services like Page Aggregation, Page Layout,
Web 2.0 client interactions etc.
+ *
+ * Typically the Core component of the Portal delegates all UI specific functions to this
component
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class AjaxUIController implements RequestController
+{
+
+ /** . */
+ private PresentationServer presentationServer = null;
+
+
+ public AjaxUIController()
+ {
+ }
+
+
+ /**
+ * handle is the entry point for handling an incoming Portal request. The request is
handed over
+ * from the Http Layer via the main Portal Servlet
+ */
+ public void handle(ServerInvocation invocation) throws ServerException
+ {
+ try
+ {
+ HttpServletRequest request = invocation.getServerContext().getClientRequest();
+
+ /**
+ * TODO: decouple the implementation via factory pattern
+ */
+ PresentationContext presentationContext = new
PresentationContextImpl(this.presentationServer,
+ invocation);
+ request.setAttribute("requestContext", presentationContext);
+
+ /**
+ * TODO: move this functionality to another component like a UIPresenter etc
+ */
+ ServerAction serverAction = this.getServerAction(presentationContext,
invocation);
+
+ ProcessorRequest processorRequest = new ProcessorRequest(serverAction);
+ ProcessorResponse processorResponse =
this.presentationServer.getProcessor().process(presentationContext,
+ processorRequest);
+
+ //Process the response from the Processor
+ ServerResponse serverResponse = processorResponse.getResponse();
+ this.handle(presentationContext, serverResponse, invocation);
+ }
+ catch(Exception e)
+ {
+ throw new ServerException(e);
+ }
+ }
+
+ /**
+ *
+ * @param serverResponse
+ * @throws ServerException
+ */
+ private void handle(PresentationContext presentationContext, ServerResponse
serverResponse, ServerInvocation invocation) throws ServerException
+ {
+ try
+ {
+ HttpServletResponse response =
invocation.getServerContext().getClientResponse();
+ if(serverResponse instanceof ShowUIObjectResponse)
+ {
+ ShowUIObjectResponse show = (ShowUIObjectResponse)serverResponse;
+ String targetId = show.getTargetId();
+
+ //Load the objects in the UITree
+ UIObject uiObject = presentationContext.getUIContext().getObject(targetId);
+
+ if(uiObject instanceof UIPage)
+ {
+ //
+ render(invocation, presentationContext, targetId);
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ throw new ServerException(e);
+ }
+ }
+
+ /**
+ *
+ * @param presentationContext
+ * @param targetId
+ */
+ private void render(ServerInvocation invocation,PresentationContext
presentationContext, String targetId)
+ {
+ UIObject uiObject = presentationContext.getUIContext().getObject(targetId);
+
+ //Display the page to the client
+ if(uiObject instanceof UIPage)
+ {
+ UIPage page = (UIPage)uiObject;
+
+ org.jboss.portal.presentation.ajax.client.model.UIPage clientPage = new
org.jboss.portal.presentation.ajax.client.model.UIPage();
+ clientPage.setId(page.getId());
+ clientPage.setName(page.getName());
+ //TODO: set proper status
+ //TODO: set proper parent reference
+
+ List<UIObject> windows = page.getChildren();
+ List clientWindows = new ArrayList();
+ for(int i=0; i<windows.size(); i++)
+ {
+ UIObject cour = windows.get(i);
+ if(cour instanceof UIWindow)
+ {
+ UIWindow window = (UIWindow)cour;
+ try
+ {
+ WindowContent windowContent =
this.presentationServer.render(presentationContext, window);
+
+ org.jboss.portal.presentation.ajax.client.model.UIWindow clientWindow
= new org.jboss.portal.presentation.ajax.client.model.UIWindow();
+
+ clientWindow.setId(window.getId());
+ clientWindow.setName(windowContent.getTitle());
+ clientWindow.setParent(clientPage);
+ //TODO: set proper status
+
+ clientWindow.setContent(windowContent.getMarkup());
+ if(window.getMode() != null)
+ {
+ clientWindow.setMode(window.getMode().toString());
+ }
+ if(window.getWindowState() != null)
+ {
+ clientWindow.setState(window.getWindowState().toString());
+ }
+ //TODO: set proper visibility status
+
+ clientWindows.add(clientWindow);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ clientPage.setChildren(clientWindows);
+
+
invocation.getServerContext().getClientRequest().setAttribute("uiObject",
clientPage);
+ }
+ }
+
+ /**
+ *
+ *
+ */
+ public void start()
+ {
+
+ }
+
+ /**
+ *
+ *
+ */
+ public void stop()
+ {
+
+ }
+
//-----------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ public PresentationServer getPresentationServer()
+ {
+ return presentationServer;
+ }
+
+ /**
+ *
+ * @param presentationServer
+ */
+ public void setPresentationServer(PresentationServer presentationServer)
+ {
+ this.presentationServer = presentationServer;
+ }
+
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ private ServerAction getServerAction(PresentationContext presentationContext,
ServerInvocation invocation)
+ {
+
+ //Just use ViewUIObject command for now until URL interpretation/mapping
+ //to ServiceAction is implemented
+ return new ViewUIObjectAction("/default/default");
+
+ /*ServerInvocationContext invocationContext = invocation.getServerContext();
+ String requestPath = invocation.getServerContext().getPortalRequestPath();
+
+ //
+ if (requestPath.startsWith("/invoke/"))
+ {
+ UIObject target = presentationContext.getUIContext();
+
+ //
+ int from = "/invoke/".length();
+ while (true)
+ {
+ int pos = requestPath.indexOf('/', from);
+ if (pos == -1)
+ {
+ String name = requestPath.substring(from);
+ target = target.getChild(name);
+ break;
+ }
+ else
+ {
+ String name = requestPath.substring(from, pos);
+ target = target.getChild(name);
+ }
+ if (target == null)
+ {
+ break;
+ }
+ from = pos + 1;
+ }
+
+ // I know but it will go away later when we remove dependency on server module
+ WebRequest webReq =
((ServerInvocationContextImpl)invocation.getContext()).getWebRequest();
+
+ //
+ if (target != null)
+ {
+ if ("GET".equals(webReq.getMethod()))
+ {
+ return new GetActivation(target.getId(), webReq.getQueryParameterMap());
+ }
+ else if ("POST".equals(webReq.getMethod()))
+ {
+ return new PostActivation(target.getId(), webReq.getQueryParameterMap(),
webReq.getBody());
+ }
+ }
+ }
+
+
+
+ if(targetPortalObject instanceof UIPage)
+ {
+ serverAction = new ViewUIObjectAction(targetPortalObject.getId());
+ }
+ else if(targetPortalObject instanceof UIWindow)
+ {
+ if(request.getMethod().equals("GET"))
+ {
+ GetActivation get = new GetActivation();
+ get.setUrl(request.getRequestURL().toString());
+ get.setContentType(invocationContext.getMediaType());
+ get.setQueryParameters(invocationContext.getQueryParameterMap());
+ get.setPortal(targetPortal);
+ get.setTarget(targetPortalObject);
+ serverAction = get;
+ }
+ else if(request.getMethod().equals("POST"))
+ {
+ PostActivation post = new PostActivation();
+ post.setUrl(request.getRequestURL().toString());
+ post.setContentType(invocationContext.getMediaType());
+ post.setQueryParameters(invocationContext.getQueryParameterMap());
+ post.setBodyParameters(invocationContext.getBodyParameterMap());
+ post.setPortal(targetPortal);
+ post.setTarget(targetPortalObject);
+ serverAction = post;
+ }
+ }*/
+ }
+}
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -28,10 +28,15 @@
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.server.RequestController;
import org.jboss.portal.server.RequestControllerDispatcher;
+import org.jboss.portal.web.WebRequest;
import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.UIObject;
+import org.jboss.portal.presentation.ajax.client.model.UIPage;
+import org.jboss.portal.presentation.ajax.client.model.UIContext;
+import org.jboss.portal.presentation.ajax.client.model.UIPortal;
+import org.jboss.portal.presentation.ajax.client.model.Page;
+import org.jboss.portal.presentation.ajax.client.model.Window;
import org.jboss.portal.presentation.server.ProcessorResponse;
import com.google.gwt.user.client.rpc.SerializationException;
@@ -48,38 +53,59 @@
{
/** The logger. */
private Logger log = Logger.getLogger(getClass());
-
+
/**
*
*/
-// private EntryPoint entryPoint = null;
+ private RequestControllerFactory controllerFactory = null;
+
+ /** The interceptor stack. */
+ private InterceptorStackFactory interceptorStack = null;
+
+ /**
+ *
+ */
+ private Server portalServer = 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);
-// }
+ try
+ {
+ MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
+
+ //Locate the request controller
+ this.controllerFactory = (RequestControllerFactory)
MBeanProxy.get(RequestControllerFactory.class, new ObjectName(
+ this.getInitParameter("controllerFactoryName")),
+ mbeanServer);
+
+ //Locate the interceptor stack factory
+ this.interceptorStack = (InterceptorStackFactory)
MBeanProxy.get(InterceptorStackFactory.class, new ObjectName(
+ this.getInitParameter("interceptorStackFactoryName")),
+ mbeanServer);
+
+ //Locate the portal server
+ this.portalServer = (Server) MBeanProxy.get(Server.class, new ObjectName(
+ this.getInitParameter("portalServerName")),
+ mbeanServer);
+
+ }
+ catch (Exception e)
+ {
+ this.controllerFactory = null;
+ this.interceptorStack = null;
+ String msg = "Ajax 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);
@@ -90,89 +116,38 @@
}
//
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/**
- * Loads the initial Portal Page at the start of a Portal session
+ * Asynchronously loads the specified object from the server
*
* @return The Initial Portal Page
*/
- public Page loadPortal()
+ public UIObject loadObject(String objectId)
{
try
{
- Page display = null;
+ UIObject uiObject = null;
+
HttpServletRequest request = this.getThreadLocalRequest();
- this.callPortalServer();
- display =
this.getDisplay((ProcessorResponse)request.getAttribute("processorResponse"));
- return display;
+
+ //execute the call on the Portal
+ this.callPortalServer();
+
+ //Setup the initial UIContext for the client session
+ uiObject = (UIObject)request.getAttribute("uiObject");
+
+ return uiObject;
}
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;
-
- //Implement this with the new model
- /*
- org.jboss.portal.presentation.model.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.presentation.model.Window pageWindow =
(org.jboss.portal.presentation.model.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();
@@ -180,27 +155,24 @@
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);
+
+ WebRequest webReq = new WebRequest(req);
- Server server = this.entryPoint.getPortalServer();
-
//
ServerInvocationContext invocationCtx = new ServerInvocationContextImpl(
req,
resp,
+ webReq,
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
+ urlContext
);
//
ServerRequest request = new ServerRequest(invocationCtx);
- request.setServer(server);
+ request.setServer(this.portalServer);
//
ServerResponse response = new ServerResponse(request, invocationCtx);
@@ -210,13 +182,10 @@
invocation.setRequest(request);
invocation.setResponse(response);
- //
- RequestControllerFactory controllerFactory =
this.entryPoint.getControllerFactory();
- RequestController controller =
controllerFactory.createRequestController(invocation);
+ //
+ RequestController controller =
this.controllerFactory.createRequestController(invocation);
invocation.setHandler(new RequestControllerDispatcher(controller));
-
- InterceptorStackFactory stack = this.entryPoint.getInterceptorStackFactory();
- invocation.invoke(stack.getInterceptorStack());
-*/
+
+ invocation.invoke(this.interceptorStack.getInterceptorStack());
}
}
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/HostedModeProxy.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -71,7 +71,7 @@
//Proxy this rpc request over to the Portal server
WebRequest post = new PostMethodWebRequest(
- "http://localhost:8080/portal-uiserver/portalrpc",
+ "http://localhost:8080/presentation/portalrpc",
new ByteArrayInputStream(input.getBytes()),
"text/plain; charset=utf-8"
);
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java 2007-12-13
18:24:13 UTC (rev 9339)
@@ -5,8 +5,8 @@
import javax.servlet.http.HttpServletRequest;
import org.jboss.portal.presentation.ajax.client.PortletService;
-import org.jboss.portal.presentation.ajax.client.protocol.Page;
-import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.model.Page;
+import org.jboss.portal.presentation.ajax.client.model.Window;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
Modified:
branches/presentation/presentation/src/resources/presentation-war/WEB-INF/web.xml
===================================================================
---
branches/presentation/presentation/src/resources/presentation-war/WEB-INF/web.xml 2007-12-12
17:54:17 UTC (rev 9338)
+++
branches/presentation/presentation/src/resources/presentation-war/WEB-INF/web.xml 2007-12-13
18:24:13 UTC (rev 9339)
@@ -27,16 +27,18 @@
"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>
+
<filter-class>org.jboss.portal.presentation.impl.ajax.entry.GWTClientFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GWTClientFilter</filter-name>
- <servlet-name>PortalEntryPoint</servlet-name>
+ <servlet-name>PortalServletWithPathMapping</servlet-name>
</filter-mapping>
- -->
+ <filter-mapping>
+ <filter-name>GWTClientFilter</filter-name>
+ <servlet-name>PortalServletWithDefaultServletMapping</servlet-name>
+ </filter-mapping>
<!-- The portal servlet is the main entrance point -->
<servlet>
@@ -107,17 +109,22 @@
<!-- Asynchronous service request processor -->
<servlet>
<servlet-name>AjaxPortalEntryPoint</servlet-name>
-
<servlet-class>org.jboss.portal.presentation.impl.ajax.entry.PortalEntryPoint</servlet-class>
+
<servlet-class>org.jboss.portal.presentation.impl.ajax.entry.PortalEntryPoint</servlet-class>
<init-param>
- <param-name>asDefaultServlet</param-name>
- <param-value>false</param-value>
- <description>The servlet needs to know wether it is set as a default
servlet or not</description>
+ <param-name>controllerFactoryName</param-name>
+
<param-value>portal:service=ControllerFactory,type=Ajax/Presentation</param-value>
+ <description>The request controller factory for the portal
servlet</description>
</init-param>
<init-param>
- <param-name>entryPointServiceName</param-name>
- <param-value>portal:service=EntryPoint</param-value>
- <description>Entry Point Service</description>
+ <param-name>interceptorStackFactoryName</param-name>
+
<param-value>portal:service=InterceptorStackFactory,type=Server</param-value>
+ <description>The request controller factory for the portal
servlet</description>
</init-param>
+ <init-param>
+ <param-name>portalServerName</param-name>
+ <param-value>portal:service=Server</param-value>
+ <description>The request controller factory for the portal
servlet</description>
+ </init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>