[overlord-commits] Overlord SVN: r930 - in bpm-console/trunk: gui/war/src/main/java/org/jboss/bpm/console/client/engine and 4 other directories.

overlord-commits at lists.jboss.org overlord-commits at lists.jboss.org
Mon Jan 25 07:55:28 EST 2010


Author: heiko.braun at jboss.com
Date: 2010-01-25 07:55:27 -0500 (Mon, 25 Jan 2010)
New Revision: 930

Added:
   bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
   bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LazyPanel.java
Removed:
   bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
   bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/LazyPanel.java
   bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/model/
Modified:
   bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java
   bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java
   bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
   bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
   bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
   bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java
   bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Workspace.java
Log:
Remove dependencies on BPM workspace

Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java	                        (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -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 org.gwt.mosaic.ui.client.Viewport;
+
+/**
+ * Provides context information to console components and plugins.
+ * 
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public interface ApplicationContext
+{
+  Workspace getWorkpace();
+  
+  void displayMessage(String message, boolean isError);
+
+  Authentication getAuthentication();
+
+  ConsoleConfig getConfig();
+
+  Viewport getViewport();
+
+  void refreshView();
+    
+}

Added: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LazyPanel.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LazyPanel.java	                        (rev 0)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/LazyPanel.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -0,0 +1,35 @@
+/*
+ * 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 interface LazyPanel
+{
+  boolean isInitialized();
+
+  /**
+   * Expected to be an idempotent implementation
+   */
+  void initialize();
+}

Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/SettingsEditor.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -34,6 +34,7 @@
 import org.gwt.mosaic.ui.client.layout.MosaicPanel;
 import org.jboss.bpm.console.client.common.HeaderLabel;
 import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+import org.jboss.errai.workspaces.client.Registry;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
@@ -64,7 +65,7 @@
 
       this.add(tabPanel);
 
-      appContext.refreshView();
+      Registry.get(ApplicationContext.class).refreshView();
       
       isInitialized = true;
     }
@@ -110,12 +111,12 @@
     HeaderLabel server = new HeaderLabel("Server Info");
     layoutPanel.add(server, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
 
-    ServerStatusView serverStatus = new ServerStatusView(appContext);
+    ServerStatusView serverStatus = new ServerStatusView(Registry.get(ApplicationContext.class));
     serverStatus.initialize();
 
     MosaicPanel layout2 = new MosaicPanel(new GridLayout(2,2));
     layout2.add(new HTML("Host:"));
-    layout2.add(new HTML(appContext.getConfig().getConsoleServerUrl()));
+    layout2.add(new HTML(Registry.get(ApplicationContext.class).getConfig().getConsoleServerUrl()));
 
     layout2.add(new Label("Plugins:"));
     layout2.add(serverStatus);
@@ -145,7 +146,7 @@
     return new MenuSection(
         getTitle(),
         AbstractImagePrototype.create(icons.settingsIcon()),
-        new SettingsEditorNavigation(appContext)
+        new SettingsEditorNavigation(Registry.get(ApplicationContext.class))
     );
 
   }

Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/EngineEditor.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -25,11 +25,13 @@
 import com.google.gwt.user.client.ui.AbstractImagePrototype;
 import org.gwt.mosaic.ui.client.MessageBox;
 import org.gwt.mosaic.ui.client.TabLayoutPanel;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.Editor;
 import org.jboss.bpm.console.client.MenuSection;
 import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
 import org.jboss.errai.workspaces.client.EditorWidget;
 import org.jboss.errai.workspaces.client.EditorWidgetClient;
