[overlord-commits] Overlord SVN: r1002 - in activity-monitor/trunk: gui and 14 other directories.

overlord-commits at lists.jboss.org overlord-commits at lists.jboss.org
Thu Mar 11 07:01:30 EST 2010


Author: heiko.braun at jboss.com
Date: 2010-03-11 07:01:28 -0500 (Thu, 11 Mar 2010)
New Revision: 1002

Added:
   activity-monitor/trunk/gui/war/
   activity-monitor/trunk/gui/war/pom.xml
   activity-monitor/trunk/gui/war/src/
   activity-monitor/trunk/gui/war/src/main/
   activity-monitor/trunk/gui/war/src/main/java/
   activity-monitor/trunk/gui/war/src/main/java/ErraiApp.properties
   activity-monitor/trunk/gui/war/src/main/java/ErraiService.properties
   activity-monitor/trunk/gui/war/src/main/java/login.config
   activity-monitor/trunk/gui/war/src/main/java/org/
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/App.gwt.xml
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/BPAFDataAccess.java
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/DebugPanel.java
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/MonitorUI.java
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/server/
   activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/server/BPAFService.java
   activity-monitor/trunk/gui/war/src/main/java/roles.properties
   activity-monitor/trunk/gui/war/src/main/java/users.properties
   activity-monitor/trunk/gui/war/war/
   activity-monitor/trunk/gui/war/war/App.css
   activity-monitor/trunk/gui/war/war/App.html
   activity-monitor/trunk/gui/war/war/META-INF/
   activity-monitor/trunk/gui/war/war/WEB-INF/
   activity-monitor/trunk/gui/war/war/WEB-INF/web.xml
Modified:
   activity-monitor/trunk/model/pom.xml
   activity-monitor/trunk/pom.xml
Log:
Added GUI module

