[jbpm-commits] JBoss JBPM SVN: r3645 - in projects/gwt-console/trunk: plugin and 31 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Jan 15 08:35:02 EST 2009


Author: heiko.braun at jboss.com
Date: 2009-01-15 08:35:00 -0500 (Thu, 15 Jan 2009)
New Revision: 3645

Added:
   projects/gwt-console/trunk/plugin-example/
   projects/gwt-console/trunk/plugin-example/plugin-example.iml
   projects/gwt-console/trunk/plugin-example/pom.xml
   projects/gwt-console/trunk/plugin-example/src/
   projects/gwt-console/trunk/plugin-example/src/main/
   projects/gwt-console/trunk/plugin-example/src/main/java/
   projects/gwt-console/trunk/plugin-example/src/main/java/org/
   projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/
   projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/
   projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/
   projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/mapsplugin/
   projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/mapsplugin/MapsEditor.java
   projects/gwt-console/trunk/plugin-example/src/main/resources/
   projects/gwt-console/trunk/plugin-example/src/main/resources/org/
   projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/
   projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/
   projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/
   projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.txt
   projects/gwt-console/trunk/plugin/
   projects/gwt-console/trunk/plugin/plugin.iml
   projects/gwt-console/trunk/plugin/pom.xml
   projects/gwt-console/trunk/plugin/src/
   projects/gwt-console/trunk/plugin/src/main/
   projects/gwt-console/trunk/plugin/src/main/java/
   projects/gwt-console/trunk/plugin/src/main/java/org/
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Authentication.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Editor.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Menu.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/MenuSection.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/UIConstants.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/View.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Workspace.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/model/
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ConsoleLog.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/DateRenderer.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelChangeListener.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelListenerRegistry.java
   projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelModificationCallback.java
   projects/gwt-console/trunk/plugin/src/main/resources/
Removed:
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Editor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Menu.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MenuSection.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/View.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Workspace.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/util/
Modified:
   projects/gwt-console/trunk/pom.xml
   projects/gwt-console/trunk/war/gwt-war.iml
   projects/gwt-console/trunk/war/pom.xml
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageComponent.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditorComponent.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ProcessReportView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java
   projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java
Log:
Break upplugin API into own jar

Added: projects/gwt-console/trunk/plugin/plugin.iml
===================================================================
--- projects/gwt-console/trunk/plugin/plugin.iml	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/plugin.iml	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+  <component name="ModuleRootManager" />
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.2:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-user-1.5.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gwt-log/gwt-log/2.5.2/gwt-log-2.5.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:runtime">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.2/gwt-servlet-1.5.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: org.jbpm.jbpm3:gwt-console-rpc:jar:1.0.0-SNAPSHOT:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntryProperties />
+  </component>
+</module>
+

