[jbpm-commits] JBoss JBPM SVN: r4680 - in projects/gwt-console/trunk: gui/war and 6 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Apr 29 15:49:16 EDT 2009


Author: heiko.braun at jboss.com
Date: 2009-04-29 15:49:16 -0400 (Wed, 29 Apr 2009)
New Revision: 4680

Modified:
   projects/gwt-console/trunk/gui/war/gui-war.iml
   projects/gwt-console/trunk/gui/workspace-api/workspace-api.iml
   projects/gwt-console/trunk/gui/workspace-example/workspace-example.iml
   projects/gwt-console/trunk/gwt-parent.iml
   projects/gwt-console/trunk/server/server-core/server-core.iml
   projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskListFacade.java
   projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
   projects/gwt-console/trunk/server/server-integration/server-integration.iml
   projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/PluginMgr.java
   projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/TaskDispatcherPlugin.java
Log:
Add ui render and ui process interfaces

Modified: projects/gwt-console/trunk/gui/war/gui-war.iml
===================================================================
--- projects/gwt-console/trunk/gui/war/gui-war.iml	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/gui/war/gui-war.iml	2009-04-29 19:49:16 UTC (rev 4680)
@@ -13,7 +13,6 @@
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-rpc" exported="" />
     <orderEntry type="module" module-name="workspace-api" exported="" />
-    <orderEntry type="module" module-name="gwt-parent" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
         <CLASSES>

Modified: projects/gwt-console/trunk/gui/workspace-api/workspace-api.iml
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/workspace-api.iml	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/gui/workspace-api/workspace-api.iml	2009-04-29 19:49:16 UTC (rev 4680)
@@ -10,7 +10,6 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-rpc" exported="" />
-    <orderEntry type="module" module-name="gwt-parent" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
         <CLASSES>

Modified: projects/gwt-console/trunk/gui/workspace-example/workspace-example.iml
===================================================================
--- projects/gwt-console/trunk/gui/workspace-example/workspace-example.iml	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/gui/workspace-example/workspace-example.iml	2009-04-29 19:49:16 UTC (rev 4680)
@@ -11,10 +11,9 @@
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="toplevel" />
     <orderEntry type="module" module-name="plugin-api" />
-    <orderEntry type="module" module-name="gwt-rpc" />
     <orderEntry type="module" module-name="plugin" />
+    <orderEntry type="module" module-name="gwt-rpc" />
     <orderEntry type="module" module-name="workspace-api" />
-    <orderEntry type="module" module-name="gwt-parent" />
     <orderEntry type="module-library">
       <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
         <CLASSES>

Modified: projects/gwt-console/trunk/gwt-parent.iml
===================================================================
--- projects/gwt-console/trunk/gwt-parent.iml	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/gwt-parent.iml	2009-04-29 19:49:16 UTC (rev 4680)
@@ -20,9 +20,9 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="module" module-name="gwt-rpc" exported="" />
-    <orderEntry type="module" module-name="workspace-api" exported="" />
-    <orderEntry type="module" module-name="server-integration" exported="" />
+    <orderEntry type="module" module-name="gwt-rpc" />
+    <orderEntry type="module" module-name="server-integration" />
+    <orderEntry type="module" module-name="workspace-api" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
         <CLASSES>

Modified: projects/gwt-console/trunk/server/server-core/server-core.iml
===================================================================
--- projects/gwt-console/trunk/server/server-core/server-core.iml	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/server/server-core/server-core.iml	2009-04-29 19:49:16 UTC (rev 4680)
@@ -11,8 +11,7 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-rpc" exported="" />
-    <orderEntry type="module" module-name="gwt-parent" exported="" />
-    <orderEntry type="module" module-name="server-integration" />
+    <orderEntry type="module" module-name="server-integration" exported="" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: org.slf4j:slf4j-simple:jar:1.5.2:compile">
         <CLASSES>

