[overlord-commits] Overlord SVN: r855 - in bpm-console/branches/hbraun: gui/war and 12 other directories.

overlord-commits at lists.jboss.org overlord-commits at lists.jboss.org
Mon Oct 26 05:36:03 EDT 2009


Author: heiko.braun at jboss.com
Date: 2009-10-26 05:36:02 -0400 (Mon, 26 Oct 2009)
New Revision: 855

Added:
   bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/common/BaseAction.java
   bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/server/
   bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java
   bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/
   bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/ProcessMgmtService.java
   bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/ProcessMgmtServiceAsync.java
   bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/server/svc/
   bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/server/svc/ProcessMgmtServiceImpl.java
Modified:
   bpm-console/branches/hbraun/BPMC.iws
   bpm-console/branches/hbraun/bpmc-toplevel.iml
   bpm-console/branches/hbraun/gui/war/gui-war.iml
   bpm-console/branches/hbraun/gui/war/pom.xml
   bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
   bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java
   bpm-console/branches/hbraun/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
   bpm-console/branches/hbraun/gui/war/src/main/webapp/WEB-INF/web.xml
   bpm-console/branches/hbraun/server/war/server-war.iml
   bpm-console/branches/hbraun/server/war/src/main/webapp/WEB-INF/web.xml
   bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java
   bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java
Log:
Begin work on GWT RPC integration

Modified: bpm-console/branches/hbraun/BPMC.iws
===================================================================
--- bpm-console/branches/hbraun/BPMC.iws	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/BPMC.iws	2009-10-26 09:36:02 UTC (rev 855)
@@ -144,6 +144,58 @@
         <option name="CONDITION" value="" />
         <option name="LOG_MESSAGE" value="" />
       </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java" line="557" class="org.jboss.bpm.console.server.ProxyServlet" package="org.jboss.bpm.console.server">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java" line="181" class="org.jboss.bpm.console.server.ProxyServlet" package="org.jboss.bpm.console.server">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java" line="159" class="org.jboss.bpm.console.server.ProxyServlet" package="org.jboss.bpm.console.server">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java" line="323" class="org.jboss.bpm.console.server.ProxyServlet" package="org.jboss.bpm.console.server">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
     </line_breakpoints>
     <breakpoint_any>
       <breakpoint>
@@ -217,44 +269,15 @@
   <component name="FileColors" enabled="false" enabledForTabs="false" />
   <component name="FileEditorManager">
     <leaf>
-      <file leaf-file-name="SettingsEditor.java" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java">
+      <file leaf-file-name="pom.xml" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/gui/war/pom.xml">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="123" column="30" selection-start="3747" selection-end="3747" vertical-scroll-proportion="0.48899755">
+            <state line="187" column="37" selection-start="5480" selection-end="5480" vertical-scroll-proportion="0.100250624">
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="console.css" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="337" column="35" selection-start="5200" selection-end="5200" vertical-scroll-proportion="0.6926771">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="ProcessEditor.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="100" column="60" selection-start="3634" selection-end="3669" vertical-scroll-proportion="0.52100843">
-              <folding>
-                <element signature="class#2386:3598" expanded="false" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="PreferencesView.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesView.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state line="40" column="13" selection-start="1690" selection-end="1690" vertical-scroll-proportion="0.15647922">
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
     </leaf>
   </component>
   <component name="FindManager">
@@ -355,6 +378,144 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
+          <option name="myItemId" value="shared-rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="shared-rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="shared-rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="shared-rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org/jboss" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org/jboss/bpm" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org/jboss/bpm/console" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org/jboss/bpm/console/server" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org/jboss/bpm/console/server/svc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="shared-rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org/jboss" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org/jboss/bpm" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/shared/rpc/src/main/java/org/jboss/bpm/console" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
           <option name="myItemId" value="server-war" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
         </PATH_ELEMENT>
@@ -412,6 +573,10 @@
           <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src/main" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src/main/webapp" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -435,6 +600,58 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src/main/webapp" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src/main/webapp/WEB-INF" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="server-war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="server-war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
           <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/server/war/src/main/java" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
@@ -522,6 +739,10 @@
           <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/webapp" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -545,6 +766,58 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/webapp" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/webapp/WEB-INF" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="gui-war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="gui-war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
           <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/resources" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
@@ -617,25 +890,43 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/resources/org" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/resources/jmaki" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/resources/org/jboss" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/resources/jmaki/xhp" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
+      </PATH>
+      <PATH>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/resources/org/jboss/bpm" />
+          <option name="myItemId" value="BPMC.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="gui-war" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/resources/org/jboss/bpm/console" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/resources/org/jboss/bpm/console/public" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -666,6 +957,22 @@
           <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org/jboss" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/server" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -801,7 +1108,7 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/process" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/util" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
       </PATH>
@@ -851,7 +1158,7 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/engine" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/process" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
       </PATH>
@@ -935,6 +1242,7 @@
       <recent name="" />
     </key>
     <key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+      <recent name="org.jboss.bpm.console.server" />
       <recent name="org.jboss.bpm.console.client" />
       <recent name="org.jboss.bpm.console.client.sam" />
       <recent name="org.jboss.bpm.console.client.util" />
@@ -1172,16 +1480,16 @@
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="328" y="52" width="1278" height="980" extended-state="0" />
+    <frame x="357" y="41" width="1284" height="960" extended-state="0" />
     <editor active="true" />
     <layout>
       <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3213995" order="0" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.29392713" order="0" />
       <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39290988" order="1" />
-      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.27420667" order="1" />
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.27376118" order="1" />
       <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32992035" order="8" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
       <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
@@ -1193,7 +1501,7 @@
       <window_info id="Maven" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24818695" order="2" />
       <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39184597" order="4" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3914328" order="4" />
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
       <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32873562" order="8" />
@@ -1280,123 +1588,119 @@
   <component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
     <option name="myLastEditedConfigurable" />
   </component>
-  <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.11111111,0.5" version="1">
+  <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.3805061" version="1">
     <option name="myPlainMode" value="false" />
-    <option name="myLastEditedConfigurable" value="bpmc-toplevel" />
+    <option name="myLastEditedConfigurable" value="M2 Dep: commons-codec:commons-codec:jar:1.2:compile" />
   </component>
   <component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1">
     <option name="myLastEditedConfigurable" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/LoginView.java">