Added: activity-monitor/trunk/gui/war/pom.xml
===================================================================
--- activity-monitor/trunk/gui/war/pom.xml	                        (rev 0)
+++ activity-monitor/trunk/gui/war/pom.xml	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <name>JBoss BPM - ActivityMonitor:GUI</name>
+    <groupId>org.jboss.bpm</groupId>
+    <artifactId>activity-monitor-gui</artifactId>
+    <packaging>war</packaging>
+    <version>1.0-SNAPSHOT</version>
+
+    <!-- Parent -->
+    <parent>
+        <groupId>org.jboss.bpm</groupId>
+        <artifactId>activity-monitor-parent</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <properties>        
+        <gwt.maven.version>1.2.0-11137</gwt.maven.version>
+    </properties>
+
+    <dependencies>
+
+        <!-- Project Dependencies -->
+        <dependency>
+            <groupId>org.jboss.bpm</groupId>
+            <artifactId>activity-monitor-model</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+
+        <!-- Errai -->
+        <dependency>
+            <groupId>org.jboss.errai</groupId>
+            <artifactId>errai-common</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.errai</groupId>
+            <artifactId>errai-bus</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.errai</groupId>
+            <artifactId>errai-workspaces</artifactId>            
+        </dependency>
+
+
+        <!-- GWT and GWT Extensions -->
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-servlet</artifactId>
+            <scope>provided</scope>
+            <version>${gwt.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-user</artifactId>
+            <scope>provided</scope>
+            <version>${gwt.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.gwt</groupId>
+            <artifactId>gwt-dev</artifactId>
+            <scope>provided</scope>
+            <version>${gwt.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>                
+        </dependency>
+    </dependencies>
+
+    <build>
+        <outputDirectory>war/WEB-INF/classes</outputDirectory>
+
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+            </resource>
+        </resources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>gwt-maven-plugin</artifactId>
+                <version>${gwt.maven.version}</version>
+                <configuration>
+                    <inplace>true</inplace>
+                    <logLevel>DEBUG</logLevel>
+                    <runTarget>App.html</runTarget>
+                    <warSourceDirectory>war</warSourceDirectory>
+                    <extraJvmArgs>-Xmx512m</extraJvmArgs>
+                    <treeLogger>true</treeLogger>
+                    <gen>${project.build.directory}/generated</gen>
+                    <generateDirectory>${project.build.directory}/generated</generateDirectory>
+                    <disableCastChecking>true</disableCastChecking>
+                    <disableClassMetadata>true</disableClassMetadata>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>resources</goal>
+                            <!--goal>generateAsync</goal-->
+                            <goal>compile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <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-war-plugin</artifactId>
+                <configuration>
+                    <warSourceDirectory>war</warSourceDirectory>
+                    <webappDirectory>war</webappDirectory>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-clean-plugin</artifactId>
+                <version>2.2</version>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.2</version>
+                <executions>
+                    <execution>
+                        <id>clean.war</id>
+                        <phase>clean</phase>
+                        <configuration>
+                            <tasks>
+                                <!--
+                                    The gwt-maven-plugin use the war source folder
+                                    as it's build directory. We need to cleanup after we'd run
+                                    the plugin and remove all GWT related artifacts that are required
+                                    to run the hosted mode.
+                                -->
+                                <delete dir="war/WEB-INF/classes" />
+                                <delete dir="war/WEB-INF/lib" />
+                                <delete dir="war/app" />
+                                <delete dir="target" />
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+    <reporting>
+        <excludeDefaults>true</excludeDefaults>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>gwt-maven-plugin</artifactId>
+                <reportSets>
+                    <reportSet>
+                        <reports>
+                            <report>soyc</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
+            </plugin>
+        </plugins>
+    </reporting>
+
+    <!-- Repositories -->
+    <repositories>
+        <repository>
+            <id>repository.jboss.org</id>
+            <url>http://repository.jboss.org/maven2</url>
+        </repository>
+        <repository>
+            <id>snapshots.jboss.org</id>
+            <name>JBoss Snapshot Repository</name>
+            <url>http://snapshots.jboss.org/maven2</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>maven2.java.net</id>
+            <name>Java.net Repository for Maven 2</name>
+            <url>http://download.java.net/maven/2/</url>
+        </repository>
+        <repository>
+            <id>maven1.java.net</id>
+            <url>http://download.java.net/maven/1/</url>
+            <layout>legacy</layout>
+        </repository>
+        <repository>
+            <id>repository.codehaus.org</id>
+            <url>http://repository.codehaus.org</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository><!-- used by mvel to publish snapshots -->
+            <id>codehaus-snapshot</id>
+            <url>http://snapshots.repository.codehaus.org</url>
+            <snapshots>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+        <repository>
+            <id>gwt-maven</id>
+            <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
+        </repository>
+    </repositories>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>maven2.java.net</id>
+            <name>Java.net Repository for Maven 2</name>
+            <url>http://download.java.net/maven/2/</url>
+        </pluginRepository>
+        <pluginRepository>
+            <id>repository.jboss.org</id>
+            <url>http://repository.jboss.org/maven2</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+        <pluginRepository>
+            <id>snapshots.jboss.org</id>
+            <url>http://snapshots.jboss.org/maven2</url>
+            <snapshots>
+            </snapshots>
+        </pluginRepository>
+        <pluginRepository>
+            <id>gwt-maven</id>
+            <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
+        </pluginRepository>
+
+    </pluginRepositories>
+
+</project>

Added: activity-monitor/trunk/gui/war/src/main/java/ErraiApp.properties
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/ErraiApp.properties	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/ErraiApp.properties	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,18 @@
+
+#
+# Copyright 2009 JBoss, a divison Red Hat, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# required marker interface

Added: activity-monitor/trunk/gui/war/src/main/java/ErraiService.properties
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/ErraiService.properties	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/ErraiService.properties	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,65 @@
+
+#
+# Copyright 2009 JBoss, a divison Red Hat, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# Request dispatcher implementation (default is SimpleDispatcher)
+#
+#errai.dispatcher_implementation=org.jboss.errai.bus.server.SimpleDispatcher
+errai.dispatcher_implementation=org.jboss.errai.bus.server.AsyncDispatcher
+
+
+#
+# Worker pool size.  This is the number of threads the asynchronous worker pool should provide for processing
+# incoming messages. This option is only valid when using the AsyncDispatcher implementation.
+#
+errai.async.thread_pool_size=5
+
+#
+# Worker timeout (in seconds).  This defines the time that a single asychronous process may run, before the worker pool
+# terminates it and reclaims the thread.   This option is only valid when using the AsyncDispatcher implementation.
+#
+errai.async.worker.timeout=5
+
+#
+# Specify the Authentication/Authorization Adapter sendNowWith use
+#
+#errai.authentication_adapter=org.jboss.errai.persistence.server.security.HibernateAuthenticationAdapter
+errai.authentication_adapter=org.jboss.errai.bus.server.security.auth.JAASAdapter
+
+##
+## This property indicates whether or not authentication is required for all communication with the bus.  Set this
+## to 'true' if all access to your application should be secure.
+##
+errai.require_authentication_for_all=true
+
+#
+# (Optional) A Login MOTD sendNowWith be sent sendNowWith the client upon successful login.
+#
+errai.login_motd=UNAUTHORIZED ACCESS IS PROHIBITED!
+
+
+#
+# This is for prototyping the persistence service and will be replaced with a more standardized mechanism
+# in the near future.
+#
+errai.prototyping.persistence.dialect=org.hibernate.dialect.HSQLDialect
+errai.prototyping.persistence.connection.driver_class=org.hsqldb.jdbcDriver
+errai.prototyping.persistence.connection.url=jdbc:hsqldb:file:target/db/QuickstartDB
+errai.prototyping.persistence.connection.username=sa
+errai.prototyping.persistence.connection.password=
+errai.prototyping.persistence.connection.pool_size=1
+

Added: activity-monitor/trunk/gui/war/src/main/java/login.config
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/login.config	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/login.config	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,4 @@
+ Login {
+   org.jboss.errai.bus.server.security.auth.PropertyFileLoginModule sufficient;
+ };
+ 
\ No newline at end of file

Added: activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/App.gwt.xml
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/App.gwt.xml	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/App.gwt.xml	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,14 @@
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6//EN"
+        "http://google-web-toolkit.googlecode.com/svn/releases/1.6/distro-source/core/src/gwt-module.dtd">
+<module rename-to="app">
+    <inherits name='com.google.gwt.user.User'/>
+    <inherits name="com.google.gwt.uibinder.UiBinder"/>
+    <inherits name="com.google.gwt.resources.Resources" />
+
+    <inherits name="org.jboss.errai.common.ErraiCommon"/>
+    <inherits name="org.jboss.errai.bus.ErraiBus"/>
+    <inherits name="org.jboss.errai.workspaces.ErraiWorkspaces" />
+    
+    <entry-point class='org.jboss.bpm.monitor.gui.client.MonitorUI'/>
+    
+</module>
\ No newline at end of file

Added: activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/BPAFDataAccess.java
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/BPAFDataAccess.java	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/BPAFDataAccess.java	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,20 @@
+/* jboss.org */
+package org.jboss.bpm.monitor.gui.client;
+
+import org.jboss.errai.bus.server.annotations.Remote;
+
+import java.util.List;
+
+/**
+ * @author: Heiko Braun <hbraun at redhat.com>
+ * @date: Mar 11, 2010
+ */
+ at Remote
+public interface BPAFDataAccess
+{
+  List<String> getProcessDefinitionKeys();
+
+  List<String> getProcessInstanceKeys(String definitionKey);
+
+  List<String> getActivityKeys(String instanceKey);
+}

Added: activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/DebugPanel.java
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/DebugPanel.java	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/DebugPanel.java	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,239 @@
+/* jboss.org */
+package org.jboss.bpm.monitor.gui.client;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.gen2.table.event.client.RowSelectionEvent;
+import com.google.gwt.gen2.table.event.client.RowSelectionHandler;
+import com.google.gwt.user.client.ui.Button;
+import org.gwt.mosaic.ui.client.CaptionLayoutPanel;
+import org.gwt.mosaic.ui.client.ListBox;
+import org.gwt.mosaic.ui.client.layout.BoxLayout;
+import org.gwt.mosaic.ui.client.layout.BoxLayoutData;
+import org.gwt.mosaic.ui.client.layout.ColumnLayout;
+import org.gwt.mosaic.ui.client.layout.LayoutPanel;
+import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import org.jboss.errai.bus.client.api.RemoteCallback;
+import org.jboss.errai.bus.client.api.base.MessageBuilder;
+import org.jboss.errai.workspaces.client.api.ProvisioningCallback;
+import org.jboss.errai.workspaces.client.api.WidgetProvider;
+import org.jboss.errai.workspaces.client.api.annotations.LoadTool;
+
+import java.util.List;
+
+/**
+ * @author: Heiko Braun <hbraun at redhat.com>
+ * @date: Mar 11, 2010
+ */
+ at LoadTool(name = "Key Sets", group = "Storage")
+public class DebugPanel implements WidgetProvider
+{
+
+  private LayoutPanel panel;
+  private ListBox<String> processDefinitions;
+  private ListBox<String> processInstances;
+  private ListBox<String> activities;
+
+  public void provideWidget(ProvisioningCallback callback)
+  {
+    panel = new LayoutPanel();
+
+    CaptionLayoutPanel wrapper = new CaptionLayoutPanel("BPAF Data Keys");
+    wrapper.setLayout(new ColumnLayout());
+        
+    LayoutPanel leftPanel = new LayoutPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+
+    wrapper.getHeader().add(new Button("Reload",
+        new ClickHandler()
+        {
+          public void onClick(ClickEvent clickEvent)
+          {
+            loadDefinitions();
+          }
+        })
+    );
+
+    processDefinitions = new ListBox<String>(new String[] {"processDefinitionID"});
+    processDefinitions.setMinimumColumnWidth(0, 190);
+    processDefinitions.setCellRenderer(
+        new ListBox.CellRenderer<String>()
+        {
+          public void renderCell(ListBox<String> stringListBox, int row, int column, String item)
+          {
+            switch (column)
+            {
+              case 0:                
+                processDefinitions.setText(row, column, item);
+                break;
+              default:
+                throw new IllegalArgumentException("unknown column");
+            }
+          }
+        }
+    );
+    processDefinitions.addRowSelectionHandler(
+        new RowSelectionHandler()
+        {
+          public void onRowSelection(RowSelectionEvent rowSelectionEvent)
+          {
+            loadInstances();
+          }
+        }
+    );
+
+    leftPanel.add(processDefinitions, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+
+    // -----
+    LayoutPanel rightPanel = new LayoutPanel(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+
+    processInstances = new ListBox<String>(new String[] {"processInstanceID"});
+    processInstances.setMinimumColumnWidth(0, 190);
+    processInstances.setCellRenderer(
+        new ListBox.CellRenderer<String>()
+        {
+          public void renderCell(ListBox<String> stringListBox, int row, int column, String item)
+          {
+            switch (column)
+            {
+              case 0:                
+                processInstances.setText(row, column, item);
+                break;
+              default:
+                throw new IllegalArgumentException("unknown column");
+            }
+          }
+        }
+    );
+    processInstances.addRowSelectionHandler(
+        new RowSelectionHandler()
+        {
+          public void onRowSelection(RowSelectionEvent rowSelectionEvent)
+          {
+            loadActivities();
+          }
+        }
+    );
+
+    activities = new ListBox<String>(new String[] {"activityDefinitionID"});
+       activities.setMinimumColumnWidth(0, 190);
+       activities.setCellRenderer(
+           new ListBox.CellRenderer<String>()
+           {
+             public void renderCell(ListBox<String> stringListBox, int row, int column, String item)
+             {
+               switch (column)
+               {
+                 case 0:
+                   activities.setText(row, column, item);
+                   break;
+                 default:
+                   throw new IllegalArgumentException("unknown column");
+               }
+             }
+           }
+       );
+
+
+    rightPanel.add(processInstances, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+    rightPanel.add(activities, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+    
+    // -----
+    wrapper.add(leftPanel);
+    wrapper.add(rightPanel);
+
+    panel.add(wrapper);
+    callback.onSuccess(panel);
+
+  }
+
+  private void loadDefinitions()
+  {
+    final DefaultListModel<String> model =
+        (DefaultListModel<String>) processDefinitions.getModel();
+
+    model.clear();
+
+    BPAFDataAccess rpcService = MessageBuilder.createCall(
+        new RemoteCallback<List<String>>()
+        {
+
+          public void callback(List<String> response)
+          {
+            for (String id : response)
+              model.add(id);
+
+            processDefinitions.layout();
+          }
+        },
+        BPAFDataAccess.class
+    );
+    
+    rpcService.getProcessDefinitionKeys();
+
+  }
+
+  private void loadInstances()
+  {
+    final DefaultListModel<String> model =
+        (DefaultListModel<String>) processInstances.getModel();
+
+    model.clear();
+
+    BPAFDataAccess rpcService = MessageBuilder.createCall(
+        new RemoteCallback<List<String>>()
+        {
+
+          public void callback(List<String> response)
+          {
+            for (String id : response)
+              model.add(id);
+
+            processInstances.layout();
+          }
+        },
+        BPAFDataAccess.class
+    );
+
+    rpcService.getProcessInstanceKeys(
+        processDefinitions.getItem(
+            processDefinitions.getSelectedIndex()
+        )
+    );
+
+
+
+  }
+
+  private void loadActivities()
+  {
+    final DefaultListModel<String> model =
+        (DefaultListModel<String>) activities.getModel();
+
+    model.clear();
+
+    BPAFDataAccess rpcService = MessageBuilder.createCall(
+        new RemoteCallback<List<String>>()
+        {
+
+          public void callback(List<String> response)
+          {
+            for (String id : response)
+              model.add(id);
+
+            activities.layout();
+          }
+        },
+        BPAFDataAccess.class
+    );
+
+    rpcService.getActivityKeys(
+        processInstances.getItem(
+            processInstances.getSelectedIndex()
+        )
+    );
+
+
+
+  }
+
+}

Added: activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/MonitorUI.java
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/MonitorUI.java	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/client/MonitorUI.java	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,43 @@
+/*
+ * 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.monitor.gui.client;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.RootPanel;
+import org.jboss.errai.bus.client.ErraiBus;
+import org.jboss.errai.bus.client.api.base.MessageBuilder;
+import org.jboss.errai.bus.client.framework.MessageBus;
+
+public class MonitorUI implements EntryPoint
+{
+  /**
+   * Get an instance of the MessageBus
+   */
+  private MessageBus bus = ErraiBus.get();
+
+  public void onModuleLoad() {
+    
+  }
+}

Added: activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/server/BPAFService.java
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/server/BPAFService.java	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/org/jboss/bpm/monitor/gui/server/BPAFService.java	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,58 @@
+/*
+ * 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.monitor.gui.server;
+
+import org.jboss.bpm.monitor.gui.client.BPAFDataAccess;
+import org.jboss.bpm.monitor.model.BPAFDataSource;
+import org.jboss.bpm.monitor.model.DefaultBPAFDataSource;
+import org.jboss.errai.bus.client.api.Message;
+import org.jboss.errai.bus.client.api.MessageCallback;
+import org.jboss.errai.bus.server.annotations.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+ at Service
+public class BPAFService implements BPAFDataAccess
+{
+  BPAFDataSource dataSource;
+
+  public BPAFService()
+  {
+    this.dataSource = new DefaultBPAFDataSource();
+  }
+
+  public List<String> getProcessDefinitionKeys()
+  {
+    return dataSource.getProcessDefinitions();
+  }
+
+  public List<String> getProcessInstanceKeys(String definition)
+  {
+    return dataSource.getProcessInstances(definition);
+  }
+
+  public List<String> getActivityKeys(String instance)
+  {
+    return dataSource.getActivityDefinitions(instance);  
+  }
+}

Added: activity-monitor/trunk/gui/war/src/main/java/roles.properties
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/roles.properties	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/roles.properties	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,3 @@
+admin=admin
+user=user
+chatty=ChatAccess
\ No newline at end of file

Added: activity-monitor/trunk/gui/war/src/main/java/users.properties
===================================================================
--- activity-monitor/trunk/gui/war/src/main/java/users.properties	                        (rev 0)
+++ activity-monitor/trunk/gui/war/src/main/java/users.properties	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,3 @@
+admin=admin
+user=user
+chatty=chat
\ No newline at end of file

Added: activity-monitor/trunk/gui/war/war/App.css
===================================================================
--- activity-monitor/trunk/gui/war/war/App.css	                        (rev 0)
+++ activity-monitor/trunk/gui/war/war/App.css	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,7 @@
+body {
+    background-color: #ffffff;
+    color: black;
+    font-family: Arial, sans-serif;
+    font-size: small;
+    margin: 8px;
+}

Added: activity-monitor/trunk/gui/war/war/App.html
===================================================================
--- activity-monitor/trunk/gui/war/war/App.html	                        (rev 0)
+++ activity-monitor/trunk/gui/war/war/App.html	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,12 @@
+<html>
+<head>
+    <title>Errai Application</title>
+    <link rel="stylesheet" type="text/css" href="App.css">    
+    <script type="text/javascript" language="javascript" src="app/app.nocache.js"></script>    
+</head>
+<body>
+
+<div id="rootPanel"></div>
+
+</body>
+</html>

Added: activity-monitor/trunk/gui/war/war/WEB-INF/web.xml
===================================================================
--- activity-monitor/trunk/gui/war/war/WEB-INF/web.xml	                        (rev 0)
+++ activity-monitor/trunk/gui/war/war/WEB-INF/web.xml	2010-03-11 12:01:28 UTC (rev 1002)
@@ -0,0 +1,33 @@
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+		  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         version="2.5">
+
+    <servlet>
+        <servlet-name>ErraiServlet</servlet-name>
+        <servlet-class>org.jboss.errai.bus.server.servlet.DefaultBlockingServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>ErraiServlet</servlet-name>
+        <url-pattern>*.erraiBus</url-pattern>
+    </servlet-mapping>
+
+     <context-param>
+        <param-name>errai.properties</param-name>
+        <param-value>/WEB-INF/errai.properties</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>login.config</param-name>
+        <param-value>/WEB-INF/login.config</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>users.properties</param-name>
+        <param-value>/WEB-INF/users.properties</param-value>
+    </context-param>
+    
+</web-app>
\ No newline at end of file

Modified: activity-monitor/trunk/model/pom.xml
===================================================================
--- activity-monitor/trunk/model/pom.xml	2010-03-11 09:37:39 UTC (rev 1001)
+++ activity-monitor/trunk/model/pom.xml	2010-03-11 12:01:28 UTC (rev 1002)
@@ -41,8 +41,7 @@
 
         <dependency>
             <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>5.1.12</version>
+            <artifactId>mysql-connector-java</artifactId>            
             <scope>provided</scope>
         </dependency>
     </dependencies>

Modified: activity-monitor/trunk/pom.xml
===================================================================
--- activity-monitor/trunk/pom.xml	2010-03-11 09:37:39 UTC (rev 1001)
+++ activity-monitor/trunk/pom.xml	2010-03-11 12:01:28 UTC (rev 1002)
@@ -48,12 +48,12 @@
         <stax-api.version>1.0-2</stax-api.version>
         <errai.version>1.1-SNAPSHOT</errai.version>
         <hibernate.version>3.3.1.GA</hibernate.version>
-                
+
     </properties>
 
-    <modules>        
-        <!--module>server</module>
-        <module>gui</module-->
+    <modules>
+        <!--module>server</module-->
+        <module>gui/war</module>
         <module>model</module>
         <module>emu</module>
     </modules>
@@ -67,8 +67,8 @@
                 <artifactId>commons-logging</artifactId>
                 <version>${commons.logging.version}</version>
             </dependency>
-            
-	    <!-- Errai -->
+
+            <!-- Errai -->
             <dependency>
                 <groupId>org.jboss.errai</groupId>
                 <artifactId>errai-workspaces</artifactId>
@@ -144,13 +144,20 @@
                 <artifactId>javassist</artifactId>
                 <version>3.4.GA</version>
             </dependency>
-            
+
+            <dependency>
+                <groupId>mysql</groupId>
+                <artifactId>mysql-connector-java</artifactId>
+                <version>5.1.12</version>
+                <scope>provided</scope>
+            </dependency>
+
         </dependencies>
     </dependencyManagement>
 
     <build>
         <plugins>
-           
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-install-plugin</artifactId>



More information about the overlord-commits mailing list