Added: projects/gwt-console/trunk/plugin/pom.xml
===================================================================
--- projects/gwt-console/trunk/plugin/pom.xml	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/pom.xml	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <name>JBoss jBPM3 - GWT Console (WAR)</name>
+  <groupId>org.jbpm.jbpm3</groupId>
+  <artifactId>gwt-console-plugin</artifactId>
+  <packaging>jar</packaging>
+
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jbpm.jbpm3</groupId>
+    <artifactId>gwt-console-parent</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+  <properties>
+    <jaxb.version>2.1</jaxb.version>
+  </properties>
+  <!--  Dependencies -->
+  <dependencies>
+
+    <dependency>
+      <groupId>org.jbpm.jbpm3</groupId>
+      <artifactId>gwt-console-rpc</artifactId>
+      <version>${version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.xml.bind</groupId>
+      <artifactId>jaxb-api</artifactId>
+      <version>${jaxb.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.google.gwt</groupId>
+      <artifactId>gwt-user</artifactId>
+      <version>${gwt.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>com.gwtext</groupId>
+      <artifactId>gwtext</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>com.google.code.gwt-log</groupId>
+      <artifactId>gwt-log</artifactId>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+          <showDeprecation>true</showDeprecation>
+          <showWarnings>true</showWarnings>
+          <optimize>true</optimize>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,42 @@
+/*
+ * 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;
+
+/**
+ * Provides context information to console compoments and plugins.
+ * 
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public interface ApplicationContext
+{
+  void addEditor(Editor editor);
+
+  boolean hasEditor(String id);
+
+  void showEditor(String id);
+
+  URLBuilder getUrlBuilder();
+
+  void displayMessage(String message, boolean isError);
+
+  Authentication getAuthentication();
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Authentication.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Authentication.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Authentication.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,158 @@
+/*
+ * 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;
+
+import com.google.gwt.http.client.*;
+import com.google.gwt.core.client.GWT;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.model.DTOParser;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Does HTTP Basic Auth and keeps assigned roles
+ * (piggy backed on response) and the username that was used.
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class Authentication
+{
+  private String loginUrl;
+  private AuthCallback callback;
+  private List<String> rolesAssigned = new ArrayList<String>();
+  private String username;
+
+  public Authentication(String loginUrl)
+  {
+    this.loginUrl = loginUrl;
+  }
+
+  public Authentication(String loginUrl, AuthCallback callback)
+  {
+    this.loginUrl = loginUrl;
+    this.callback = callback;
+  }
+
+  /**
+   * Login, but leave credentials to GWT.
+   * This will pop up a username/password dialog netive to the browser.
+   */
+  public void doLogin()
+  {
+    doLogin(null, null);
+  }
+
+  /**
+   * Login using specific credentials.
+   * This delegates to {@link com.google.gwt.http.client.RequestBuilder#setUser(String)}
+   * and {@link com.google.gwt.http.client.RequestBuilder#setPassword(String)}
+   */
+  public void doLogin(String user, String pass)
+  {
+
+    RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, loginUrl);
+    this.username = user;
+    // discard password
+
+    ConsoleLog.debug("Authentication against: " + rb.getUrl());
+
+    if (user != null && pass != null)
+    {
+      rb.setUser(user);
+      rb.setPassword(pass);
+
+      if (!GWT.isScript()) // hosted mode only
+      {
+        rb.setHeader("xtest-user", user);
+        rb.setHeader("xtest-pass", pass); // NOTE: This is plaintext, use for testing only
+      }
+    }
+
+    try
+    {
+      rb.sendRequest(null,
+          new RequestCallback()
+          {
+
+            public void onResponseReceived(Request request, Response response)
+            {
+              // parse roles
+              if (200 == response.getStatusCode())
+              {
+                rolesAssigned = DTOParser.parseRolesAssigned(response.getText());
+                if (callback != null) callback.onLoginSuccess(request, response);
+              }
+              else
+              {
+                onError(request, new Exception(response.getText()));
+              }
+            }
+
+            public void onError(Request request, Throwable t)
+            {
+              // auth failed
+              // Couldn't connect to server (could be timeout, SOP violation, etc.)
+              if (callback != null)
+                callback.onLoginFailed(request, t);
+              else
+                throw new RuntimeException("Unknown exception upon login attempt", t);
+            }
+          });
+    }
+
+    catch (RequestException e1)
+    {
+      // Couldn't connect to server
+      throw new RuntimeException("Unknown error upon login attempt", e1);
+    }
+  }
+
+
+  public void setCallback(AuthCallback callback)
+  {
+    this.callback = callback;
+  }
+
+  public native void doLogout() /*-{
+       $wnd.location.reload();
+     }-*/;
+
+
+  public interface AuthCallback
+  {
+    void onLoginSuccess(Request request, Response response);
+
+    void onLoginFailed(Request request, Throwable t);
+  }
+
+
+  public List<String> getRolesAssigned()
+  {
+    return rolesAssigned;
+  }
+
+  public String getUsername()
+  {
+    return username;
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,115 @@
+/*
+ * 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;
+
+import com.google.gwt.i18n.client.Dictionary;
+
+/**
+ * Initialize console config from host page (<code>Application.html</code>) variable:
+ * <pre>
+ *  var consoleConfig = {
+ * consoleServerUrl: "http://localhost:8080/gwt-console-server",
+ * reportServerUrl: "http://localhost:8080/report",
+ * [...]
+ * };
+ * </pre>
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ * @see com.google.gwt.i18n.client.Dictionary
+ */
+public class ConsoleConfig
+{
+  private String consoleServerUrl;
+  private String reportServerUrl;
+
+  private String overviewReportFile;
+  private String definitionReportFile;
+  private String instanceReportFile;
+
+
+  public ConsoleConfig(String consoleServerUrl, String reportServerUrl)
+  {
+    this.consoleServerUrl = consoleServerUrl;
+    this.reportServerUrl = reportServerUrl;
+  }
+
+  public ConsoleConfig()
+  {
+    Dictionary theme = Dictionary.getDictionary("consoleConfig");
+    consoleServerUrl = theme.get("consoleServerUrl");
+    reportServerUrl = theme.get("reportServerUrl");
+
+    overviewReportFile = theme.get("overviewReportFile");
+    definitionReportFile = theme.get("definitionReportFile");
+    instanceReportFile = theme.get("instanceReportFile");
+  }
+
+  public String getConsoleServerUrl()
+  {
+    return consoleServerUrl;
+  }
+
+  public void setConsoleServerUrl(String consoleServerUrl)
+  {
+    this.consoleServerUrl = consoleServerUrl;
+  }
+
+  public String getReportServerUrl()
+  {
+    return reportServerUrl;
+  }
+
+  public void setReportServerUrl(String reportServerUrl)
+  {
+    this.reportServerUrl = reportServerUrl;
+  }
+
+  public String getOverviewReportFile()
+  {
+    return overviewReportFile;
+  }
+
+  public void setOverviewReportFile(String overviewReportFile)
+  {
+    this.overviewReportFile = overviewReportFile;
+  }
+
+  public String getDefinitionReportFile()
+  {
+    return definitionReportFile;
+  }
+
+  public void setDefinitionReportFile(String definitionReportFile)
+  {
+    this.definitionReportFile = definitionReportFile;
+  }
+
+  public String getInstanceReportFile()
+  {
+    return instanceReportFile;
+  }
+
+  public void setInstanceReportFile(String instanceReportFile)
+  {
+    this.instanceReportFile = instanceReportFile;
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Editor.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Editor.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Editor.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,150 @@
+/*
+ * 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;
+
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.TabPanel;
+import com.gwtext.client.widgets.Component;
+import com.gwtext.client.widgets.layout.FitLayout;
+import com.gwtext.client.widgets.layout.BorderLayout;
+import com.gwtext.client.widgets.layout.BorderLayoutData;
+import com.gwtext.client.core.RegionPosition;
+
+/**
+ * An editor can be plugged into a {@link org.jboss.bpm.console.client.Workspace}
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public abstract class Editor extends Panel
+{
+  protected ApplicationContext main;
+  private TabPanel tabPanel;
+
+  protected Editor(ApplicationContext main)
+  {
+    super();
+    this.main = main;
+    this.setPaddings(10);
+
+    // -------
+    this.tabPanel = new TabPanel();
+    this.tabPanel.setResizeTabs(true);
+    this.tabPanel.setMinTabWidth(115);
+    this.tabPanel.setTabWidth(135);
+    this.tabPanel.setEnableTabScroll(true);
+    this.tabPanel.setAutoScroll(true);
+    this.tabPanel.setPlain(true);
+    this.tabPanel.setActiveTab(0);
+    this.tabPanel.setBorder(false);
+
+    // -------
+
+    Panel panel = new Panel();
+    panel.setBorder(false);
+    panel.setPaddings(10);
+    panel.setLayout(new FitLayout());
+
+    panel.setWidth(UIConstants.EDITOR_WIDTH);
+    panel.setHeight(500);
+
+    // -------
+
+    Panel borderPanel = new Panel();
+    borderPanel.setBorder(false);
+    borderPanel.setLayout(new BorderLayout());
+
+    //add east panel
+    /*Panel eastPanel = new Panel();
+    eastPanel.setHtml("<p>east panel</p>");
+    eastPanel.setTitle("East Side");
+    eastPanel.setCollapsible(true);
+    eastPanel.setWidth(225);
+
+    BorderLayoutData eastData = new BorderLayoutData(RegionPosition.EAST);
+    eastData.setSplit(false);
+    eastData.setMinSize(75);
+    eastData.setMaxSize(100);
+    eastData.setMargins(new Margins(0, 0, 5, 0));
+
+    borderPanel.add(eastPanel, eastData);*/
+
+    // add center panel        
+    borderPanel.add(tabPanel, new BorderLayoutData(RegionPosition.CENTER));
+
+    panel.add(borderPanel);
+
+    this.add(panel);
+  }
+
+  public abstract String getEditorId();
+
+  public abstract String getTitle();
+
+  public abstract String getIconCSS();
+
+  public abstract MenuSection provideMenuSection();
+
+  public boolean hasView(String viewId)
+  {
+    boolean b = false;
+    final String tabId = viewId + ".tab";
+
+    Component[] tabs = tabPanel.getItems();
+    for (int i = 0; i < tabs.length; i++)
+    {
+      Component tab = tabs[i];
+      if (tab.getId().equals(tabId))
+      {
+        b = true;
+        break;
+      }
+    }
+
+    return b;
+  }
+
+  public void showView(String viewId)
+  {
+    final String tabId = viewId + ".tab";
+    this.tabPanel.setActiveTab(tabId);
+  }
+
+  public void addView(View view, boolean closable)
+  {
+    view.setId(view.getViewId() + ".tab");
+    view.setClosable(closable);
+    view.setIconCls(view.getIconCSS());
+
+    this.tabPanel.add(view);
+    this.tabPanel.setActiveTab(view.getId());
+
+  }
+
+  class WrapperPanel extends Panel
+  {
+    public WrapperPanel(String id)
+    {
+      super();
+      setId(id);
+    }
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Menu.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Menu.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Menu.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,61 @@
+/*
+ * 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;
+
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.layout.AccordionLayout;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * The main menu on the left hand.
+ * Keeps a list of {@link org.jboss.bpm.console.client.MenuSection}.
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class Menu extends Panel
+{
+  private final ApplicationContext mainView;
+  private List<Panel> sections = new ArrayList<Panel>();
+
+  public Menu(final ApplicationContext view)
+  {
+    super();
+    this.mainView = view;
+
+    final AccordionLayout accordion = new AccordionLayout(true);
+
+    this.setTitle("");
+    this.setCollapsible(true);
+    this.setWidth(200);
+    this.setLayout(accordion);
+
+  }
+
+  public void addSection(MenuSection menuSection)
+  {
+    this.sections.add(menuSection);
+    this.add(menuSection);
+  }
+
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/MenuSection.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/MenuSection.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/MenuSection.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,47 @@
+/*
+ * 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;
+
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.Component;
+
+/**
+ * One section in the lefthand main menu.
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MenuSection extends Panel
+{
+
+  public MenuSection(String title, String iconClass, Component tree)
+  {
+    super();
+
+    setTitle(title);
+    setBorder(false);
+    setHideBorders(true);
+    setIconCls(iconClass);
+
+    if (tree != null)
+      add(tree);
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/UIConstants.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/UIConstants.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/UIConstants.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,39 @@
+/*
+ * 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;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class UIConstants
+{
+  public static final int OVERALL_WIDTH = 1024;
+  public static final int OVERALL_HEIGHT = 768;
+  public static final int MAIN_MENU_MIN = 175;
+  public static final int MAIN_MENU_MAX = 400;
+  public static final int EDITOR_WIDTH = 680;
+  public static final int TEASER_PANEL_WIDTH = 200;
+  public static final int EDITOR_PANEL_WIDTH = 450;
+
+  public static final String DEFAULT_TRANSITION = "default transition";
+  public static final String DATE_FORMAT = "yyyy-m-j H:i:s";  //08-10-02 13:51:27
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/URLBuilder.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/URLBuilder.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,179 @@
+/*
+ * 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;
+
+import com.google.gwt.http.client.URL;
+import com.google.gwt.core.client.GWT;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class URLBuilder
+{
+  ConsoleConfig config;
+
+  public URLBuilder(ConsoleConfig config)
+  {
+    this.config = config;
+  }
+
+  public String getConsoleServerUrl()
+  {
+    return config.getConsoleServerUrl();
+  }
+
+  public String getProcessDefinitionsURL()
+  {
+    return getConsoleServerUrl() + "/rs/process/definitions";
+  }
+
+  public String getProcessInstancesURL(long processId)
+  {
+    return getConsoleServerUrl() + "/rs/process/definitions/" + processId + "/instances";
+  }
+
+  public String getUserInRoleURL(String[] possibleRoles)
+  {
+    StringBuffer sb = new StringBuffer();
+    for (int i = 0; i < possibleRoles.length; i++)
+    {
+      sb.append(URL.encode(possibleRoles[i]));
+      if (i < possibleRoles.length - 1)
+        sb.append(",");
+    }
+    return getConsoleServerUrl() + "/rs/identity/user/roles?roleCheck=" + sb.toString();
+  }
+
+  @Deprecated
+  public String getRemoveDefinitionURL(long processId)
+  {
+    return getConsoleServerUrl() + "/rs/process/definitions/" + processId + "/remove";
+  }
+
+  public String getProcessImageURL(long processId)
+  {
+    return getConsoleServerUrl() + "/rs/jbpm3/definitions/" + processId + "/image";
+  }
+
+  public String getDiagramInfoURL(long processId)
+  {
+    return getConsoleServerUrl() + "/rs/jbpm3/definitions/" + processId + "/diagramInfo";
+  }
+
+  public String getActiveNodeInfoURL(long instanceId)
+  {
+    return getConsoleServerUrl() + "/rs/jbpm3/instances/" + instanceId + "/activeNodeInfo";
+  }
+
+  public String getStateChangeURL(long instanceId, ProcessInstanceRef.STATE state)
+  {
+    return getConsoleServerUrl() + "/rs/process/instances/" + instanceId + "/state/" + state;
+  }
+
+  public String getStartNewInstanceURL(long processId)
+  {
+    return getConsoleServerUrl() + "/rs/process/definitions/" + processId + "/instances/new";
+  }
+
+  public String getUploadDefinitionURL()
+  {
+    return getConsoleServerUrl() + "/rs/jbpm3/definitions/new";
+  }
+
+  public String getTaskListByActorURL(String actor)
+  {
+    return getConsoleServerUrl() + "/rs/tasks/actor/" + URL.encode(actor);
+  }
+
+  public String getTaskFormDefURL(long processId, long taskId)
+  {
+    return getConsoleServerUrl() + "/rs/tasks/forms/" + processId + "/" + taskId;
+  }
+
+  public String getTaskEndURL(long id)
+  {
+    return getConsoleServerUrl() + "/rs/tasks/" + id + "/close/transition/default";
+  }
+
+  public String getTaskEndURL(long id, String signalName)
+  {
+    return getConsoleServerUrl() + "/rs/tasks/" + id + "/close/transition?signal=" + URL.encode(signalName);
+  }
+
+  public String getTaskAssignmentURL(long id, String actor)
+  {
+    String actualActor = actor == null ? "" : "/" + actor;
+    return getConsoleServerUrl() + "/rs/tasks/" + id + "/assignment" + URL.encode(actualActor);
+  }
+
+  public String getTokenSignalUrl(TokenReference tok)
+  {
+    return getConsoleServerUrl() + "/rs/jbpm3/tokens/" + tok.getId() + "/transition/default";
+  }
+
+  public String getTokenSignalUrl(TokenReference tok, String signal)
+  {
+    String encodedSignal = URL.encode(signal);
+    return getConsoleServerUrl() + "/rs/jbpm3/tokens/" + tok.getId() + "/transition?signal=" + encodedSignal;
+  }
+
+  public String getAvailableActorsUrl(String actorId)
+  {
+    return getConsoleServerUrl() + "/rs/identity/user/" + actorId + "/actors";
+  }
+
+  public String getProcessDefinitionByNameURL(String name)
+  {
+    return getConsoleServerUrl() + "/rs/process/definitions/" + name;
+  }
+
+  public String getDeployTestHarnessUrl()
+  {
+    return getConsoleServerUrl() + "/rs/test/deploy/harness";
+  }
+
+  public String getUndeployTestHarnessUrl()
+  {
+    return getConsoleServerUrl() + "/rs/test/undeploy/harness";
+  }
+
+  public String getOverviewReportUrl()
+  {
+    String name = URL.encode(config.getOverviewReportFile());
+    String url = config.getReportServerUrl() + "/rs/report/view/" + name;
+    if (!GWT.isScript())
+      url += "?id=birt";
+    return url;
+  }
+
+  public String getDefinitionReportUrl(String name)
+  {
+    String reportName = URL.encode(name);
+    String reportFileName = URL.encode(config.getDefinitionReportFile());
+    String url = config.getReportServerUrl() + "/rs/report/view/" + reportFileName + "?name=" + reportName;
+    if (!GWT.isScript())
+      url += "&id=birt";
+    return url;
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/View.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/View.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/View.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,45 @@
+/*
+ * 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;
+
+import com.gwtext.client.widgets.Panel;
+
+/**
+ * View's are {@link org.jboss.bpm.console.client.Editor} components
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public abstract class View extends Panel
+{
+
+  protected ApplicationContext mainMenu;
+
+  protected View(ApplicationContext main)
+  {
+    super();
+    this.mainMenu = main;
+  }
+
+  public abstract String getViewId();
+
+  public abstract String getIconCSS();
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Workspace.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Workspace.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Workspace.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,110 @@
+/*
+ * 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;
+
+import com.gwtext.client.widgets.Component;
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.TabPanel;
+
+/**
+ * Maintains {@link org.jboss.bpm.console.client.Workspace}'s
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class Workspace extends TabPanel
+{
+  protected ApplicationContext view;
+  private Menu menu;
+  
+  public Workspace(Menu menu)
+  {
+    super();
+    this.menu = menu;
+
+    this.setResizeTabs(true);
+    this.setMinTabWidth(115);
+    this.setTabWidth(135);
+    this.setEnableTabScroll(true);
+    this.setAutoScroll(true);
+    this.setActiveTab(0);
+  }
+
+  private Panel createTab(Editor editor, boolean closeable)
+  {
+    Panel tab = new WrapperPanel(editor.getId() + ".tab");
+    tab.setTitle(editor.getTitle());
+    tab.setIconCls(editor.getIconCSS());
+    tab.setClosable(closeable);
+    tab.setAutoScroll(true);
+    tab.setBorder(false);
+    tab.setFrame(false);
+    tab.setHideBorders(true);
+    return tab;
+  }
+
+  public void addEditor(Editor editor, boolean closeable)
+  {
+    // Menu
+    menu.addSection(editor.provideMenuSection());
+
+    // Editor pane
+    Panel tab = createTab(editor, closeable);
+    tab.add(editor);
+    this.add(tab);
+    this.setActiveTab(tab.getId());
+    this.doLayout();
+  }
+
+  public boolean hasEditor(String id)
+  {
+    boolean b = false;
+    final String tabId = id + ".tab";
+
+    Component[] tabs = this.getItems();
+    for (int i = 0; i < tabs.length; i++)
+    {
+      Component tab = tabs[i];
+      if (tab.getId().equals(tabId))
+      {
+        b = true;
+        break;
+      }
+    }
+
+    return b;
+  }
+
+  public void showTab(String id)
+  {
+    final String tabId = id + ".tab";
+    this.setActiveTab(tabId);
+  }
+
+  class WrapperPanel extends Panel
+  {
+    public WrapperPanel(String id)
+    {
+      super();
+      setId(id);
+    }
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,281 @@
+/*
+ * 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;
+
+import com.google.gwt.json.client.*;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+import org.jboss.bpm.console.client.model.forms.FieldDef;
+import org.jboss.bpm.console.client.model.forms.FormDef;
+import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
+import org.jboss.bpm.console.client.util.JSONWalk;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TODO: run integrated (gwt-console-server) test
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class DTOParser
+{
+  public static ProcessDefinitionRef parseProcessDefinition(String json)
+  {
+    JSONValue root = JSONParser.parse(json);
+    long id = JSONWalk.on(root).next("processId").asLong();
+    String version = JSONWalk.on(root).next("version").asString();
+    String name = JSONWalk.on(root).next("name").asString();
+
+    return new ProcessDefinitionRef(id, name, version);
+  }
+
+  public static List<String> parseRolesAssigned(String json)
+  {
+    // parse roles
+    List<String> roles = new ArrayList<String>();
+
+    // {"roles":[{"isAssigned":true,"role":"admin"},{"isAssigned":true,"role":"user"}]}
+
+    JSONValue root = JSONParser.parse(json);
+    JSONArray array = JSONWalk.on(root).next("roles").asArray();
+
+    for (int i = 0; i < array.size(); ++i)
+    {
+      JSONObject item = array.get(i).isObject();
+      boolean assigned = JSONWalk.on(item).next("assigned").asBool();
+      String roleName = JSONWalk.on(item).next("role").asString();
+
+      if (assigned)
+      {
+        roles.add(roleName);
+      }
+    }
+
+    return roles;
+  }
+
+  public static List<TaskRef> parseTaskReferenceList(String json)
+  {
+    List<TaskRef> results = new ArrayList<TaskRef>();
+
+    // {"tasks":[{"id":14,"name":"manager evaluation","isSignalling":true,
+    // "isBlocking":false,"tokenId":6,"processInstanceId":4,"actor":"manager",
+    // "transitionNames":["reject","approve"]}]}
+
+    JSONValue root = JSONParser.parse(json);
+    JSONArray array = JSONWalk.on(root).next("tasks").asArray();
+
+    for (int i = 0; i < array.size(); ++i)
+    {
+      JSONObject item = array.get(i).isObject();
+      TaskRef ref = parseTaskReference(item);
+      results.add(ref);
+    }
+
+    return results;
+  }
+
+  public static TaskRef parseTaskReference(JSONObject item)
+  {
+
+    long id = JSONWalk.on(item).next("id").asLong();
+    long tokenId = JSONWalk.on(item).next("tokenId").asLong();
+    long instanceId = JSONWalk.on(item).next("processInstanceId").asLong();
+    long processId = JSONWalk.on(item).next("processId").asLong();
+    String name = JSONWalk.on(item).next("name").asString();
+    String actor = JSONWalk.on(item).next("actor").asString();
+    boolean isBlocking = JSONWalk.on(item).next("isBlocking").asBool();
+    boolean isSignalling = JSONWalk.on(item).next("isSignalling").asBool();
+
+    TaskRef ref = new TaskRef(
+        id, tokenId, instanceId,
+        processId,
+        name, actor,
+        isSignalling, isBlocking
+    );
+
+    // pooled actors
+    JSONArray pooledActors = JSONWalk.on(item).next("pooledActors").asArray();
+    for (int k = 0; k < pooledActors.size(); ++k)
+    {
+      JSONValue jsonValue = pooledActors.get(k);
+      JSONString t = jsonValue.isString();
+      ref.addPooledActor(t.stringValue());
+    }
+
+    if (isSignalling)
+    {
+      JSONArray arr = JSONWalk.on(item).next("transitionNames").asArray();
+      for (int k = 0; k < arr.size(); ++k)
+      {
+        JSONValue jsonValue = arr.get(k);
+        if (jsonValue.toString().equals("null"))
+        {
+          ConsoleLog.debug("FIXME JBPM-1828: Null value on transitionNames:" + arr.toString());
+          continue; // TODO: JBPM-1828
+        }
+        JSONString t = jsonValue.isString();
+        ref.getTransitionNames().add(t.stringValue());
+      }
+
+    }
+
+    return ref;
+  }
+
+  public static Map<String, String> parseFormMapping(String json)
+  {
+    //[{"name":"update erp","value":"form.raise.erp-update.xhtml"}]
+
+    throw new RuntimeException("Not implemented");
+
+  }
+
+  public static FormDef parseFormDef(String json)
+  {
+    return parseFormDef(JSONParser.parse(json));
+  }
+
+  public static FormDef parseFormDef(JSONValue root)
+  {
+    // {"formName":"taskform-15",
+    // "fields":[
+    //    {"varname":"amount","label":"FirstName","required":true,"inputType":"TEXT",
+    //    "dataTypeClass":"java.lang.String","defaults":[]}
+    // ]}
+
+    String formName = JSONWalk.on(root).next("formName").asString();
+    FormDef formDef = new FormDef(formName);
+
+    JSONArray array = JSONWalk.on(root).next("fields").asArray();
+    for (int i = 0; i < array.size(); i++)
+    {
+      JSONObject item = array.get(i).isObject();
+
+      // fieldDefs
+      String label = JSONWalk.on(item).next("label").asString();
+      String varName = JSONWalk.on(item).next("varname").asString();
+      boolean required = JSONWalk.on(item).next("required").asBool();
+      FieldDef.InputType inputType = FieldDef.InputType.valueOf(
+          JSONWalk.on(item).next("inputType").asString()
+      );
+
+      String dataType = JSONWalk.on(item).next("dataTypeClass").asString();
+
+      // TODO: Parse defaults
+
+      formDef.getFields().add(
+          new FieldDef(label, varName, inputType, dataType, required)
+      );
+    }
+
+    return formDef;
+  }
+
+  public static ProcessInstanceRef parseProcessInstance(JSONObject root)
+  {
+    ConsoleLog.debug("parse " + root);
+
+    long id = JSONWalk.on(root).next("instanceId").asLong();
+    long parentId = JSONWalk.on(root).next("parentId").asLong();
+    Date start = JSONWalk.on(root).next("startDate").asDate();
+
+    JSONWalk.JSONWrapper endDateJSON = JSONWalk.on(root).next("endDate");
+    Date end = null;
+    if (endDateJSON != null)
+      end = endDateJSON.asDate();
+
+    boolean suspended = JSONWalk.on(root).next("suspended").asBool();
+
+    ProcessInstanceRef processInstance = new ProcessInstanceRef(
+        id, parentId,
+        start, end,
+        suspended
+    );
+
+    // tokens
+    JSONObject tokJso = JSONWalk.on(root).next("rootToken").asObject();
+    TokenReference rootToken = parseTokenReference(tokJso);
+    processInstance.setRootToken(rootToken);
+    return processInstance;
+  }
+
+  public static TokenReference parseTokenReference(JSONObject jso)
+  {
+    long rootTokenId = JSONWalk.on(jso).next("id").asLong();
+    String name = JSONWalk.on(jso).next("name").asString();
+    String nodeName = JSONWalk.on(jso).next("currentNodeName").asString();
+
+    TokenReference rt = new TokenReference(rootTokenId, name, nodeName);
+
+    boolean canBeSignaled = JSONWalk.on(jso).next("canBeSignaled").asBool();
+    rt.setCanBeSignaled(canBeSignaled);
+
+    JSONArray signals = JSONWalk.on(jso).next("availableSignals").asArray();
+    for (int i = 0; i < signals.size(); i++)
+    {
+      JSONValue jsonValue = signals.get(i);
+      if (jsonValue.toString().equals("null"))
+      {
+        ConsoleLog.debug("FIXME JBPM-1828: Null value on availableSignals:" + signals.toString());
+        continue; // TODO: JBPM-1828
+      }
+      JSONString item = jsonValue.isString();
+      rt.getAvailableSignals().add(item.stringValue());
+    }
+
+    JSONArray childArr = JSONWalk.on(jso).next("children").asArray();
+    for (int i = 0; i < childArr.size(); i++)
+    {
+      JSONObject item = childArr.get(i).isObject();
+      rt.getChildren().add(parseTokenReference(item));
+    }
+
+    return rt;
+  }
+
+  public static List<String> parseStringArray(JSONValue jso)
+  {
+    List<String> result = new ArrayList<String>();
+
+    JSONArray jsonArray = jso.isArray();
+
+    if (null == jsonArray)
+      throw new IllegalArgumentException("Not an array: " + jso);
+
+    for (int i = 0; i < jsonArray.size(); i++)
+    {
+      JSONValue jsonValue = jsonArray.get(i);
+      if (jsonValue.toString().equals("null"))
+      {
+        ConsoleLog.debug("FIXME JBPM-1828: Null value on string array:" + jsonArray.toString());
+        continue; // TODO: JBPM-1828
+      }
+      JSONString item = jsonValue.isString();
+      result.add(item.stringValue());
+    }
+
+    return result;
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ConsoleLog.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ConsoleLog.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ConsoleLog.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,71 @@
+/*
+ * 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.util;
+
+/**
+ * The maven gwt:test mojo treats any output to stderr as
+ * a test failure. gwt-log does dump some information there,
+ * hence we need to proxy log invocation and be able to disable them at all.
+ * <p/>
+ * If you want to test the application, make sure to lauch it using
+ * {@link org.jboss.bpm.console.client.Application#onModuleLoad2()}.
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ConsoleLog
+{
+  private static boolean enabled = false;
+
+  public static void debug(String msg)
+  {
+    if (enabled)
+      com.allen_sauer.gwt.log.client.Log.debug(msg);
+  }
+
+  public static void error(String msg)
+  {
+    if (enabled)
+      com.allen_sauer.gwt.log.client.Log.error(msg);
+  }
+
+  public static void error(String msg, Throwable t)
+  {
+    if (enabled)
+      com.allen_sauer.gwt.log.client.Log.error(msg, t);
+  }
+
+  public static void setUncaughtExceptionHandler()
+  {
+    if (enabled)
+      com.allen_sauer.gwt.log.client.Log.setUncaughtExceptionHandler();
+  }
+
+  public static boolean isEnabled()
+  {
+    return enabled;
+  }
+
+  public static void setEnabled(boolean enabled)
+  {
+    ConsoleLog.enabled = enabled;
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/DateRenderer.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/DateRenderer.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/DateRenderer.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,61 @@
+/*
+ * 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.util;
+
+import com.gwtext.client.widgets.grid.Renderer;
+import com.gwtext.client.widgets.grid.CellMetadata;
+import com.gwtext.client.data.Store;
+import com.gwtext.client.data.Record;
+
+import java.util.Date;
+
+import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
+
+/**
+ * Renders a Date according to {@link org.jboss.bpm.console.client.model.util.SimpleDateFormat#DEFAULT_FORMAT}
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class DateRenderer implements Renderer
+{
+  private String fieldName;
+
+  public DateRenderer(String fieldName)
+  {
+    this.fieldName = fieldName;
+  }
+
+  /**
+   * Returns an empty string (field is null) or a formatted date (field is set).
+   */
+  public String render(Object value, CellMetadata cellMetadata, Record record,
+                       int rowIndex, int colNum, Store store)
+  {
+    String s = "";
+    SimpleDateFormat df = new SimpleDateFormat();
+    Date d = record.getAsDate(fieldName);
+    if (d != null)
+      s = df.format(d);
+
+    return s;
+  }
+}
\ No newline at end of file

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONRequest.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,57 @@
+/*
+ * 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.util;
+
+/**
+ * Request helper, to bypass SOP restrictions.<br>
+ * Can only be used to retrieve Json data, wrapped in a script tag.
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class JSONRequest
+{
+  public static void get(String url, JSONRequestHandler handler)
+  {
+    String callbackName = "JSONCallback" + handler.hashCode();
+    get(url + "?callback=" + callbackName, callbackName, handler);
+  }
+
+  public static void get(String url, String callbackName, JSONRequestHandler handler)
+  {
+    createCallbackFunction(handler, callbackName);
+    addScript(url);
+  }
+
+  public static native void addScript(String url) /*-{
+    var scr = document.createElement("script");
+    scr.setAttribute("language", "JavaScript");
+    scr.setAttribute("src", url);
+    document.getElementsByTagName("body")[0].appendChild(scr);
+  }-*/;
+
+  private native static void createCallbackFunction(JSONRequestHandler obj, String callbackName)/*-{
+    tmpcallback = function(j) {
+      obj. at org.jboss.bpm.console.client.util.JSONRequestHandler::onRequestComplete(Lcom/google/gwt/core/client/JavaScriptObject;)(j);
+    };
+    eval( "window." + callbackName + "=tmpcallback" );
+  }-*/;
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONRequestHandler.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,32 @@
+/*
+ * 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.util;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public interface JSONRequestHandler
+{
+  void onRequestComplete(JavaScriptObject json);
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/JSONWalk.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,193 @@
+/*
+ * 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.util;
+
+import com.google.gwt.json.client.JSONArray;
+import com.google.gwt.json.client.JSONException;
+import com.google.gwt.json.client.JSONObject;
+import com.google.gwt.json.client.JSONValue;
+import org.jboss.bpm.console.client.model.util.SimpleDateFormat;
+
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class JSONWalk
+{
+  private JSONValue root;
+
+
+  private JSONWalk(JSONValue root)
+  {
+    this.root = root;
+  }
+
+  public static JSONWalk on(JSONValue root)
+  {
+    return new JSONWalk(root);
+  }
+
+  public JSONWrapper next(String name)
+  {
+    if (null == root || root.isObject() == null) return null;
+    JSONObject rootObject = root.isObject();
+
+    JSONWrapper match = null;
+    Set<String> keySet = rootObject.keySet();
+
+    Iterator it = keySet.iterator();
+    while (it.hasNext())
+    {
+      String s = (String) it.next();
+      JSONValue child = rootObject.get(s);
+      if (name.equals(s))
+      {
+        match = new JSONWrapper(child);
+        break;
+      }
+      else
+      {
+        match = JSONWalk.on(child).next(name);
+      }
+    }
+
+    return match;
+  }
+
+  public class JSONWrapper
+  {
+
+    private JSONValue value;
+
+    public JSONWrapper(JSONValue value)
+    {
+      this.value = value;
+    }
+
+    public int asInt()
+    {
+      if (value.isNumber() != null)
+      {
+        return new Double(value.isNumber().getValue()).intValue();
+      }
+      else
+      {
+        throw new IllegalArgumentException("Not a number: " + value);
+      }
+    }
+
+    public long asLong()
+    {
+      if (value.isNumber() != null)
+      {
+        return new Double(value.isNumber().getValue()).longValue();
+      }
+      else
+      {
+        throw new IllegalArgumentException("Not a number: " + value);
+      }
+    }
+
+    public double asDouble()
+    {
+      if (value.isNumber() != null)
+      {
+        return value.isNumber().getValue();
+      }
+      else
+      {
+        throw new IllegalArgumentException("Not a number: " + value);
+      }
+    }
+
+    public String asString()
+    {
+      if (value.isString() != null)
+      {
+        return value.isString().stringValue();
+      }
+      else
+      {
+        throw new IllegalArgumentException("Not a string: " + value);
+      }
+    }
+
+    public boolean asBool()
+    {
+      if (value.isBoolean() != null)
+      {
+        return value.isBoolean().booleanValue();
+      }
+      else
+      {
+        throw new IllegalArgumentException("Not a boolean: " + value);
+      }
+    }
+
+    public Date asDate()
+    {
+      if (value.isString() != null)
+      {
+        SimpleDateFormat df = new SimpleDateFormat();
+        return df.parse(value.isString().stringValue());
+      }
+      else
+      {
+        throw new IllegalArgumentException("Not a date string: " + value);
+      }
+    }
+
+
+    public JSONArray asArray()
+    {
+      if (value.isArray() != null)
+      {
+        return value.isArray();
+      }
+      else
+      {
+        throw new IllegalArgumentException("Not a number: " + value);
+      }
+    }
+
+    public JSONObject asObject()
+    {
+      if (value.isObject() != null)
+      {
+        return value.isObject();
+      }
+      else
+      {
+        throw new IllegalArgumentException("Not an object: " + value);
+      }
+    }
+
+
+    public String toString() throws JSONException
+    {
+      return value.toString();
+    }
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelChangeListener.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelChangeListener.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelChangeListener.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,38 @@
+/*
+ * 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.util;
+
+import com.gwtext.client.data.Record;
+
+/**
+ * Get's notified when model change events are fire on {@link ModelListenerRegistry}
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public interface ModelChangeListener
+{
+  void onModelChange(ModelListenerRegistry parent, Object changeEvent);
+
+  void onRecordChange(ModelListenerRegistry parent, Record record);
+
+  void onReset();
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelListenerRegistry.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelListenerRegistry.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelListenerRegistry.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,66 @@
+/*
+ * 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.util;
+
+import com.gwtext.client.data.Record;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Utility to propagate model change events to {@link ModelChangeListener}
+ *
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class ModelListenerRegistry
+{
+  private List<ModelChangeListener> listeners = new ArrayList<ModelChangeListener>();
+
+  public void addListener(ModelChangeListener listener)
+  {
+    this.listeners.add(listener);
+  }
+
+  public void fireRecordChangeEvent(Record record)
+  {
+    for (ModelChangeListener l : listeners)
+    {
+      l.onRecordChange(this, record);
+    }
+  }
+
+  public void fireModelChangeEvent(Object event)
+  {
+    for (ModelChangeListener l : listeners)
+    {
+      l.onModelChange(this, event);
+    }
+  }
+
+  public void fireResetEvent()
+  {
+    for (ModelChangeListener l : listeners)
+    {
+      l.onReset();
+    }
+  }
+}

Added: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelModificationCallback.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelModificationCallback.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/util/ModelModificationCallback.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,32 @@
+/*
+ * 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.util;
+
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public interface ModelModificationCallback
+{
+  void onStaleModel();
+}

Added: projects/gwt-console/trunk/plugin-example/plugin-example.iml
===================================================================
--- projects/gwt-console/trunk/plugin-example/plugin-example.iml	                        (rev 0)
+++ projects/gwt-console/trunk/plugin-example/plugin-example.iml	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+  <component name="ModuleRootManager" />
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library">
+      <library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.2/gwt-servlet-1.5.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: org.jbpm.jbpm3:gwt-console-rpc:jar:1.0.0-SNAPSHOT:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:provided">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntryProperties />
+  </component>
+</module>
+

Added: projects/gwt-console/trunk/plugin-example/pom.xml
===================================================================
--- projects/gwt-console/trunk/plugin-example/pom.xml	                        (rev 0)
+++ projects/gwt-console/trunk/plugin-example/pom.xml	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <name>JBoss BPM Console - Mapsplugin</name>
+  <groupId>org.jboss.bpm.console</groupId>
+  <artifactId>mapsplugin</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <properties>
+    <gwt-console.version>1.0.0-SNAPSHOT</gwt-console.version>
+    <gwt-ext.version>2.0.5</gwt-ext.version>
+  </properties>
+
+  <!--  Dependencies -->
+  <dependencies>
+
+    <dependency>
+      <groupId>org.jbpm.jbpm3</groupId>
+      <artifactId>gwt-console-rpc</artifactId>
+      <version>${gwt-console.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>com.gwtext</groupId>
+      <artifactId>gwtext</artifactId>
+      <version>${gwt-ext.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+  </dependencies>
+
+  <!-- Plugins -->
+  <build>
+    <finalName>mapsplugin</finalName>    
+  </build>
+ 
+</project>

Added: projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/mapsplugin/MapsEditor.java
===================================================================
--- projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/mapsplugin/MapsEditor.java	                        (rev 0)
+++ projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/mapsplugin/MapsEditor.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,29 @@
+/*
+ * 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.mapsplugin;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class MapsEditor
+{
+}

Added: projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.txt
===================================================================
--- projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.txt	                        (rev 0)
+++ projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.txt	2009-01-15 13:35:00 UTC (rev 3645)
@@ -0,0 +1,3 @@
+#org.jboss.bpm.console.client.process.ProcessEditor
+#org.jboss.bpm.console.client.task.TaskEditor
+#org.jboss.bpm.console.client.report.ReportEditor
\ No newline at end of file

Modified: projects/gwt-console/trunk/pom.xml
===================================================================
--- projects/gwt-console/trunk/pom.xml	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/pom.xml	2009-01-15 13:35:00 UTC (rev 3645)
@@ -37,6 +37,7 @@
       <module>rpc</module>
       <module>server</module>
       <module>war</module>
+      <module>plugin/</module>
    </modules>
 
    <dependencyManagement>

Modified: projects/gwt-console/trunk/war/gwt-war.iml
===================================================================
--- projects/gwt-console/trunk/war/gwt-war.iml	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/gwt-war.iml	2009-01-15 13:35:00 UTC (rev 3645)
@@ -12,6 +12,7 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
     <orderEntry type="module" module-name="gwt-parent" />
+    <orderEntry type="module" module-name="plugin" />
     <orderEntry type="module-library" exported="">
       <library name="M2 Dep: junit:junit:jar:3.8.1:test">
         <CLASSES>
@@ -95,6 +96,26 @@
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: org.jbpm.jbpm3:gwt-console-rpc:jar:1.0.0-SNAPSHOT:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT-sources.jar!/" />
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
 </module>

Modified: projects/gwt-console/trunk/war/pom.xml
===================================================================
--- projects/gwt-console/trunk/war/pom.xml	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/pom.xml	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,239 +1,252 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project>
-   <modelVersion>4.0.0</modelVersion>
-   <name>JBoss jBPM3 - GWT Console (WAR)</name>
-   <groupId>org.jbpm.jbpm3</groupId>
-   <artifactId>gwt-console</artifactId>
-   <packaging>war</packaging>
+  <modelVersion>4.0.0</modelVersion>
+  <name>JBoss jBPM3 - GWT Console (WAR)</name>
+  <groupId>org.jbpm.jbpm3</groupId>
+  <artifactId>gwt-console</artifactId>
+  <packaging>war</packaging>
 
-   <!-- Parent -->
-   <parent>
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jbpm.jbpm3</groupId>
+    <artifactId>gwt-console-parent</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <relativePath>../pom.xml</relativePath>
+  </parent>
+
+  <properties>
+    <gwt-maven.version>2.0-beta24</gwt-maven.version>
+  </properties>
+
+  <!--  Dependencies -->
+  <dependencies>
+
+    <dependency>
       <groupId>org.jbpm.jbpm3</groupId>
-      <artifactId>gwt-console-parent</artifactId>
-      <version>1.0.0-SNAPSHOT</version>
-      <relativePath>../pom.xml</relativePath>
-   </parent>
+      <artifactId>gwt-console-rpc</artifactId>
+      <version>${version}</version>
+    </dependency>
 
-   <properties>
-      <gwt-maven.version>2.0-beta24</gwt-maven.version>
-   </properties>
-   
-   <!--  Dependencies -->
-   <dependencies>
+    <dependency>
+      <groupId>org.jbpm.jbpm3</groupId>
+      <artifactId>gwt-console-plugin</artifactId>
+      <version>${version}</version>
+    </dependency>
 
-      <dependency>
-         <groupId>org.jbpm.jbpm3</groupId>
-         <artifactId>gwt-console-rpc</artifactId>
-         <version>${version}</version>
-      </dependency>
+    <dependency>
+      <groupId>org.jbpm.jbpm3</groupId>
+      <artifactId>gwt-console-plugin</artifactId>
+      <classifier>sources</classifier>
+      <version>${version}</version>
+    </dependency>
 
-      <dependency>
-         <groupId>com.google.gwt</groupId>
-         <artifactId>gwt-servlet</artifactId>
-         <version>${gwt.version}</version>
-         <scope>runtime</scope>
-      </dependency>
-      <dependency>
-         <groupId>com.google.gwt</groupId>
-         <artifactId>gwt-user</artifactId>
-         <version>${gwt.version}</version>
-         <scope>provided</scope>
-      </dependency>
-      <dependency>
-         <groupId>com.google.gwt</groupId>
-         <artifactId>gwt-dev</artifactId>
-         <version>${gwt.version}</version>
-         <classifier>${platform}-libs</classifier>
-         <type>zip</type>
-         <scope>provided</scope>
-      </dependency>
-      <dependency>
-         <groupId>com.google.gwt</groupId>
-         <artifactId>gwt-dev</artifactId>
-         <version>${gwt.version}</version>
-         <classifier>${platform}</classifier>
-         <scope>provided</scope>
-      </dependency>
-      <dependency>
-         <groupId>com.gwtext</groupId>
-         <artifactId>gwtext</artifactId>
-      </dependency>
-      <dependency>
-         <groupId>com.google.code.gwt-log</groupId>
-         <artifactId>gwt-log</artifactId>
-      </dependency>
+    <dependency>
+      <groupId>com.google.gwt</groupId>
+      <artifactId>gwt-servlet</artifactId>
+      <version>${gwt.version}</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.gwt</groupId>
+      <artifactId>gwt-user</artifactId>
+      <version>${gwt.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.gwt</groupId>
+      <artifactId>gwt-dev</artifactId>
+      <version>${gwt.version}</version>
+      <classifier>${platform}-libs</classifier>
+      <type>zip</type>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.gwt</groupId>
+      <artifactId>gwt-dev</artifactId>
+      <version>${gwt.version}</version>
+      <classifier>${platform}</classifier>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.gwtext</groupId>
+      <artifactId>gwtext</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gwt-log</groupId>
+      <artifactId>gwt-log</artifactId>
+    </dependency>
 
-      <dependency>
-         <groupId>javax.xml.stream</groupId>
-         <artifactId>stax-api</artifactId>
-         <scope>provided</scope>
-      </dependency>
-      <dependency>
-         <groupId>javax.activation</groupId>
-         <artifactId>activation</artifactId>
-         <scope>provided</scope>
-      </dependency>
-      <dependency>
-         <groupId>junit</groupId>
-         <artifactId>junit</artifactId>
-         <scope>test</scope>
-      </dependency>
-   </dependencies>
+    <dependency>
+      <groupId>javax.xml.stream</groupId>
+      <artifactId>stax-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.activation</groupId>
+      <artifactId>activation</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
 
-   <!-- Plugins -->
-   <build>
-      <finalName>gwt-console</finalName>
-      <plugins>
-         <plugin>
-            <groupId>com.totsp.gwt</groupId>
-            <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
-            <version>${gwt-maven.version}</version>
-            <configuration>
-               <logLevel>INFO</logLevel>
-               <compileTargets>
-                  <value>org.jboss.bpm.console.Application</value>
-               </compileTargets>
-               <runTarget>org.jboss.bpm.console.Application/Application.html</runTarget>
-               <style>DETAILED</style>
-               <noServer>false</noServer>
-               <extraJvmArgs>-Xmx256M -Xms256M</extraJvmArgs>
-               <!--  this parameter is VERY important with automatic mode -
-                     has to match the version in your declared deps
-                     if this is set incorrect, or left out and default does not match
-                     (default is 1.5.2 for 2.0-beta23) you will have mysterious errors
-               -->
-               <gwtVersion>${gwt.version}</gwtVersion>
-            </configuration>
-            <executions>
-               <execution>
-                  <goals>
-                     <goal>mergewebxml</goal>
-                     <goal>compile</goal>
-                     <goal>gwt</goal>
+  <!-- Plugins -->
+  <build>
+    <finalName>gwt-console</finalName>
+    <plugins>
+      <plugin>
+        <groupId>com.totsp.gwt</groupId>
+        <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
+        <version>${gwt-maven.version}</version>
+        <configuration>
+          <logLevel>INFO</logLevel>
+          <compileTargets>
+            <value>org.jboss.bpm.console.Application</value>
+          </compileTargets>
+          <runTarget>org.jboss.bpm.console.Application/Application.html</runTarget>
+          <style>DETAILED</style>
+          <noServer>false</noServer>
+          <extraJvmArgs>-Xmx256M -Xms256M</extraJvmArgs>
+          <!--  this parameter is VERY important with automatic mode -
+                has to match the version in your declared deps
+                if this is set incorrect, or left out and default does not match
+                (default is 1.5.2 for 2.0-beta23) you will have mysterious errors
+          -->
+          <gwtVersion>${gwt.version}</gwtVersion>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>mergewebxml</goal>
+              <goal>compile</goal>
+              <goal>gwt</goal>
 
-                     <!--
-                        GWT tests are executed through "-Palltests"
-                     -->
-                     <!--goal>test</goal-->
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
-         <!--  Use the dependency plugin to unpack gwt-dev-PLATFORM-libs.zip -->
-         <!--
-            (this is a replacement for the old "automatic" mode - useful if you
-            don't have GWT installed already, or you just want a maven way to
-            handle gwt deps)
-         -->
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-dependency-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>unpack</id>
-                  <phase>compile</phase>
-                  <goals>
-                     <goal>unpack</goal>
-                  </goals>
-                  <configuration>
-                     <artifactItems>
-                        <artifactItem>
-                           <groupId>com.google.gwt</groupId>
-                           <artifactId>gwt-dev</artifactId>
-                           <version>${gwtVersion}</version>
-                           <classifier>${platform}-libs</classifier>
-                           <type>zip</type>
-                           <overWrite>false</overWrite>
-                           <outputDirectory>${settings.localRepository}/com/google/gwt/gwt-dev/${gwtVersion}</outputDirectory>
-                        </artifactItem>
-                     </artifactItems>
-                  </configuration>
-               </execution>
-            </executions>
-         </plugin>
-         <!--
-            If you want to use the target/web.xml file mergewebxml produces,
-            tell the war plugin to use it
-         -->
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-war-plugin</artifactId>
+              <!--
+                 GWT tests are executed through "-Palltests"
+              -->
+              <!--goal>test</goal-->
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <!--  Use the dependency plugin to unpack gwt-dev-PLATFORM-libs.zip -->
+      <!--
+         (this is a replacement for the old "automatic" mode - useful if you
+         don't have GWT installed already, or you just want a maven way to
+         handle gwt deps)
+      -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>unpack</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
             <configuration>
-               <webXml>target/web.xml</webXml>
-               <warSourceExcludes>.gwt-tmp/**</warSourceExcludes>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>com.google.gwt</groupId>
+                  <artifactId>gwt-dev</artifactId>
+                  <version>${gwtVersion}</version>
+                  <classifier>${platform}-libs</classifier>
+                  <type>zip</type>
+                  <overWrite>false</overWrite>
+                  <outputDirectory>${settings.localRepository}/com/google/gwt/gwt-dev/${gwtVersion}</outputDirectory>
+                </artifactItem>
+              </artifactItems>
             </configuration>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <configuration>
-               <source>1.5</source>
-               <target>1.5</target>
-            </configuration>
-         </plugin>
-      </plugins>
-   </build>
+          </execution>
+        </executions>
+      </plugin>
+      <!--
+         If you want to use the target/web.xml file mergewebxml produces,
+         tell the war plugin to use it
+      -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <configuration>
+          <webXml>target/web.xml</webXml>
+          <warSourceExcludes>.gwt-tmp/**</warSourceExcludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 
-   <!--  profiles (with activation per platform) -->
-   <profiles>
-      <profile>
-         <id>gwt-dev-windows</id>
-         <properties>
-            <platform>windows</platform>
-         </properties>
-         <activation>
-            <activeByDefault>true</activeByDefault>
-            <os>
-               <family>windows</family>
-            </os>
-         </activation>
-      </profile>
-      <profile>
-         <id>gwt-dev-mac</id>
-         <properties>
-            <platform>mac</platform>
-         </properties>
-         <activation>
-            <activeByDefault>false</activeByDefault>
-            <os>
-               <family>mac</family>
-            </os>
-         </activation>
-      </profile>
-      <profile>
-         <id>gwt-dev-linux</id>
-         <properties>
-            <platform>linux</platform>
-         </properties>
-         <activation>
-            <activeByDefault>false</activeByDefault>
-            <os>
-               <name>linux</name>
-            </os>
-         </activation>
-      </profile>
+  <!--  profiles (with activation per platform) -->
+  <profiles>
+    <profile>
+      <id>gwt-dev-windows</id>
+      <properties>
+        <platform>windows</platform>
+      </properties>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+        <os>
+          <family>windows</family>
+        </os>
+      </activation>
+    </profile>
+    <profile>
+      <id>gwt-dev-mac</id>
+      <properties>
+        <platform>mac</platform>
+      </properties>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+        <os>
+          <family>mac</family>
+        </os>
+      </activation>
+    </profile>
+    <profile>
+      <id>gwt-dev-linux</id>
+      <properties>
+        <platform>linux</platform>
+      </properties>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+        <os>
+          <name>linux</name>
+        </os>
+      </activation>
+    </profile>
 
-      <!--profile>
-         <id>alltests</id>
-         <build>
-         <plugins>
-            <plugin>
-               <groupId>com.totsp.gwt</groupId>
-               <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
-               <version>${gwt-maven.version}</version>
-               <executions>
-                  <execution>
-                     <goals>
-                        <goal>mergewebxml</goal>
-                        <goal>compile</goal>
-                        <goal>gwt</goal>
-                        <goal>test</goal>
-                     </goals>
-                  </execution>
-               </executions>
-            </plugin>
-         </plugins>
-         </build>
-      </profile-->
-   </profiles>
+    <!--profile>
+       <id>alltests</id>
+       <build>
+       <plugins>
+          <plugin>
+             <groupId>com.totsp.gwt</groupId>
+             <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
+             <version>${gwt-maven.version}</version>
+             <executions>
+                <execution>
+                   <goals>
+                      <goal>mergewebxml</goal>
+                      <goal>compile</goal>
+                      <goal>gwt</goal>
+                      <goal>test</goal>
+                   </goals>
+                </execution>
+             </executions>
+          </plugin>
+       </plugins>
+       </build>
+    </profile-->
+  </profiles>
 </project>

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -27,7 +27,7 @@
  */
 public class Application implements EntryPoint
 {
-  private MainView mainView;
+  private ApplicationContext mainView;
   private Authentication auth;
   private ConsoleConfig config;
   private URLBuilder urlBuilder;
@@ -85,7 +85,7 @@
     forceLogin();
   }
 
-  public MainView getConsoleView()
+  public ApplicationContext getConsoleView()
   {
     return mainView;
   }

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,158 +0,0 @@
-/*
- * 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;
-
-import com.google.gwt.http.client.*;
-import com.google.gwt.core.client.GWT;
-import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.model.DTOParser;
-
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * Does HTTP Basic Auth and keeps assigned roles
- * (piggy backed on response) and the username that was used.
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class Authentication
-{
-  private String loginUrl;
-  private AuthCallback callback;
-  private List<String> rolesAssigned = new ArrayList<String>();
-  private String username;
-
-  public Authentication(String loginUrl)
-  {
-    this.loginUrl = loginUrl;
-  }
-
-  public Authentication(String loginUrl, AuthCallback callback)
-  {
-    this.loginUrl = loginUrl;
-    this.callback = callback;
-  }
-
-  /**
-   * Login, but leave credentials to GWT.
-   * This will pop up a username/password dialog netive to the browser.
-   */
-  public void doLogin()
-  {
-    doLogin(null, null);
-  }
-
-  /**
-   * Login using specific credentials.
-   * This delegates to {@link com.google.gwt.http.client.RequestBuilder#setUser(String)}
-   * and {@link com.google.gwt.http.client.RequestBuilder#setPassword(String)}
-   */
-  public void doLogin(String user, String pass)
-  {
-
-    RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, loginUrl);
-    this.username = user;
-    // discard password
-
-    ConsoleLog.debug("Authentication against: " + rb.getUrl());
-
-    if (user != null && pass != null)
-    {
-      rb.setUser(user);
-      rb.setPassword(pass);
-
-      if (!GWT.isScript()) // hosted mode only
-      {
-        rb.setHeader("xtest-user", user);
-        rb.setHeader("xtest-pass", pass); // NOTE: This is plaintext, use for testing only
-      }
-    }
-
-    try
-    {
-      rb.sendRequest(null,
-          new RequestCallback()
-          {
-
-            public void onResponseReceived(Request request, Response response)
-            {
-              // parse roles
-              if (200 == response.getStatusCode())
-              {
-                rolesAssigned = DTOParser.parseRolesAssigned(response.getText());
-                if (callback != null) callback.onLoginSuccess(request, response);
-              }
-              else
-              {
-                onError(request, new Exception(response.getText()));
-              }
-            }
-
-            public void onError(Request request, Throwable t)
-            {
-              // auth failed
-              // Couldn't connect to server (could be timeout, SOP violation, etc.)
-              if (callback != null)
-                callback.onLoginFailed(request, t);
-              else
-                throw new RuntimeException("Unknown exception upon login attempt", t);
-            }
-          });
-    }
-
-    catch (RequestException e1)
-    {
-      // Couldn't connect to server
-      throw new RuntimeException("Unknown error upon login attempt", e1);
-    }
-  }
-
-
-  public void setCallback(AuthCallback callback)
-  {
-    this.callback = callback;
-  }
-
-  public native void doLogout() /*-{
-       $wnd.location.reload();
-     }-*/;
-
-
-  public interface AuthCallback
-  {
-    void onLoginSuccess(Request request, Response response);
-
-    void onLoginFailed(Request request, Throwable t);
-  }
-
-
-  public List<String> getRolesAssigned()
-  {
-    return rolesAssigned;
-  }
-
-  public String getUsername()
-  {
-    return username;
-  }
-}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/ConsoleConfig.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,115 +0,0 @@
-/*
- * 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;
-
-import com.google.gwt.i18n.client.Dictionary;
-
-/**
- * Initialize console config from host page (<code>Application.html</code>) variable:
- * <pre>
- *  var consoleConfig = {
- * consoleServerUrl: "http://localhost:8080/gwt-console-server",
- * reportServerUrl: "http://localhost:8080/report",
- * [...]
- * };
- * </pre>
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- * @see com.google.gwt.i18n.client.Dictionary
- */
-public class ConsoleConfig
-{
-  private String consoleServerUrl;
-  private String reportServerUrl;
-
-  private String overviewReportFile;
-  private String definitionReportFile;
-  private String instanceReportFile;
-
-
-  public ConsoleConfig(String consoleServerUrl, String reportServerUrl)
-  {
-    this.consoleServerUrl = consoleServerUrl;
-    this.reportServerUrl = reportServerUrl;
-  }
-
-  public ConsoleConfig()
-  {
-    Dictionary theme = Dictionary.getDictionary("consoleConfig");
-    consoleServerUrl = theme.get("consoleServerUrl");
-    reportServerUrl = theme.get("reportServerUrl");
-
-    overviewReportFile = theme.get("overviewReportFile");
-    definitionReportFile = theme.get("definitionReportFile");
-    instanceReportFile = theme.get("instanceReportFile");
-  }
-
-  public String getConsoleServerUrl()
-  {
-    return consoleServerUrl;
-  }
-
-  public void setConsoleServerUrl(String consoleServerUrl)
-  {
-    this.consoleServerUrl = consoleServerUrl;
-  }
-
-  public String getReportServerUrl()
-  {
-    return reportServerUrl;
-  }
-
-  public void setReportServerUrl(String reportServerUrl)
-  {
-    this.reportServerUrl = reportServerUrl;
-  }
-
-  public String getOverviewReportFile()
-  {
-    return overviewReportFile;
-  }
-
-  public void setOverviewReportFile(String overviewReportFile)
-  {
-    this.overviewReportFile = overviewReportFile;
-  }
-
-  public String getDefinitionReportFile()
-  {
-    return definitionReportFile;
-  }
-
-  public void setDefinitionReportFile(String definitionReportFile)
-  {
-    this.definitionReportFile = definitionReportFile;
-  }
-
-  public String getInstanceReportFile()
-  {
-    return instanceReportFile;
-  }
-
-  public void setInstanceReportFile(String instanceReportFile)
-  {
-    this.instanceReportFile = instanceReportFile;
-  }
-}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Editor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Editor.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Editor.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,150 +0,0 @@
-/*
- * 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;
-
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.TabPanel;
-import com.gwtext.client.widgets.Component;
-import com.gwtext.client.widgets.layout.FitLayout;
-import com.gwtext.client.widgets.layout.BorderLayout;
-import com.gwtext.client.widgets.layout.BorderLayoutData;
-import com.gwtext.client.core.RegionPosition;
-
-/**
- * An editor can be plugged into a {@link org.jboss.bpm.console.client.Workspace}
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public abstract class Editor extends Panel
-{
-  protected MainView main;
-  private TabPanel tabPanel;
-
-  protected Editor(MainView main)
-  {
-    super();
-    this.main = main;
-    this.setPaddings(10);
-
-    // -------
-    this.tabPanel = new TabPanel();
-    this.tabPanel.setResizeTabs(true);
-    this.tabPanel.setMinTabWidth(115);
-    this.tabPanel.setTabWidth(135);
-    this.tabPanel.setEnableTabScroll(true);
-    this.tabPanel.setAutoScroll(true);
-    this.tabPanel.setPlain(true);
-    this.tabPanel.setActiveTab(0);
-    this.tabPanel.setBorder(false);
-
-    // -------
-
-    Panel panel = new Panel();
-    panel.setBorder(false);
-    panel.setPaddings(10);
-    panel.setLayout(new FitLayout());
-
-    panel.setWidth(UIConstants.EDITOR_WIDTH);
-    panel.setHeight(500);
-
-    // -------
-
-    Panel borderPanel = new Panel();
-    borderPanel.setBorder(false);
-    borderPanel.setLayout(new BorderLayout());
-
-    //add east panel
-    /*Panel eastPanel = new Panel();
-    eastPanel.setHtml("<p>east panel</p>");
-    eastPanel.setTitle("East Side");
-    eastPanel.setCollapsible(true);
-    eastPanel.setWidth(225);
-
-    BorderLayoutData eastData = new BorderLayoutData(RegionPosition.EAST);
-    eastData.setSplit(false);
-    eastData.setMinSize(75);
-    eastData.setMaxSize(100);
-    eastData.setMargins(new Margins(0, 0, 5, 0));
-
-    borderPanel.add(eastPanel, eastData);*/
-
-    // add center panel        
-    borderPanel.add(tabPanel, new BorderLayoutData(RegionPosition.CENTER));
-
-    panel.add(borderPanel);
-
-    this.add(panel);
-  }
-
-  public abstract String getEditorId();
-
-  public abstract String getTitle();
-
-  public abstract String getIconCSS();
-
-  public abstract MenuSection provideMenuSection();
-
-  public boolean hasView(String viewId)
-  {
-    boolean b = false;
-    final String tabId = viewId + ".tab";
-
-    Component[] tabs = tabPanel.getItems();
-    for (int i = 0; i < tabs.length; i++)
-    {
-      Component tab = tabs[i];
-      if (tab.getId().equals(tabId))
-      {
-        b = true;
-        break;
-      }
-    }
-
-    return b;
-  }
-
-  public void showView(String viewId)
-  {
-    final String tabId = viewId + ".tab";
-    this.tabPanel.setActiveTab(tabId);
-  }
-
-  public void addView(View view, boolean closable)
-  {
-    view.setId(view.getViewId() + ".tab");
-    view.setClosable(closable);
-    view.setIconCls(view.getIconCSS());
-
-    this.tabPanel.add(view);
-    this.tabPanel.setActiveTab(view.getId());
-
-  }
-
-  class WrapperPanel extends Panel
-  {
-    public WrapperPanel(String id)
-    {
-      super();
-      setId(id);
-    }
-  }
-}

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Header.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -31,18 +31,16 @@
 
 import java.util.List;
 