+    <entry file="file://$PROJECT_DIR$/server/war/src/main/webapp/WEB-INF/web.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="125" column="61" selection-start="3887" selection-end="3887" vertical-scroll-proportion="0.9779951">
+        <state line="30" column="53" selection-start="915" selection-end="915" vertical-scroll-proportion="0.05882353">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java">
+    <entry file="file://$PROJECT_DIR$/server/war/pom.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="271" column="38" selection-start="8886" selection-end="8886" vertical-scroll-proportion="0.6393643">
+        <state line="39" column="66" selection-start="1293" selection-end="1293" vertical-scroll-proportion="0.64547676">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="231" column="50" selection-start="7357" selection-end="7357" vertical-scroll-proportion="0.6845966">
+        <state line="37" column="53" selection-start="1583" selection-end="1583" vertical-scroll-proportion="0.15647922">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/common/PagingPanel.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/common/BaseAction.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="121" column="52" selection-start="3130" selection-end="3130" vertical-scroll-proportion="0.62064826">
-          <folding>
-            <element signature="imports" expanded="true" />
-            <element signature="class#2047:2242" expanded="false" />
-            <element signature="class#2363:2547" expanded="false" />
-          </folding>
+        <state line="40" column="3" selection-start="1592" selection-end="1592" vertical-scroll-proportion="0.13565426">
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/task/AbstractTaskList.java">
+    <entry file="jar:///Users/hbraun/.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar!/org/apache/commons/fileupload/FileUploadException.class">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="36" column="22" selection-start="1449" selection-end="1449" vertical-scroll-proportion="0.19207683">
+        <state line="5" column="13" selection-start="167" selection-end="167" vertical-scroll-proportion="0.104575165">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/task/OpenTasksView.java">
+    <entry file="jar:///Users/hbraun/.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar!/org/apache/commons/fileupload/servlet/ServletFileUpload.class">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="209" column="31" selection-start="6845" selection-end="6865" vertical-scroll-proportion="0.41075796">
+        <state line="5" column="13" selection-start="175" selection-end="175" vertical-scroll-proportion="0.18879056">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/task/AssignedTasksView.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="78" column="51" selection-start="3017" selection-end="3017" vertical-scroll-proportion="-2.190709">
+        <state line="37" column="13" selection-start="1514" selection-end="1514" vertical-scroll-proportion="0.1323764">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailView.java">
+    <entry file="file://$PROJECT_DIR$/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="111" column="54" selection-start="3501" selection-end="3501" vertical-scroll-proportion="0.6845966">
+        <state line="83" column="33" selection-start="2822" selection-end="2822" vertical-scroll-proportion="0.7777778">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/engine/JobListView.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="127" column="49" selection-start="4184" selection-end="4184" vertical-scroll-proportion="0.7432763">
-          <folding />
+        <state line="128" column="37" selection-start="4935" selection-end="4935" vertical-scroll-proportion="0.026143791">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/process/InstanceListView.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/jmaki/xhp/XmlHttpProxyServlet.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="46" column="6" selection-start="1992" selection-end="1992" vertical-scroll-proportion="-1.4083129">
+        <state line="335" column="47" selection-start="11825" selection-end="12541" vertical-scroll-proportion="0.8120915">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/process/DefinitionListView.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/resources/jmaki/xhp/xhp.json">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="163" column="30" selection-start="5079" selection-end="5354" vertical-scroll-proportion="0.9608802">
-          <folding>
-            <element signature="method#onChange#0;class#4249:4777" expanded="false" />
-          </folding>
+        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/webapp/WEB-INF/web.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="100" column="60" selection-start="3634" selection-end="3669" vertical-scroll-proportion="0.52100843">
-          <folding>
-            <element signature="class#2386:3598" expanded="false" />
-          </folding>
+        <state line="22" column="21" selection-start="718" selection-end="718" vertical-scroll-proportion="0.5614035">
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/PreferencesView.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="40" column="13" selection-start="1690" selection-end="1690" vertical-scroll-proportion="0.15647922">
+        <state line="57" column="78" selection-start="2646" selection-end="2646" vertical-scroll-proportion="0.784689">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/resources/org/jboss/bpm/console/public/console.css">
+    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="337" column="35" selection-start="5200" selection-end="5200" vertical-scroll-proportion="0.6926771">
-          <folding />
+        <state line="49" column="45" selection-start="2027" selection-end="2027" vertical-scroll-proportion="0.5424837">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java">
+    <entry file="file://$PROJECT_DIR$/gui/war/pom.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="123" column="30" selection-start="3747" selection-end="3747" vertical-scroll-proportion="0.48899755">
+        <state line="187" column="37" selection-start="5480" selection-end="5480" vertical-scroll-proportion="0.100250624">
           <folding />
         </state>
       </provider>

Modified: bpm-console/branches/hbraun/bpmc-toplevel.iml
===================================================================
--- bpm-console/branches/hbraun/bpmc-toplevel.iml	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/bpmc-toplevel.iml	2009-10-26 09:36:02 UTC (rev 855)
@@ -273,15 +273,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: junit:junit:jar:3.8.1:test">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
@@ -365,15 +356,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library" exported="">
-      <library name="M2 Dep: commons-fileupload:commons-fileupload:jar:1.2.1:compile">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
       <library name="M2 Dep: commons-io:commons-io:jar:1.3.2:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar!/" />
@@ -548,6 +530,42 @@
         </SOURCES>
       </library>
     </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-httpclient:commons-httpclient:jar:3.1:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-fileupload:commons-fileupload:jar:1.2.1:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: commons-codec:commons-codec:jar:1.2:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../.m2/repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: bpm-console/branches/hbraun/gui/war/gui-war.iml
===================================================================
--- bpm-console/branches/hbraun/gui/war/gui-war.iml	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/gui/war/gui-war.iml	2009-10-26 09:36:02 UTC (rev 855)
@@ -11,21 +11,10 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="shared-rpc" />
     <orderEntry type="module" module-name="bpmc-toplevel" />
     <orderEntry type="module" module-name="gui-profiles" />
     <orderEntry type="module-library">
-      <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MAVEN_REPOSITORY$/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar!/" />
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
       <library name="M2 Dep: commons-collections:commons-collections:jar:3.2.1:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar!/" />
@@ -35,15 +24,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
       <library name="M2 Dep: junit:junit:jar:3.8.1:test">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
@@ -143,18 +123,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: commons-beanutils:commons-beanutils:jar:1.7.0:provided">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES>
-          <root url="jar://$MAVEN_REPOSITORY$/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar!/" />
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar!/" />
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
       <library name="M2 Dep: commons-configuration:commons-configuration:jar:1.6:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar!/" />
@@ -200,17 +168,74 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
+      <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: commons-beanutils:commons-beanutils:jar:1.7.0:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
       <library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES>
-          <root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
         </SOURCES>
       </library>
     </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: commons-logging:commons-logging:jar:1.1.1:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: commons-fileupload:commons-fileupload:jar:1.2.1:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: commons-httpclient:commons-httpclient:jar:3.1:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: commons-codec:commons-codec:jar:1.2:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: bpm-console/branches/hbraun/gui/war/pom.xml
===================================================================
--- bpm-console/branches/hbraun/gui/war/pom.xml	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/gui/war/pom.xml	2009-10-26 09:36:02 UTC (rev 855)
@@ -115,6 +115,19 @@
     <!-- 3rd party -->
 
     <dependency>
+      <groupId>commons-httpclient</groupId>
+      <artifactId>commons-httpclient</artifactId>
+      <version>3.1</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-fileupload</groupId>
+      <artifactId>commons-fileupload</artifactId>
+      <version>1.2.1</version>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
       <scope>provided</scope>