+import org.jboss.errai.workspaces.client.Registry;
 
 /**
  * Manage runtime aspects of a process engine
@@ -57,7 +59,7 @@
               tabPanel = (TabLayoutPanel)editorWidget.build();
               EngineEditor.this.add(tabPanel);
               editorWidget.loadData();
-              appContext.refreshView();
+              Registry.get(ApplicationContext.class).refreshView();
               isInitialized = true;
             }
 
@@ -87,7 +89,7 @@
     return new MenuSection(
         getTitle(),
         AbstractImagePrototype.create(icons.runtimeIcon()),
-        new EngineEditorNavigation(appContext)
+        new EngineEditorNavigation(Registry.get(ApplicationContext.class))
     );
   }
 }

Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -25,11 +25,13 @@
 import com.google.gwt.user.client.ui.AbstractImagePrototype;
 import org.gwt.mosaic.ui.client.MessageBox;
 import org.gwt.mosaic.ui.client.TabLayoutPanel;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.Editor;
 import org.jboss.bpm.console.client.MenuSection;
 import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
 import org.jboss.errai.workspaces.client.EditorWidget;
 import org.jboss.errai.workspaces.client.EditorWidgetClient;
+import org.jboss.errai.workspaces.client.Registry;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
@@ -52,7 +54,7 @@
               tabPanel = (TabLayoutPanel)editorWidget.build();
               ProcessEditor.this.add(tabPanel);
               editorWidget.loadData();
-              appContext.refreshView();
+              Registry.get(ApplicationContext.class).refreshView();
               isInitialized = true;
             }
 
@@ -82,7 +84,7 @@
     return new MenuSection(
         getTitle(),
        AbstractImagePrototype.create(icons.processIcon()),
-        new ProcessEditorNavigation(super.appContext)
+        new ProcessEditorNavigation(Registry.get(ApplicationContext.class))
     );
   }
 }

Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -28,11 +28,13 @@
 import org.gwt.mosaic.ui.client.ImageButton;
 import org.gwt.mosaic.ui.client.MessageBox;
 import org.gwt.mosaic.ui.client.TabLayoutPanel;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.Editor;
 import org.jboss.bpm.console.client.MenuSection;
 import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
 import org.jboss.errai.workspaces.client.EditorWidget;
 import org.jboss.errai.workspaces.client.EditorWidgetClient;
+import org.jboss.errai.workspaces.client.Registry;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
@@ -55,7 +57,7 @@
               tabPanel = (TabLayoutPanel)editorWidget.build();
               ReportEditor.this.add(tabPanel);
               editorWidget.loadData();
-              appContext.refreshView();
+              Registry.get(ApplicationContext.class).refreshView();
               isInitialized = true;
             }
 
@@ -85,7 +87,7 @@
     return new MenuSection(
         getTitle(),
         AbstractImagePrototype.create(icons.reportIcon()),
-        new ReportEditorNavigation(appContext)
+        new ReportEditorNavigation(Registry.get(ApplicationContext.class))
     );
   }
 

Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -25,11 +25,13 @@
 import com.google.gwt.user.client.ui.AbstractImagePrototype;
 import org.gwt.mosaic.ui.client.MessageBox;
 import org.gwt.mosaic.ui.client.TabLayoutPanel;
+import org.jboss.bpm.console.client.ApplicationContext;
 import org.jboss.bpm.console.client.Editor;
 import org.jboss.bpm.console.client.MenuSection;
 import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
 import org.jboss.errai.workspaces.client.EditorWidget;
 import org.jboss.errai.workspaces.client.EditorWidgetClient;
+import org.jboss.errai.workspaces.client.Registry;
 
 /**
  * @author Heiko.Braun <heiko.braun at jboss.com>
@@ -52,7 +54,7 @@
               tabPanel = (TabLayoutPanel)editorWidget.build();
               TaskEditor.this.add(tabPanel);
               editorWidget.loadData();
-              appContext.refreshView();
+              Registry.get(ApplicationContext.class).refreshView();
               isInitialized = true;
             }
 
@@ -82,7 +84,7 @@
     return new MenuSection(
         getTitle(),
         AbstractImagePrototype.create(icons.taskIcon()),
-        new TaskEditorNavigation(appContext)
+        new TaskEditorNavigation(Registry.get(ApplicationContext.class))
     );
   }
 

Deleted: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/ApplicationContext.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -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 org.gwt.mosaic.ui.client.Viewport;
-
-/**
- * Provides context information to console components and plugins.
- * 
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public interface ApplicationContext
-{
-  Workspace getWorkpace();
-  
-  void displayMessage(String message, boolean isError);
-
-  Authentication getAuthentication();
-
-  ConsoleConfig getConfig();
-
-  Viewport getViewport();
-
-  void refreshView();
-    
-}

Modified: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Editor.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -37,8 +37,6 @@
  *  Controller.handleEvent( new Event(...));
  * </code>
  * <p/>
- * By default every editor get's it's own controller that delegates to the main {@link org.jboss.bpm.console.client.ApplicationContext}
- * controller as it's parent.
  *
  * <h2>Layout</h2>
  * Each Editor uses a {@link org.gwt.mosaic.ui.client.layout.BorderLayout} by default.
@@ -46,10 +44,8 @@
  * @author Heiko.Braun <heiko.braun at jboss.com>
  */
 public abstract class Editor
-    extends org.gwt.mosaic.ui.client.layout.LayoutPanel
-    implements LazyPanel
+    extends org.gwt.mosaic.ui.client.layout.LayoutPanel    
 {
-  protected ApplicationContext appContext;
 
   protected Controller controller;
 
@@ -57,8 +53,7 @@
 
   public Editor()
   {
-    super();
-    this.appContext = Registry.get(ApplicationContext.class);
+    super();  
     this.controller = Registry.get(Controller.class);
   }
 

Deleted: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/LazyPanel.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/LazyPanel.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/LazyPanel.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -1,35 +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 interface LazyPanel
-{
-  boolean isInitialized();
-
-  /**
-   * Expected to be an idempotent implementation
-   */
-  void initialize();
-}

Modified: bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Workspace.java
===================================================================
--- bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Workspace.java	2010-01-25 12:15:43 UTC (rev 929)
+++ bpm-console/trunk/workspace/workspace-api/src/main/java/org/jboss/bpm/console/client/Workspace.java	2010-01-25 12:55:27 UTC (rev 930)
@@ -24,7 +24,6 @@
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DeferredCommand;
 import org.gwt.mosaic.ui.client.DeckLayoutPanel;
-import org.jboss.errai.workspaces.client.Registry;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -36,13 +35,11 @@
  */
 public class Workspace extends DeckLayoutPanel
 {
-  protected ApplicationContext appContext;
   private Menu menu;
 
   public Workspace(Menu menu)
   {
     super();
-    this.appContext = Registry.get(ApplicationContext.class);
     this.menu = menu;
     this.setPadding(5);
 



More information about the overlord-commits mailing list