-import org.jboss.bpm.console.client.widgets.HelpPanel;
-
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 public class Header extends Panel
 {
-  private MainView view;
+  private ApplicationContext view;
 
   public final static String ID = "org.jboss.bpm.headerPanel";
 
-  public Header(MainView view)
+  public Header(ApplicationContext view)
   {
     super();
     this.view = view;
@@ -70,7 +68,7 @@
     userInfo.setLayout(layout);
 
     userInfo.add(new Image("images/icons/05.png"));
-    userInfo.add(new HTML(view.getUsername()));
+    userInfo.add(new HTML(view.getAuthentication().getUsername()));
     userInfo.add(
         new Button("Logout",
             new ButtonListenerAdapter()
@@ -78,7 +76,7 @@
 
               public void onClick(Button button, EventObject eventObject)
               {
-                view.logout();
+                view.getAuthentication().doLogout();
               }
             }
         )

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -40,7 +40,7 @@
  *
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
-public class MainView extends Composite
+public class MainView extends Composite implements ApplicationContext
 {
   private HTML status = new HTML();
   private Header header;
@@ -158,18 +158,8 @@
     });
   }
 
-  public List<String> getRolesAssigned()
+  public Authentication getAuthentication()
   {
-    return auth.getRolesAssigned();
+    return auth;
   }