@@ -172,7 +185,7 @@
             <value>org.jboss.bpm.console.Application</value>
           </compileTargets>
           <runTarget>org.jboss.bpm.console.Application/Application.html</runTarget>
-          <style>DETAILED</style>
+          <!--style>DETAILED</style-->
           <noServer>false</noServer>
           <extraJvmArgs>-Xmx256M -Xms256M</extraJvmArgs>
           <gwtVersion>${gwt.version}</gwtVersion>

Modified: bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java
===================================================================
--- bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/common/AbstractRESTAction.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -29,28 +29,19 @@
 import org.jboss.bpm.console.client.LoadingStatusAction;
 import org.jboss.bpm.console.client.Registry;
 import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.gwt.mosaic.ui.client.MessageBox;
 
 import java.io.IOException;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
-public abstract class AbstractRESTAction implements ActionInterface
-{
-  protected ApplicationContext appContext;
-
-  protected AbstractRESTAction()
-  {
-    this.appContext = Registry.get(ApplicationContext.class);;
-  }
-
-  public abstract String getId();
+public abstract class AbstractRESTAction extends BaseAction
+{  
   public abstract String getUrl(Object event);
   public abstract RequestBuilder.Method getRequestMethod();
   public abstract void handleSuccessfulResponse(final Controller controller, final Object event, Response response);
 
-  public void execute(final Controller controller, final Object object)
+  public void doExecute(final Controller controller, final Object object)
   {
     final String url = getUrl(object);
     RequestBuilder builder = new RequestBuilder(getRequestMethod(), URL.encode(url));
@@ -59,41 +50,33 @@
 
     try
     {
-      controller.handleEvent( LoadingStatusAction.ON );
-
       final Request request = builder.sendRequest(null,
           new RequestCallback()
           {
             public void onError(Request request, Throwable exception) {
               // Couldn't connect to server (could be timeout, SOP violation, etc.)
               handleError(url, exception);
-              controller.handleEvent( LoadingStatusAction.OFF );
             }
 
             public void onResponseReceived(Request request, Response response) {
-              try
+
+              if(response.getText().indexOf("HTTP 401")!=-1) // HACK
               {
-                if(response.getText().indexOf("HTTP 401")!=-1) // HACK
-                {
-                  appContext.getAuthentication().handleSessionTimeout();
-                }
-                else if (200 == response.getStatusCode())
-                {
-                  handleSuccessfulResponse(controller, object, response);
-                }
-                else
-                {
-                  final String msg = response.getText().equals("") ? "Unknown error" : response.getText();
-                  handleError(
-                      url,
-                      new RequestException("HTTP "+ response.getStatusCode()+ ": " + msg)
-                  );
-                }
+                appContext.getAuthentication().handleSessionTimeout();
               }
-              finally
+              else if (200 == response.getStatusCode())
               {
-                controller.handleEvent( LoadingStatusAction.OFF );
+                handleSuccessfulResponse(controller, object, response);
               }
+              else
+              {
+                final String msg = response.getText().equals("") ? "Unknown error" : response.getText();
+                handleError(
+                    url,
+                    new RequestException("HTTP "+ response.getStatusCode()+ ": " + msg)
+                );
+              }
+
             }
           }
       );
@@ -121,22 +104,7 @@
     {
       // Couldn't connect to server
       handleError(url, e);
-      controller.handleEvent( LoadingStatusAction.OFF );
     }
   }
 
-  protected void handleError(String url, Throwable t)
-  {
-    final String out =
-        "<ul>"+
-            "<li>URL: '" + url + "'\n"+
-            "<li>Action: '" + getId() + "'\n" +
-            "<li>Exception: '" + t.getClass() +"'"+
-            "</ul>\n\n"+
-            t.getMessage();
-
-    ConsoleLog.error(out, t);
-    appContext.displayMessage(out, true);
-
-  }
 }

Added: bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/common/BaseAction.java
===================================================================
--- bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/common/BaseAction.java	                        (rev 0)
+++ bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/common/BaseAction.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.client.common;
+
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.LoadingStatusAction;
+import org.jboss.bpm.console.client.Registry;
+import com.mvc4g.client.ActionInterface;
+import com.mvc4g.client.Controller;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public abstract class BaseAction implements ActionInterface
+{
+  protected ApplicationContext appContext;
+
+  public abstract String getId();
+
+  protected BaseAction()
+  {  
+    this.appContext = Registry.get(ApplicationContext.class);
+  }
+
+  protected void handleError(String url, Throwable t)
+  {
+    final String out =
+        "<ul>"+
+            "<li>URL: '" + url + "'\n"+
+            "<li>Action: '" + getId() + "'\n" +
+            "<li>Exception: '" + t.getClass() +"'"+
+            "</ul>\n\n"+
+            t.getMessage();
+
+    ConsoleLog.error(out, t);
+    appContext.displayMessage(out, true);
+
+  }
+
+
+  public void execute(Controller controller, Object object)
+  {
+    try
+    {
+      controller.handleEvent( LoadingStatusAction.ON );
+      doExecute(controller, object);
+    }
+    catch(Throwable t)
+    {
+      handleError(getId(), t);
+    }
+    finally
+    {
+      controller.handleEvent( LoadingStatusAction.OFF );
+    }
+  }
+
+  protected abstract void doExecute(Controller controller, Object object);
+}

Modified: bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java
===================================================================
--- bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/client/process/UpdateDefinitionsAction.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -21,16 +21,14 @@
  */
 package org.jboss.bpm.console.client.process;
 
-import com.google.gwt.http.client.RequestBuilder;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.json.client.JSONParser;
-import com.google.gwt.json.client.JSONValue;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
 import com.mvc4g.client.Controller;
-import org.jboss.bpm.console.client.ApplicationContext;
-import org.jboss.bpm.console.client.URLBuilder;
-import org.jboss.bpm.console.client.common.AbstractRESTAction;
-import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.common.BaseAction;
 import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.svc.ProcessMgmtService;
+import org.jboss.bpm.console.client.model.svc.ProcessMgmtServiceAsync;
 import org.jboss.bpm.console.client.util.ConsoleLog;
 
 import java.util.List;
@@ -41,39 +39,44 @@
  *
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
-public class UpdateDefinitionsAction extends AbstractRESTAction
+public class UpdateDefinitionsAction extends BaseAction
 {
   public final static String ID = UpdateDefinitionsAction.class.getName();
 
-  public String getId()
-  {
-    return ID;
-  }
+  private ProcessMgmtServiceAsync svc;
 
-  public String getUrl(Object event)
+  public UpdateDefinitionsAction()
   {
-    return URLBuilder.getInstance().getProcessDefinitionsURL();
+    svc = GWT.create(ProcessMgmtService.class);
+    String s = "http://localhost:8888/org.jboss.bpm.console.Application/proxy/rpc/rpcProcess";//appContext.getConfig().getConsoleServerUrl() + "/rpcProcess";
+    ConsoleLog.debug("RPC "+s);
+    ((ServiceDefTarget) svc).setServiceEntryPoint(s);
   }
 
-  public RequestBuilder.Method getRequestMethod()
+  public String getId()
   {
-    return RequestBuilder.GET;
+    return ID;
   }
 
-  public void handleSuccessfulResponse(final Controller controller, final Object event, Response response)
+  protected void doExecute(final Controller controller, final Object object)
   {
-    long start = System.currentTimeMillis();
+    svc.getProcessDefinitions(
+        new AsyncCallback<List<ProcessDefinitionRef>>()
+        {
+          public void onFailure(Throwable throwable)
+          {
+            handleError(getId(), throwable);
+          }
 
-    DefinitionListView view = (DefinitionListView) controller.getView(DefinitionListView.ID);
-    if(view!=null) // may not be initialized (lazy)
-    {
-      JSONValue json = JSONParser.parse(response.getText());
-      List<ProcessDefinitionRef> definitions = DTOParser.parseProcessDefinitions(json);
+          public void onSuccess(List<ProcessDefinitionRef> processDefinitionRefs)
+          {
+            long start = System.currentTimeMillis();
+            DefinitionListView view = (DefinitionListView) controller.getView(DefinitionListView.ID);
+            view.update(processDefinitionRefs);
+            ConsoleLog.info("Loaded " + processDefinitionRefs.size() + " process definitions in " +(System.currentTimeMillis()-start)+" ms");
+          }
+        }
+    );
 
-      view.update(definitions);
-      
-      ConsoleLog.info("Loaded " + definitions.size() + " process definitions in " +(System.currentTimeMillis()-start)+" ms");
-
-    }
   }
 }

Added: bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java
===================================================================
--- bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java	                        (rev 0)
+++ bpm-console/branches/hbraun/gui/war/src/main/java/org/jboss/bpm/console/server/ProxyServlet.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -0,0 +1,643 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.server;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.GZIPInputStream;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.NameValuePair;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.commons.httpclient.methods.multipart.ByteArrayPartSource;
+import org.apache.commons.httpclient.methods.multipart.FilePart;
+import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
+import org.apache.commons.httpclient.methods.multipart.Part;
+import org.apache.commons.httpclient.methods.multipart.StringPart;
+
+/**
+ * ProxyServlet from http://edwardstx.net/wiki/attach/HttpProxyServlet/ProxyServlet.java
+ * (This seems to be a derivative of Noodle -- http://noodle.tigris.org/)
+ *
+ * Patched to skip "Transfer-Encoding: chunked" headers, avoid double slashes
+ * in proxied URLs, handle GZip and allow GWT RPC.
+ */
+public class ProxyServlet extends HttpServlet {
+
+  private static final int FOUR_KB = 4196;
+
+  /**
+   * Serialization UID.
+   */
+  private static final long serialVersionUID = 1L;
+  /**
+   * Key for redirect location header.
+   */
+  private static final String STRING_LOCATION_HEADER = "Location";
+  /**
+   * Key for content type header.
+   */
+  private static final String STRING_CONTENT_TYPE_HEADER_NAME = "Content-Type";
+  /**
+   * Key for content length header.
+   */
+  private static final String STRING_CONTENT_LENGTH_HEADER_NAME = "Content-Length";
+  /**
+   * Key for host header
+   */
+  private static final String STRING_HOST_HEADER_NAME = "Host";
+  /**
+   * The directory to use to temporarily store uploaded files
+   */
+  private static final File FILE_UPLOAD_TEMP_DIRECTORY = new File(System.getProperty("java.io.tmpdir"));
+
+  // Proxy host params
+  /**
+   * The host to which we are proxying requests. Default value is "localhost".
+   */
+  private String stringProxyHost = "localhost";
+  /**
+   * The port on the proxy host to wihch we are proxying requests. Default value is 80.
+   */
+  private int intProxyPort = 8080;
+  /**
+   * The (optional) path on the proxy host to which we are proxying requests. 
+   * Default value is "".
+   */
+  private String stringProxyPath = "";
+  /**
+   * Setting that allows removing the initial path from client.
+   * Allows specifying /twitter/* as synonym for twitter.com.
+   */
+  private boolean removePrefix;
+  /**
+   * The maximum size for uploaded files in bytes. Default value is 5MB.
+   */
+  private int intMaxFileUploadSize = 5 * 1024 * 1024;
+  private boolean isSecure;
+  private boolean followRedirects;
+
+  /**
+   * Initialize the <code>ProxyServlet</code>
+   * @param servletConfig The Servlet configuration passed in by the servlet container
+   */
+  public void init(ServletConfig servletConfig) {
+    // Get the proxy host
+    String stringProxyHostNew = servletConfig.getInitParameter("proxyHost");
+    if (stringProxyHostNew != null && stringProxyHostNew.length() > 0) {
+      this.setProxyHost(stringProxyHostNew);      
+    }
+    // Get the proxy port if specified
+    String stringProxyPortNew = servletConfig.getInitParameter("proxyPort");
+    if (stringProxyPortNew != null && stringProxyPortNew.length() > 0) {
+      this.setProxyPort(Integer.parseInt(stringProxyPortNew));
+    }
+    // Get the proxy path if specified
+    String stringProxyPathNew = servletConfig.getInitParameter("proxyPath");
+    if (stringProxyPathNew != null && stringProxyPathNew.length() > 0) {
+      this.setProxyPath(stringProxyPathNew);
+    }
+    // Get the maximum file upload size if specified
+    String stringMaxFileUploadSize = servletConfig.getInitParameter("maxFileUploadSize");
+    if (stringMaxFileUploadSize != null && stringMaxFileUploadSize.length() > 0) {
+      this.setMaxFileUploadSize(Integer.parseInt(stringMaxFileUploadSize));
+    }
+  }
+
+  /**
+   * Performs an HTTP GET request
+   * @param httpServletRequest The {@link HttpServletRequest} object passed
+   *                            in by the servlet engine representing the
+   *                            client request to be proxied
+   * @param httpServletResponse The {@link HttpServletResponse} object by which
+   *                             we can send a proxied response to the client
+   */
+  public void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
+      throws IOException, ServletException {
+    // Create a GET request
+    String destinationUrl = this.getProxyURL(httpServletRequest);
+    debug("GET Request URL: " + httpServletRequest.getRequestURL(),
+        "Destination URL: " + destinationUrl);
+    GetMethod getMethodProxyRequest = new GetMethod(destinationUrl);
+    // Forward the request headers
+    setProxyRequestHeaders(httpServletRequest, getMethodProxyRequest);
+    setProxyRequestCookies(httpServletRequest, getMethodProxyRequest);
+    // Execute the proxy request
+    this.executeProxyRequest(getMethodProxyRequest, httpServletRequest, httpServletResponse);
+  }
+
+  /**
+   * Performs an HTTP POST request
+   * @param httpServletRequest The {@link HttpServletRequest} object passed
+   *                            in by the servlet engine representing the
+   *                            client request to be proxied
+   * @param httpServletResponse The {@link HttpServletResponse} object by which
+   *                             we can send a proxied response to the client
+   */
+  public void doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
+      throws IOException, ServletException {
+    // Create a standard POST request
+    String contentType = httpServletRequest.getContentType();
+    String destinationUrl = this.getProxyURL(httpServletRequest);
+    debug("POST Request URL: " + httpServletRequest.getRequestURL(),
+        "    Content Type: " + contentType,
+        " Destination URL: " + destinationUrl);
+    PostMethod postMethodProxyRequest = new PostMethod(destinationUrl);
+    // Forward the request headers
+    setProxyRequestHeaders(httpServletRequest, postMethodProxyRequest);
+    setProxyRequestCookies(httpServletRequest, postMethodProxyRequest);
+    // Check if this is a mulitpart (file upload) POST
+    if (ServletFileUpload.isMultipartContent(httpServletRequest)) {
+      this.handleMultipartPost(postMethodProxyRequest, httpServletRequest);
+    } else {
+      if (contentType == null || PostMethod.FORM_URL_ENCODED_CONTENT_TYPE.equals(contentType)) {
+        this.handleStandardPost(postMethodProxyRequest, httpServletRequest);
+      } else {
+        this.handleContentPost(postMethodProxyRequest, httpServletRequest);
+      }
+    }
+    // Execute the proxy request
+    this.executeProxyRequest(postMethodProxyRequest, httpServletRequest, httpServletResponse);
+  }
+
+  /**
+   * Sets up the given {@link PostMethod} to send the same multipart POST
+   * data as was sent in the given {@link HttpServletRequest}
+   * @param postMethodProxyRequest The {@link PostMethod} that we are
+   *                                configuring to send a multipart POST request
+   * @param httpServletRequest The {@link HttpServletRequest} that contains
+   *                            the mutlipart POST data to be sent via the {@link PostMethod}
+   */
+  @SuppressWarnings("unchecked")
+  private void handleMultipartPost(PostMethod postMethodProxyRequest, HttpServletRequest httpServletRequest)
+      throws ServletException {
+    // Create a factory for disk-based file items
+    DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory();
+    // Set factory constraints
+    diskFileItemFactory.setSizeThreshold(this.getMaxFileUploadSize());
+    diskFileItemFactory.setRepository(FILE_UPLOAD_TEMP_DIRECTORY);
+    // Create a new file upload handler
+    ServletFileUpload servletFileUpload = new ServletFileUpload(diskFileItemFactory);
+    // Parse the request
+    try {
+      // Get the multipart items as a list
+      List<FileItem> listFileItems = (List<FileItem>) servletFileUpload.parseRequest(httpServletRequest);
+      // Create a list to hold all of the parts
+      List<Part> listParts = new ArrayList<Part>();
+      // Iterate the multipart items list
+      for (FileItem fileItemCurrent : listFileItems) {
+        // If the current item is a form field, then create a string part
+        if (fileItemCurrent.isFormField()) {
+          StringPart stringPart = new StringPart(
+              fileItemCurrent.getFieldName(), // The field name
+              fileItemCurrent.getString() // The field value
+          );
+          // Add the part to the list
+          listParts.add(stringPart);
+        } else {
+          // The item is a file upload, so we create a FilePart
+          FilePart filePart = new FilePart(
+              fileItemCurrent.getFieldName(), // The field name
+              new ByteArrayPartSource(
+                  fileItemCurrent.getName(), // The uploaded file name
+                  fileItemCurrent.get() // The uploaded file contents
+              ));
+          // Add the part to the list
+          listParts.add(filePart);
+        }
+      }
+      MultipartRequestEntity multipartRequestEntity = new MultipartRequestEntity(
+          listParts.toArray(new Part[]{}),
+          postMethodProxyRequest.getParams());
+      postMethodProxyRequest.setRequestEntity(multipartRequestEntity);
+      // The current content-type header (received from the client) IS of
+      // type "multipart/form-data", but the content-type header also
+      // contains the chunk boundary string of the chunks. Currently, this
+      // header is using the boundary of the client request, since we
+      // blindly copied all headers from the client request to the proxy
+      // request. However, we are creating a new request with a new chunk
+      // boundary string, so it is necessary that we re-set the
+      // content-type string to reflect the new chunk boundary string
+      postMethodProxyRequest.setRequestHeader(STRING_CONTENT_TYPE_HEADER_NAME, multipartRequestEntity.getContentType());
+    } catch (FileUploadException fileUploadException) {
+      throw new ServletException(fileUploadException);
+    }
+  }
+
+  /**
+   * Sets up the given {@link PostMethod} to send the same standard POST
+   * data as was sent in the given {@link HttpServletRequest}
+   * @param postMethodProxyRequest The {@link PostMethod} that we are
+   *                                configuring to send a standard POST request
+   * @param httpServletRequest The {@link HttpServletRequest} that contains
+   *                            the POST data to be sent via the {@link PostMethod}
+   */
+  @SuppressWarnings("unchecked")
+  private void handleStandardPost(PostMethod postMethodProxyRequest, HttpServletRequest httpServletRequest) {
+    // Get the client POST data as a Map
+    Map<String, String[]> mapPostParameters = (Map<String, String[]>) httpServletRequest.getParameterMap();
+    // Create a List to hold the NameValuePairs to be passed to the PostMethod
+    List<NameValuePair> listNameValuePairs = new ArrayList<NameValuePair>();
+    // Iterate the parameter names
+    for (String stringParameterName : mapPostParameters.keySet()) {
+      // Iterate the values for each parameter name
+      String[] stringArrayParameterValues = mapPostParameters.get(stringParameterName);
+      for (String stringParamterValue : stringArrayParameterValues) {
+        // Create a NameValuePair and store in list
+        NameValuePair nameValuePair = new NameValuePair(stringParameterName, stringParamterValue);
+        listNameValuePairs.add(nameValuePair);
+      }
+    }
+    // Set the proxy request POST data
+    postMethodProxyRequest.setRequestBody(listNameValuePairs.toArray(new NameValuePair[]{}));
+  }
+
+  /**
+   * Sets up the given {@link PostMethod} to send the same content POST
+   * data (JSON, XML, etc.) as was sent in the given {@link HttpServletRequest}
+   * @param postMethodProxyRequest The {@link PostMethod} that we are
+   *                                configuring to send a standard POST request
+   * @param httpServletRequest The {@link HttpServletRequest} that contains
+   *                            the POST data to be sent via the {@link PostMethod}
+   */
+  private void handleContentPost(PostMethod postMethodProxyRequest, HttpServletRequest httpServletRequest) throws IOException, ServletException {
+    StringBuilder content = new StringBuilder();
+    BufferedReader reader = httpServletRequest.getReader();
+    for (;;) {
+      String line = reader.readLine();
+      if (line == null) break;
+      content.append(line);
+    }
+
+    String contentType = httpServletRequest.getContentType();
+    String postContent = content.toString();
+
+    if (contentType.startsWith("text/x-gwt-rpc")) {
+      String clientHost = httpServletRequest.getLocalName();
+      if (clientHost.equals("127.0.0.1")) {
+        clientHost = "localhost";
+      }
+
+      int clientPort = httpServletRequest.getLocalPort();
+      String clientUrl = clientHost + ((clientPort != 80) ? ":" + clientPort : "");
+      String serverUrl = stringProxyHost + ((intProxyPort != 80) ? ":" + intProxyPort : "") + httpServletRequest.getServletPath();
+      //debug("Replacing client (" + clientUrl + ") with server (" + serverUrl + ")");
+      postContent = postContent.replace(clientUrl , serverUrl);
+    }
+
+    String encoding = httpServletRequest.getCharacterEncoding();
+    debug("POST Content Type: " + contentType + " Encoding: " + encoding,
+        "Content: " + postContent);
+    StringRequestEntity entity;
+    try {
+      entity = new StringRequestEntity(postContent, contentType, encoding);
+    } catch (UnsupportedEncodingException e) {
+      throw new ServletException(e);
+    }
+    // Set the proxy request POST data
+    postMethodProxyRequest.setRequestEntity(entity);
+  }
+
+  /**
+   * Executes the {@link HttpMethod} passed in and sends the proxy response
+   * back to the client via the given {@link HttpServletResponse}
+   * @param httpMethodProxyRequest An object representing the proxy request to be made
+   * @param httpServletResponse An object by which we can send the proxied
+   *                             response back to the client
+   * @throws IOException Can be thrown by the {@link HttpClient}.executeMethod
+   * @throws ServletException Can be thrown to indicate that another error has occurred
+   */
+  private void executeProxyRequest(
+      HttpMethod httpMethodProxyRequest,
+      HttpServletRequest httpServletRequest,
+      HttpServletResponse httpServletResponse)
+      throws IOException, ServletException {
+    // Create a default HttpClient
+    HttpClient httpClient = new HttpClient();
+    httpMethodProxyRequest.setFollowRedirects(false);
+    // Execute the request
+    int intProxyResponseCode = httpClient.executeMethod(httpMethodProxyRequest);
+    String response = httpMethodProxyRequest.getResponseBodyAsString();
+
+    // Check if the proxy response is a redirect
+    // The following code is adapted from org.tigris.noodle.filters.CheckForRedirect
+    // Hooray for open source software
+    if (intProxyResponseCode >= HttpServletResponse.SC_MULTIPLE_CHOICES /* 300 */ && intProxyResponseCode < HttpServletResponse.SC_NOT_MODIFIED /* 304 */) {
+      String stringStatusCode = Integer.toString(intProxyResponseCode);
+      String stringLocation = httpMethodProxyRequest.getResponseHeader(STRING_LOCATION_HEADER).getValue();
+      if (stringLocation == null) {
+        throw new ServletException("Received status code: " + stringStatusCode + " but no " + STRING_LOCATION_HEADER + " header was found in the response");
+      }
+      // Modify the redirect to go to this proxy servlet rather that the proxied host
+      String stringMyHostName = httpServletRequest.getServerName();
+      if (httpServletRequest.getServerPort() != 80) {
+        stringMyHostName += ":" + httpServletRequest.getServerPort();
+      }
+      stringMyHostName += httpServletRequest.getContextPath();
+      if (followRedirects) {
+        if (stringLocation.contains("jsessionid")) {
+          Cookie cookie = new Cookie("JSESSIONID", stringLocation.substring(stringLocation.indexOf("jsessionid=") + 11));
+          cookie.setPath("/");
+          httpServletResponse.addCookie(cookie);
+          //debug("redirecting: set jessionid (" + cookie.getValue() + ") cookie from URL");
+        } else if (httpMethodProxyRequest.getResponseHeader("Set-Cookie") != null) {
+          Header header = httpMethodProxyRequest.getResponseHeader("Set-Cookie");
+          String[] cookieDetails = header.getValue().split(";");
+          String[] nameValue = cookieDetails[0].split("=");
+
+          Cookie cookie = new Cookie(nameValue[0], nameValue[1]);
+          cookie.setPath("/");
+          //debug("redirecting: setting cookie: " + cookie.getName() + ":" + cookie.getValue() + " on " + cookie.getPath());
+          httpServletResponse.addCookie(cookie);
+        }
+        httpServletResponse.sendRedirect(stringLocation.replace(getProxyHostAndPort() + this.getProxyPath(), stringMyHostName));
+        return;
+      }
+    } else if (intProxyResponseCode == HttpServletResponse.SC_NOT_MODIFIED) {
+      // 304 needs special handling.  See:
+      // http://www.ics.uci.edu/pub/ietf/http/rfc1945.html#Code304
+      // We get a 304 whenever passed an 'If-Modified-Since'
+      // header and the data on disk has not changed; server
+      // responds w/ a 304 saying I'm not going to send the
+      // body because the file has not changed.
+      httpServletResponse.setIntHeader(STRING_CONTENT_LENGTH_HEADER_NAME, 0);
+      httpServletResponse.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
+      return;
+    }
+
+    // Pass the response code back to the client
+    httpServletResponse.setStatus(intProxyResponseCode);
+
+    // Pass response headers back to the client
+    Header[] headerArrayResponse = httpMethodProxyRequest.getResponseHeaders();
+    for (Header header : headerArrayResponse) {
+      if (header.getName().equals("Transfer-Encoding") && header.getValue().equals("chunked") ||
+          header.getName().equals("Content-Encoding") && header.getValue().equals("gzip") || // don't copy gzip header
+          header.getName().equals("WWW-Authenticate")) { // don't copy WWW-Authenticate header so browser doesn't prompt on failed basic auth
+        // proxy servlet does not support chunked encoding
+      } else {
+        httpServletResponse.setHeader(header.getName(), header.getValue());
+      }
+    }
+
+    List<Header> responseHeaders = Arrays.asList(headerArrayResponse);
+
+    if (isBodyParameterGzipped(responseHeaders)) {
+      debug("GZipped: true");
+      if (!followRedirects && intProxyResponseCode == HttpServletResponse.SC_MOVED_TEMPORARILY) {
+        response = httpMethodProxyRequest.getResponseHeader(STRING_LOCATION_HEADER).getValue();
+        httpServletResponse.setStatus(HttpServletResponse.SC_OK);
+        intProxyResponseCode = HttpServletResponse.SC_OK;
+        httpServletResponse.setHeader(STRING_LOCATION_HEADER, response);
+      } else {
+        response = new String(ungzip(httpMethodProxyRequest.getResponseBody()));
+      }
+      httpServletResponse.setContentLength(response.length());
+    }
+
+    // Send the content to the client
+    debug("Received status code: " + intProxyResponseCode,
+        "Response: " + response);
+
+    httpServletResponse.getWriter().write(response);
+  }
+
+
+  /**
+   * The response body will be assumed to be gzipped if the GZIP header has been set.
+   *
+   * @param responseHeaders of response headers
+   * @return true if the body is gzipped
+   */
+  private boolean isBodyParameterGzipped(List<Header> responseHeaders) {
+    for (Header header : responseHeaders) {
+      if (header.getValue().equals("gzip")) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /**
+   * A highly performant ungzip implementation. Do not refactor this without taking new timings.
+   * See ElementTest in ehcache for timings
+   *
+   * @param gzipped the gzipped content
+   * @return an ungzipped byte[]
+   * @throws java.io.IOException when something bad happens
+   */
+  private byte[] ungzip(final byte[] gzipped) throws IOException {
+    final GZIPInputStream inputStream = new GZIPInputStream(new ByteArrayInputStream(gzipped));
+    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(gzipped.length);
+    final byte[] buffer = new byte[FOUR_KB];
+    int bytesRead = 0;
+    while (bytesRead != -1) {
+      bytesRead = inputStream.read(buffer, 0, FOUR_KB);
+      if (bytesRead != -1) {
+        byteArrayOutputStream.write(buffer, 0, bytesRead);
+      }
+    }
+    byte[] ungzipped = byteArrayOutputStream.toByteArray();
+    inputStream.close();
+    byteArrayOutputStream.close();
+    return ungzipped;
+  }
+
+  public String getServletInfo() {
+    return "GWT Proxy Servlet";
+  }
+
+  /**
+   * Retrieves all of the headers from the servlet request and sets them on
+   * the proxy request
+   *
+   * @param httpServletRequest The request object representing the client's
+   *                            request to the servlet engine
+   * @param httpMethodProxyRequest The request that we are about to send to
+   *                                the proxy host
+   */
+  @SuppressWarnings("unchecked")
+  private void setProxyRequestHeaders(HttpServletRequest httpServletRequest, HttpMethod httpMethodProxyRequest) {
+    // Get an Enumeration of all of the header names sent by the client
+    Enumeration enumerationOfHeaderNames = httpServletRequest.getHeaderNames();
+    while (enumerationOfHeaderNames.hasMoreElements()) {
+      String stringHeaderName = (String) enumerationOfHeaderNames.nextElement();
+      if (stringHeaderName.equalsIgnoreCase(STRING_CONTENT_LENGTH_HEADER_NAME)) {
+        continue;
+      }
+      // As per the Java Servlet API 2.5 documentation:
+      //		Some headers, such as Accept-Language can be sent by clients
+      //		as several headers each with a different value rather than
+      //		sending the header as a comma separated list.
+      // Thus, we get an Enumeration of the header values sent by the client
+      Enumeration enumerationOfHeaderValues = httpServletRequest.getHeaders(stringHeaderName);
+      while (enumerationOfHeaderValues.hasMoreElements()) {
+        String stringHeaderValue = (String) enumerationOfHeaderValues.nextElement();
+        // In case the proxy host is running multiple virtual servers,
+        // rewrite the Host header to ensure that we get content from
+        // the correct virtual server
+        if (stringHeaderName.equalsIgnoreCase(STRING_HOST_HEADER_NAME)) {
+          stringHeaderValue = getProxyHostAndPort();
+        }
+        Header header = new Header(stringHeaderName, stringHeaderValue);
+        // Set the same header on the proxy request
+        httpMethodProxyRequest.setRequestHeader(header);
+      }
+    }
+  }
+
+  /**
+   * Retrieves all of the cookies from the servlet request and sets them on
+   * the proxy request
+   *
+   * @param httpServletRequest The request object representing the client's
+   *                            request to the servlet engine
+   * @param httpMethodProxyRequest The request that we are about to send to
+   *                                the proxy host
+   */
+  @SuppressWarnings("unchecked")
+  private void setProxyRequestCookies(HttpServletRequest httpServletRequest, HttpMethod httpMethodProxyRequest) {
+    // Get an array of all of all the cookies sent by the client
+    Cookie[] cookies = httpServletRequest.getCookies();
+    if (cookies == null) {
+      return;
+    }
+
+    for (Cookie cookie : cookies) {
+      cookie.setDomain(stringProxyHost);
+      cookie.setPath(httpServletRequest.getServletPath());
+      httpMethodProxyRequest.setRequestHeader("Cookie", cookie.getName() + "=" + cookie.getValue() + "; Path=" + cookie.getPath());
+    }
+  }
+
+  // Accessors
+  private String getProxyURL(HttpServletRequest httpServletRequest) {
+    // Set the protocol to HTTP
+    String protocol = (isSecure) ? "https://" : "http://";
+    String stringProxyURL = protocol + this.getProxyHostAndPort();
+
+    // simply use whatever servlet path that was part of the request
+    // as opposed to getting a preset/configurable proxy path
+    if (!removePrefix) {
+      stringProxyURL += httpServletRequest.getServletPath();
+    }
+    stringProxyURL += "/";
+
+    // Handle the path given to the servlet
+    String pathInfo = httpServletRequest.getPathInfo();
+    if (pathInfo != null && pathInfo.startsWith("/")) {
+      if (stringProxyURL != null && stringProxyURL.endsWith("/")) {
+        // avoid double '/'
+        stringProxyURL += pathInfo.substring(1);
+      }
+    } else {
+      stringProxyURL += httpServletRequest.getPathInfo();
+    }
+    // Handle the query string
+    if (httpServletRequest.getQueryString() != null) {
+      stringProxyURL += "?" + httpServletRequest.getQueryString();
+    }
+
+    return stringProxyURL;
+  }
+
+  private String getProxyHostAndPort() {
+    if (this.getProxyPort() == 80) {
+      return this.getProxyHost();
+    } else {
+      return this.getProxyHost() + ":" + this.getProxyPort();
+    }
+  }
+
+  protected String getProxyHost() {
+    return this.stringProxyHost;
+  }
+
+  protected void setProxyHost(String stringProxyHostNew) {
+    this.stringProxyHost = stringProxyHostNew;
+  }
+
+  protected int getProxyPort() {
+    return this.intProxyPort;
+  }
+
+  protected void setSecure(boolean secure) {
+    this.isSecure = secure;
+  }
+
+  protected void setFollowRedirects(boolean followRedirects) {
+    this.followRedirects = followRedirects;
+  }
+
+  protected void setProxyPort(int intProxyPortNew) {
+    this.intProxyPort = intProxyPortNew;
+  }
+
+  protected String getProxyPath() {
+    return this.stringProxyPath;
+  }
+
+  protected void setProxyPath(String stringProxyPathNew) {
+    this.stringProxyPath = stringProxyPathNew;
+  }
+
+  protected void setRemovePrefix(boolean removePrefix) {
+    this.removePrefix = removePrefix;
+  }
+
+  protected int getMaxFileUploadSize() {
+    return this.intMaxFileUploadSize;
+  }
+
+  protected void setMaxFileUploadSize(int intMaxFileUploadSizeNew) {
+    this.intMaxFileUploadSize = intMaxFileUploadSizeNew;
+  }
+
+  private void debug(String ... msg) {
+    for (String m : msg) {
+      System.out.println("[DEBUG] " + m);
+    }
+  }
+}
\ No newline at end of file

Modified: bpm-console/branches/hbraun/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
===================================================================
--- bpm-console/branches/hbraun/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/gui/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml	2009-10-26 09:36:02 UTC (rev 855)
@@ -55,7 +55,9 @@
   <entry-point class="org.jboss.bpm.console.client.Application" />
 
   <servlet path="/xhp" class="jmaki.xhp.XmlHttpProxyServlet"/>
-
+  <servlet path="/proxy" class="org.jboss.bpm.console.server.ProxyServlet"/>
+  <servlet path="/rpcProcess" class="org.jboss.bpm.console.server.svc.ProcessMgmtServiceImpl" />
+  
   <!-- Specify a css to load into your gwt application -->
   <stylesheet src='console.css' />
 

Modified: bpm-console/branches/hbraun/gui/war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- bpm-console/branches/hbraun/gui/war/src/main/webapp/WEB-INF/web.xml	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/gui/war/src/main/webapp/WEB-INF/web.xml	2009-10-26 09:36:02 UTC (rev 855)
@@ -1,23 +1,25 @@
 <!DOCTYPE web-app PUBLIC
-  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
-  "http://java.sun.com/dtd/web-app_2_3.dtd" >
+    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+    "http://java.sun.com/dtd/web-app_2_3.dtd" >
 
 <web-app>
-   <display-name>Archetype Created Web Application</display-name>
+  <display-name>BPM Console</display-name>
 
-   <!--servlet>
-      <servlet-name>com.jsos.httpproxy.HttpProxyServlet/org.jboss.bpm.console.Application/proxy</servlet-name>
-      <servlet-class>com.jsos.httpproxy.HttpProxyServlet</servlet-class>
-      <init-param>
-         <param-name>host</param-name>
-         <param-value>http://localhost:8080/</param-value>
-      </init-param>
-   </servlet>
+  <!--servlet>
+    <servlet-name>proxy</servlet-name>
+    <servlet-class>org.jboss.bpm.console.server.ProxyServlet</servlet-class>
+    <init-param>
+      <param-name>proxyHost</param-name>
+      <param-value>localhost</param-value>
+    </init-param>
+    <init-param>
+      <param-name>proxyPort</param-name>
+      <param-value>8080</param-value>
+    </init-param>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>proxy</servlet-name>
+    <url-pattern>/org.jboss.bpm.console.Application/proxy</url-pattern>
+  </servlet-mapping-->
 
-   <servlet-mapping>
-      <servlet-name>com.jsos.httpproxy.HttpProxyServlet/org.jboss.bpm.console.Application/proxy</servlet-name>
-      <url-pattern>/org.jboss.bpm.console.Application/proxy</url-pattern>
-   </servlet-mapping-->
-
-
 </web-app>
\ No newline at end of file

Modified: bpm-console/branches/hbraun/server/war/server-war.iml
===================================================================
--- bpm-console/branches/hbraun/server/war/server-war.iml	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/server/war/server-war.iml	2009-10-26 09:36:02 UTC (rev 855)
@@ -10,6 +10,7 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="shared-rpc" />
     <orderEntry type="module" module-name="bpmc-toplevel" />
     <orderEntry type="module-library">
       <library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
@@ -192,15 +193,6 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.3:runtime">
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.3/gwt-servlet-1.5.3.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
       <library name="M2 Dep: javassist:javassist:jar:3.6.0.GA:compile">
         <CLASSES>
           <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javassist/javassist/3.6.0.GA/javassist-3.6.0.GA.jar!/" />
@@ -427,6 +419,15 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.3:runtime">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.3/gwt-servlet-1.5.3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: bpm-console/branches/hbraun/server/war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- bpm-console/branches/hbraun/server/war/src/main/webapp/WEB-INF/web.xml	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/server/war/src/main/webapp/WEB-INF/web.xml	2009-10-26 09:36:02 UTC (rev 855)
@@ -42,11 +42,22 @@
     </servlet-class>
   </servlet>
 
+   <servlet>
+    <servlet-name>rpcProcess</servlet-name>
+    <servlet-class>org.jboss.bpm.console.server.svc.ProcessMgmtServiceImpl</servlet-class>
+  </servlet>
+
   <servlet-mapping>
     <servlet-name>Resteasy</servlet-name>
     <url-pattern>/rs/*</url-pattern>
   </servlet-mapping>
 
+
+  <servlet-mapping>
+    <servlet-name>rpcProcess</servlet-name>
+    <url-pattern>/rpc/rpcProcess</url-pattern>
+  </servlet-mapping>
+
   <security-constraint>
     <web-resource-collection>
       <web-resource-name>Resteasy</web-resource-name>      

Modified: bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java
===================================================================
--- bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRef.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -23,12 +23,13 @@
 
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 @XmlRootElement(name="processDefinition")
-public class ProcessDefinitionRef 
+public class ProcessDefinitionRef implements Serializable
 {
   private String id;
   

Modified: bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java
===================================================================
--- bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java	2009-10-26 09:29:23 UTC (rev 854)
+++ bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionRefWrapper.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -24,12 +24,13 @@
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import java.util.List;
+import java.io.Serializable;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 @XmlRootElement(name = "wrapper")
-public class ProcessDefinitionRefWrapper
+public class ProcessDefinitionRefWrapper implements Serializable
 {
 
    List<ProcessDefinitionRef> definitions;

Added: bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/ProcessMgmtService.java
===================================================================
--- bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/ProcessMgmtService.java	                        (rev 0)
+++ bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/ProcessMgmtService.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.client.model.svc;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+ at RemoteServiceRelativePath("rpcProcess")
+public interface ProcessMgmtService extends RemoteService
+{
+  List<ProcessDefinitionRef> getProcessDefinitions();  
+}

Added: bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/ProcessMgmtServiceAsync.java
===================================================================
--- bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/ProcessMgmtServiceAsync.java	                        (rev 0)
+++ bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/client/model/svc/ProcessMgmtServiceAsync.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.client.model.svc;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.RemoteService;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public interface ProcessMgmtServiceAsync extends RemoteService
+{
+  void getProcessDefinitions(AsyncCallback async);
+}
+

Added: bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/server/svc/ProcessMgmtServiceImpl.java
===================================================================
--- bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/server/svc/ProcessMgmtServiceImpl.java	                        (rev 0)
+++ bpm-console/branches/hbraun/shared/rpc/src/main/java/org/jboss/bpm/console/server/svc/ProcessMgmtServiceImpl.java	2009-10-26 09:36:02 UTC (rev 855)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.server.svc;
+
+import org.jboss.bpm.console.client.model.svc.ProcessMgmtService;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ProcessMgmtServiceImpl extends RemoteServiceServlet
+    implements ProcessMgmtService
+{
+
+  public List<ProcessDefinitionRef> getProcessDefinitions()
+  {
+    List<ProcessDefinitionRef> result = new ArrayList<ProcessDefinitionRef>();
+
+    for(int i=0; i<20; i++)
+    {
+      result.add( new ProcessDefinitionRef("gwt-rpc-test", "some process", i));
+    }
+    
+    return result;
+  }
+}



More information about the overlord-commits mailing list