Modified: projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskListFacade.java
===================================================================
--- projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskListFacade.java	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskListFacade.java	2009-04-29 19:49:16 UTC (rev 4680)
@@ -95,7 +95,7 @@
     {
       for(TaskRef task : refs)
       {
-        URL taskFormURL = formPlugin.getDispatchUrl(task);
+        URL taskFormURL = formPlugin.getDispatchUrl(task.getId());
         if(taskFormURL!=null)
         {
           task.setUrl(taskFormURL.toExternalForm());

Modified: projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
===================================================================
--- projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java	2009-04-29 19:49:16 UTC (rev 4680)
@@ -25,9 +25,12 @@
 import org.apache.commons.logging.LogFactory;
 import org.jboss.bpm.console.server.integration.ManagementFactory;
 import org.jboss.bpm.console.server.integration.TaskManagement;
+import org.jboss.bpm.console.server.plugin.TaskDispatcherPlugin;
+import org.jboss.bpm.console.server.plugin.PluginMgr;
 
 import javax.ws.rs.*;
 import javax.ws.rs.core.Response;
+import javax.activation.DataHandler;
 
 /**
  * REST server module for accessing task related data.
@@ -41,6 +44,8 @@
 
   private TaskManagement taskManagement;  
 
+  private TaskDispatcherPlugin formPlugin;
+
   /**
    * Lazy load the {@link org.jboss.bpm.console.server.integration.TaskManagement}
    */
@@ -56,6 +61,20 @@
     return this.taskManagement;
   }
 
+  /**
+   * Lazy load the {@link org.jboss.bpm.console.server.integration.TaskManagement}
+   */
+  private TaskDispatcherPlugin getTaskDispatcherPlugin()
+  {
+    if(null==this.formPlugin)
+    {
+      this.formPlugin = PluginMgr.load(TaskDispatcherPlugin.class);
+      log.debug("Using TaskDispatcherPlugin impl:" + this.formPlugin);
+    }
+
+    return this.formPlugin;
+  }
+
   @POST
   @Path("{taskId}/assign/{ifRef}")
   @Produces("application/json")
@@ -111,4 +130,32 @@
     getTaskManagement().completeTask(taskId, outcome);
     return Response.ok().build();
   }
+
+  @GET
+  @Path("{taskId}/render")
+  @Produces("text/html")
+  public Response renderUI(
+      @PathParam("taskId")
+      long taskId
+  )
+  {
+    DataHandler dh = getTaskDispatcherPlugin().provideTaskUI(taskId);
+    if(null==dh)
+    {
+      throw new RuntimeException("No UI associated with task ID" + taskId);
+    }
+
+    return Response.ok(dh).build();
+  }
+
+  @POST
+    @Path("{taskId}/close")
+  @Produces("text/html")
+  public Response closeWithUI(
+      @PathParam("taskId")
+      long taskId
+  )
+  {
+    return Response.serverError().build();
+  }
 }

Modified: projects/gwt-console/trunk/server/server-integration/server-integration.iml
===================================================================
--- projects/gwt-console/trunk/server/server-integration/server-integration.iml	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/server/server-integration/server-integration.iml	2009-04-29 19:49:16 UTC (rev 4680)
@@ -9,7 +9,6 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-rpc" exported="" />
-    <orderEntry type="module" module-name="gwt-parent" exported="" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
         <CLASSES>

Modified: projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/PluginMgr.java
===================================================================
--- projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/PluginMgr.java	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/PluginMgr.java	2009-04-29 19:49:16 UTC (rev 4680)
@@ -22,6 +22,7 @@
 package org.jboss.bpm.console.server.plugin;
 
 import org.jboss.bpm.console.server.util.ServiceLoader;
+import org.jboss.bpm.console.server.util.InvocationProxy;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
@@ -40,6 +41,6 @@
     T pluginImpl = (T) ServiceLoader.loadService(
         type.getName(), null
     );
-    return pluginImpl;
+    return (T)InvocationProxy.newInstance(pluginImpl);
   }
 }

Modified: projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/TaskDispatcherPlugin.java
===================================================================
--- projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/TaskDispatcherPlugin.java	2009-04-29 12:02:04 UTC (rev 4679)
+++ projects/gwt-console/trunk/server/server-integration/src/main/java/org/jboss/bpm/console/server/plugin/TaskDispatcherPlugin.java	2009-04-29 19:49:16 UTC (rev 4680)
@@ -21,20 +21,20 @@
  */
 package org.jboss.bpm.console.server.plugin;
 
-import org.jboss.bpm.console.client.model.TaskRef;
-
+import javax.activation.DataHandler;
+import java.io.InputStream;
 import java.net.URL;
 
 /**
- * Create dispatch URL's for reneering task forms.
- * 
+ * Render task UI's and process task completion.
+ *
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 public interface TaskDispatcherPlugin
 {
-  /**   
-   * @param task
-   * @return a URL or null if the task doesn't have an associated form 
-   */
-  URL getDispatchUrl(TaskRef task);
+  URL getDispatchUrl(long taskId);
+  
+  DataHandler provideTaskUI(long taskId);
+
+  void processCompletion(long taskId, String outcome, InputStream payload);
 }




More information about the jbpm-commits mailing list