-
-  public String getUsername()
-  {
-    return auth.getUsername();
-  }
-
-  public void logout()
-  {
-    auth.doLogout();
-  }
 }

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Menu.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Menu.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Menu.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,61 +0,0 @@
-/*
- * 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;
-
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.layout.AccordionLayout;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * The main menu on the left hand.
- * Keeps a list of {@link org.jboss.bpm.console.client.MenuSection}.
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class Menu extends Panel
-{
-  private final MainView mainView;
-  private List<Panel> sections = new ArrayList<Panel>();
-
-  public Menu(final MainView view)
-  {
-    super();
-    this.mainView = view;
-
-    final AccordionLayout accordion = new AccordionLayout(true);
-
-    this.setTitle("");
-    this.setCollapsible(true);
-    this.setWidth(200);
-    this.setLayout(accordion);
-
-  }
-
-  public void addSection(MenuSection menuSection)
-  {
-    this.sections.add(menuSection);
-    this.add(menuSection);
-  }
-
-}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MenuSection.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MenuSection.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MenuSection.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,47 +0,0 @@
-/*
- * 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;
-
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.Component;
-
-/**
- * One section in the lefthand main menu.
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class MenuSection extends Panel
-{
-
-  public MenuSection(String title, String iconClass, Component tree)
-  {
-    super();
-
-    setTitle(title);
-    setBorder(false);
-    setHideBorders(true);
-    setIconCls(iconClass);
-
-    if (tree != null)
-      add(tree);
-  }
-}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/UIConstants.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,39 +0,0 @@
-/*
- * 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;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class UIConstants
-{
-  public static final int OVERALL_WIDTH = 1024;
-  public static final int OVERALL_HEIGHT = 768;
-  public static final int MAIN_MENU_MIN = 175;
-  public static final int MAIN_MENU_MAX = 400;
-  public static final int EDITOR_WIDTH = 680;
-  public static final int TEASER_PANEL_WIDTH = 200;
-  public static final int EDITOR_PANEL_WIDTH = 450;
-
-  public static final String DEFAULT_TRANSITION = "default transition";
-  public static final String DATE_FORMAT = "yyyy-m-j H:i:s";  //08-10-02 13:51:27
-}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,179 +0,0 @@
-/*
- * 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;
-
-import com.google.gwt.http.client.URL;
-import com.google.gwt.core.client.GWT;
-import org.jboss.bpm.console.client.model.ProcessInstanceRef;
-import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class URLBuilder
-{
-  ConsoleConfig config;
-
-  public URLBuilder(ConsoleConfig config)
-  {
-    this.config = config;
-  }
-
-  public String getConsoleServerUrl()
-  {
-    return config.getConsoleServerUrl();
-  }
-
-  public String getProcessDefinitionsURL()
-  {
-    return getConsoleServerUrl() + "/rs/process/definitions";
-  }
-
-  public String getProcessInstancesURL(long processId)
-  {
-    return getConsoleServerUrl() + "/rs/process/definitions/" + processId + "/instances";
-  }
-
-  public String getUserInRoleURL(String[] possibleRoles)
-  {
-    StringBuffer sb = new StringBuffer();
-    for (int i = 0; i < possibleRoles.length; i++)
-    {
-      sb.append(URL.encode(possibleRoles[i]));
-      if (i < possibleRoles.length - 1)
-        sb.append(",");
-    }
-    return getConsoleServerUrl() + "/rs/identity/user/roles?roleCheck=" + sb.toString();
-  }
-
-  @Deprecated
-  public String getRemoveDefinitionURL(long processId)
-  {
-    return getConsoleServerUrl() + "/rs/process/definitions/" + processId + "/remove";
-  }
-
-  public String getProcessImageURL(long processId)
-  {
-    return getConsoleServerUrl() + "/rs/jbpm3/definitions/" + processId + "/image";
-  }
-
-  public String getDiagramInfoURL(long processId)
-  {
-    return getConsoleServerUrl() + "/rs/jbpm3/definitions/" + processId + "/diagramInfo";
-  }
-
-  public String getActiveNodeInfoURL(long instanceId)
-  {
-    return getConsoleServerUrl() + "/rs/jbpm3/instances/" + instanceId + "/activeNodeInfo";
-  }
-
-  public String getStateChangeURL(long instanceId, ProcessInstanceRef.STATE state)
-  {
-    return getConsoleServerUrl() + "/rs/process/instances/" + instanceId + "/state/" + state;
-  }
-
-  public String getStartNewInstanceURL(long processId)
-  {
-    return getConsoleServerUrl() + "/rs/process/definitions/" + processId + "/instances/new";
-  }
-
-  public String getUploadDefinitionURL()
-  {
-    return getConsoleServerUrl() + "/rs/jbpm3/definitions/new";
-  }
-
-  public String getTaskListByActorURL(String actor)
-  {
-    return getConsoleServerUrl() + "/rs/tasks/actor/" + URL.encode(actor);
-  }
-
-  public String getTaskFormDefURL(long processId, long taskId)
-  {
-    return getConsoleServerUrl() + "/rs/tasks/forms/" + processId + "/" + taskId;
-  }
-
-  public String getTaskEndURL(long id)
-  {
-    return getConsoleServerUrl() + "/rs/tasks/" + id + "/close/transition/default";
-  }
-
-  public String getTaskEndURL(long id, String signalName)
-  {
-    return getConsoleServerUrl() + "/rs/tasks/" + id + "/close/transition?signal=" + URL.encode(signalName);
-  }
-
-  public String getTaskAssignmentURL(long id, String actor)
-  {
-    String actualActor = actor == null ? "" : "/" + actor;
-    return getConsoleServerUrl() + "/rs/tasks/" + id + "/assignment" + URL.encode(actualActor);
-  }
-
-  public String getTokenSignalUrl(TokenReference tok)
-  {
-    return getConsoleServerUrl() + "/rs/jbpm3/tokens/" + tok.getId() + "/transition/default";
-  }
-
-  public String getTokenSignalUrl(TokenReference tok, String signal)
-  {
-    String encodedSignal = URL.encode(signal);
-    return getConsoleServerUrl() + "/rs/jbpm3/tokens/" + tok.getId() + "/transition?signal=" + encodedSignal;
-  }
-
-  public String getAvailableActorsUrl(String actorId)
-  {
-    return getConsoleServerUrl() + "/rs/identity/user/" + actorId + "/actors";
-  }
-
-  public String getProcessDefinitionByNameURL(String name)
-  {
-    return getConsoleServerUrl() + "/rs/process/definitions/" + name;
-  }
-
-  public String getDeployTestHarnessUrl()
-  {
-    return getConsoleServerUrl() + "/rs/test/deploy/harness";
-  }
-
-  public String getUndeployTestHarnessUrl()
-  {
-    return getConsoleServerUrl() + "/rs/test/undeploy/harness";
-  }
-
-  public String getOverviewReportUrl()
-  {
-    String name = URL.encode(config.getOverviewReportFile());
-    String url = config.getReportServerUrl() + "/rs/report/view/" + name;
-    if (!GWT.isScript())
-      url += "?id=birt";
-    return url;
-  }
-
-  public String getDefinitionReportUrl(String name)
-  {
-    String reportName = URL.encode(name);
-    String reportFileName = URL.encode(config.getDefinitionReportFile());
-    String url = config.getReportServerUrl() + "/rs/report/view/" + reportFileName + "?name=" + reportName;
-    if (!GWT.isScript())
-      url += "&id=birt";
-    return url;
-  }
-}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/View.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/View.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/View.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,45 +0,0 @@
-/*
- * 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;
-
-import com.gwtext.client.widgets.Panel;
-
-/**
- * View's are {@link org.jboss.bpm.console.client.Editor} components
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public abstract class View extends Panel
-{
-
-  protected MainView mainMenu;
-
-  protected View(MainView main)
-  {
-    super();
-    this.mainMenu = main;
-  }
-
-  public abstract String getViewId();
-
-  public abstract String getIconCSS();
-}

Deleted: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Workspace.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Workspace.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Workspace.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -1,110 +0,0 @@
-/*
- * 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;
-
-import com.gwtext.client.widgets.Component;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.TabPanel;
-
-/**
- * Maintains {@link org.jboss.bpm.console.client.Workspace}'s
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class Workspace extends TabPanel
-{
-  protected MainView view;
-  private Menu menu;
-  
-  public Workspace(Menu menu)
-  {
-    super();
-    this.menu = menu;
-
-    this.setResizeTabs(true);
-    this.setMinTabWidth(115);
-    this.setTabWidth(135);
-    this.setEnableTabScroll(true);
-    this.setAutoScroll(true);
-    this.setActiveTab(0);
-  }
-
-  private Panel createTab(Editor editor, boolean closeable)
-  {
-    Panel tab = new WrapperPanel(editor.getId() + ".tab");
-    tab.setTitle(editor.getTitle());
-    tab.setIconCls(editor.getIconCSS());
-    tab.setClosable(closeable);
-    tab.setAutoScroll(true);
-    tab.setBorder(false);
-    tab.setFrame(false);
-    tab.setHideBorders(true);
-    return tab;
-  }
-
-  public void addEditor(Editor editor, boolean closeable)
-  {
-    // Menu
-    menu.addSection(editor.provideMenuSection());
-
-    // Editor pane
-    Panel tab = createTab(editor, closeable);
-    tab.add(editor);
-    this.add(tab);
-    this.setActiveTab(tab.getId());
-    this.doLayout();
-  }
-
-  public boolean hasEditor(String id)
-  {
-    boolean b = false;
-    final String tabId = id + ".tab";
-
-    Component[] tabs = this.getItems();
-    for (int i = 0; i < tabs.length; i++)
-    {
-      Component tab = tabs[i];
-      if (tab.getId().equals(tabId))
-      {
-        b = true;
-        break;
-      }
-    }
-
-    return b;
-  }
-
-  public void showTab(String id)
-  {
-    final String tabId = id + ".tab";
-    this.setActiveTab(tabId);
-  }
-
-  class WrapperPanel extends Panel
-  {
-    public WrapperPanel(String id)
-    {
-      super();
-      setId(id);
-    }
-  }
-}

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -26,5 +26,5 @@
  */
 public interface WorkspaceLauncher
 {
-  void launch(MainView main, Workspace workspace);
+  void launch(ApplicationContext appContext, Workspace workspace);
 }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -31,8 +31,8 @@
 import com.gwtext.client.widgets.grid.RowSelectionModel;
 import org.jboss.bpm.console.client.util.ConsoleLog;
 import org.jboss.bpm.console.client.util.ModelModificationCallback;
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 import org.jboss.bpm.console.client.widgets.RemoteListView;
 
@@ -45,7 +45,7 @@
 {
   private Map<Integer, ProcessDefinitionRef> row2ProcessMap = new HashMap<Integer, ProcessDefinitionRef>();
 
-  public ProcessDefinitionList(ModelModificationCallback callback, String titleName, final MainView view)
+  public ProcessDefinitionList(ModelModificationCallback callback, String titleName, final ApplicationContext view)
   {
     super(callback, titleName, view, getResourceUrl(view));
     enableAddBtn(false);
@@ -53,7 +53,7 @@
     setRowSelectionModel(sm);
   }
 
-  private static String getResourceUrl(MainView view)
+  private static String getResourceUrl(ApplicationContext view)
   {
     return view.getUrlBuilder().getProcessDefinitionsURL();
   }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -49,10 +49,10 @@
   public final static String ID = "org.jboss.bpm.process.ProcessEditor";
 
   private ProcessDefinitionList processDefinitionList;
-  private MainView mainView;
+  private ApplicationContext mainView;
   private ModelListenerRegistry modelListeners = new ModelListenerRegistry();
 
-  public ProcessEditor(final MainView view)
+  public ProcessEditor(final ApplicationContext view)
   {
     super(view);
     this.setId(ID);

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageComponent.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageComponent.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageComponent.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -28,7 +28,7 @@
 import com.gwtext.client.widgets.Panel;
 import com.gwtext.client.widgets.event.PanelListenerAdapter;
 import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.MainView;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
 import org.jboss.bpm.console.client.model.jbpm3.DiagramNodeInfo;
@@ -51,10 +51,10 @@
 public class ProcessImageComponent extends Panel
 {
   private ProcessInstanceRef instance;
-  private MainView view;
+  private ApplicationContext view;
   private ActiveNodeInfo activeNodeInfo = null;
 
-  public ProcessImageComponent(final ProcessInstanceRef instance, final MainView view)
+  public ProcessImageComponent(final ProcessInstanceRef instance, final ApplicationContext view)
   {
     super();
     this.instance = instance;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -32,7 +32,7 @@
 import com.gwtext.client.widgets.form.FormPanel;
 import com.gwtext.client.widgets.form.TextField;
 import com.gwtext.client.data.Record;
-import org.jboss.bpm.console.client.MainView;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.widgets.FormWidgets;
 import org.jboss.bpm.console.client.util.ModelChangeListener;
@@ -50,12 +50,12 @@
 
   private ModelModificationCallback callback;
 
-  private MainView mainView;
+  private ApplicationContext mainView;
 
   private Button suspendButton;
   private Button resumeButton;
 
-  public ProcessInstanceDetailForm(MainView view, ModelModificationCallback callback)
+  public ProcessInstanceDetailForm(ApplicationContext view, ModelModificationCallback callback)
   {
     super();
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -33,9 +33,9 @@
 import com.gwtext.client.widgets.grid.Renderer;
 import com.gwtext.client.widgets.grid.CellMetadata;
 import org.jboss.bpm.console.client.util.ConsoleLog;
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.util.DateRenderer;
 import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 import org.jboss.bpm.console.client.model.ProcessInstanceRef;
@@ -55,7 +55,7 @@
   private Map<Integer, ProcessInstanceRef> row2InstanceMap = new HashMap<Integer, ProcessInstanceRef>();
   private ProcessDefinitionRef parent;
 
-  public ProcessInstanceList(ModelModificationCallback callback, ProcessDefinitionRef procDef, String titleName, MainView view)
+  public ProcessInstanceList(ModelModificationCallback callback, ProcessDefinitionRef procDef, String titleName, ApplicationContext view)
   {
     super(callback, titleName, view, getResourceUrl(view, procDef.getProcessId()));
     this.parent = procDef;
@@ -258,7 +258,7 @@
     return reader;
   }
 
-  private static String getResourceUrl(MainView view, long parentId)
+  private static String getResourceUrl(ApplicationContext view, long parentId)
   {
     return view.getUrlBuilder().getProcessInstancesURL(parentId);
   }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListView.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListView.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -27,9 +27,9 @@
 import com.gwtext.client.widgets.TabPanel;
 import com.gwtext.client.widgets.grid.RowSelectionModel;
 import com.gwtext.client.widgets.grid.event.RowSelectionListenerAdapter;
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.View;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.util.ModelChangeListener;
@@ -44,7 +44,7 @@
 {
   public final static String ID = "org.jboss.bpm.process.ProcessInstanceList";
 
-  private MainView view;
+  private ApplicationContext view;
   private ProcessDefinitionRef parent;
   private ProcessInstanceList instanceList;
 
@@ -59,7 +59,7 @@
   private ModelListenerRegistry modelListeners = new ModelListenerRegistry();
   private ModelModificationCallback modelModificationCallback;
 
-  public ProcessInstanceListView(ProcessDefinitionRef proc, final MainView view)
+  public ProcessInstanceListView(ProcessDefinitionRef proc, final ApplicationContext view)
   {
     super(view);
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceView.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceView.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -24,9 +24,9 @@
 import com.gwtext.client.core.EventObject;
 import com.gwtext.client.widgets.*;
 import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.View;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
 import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 
@@ -42,9 +42,9 @@
 
   private ProcessInstanceRef processInstance;
 
-  private MainView mainView;
+  private ApplicationContext mainView;
 
-  public ProcessInstanceView(final ProcessDefinitionRef proc, final ProcessInstanceRef instance, final MainView view)
+  public ProcessInstanceView(final ProcessDefinitionRef proc, final ProcessInstanceRef instance, final ApplicationContext view)
   {
     super(view);
     this.setId(ID + "." + instance.getInstanceId());

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditorComponent.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditorComponent.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditorComponent.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -31,8 +31,8 @@
 import com.gwtext.client.widgets.tree.TreeNode;
 import com.gwtext.client.widgets.tree.TreePanel;
 import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.util.ModelModificationCallback;
 import org.jboss.bpm.console.client.model.ProcessInstanceRef;
 import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
@@ -45,11 +45,11 @@
 
   private TokenForm tokenForm;
   private TokenTree tokenTree;
-  private MainView mainView;
+  private ApplicationContext mainView;
   private ModelModificationCallback callback;
 
   public TokenEditorComponent(
-      MainView mainView, final ProcessInstanceRef instance,
+      ApplicationContext mainView, final ProcessInstanceRef instance,
       ModelModificationCallback callback
   )
   {

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ProcessReportView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ProcessReportView.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ProcessReportView.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -21,9 +21,9 @@
  */
 package org.jboss.bpm.console.client.report;
 
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
 import org.jboss.bpm.console.client.View;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.util.ConsoleLog;
 import com.gwtext.client.widgets.layout.VerticalLayout;
 import com.gwtext.client.widgets.layout.HorizontalLayout;
@@ -46,9 +46,9 @@
 {
   public final static String ID = "org.jboss.bpm.metric.ProcessMetric";
   private String definitionName;
-  private MainView mainView;
+  private ApplicationContext mainView;
 
-  public ProcessReportView(final String definitionName, final MainView view)
+  public ProcessReportView(final String definitionName, final ApplicationContext view)
   {
     super(view);
     this.definitionName = definitionName;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -34,10 +34,8 @@
 import com.gwtext.client.widgets.layout.HorizontalLayout;
 import com.gwtext.client.widgets.layout.VerticalLayout;
 import com.gwtext.client.widgets.menu.Separator;
+import org.jboss.bpm.console.client.*;
 import org.jboss.bpm.console.client.Editor;
-import org.jboss.bpm.console.client.MainView;
-import org.jboss.bpm.console.client.MenuSection;
-import org.jboss.bpm.console.client.View;
 import org.jboss.bpm.console.client.util.ConsoleLog;
 
 /**
@@ -46,9 +44,9 @@
 public class ReportEditor extends Editor
 {
   public final static String ID = "org.jboss.bpm.metric.ProcessMetricOverview";
-  private MainView mainView;
+  private ApplicationContext mainView;
 
-  public ReportEditor(final MainView view)
+  public ReportEditor(final ApplicationContext view)
   {
     super(view);
     this.mainView = view;

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -33,7 +33,7 @@
 import com.gwtext.client.widgets.event.PanelListenerAdapter;
 import com.gwtext.client.widgets.form.Form;
 import com.gwtext.client.widgets.form.FormPanel;
-import org.jboss.bpm.console.client.MainView;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.model.DTOParser;
 import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.client.widgets.FormWidgets;
@@ -51,13 +51,13 @@
 {
   private FormPanel formPanel;
 
-  private MainView mainView;
+  private ApplicationContext mainView;
   private AssignmentCallback callback;
 
   private List<String> availableActors;
   private TaskRef selectedInstance;
 
-  public AssignmentFormPanel(MainView mainView, AssignmentCallback callback)
+  public AssignmentFormPanel(ApplicationContext mainView, AssignmentCallback callback)
   {
     super();
     this.mainView = mainView;
@@ -151,7 +151,7 @@
 
   private void loadActors()
   {
-    String url = mainView.getUrlBuilder().getAvailableActorsUrl(mainView.getUsername());
+    String url = mainView.getUrlBuilder().getAvailableActorsUrl(mainView.getAuthentication().getUsername());
     RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, url);
 
     try

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -33,8 +33,8 @@
 import com.gwtext.client.widgets.form.Form;
 import com.gwtext.client.widgets.form.FormPanel;
 import com.gwtext.client.widgets.form.TextField;
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.model.TaskRef;
 import org.jboss.bpm.console.client.widgets.FormWidgets;
 import org.jboss.bpm.console.client.util.ModelChangeListener;
@@ -49,7 +49,7 @@
 
   private FormPanel formPanel;
   private TaskRef selectedInstance;
-  private MainView mainView;
+  private ApplicationContext mainView;
 
   private Button startBtn;
   private Button stopBtn;
@@ -57,7 +57,7 @@
 
   private AssignmentCallback callback;
 
-  public TaskDetailsFormPanel(final MainView mainView, AssignmentCallback callback)
+  public TaskDetailsFormPanel(final ApplicationContext mainView, AssignmentCallback callback)
   {
     super();
     this.mainView = mainView;
@@ -103,7 +103,7 @@
               MessageBox.alert("Please select a task.");
               return;
             }
-            selectedInstance.setActor(mainView.getUsername());
+            selectedInstance.setActor(mainView.getAuthentication().getUsername());
             reassignTask();
           }
         }

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -48,7 +48,7 @@
 {
 
   public final static String ID = "org.jboss.bpm.task.TaskList";
-  private MainView mainView;
+  private ApplicationContext mainView;
   private TaskList taskList;
   
   private boolean initialized;
@@ -56,7 +56,7 @@
 
   private ModelListenerRegistry modelListeners = new ModelListenerRegistry();
 
-  public TaskEditor(MainView mainView)
+  public TaskEditor(ApplicationContext mainView)
   {
     super(mainView);
     this.setId(ID);

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -34,8 +34,8 @@
 import com.gwtext.client.widgets.event.PanelListenerAdapter;
 import com.gwtext.client.widgets.grid.*;
 import com.gwtext.client.widgets.grid.event.GridCellListener;
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.model.DTOParser;
 import org.jboss.bpm.console.client.model.TaskRef;
 
@@ -48,7 +48,7 @@
 public class TaskList extends Panel
 {
   private Map<Integer, TaskRef> row2taskref = new HashMap<Integer, TaskRef>();
-  private MainView mainView;
+  private ApplicationContext mainView;
   private GridPanel grid;
   private GroupingStore store;
   private String title;
@@ -58,7 +58,7 @@
 
   private ModelModificationCallback modelModificationCallback;
 
-  public TaskList(ModelModificationCallback callback, String titleName, final MainView view)
+  public TaskList(ModelModificationCallback callback, String titleName, final ApplicationContext view)
   {
     this.mainView = view;
     //this.title = titleName;
@@ -70,7 +70,7 @@
     this.setFrame(false);
     this.setIconCls("bpm-task-icon");
 
-    String resourceUrl = view.getUrlBuilder().getTaskListByActorURL(view.getUsername());
+    String resourceUrl = view.getUrlBuilder().getTaskListByActorURL(view.getAuthentication().getUsername());
     DataProxy dataProxy = new ScriptTagProxy(resourceUrl, 1000 * 10);
 
     final Reader reader = createReader();

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -34,8 +34,8 @@
 import com.gwtext.client.widgets.grid.event.GridCellListener;
 import org.jboss.bpm.console.client.util.ConsoleLog;
 import org.jboss.bpm.console.client.util.ModelModificationCallback;
-import org.jboss.bpm.console.client.MainView;
 import org.jboss.bpm.console.client.UIConstants;
+import org.jboss.bpm.console.client.ApplicationContext;
 
 /**
  * A {@link com.gwtext.client.widgets.grid.GridPanel} view that will pull data
@@ -50,7 +50,7 @@
 public abstract class RemoteListView extends Panel
 {
   protected int selectedRowIndex = -1;
-  protected MainView view;
+  protected ApplicationContext view;
   public static final int PAGE_SIZE = 25;
   private GridPanel grid;
   protected String title;
@@ -69,7 +69,7 @@
 
   protected ModelModificationCallback modelModificationCallback;
 
-  public RemoteListView(ModelModificationCallback callback, String titleName, MainView view, String resourceUrl)
+  public RemoteListView(ModelModificationCallback callback, String titleName, ApplicationContext view, String resourceUrl)
   {
     super();
 

Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java	2009-01-15 11:05:35 UTC (rev 3644)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java	2009-01-15 13:35:00 UTC (rev 3645)
@@ -102,7 +102,7 @@
         new ClassSourceFileComposerFactory(packageName, className);
 
     // Imports
-    composerFactory.addImport("org.jboss.bpm.console.client.MainView");
+    composerFactory.addImport("org.jboss.bpm.console.client.ApplicationContext");
     composerFactory.addImport("org.jboss.bpm.console.client.Workspace");
     composerFactory.addImport("org.jboss.bpm.console.client.WorkspaceLauncher");
 
@@ -126,7 +126,7 @@
   private void generateMethods(SourceWriter sourceWriter)
   {
     // start constructor source generation
-    sourceWriter.println("public void launch(MainView main, Workspace workspace) { ");
+    sourceWriter.println("public void launch(ApplicationContext appContext, Workspace workspace) { ");
     sourceWriter.indent();
 
     InputStream in = getClass().getClassLoader().getResourceAsStream(
@@ -151,7 +151,7 @@
           if (line.equals("") || line.startsWith("#"))
             continue;
 
-          sourceWriter.println("workspace.addEditor( new " + line + "(main), false );");
+          sourceWriter.println("workspace.addEditor( new " + line + "(appContext), false );");
         }
       }
       finally




More information about the jbpm-commits mailing list