Author: heiko.braun(a)jboss.com
Date: 2009-02-09 09:49:25 -0500 (Mon, 09 Feb 2009)
New Revision: 3812
Added:
projects/gwt-console/trunk/server-integration/
projects/gwt-console/trunk/server-integration/gwt-server-integration.iml
projects/gwt-console/trunk/server-integration/pom.xml
projects/gwt-console/trunk/server-integration/src/
projects/gwt-console/trunk/server-integration/src/main/
projects/gwt-console/trunk/server-integration/src/main/java/
projects/gwt-console/trunk/server-integration/src/main/java/org/
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ExtensionManagement.java
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ProcessManagement.java
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/TaskManagement.java
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/UserManagement.java
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
Removed:
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/integration/
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
Modified:
projects/gwt-console/trunk/plugin-example/pom.xml
projects/gwt-console/trunk/plugin/pom.xml
projects/gwt-console/trunk/pom.xml
projects/gwt-console/trunk/rpc/pom.xml
projects/gwt-console/trunk/server/pom.xml
projects/gwt-console/trunk/server/src/main/webapp/WEB-INF/web.xml
projects/gwt-console/trunk/server/src/main/webapp/index.html
projects/gwt-console/trunk/war/pom.xml
Log:
Rename to groupId org.jboss.bpm
Modified: projects/gwt-console/trunk/plugin/pom.xml
===================================================================
--- projects/gwt-console/trunk/plugin/pom.xml 2009-02-09 14:06:18 UTC (rev 3811)
+++ projects/gwt-console/trunk/plugin/pom.xml 2009-02-09 14:49:25 UTC (rev 3812)
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
- <name>JBoss jBPM3 - GWT Console (Plugin-API)</name>
- <groupId>org.jbpm.jbpm3</groupId>
+ <name>JBoss BPM - GWT Console (Plugin-API)</name>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-plugin</artifactId>
<packaging>jar</packaging>
<!-- Parent -->
<parent>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
@@ -21,7 +21,7 @@
<dependencies>
<dependency>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-rpc</artifactId>
<version>${version}</version>
</dependency>
Modified: projects/gwt-console/trunk/plugin-example/pom.xml
===================================================================
--- projects/gwt-console/trunk/plugin-example/pom.xml 2009-02-09 14:06:18 UTC (rev 3811)
+++ projects/gwt-console/trunk/plugin-example/pom.xml 2009-02-09 14:49:25 UTC (rev 3812)
@@ -16,7 +16,7 @@
<dependencies>
<dependency>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-rpc</artifactId>
<version>${gwt-console.version}</version>
<scope>provided</scope>
@@ -30,7 +30,7 @@
</dependency>
<dependency>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-plugin</artifactId>
<version>${version}</version>
</dependency>
Modified: projects/gwt-console/trunk/pom.xml
===================================================================
--- projects/gwt-console/trunk/pom.xml 2009-02-09 14:06:18 UTC (rev 3811)
+++ projects/gwt-console/trunk/pom.xml 2009-02-09 14:49:25 UTC (rev 3812)
@@ -1,8 +1,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 jBPM3 - GWT Console</name>
- <groupId>org.jbpm.jbpm3</groupId>
+ <name>JBoss BPM - GWT Console</name>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
@@ -35,6 +35,7 @@
<modules>
<module>rpc</module>
+ <module>server-integration</module>
<module>server</module>
<module>war</module>
<module>plugin/</module>
@@ -44,26 +45,6 @@
<dependencyManagement>
<dependencies>
- <!-- JBPM -->
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- <scope>provided</scope>
- <version>${jbpm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-enterprise</artifactId>
- <scope>provided</scope>
- <version>${jbpm.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-identity</artifactId>
- <scope>provided</scope>
- <version>${jbpm.version}</version>
- </dependency>
-
<!-- GET related -->
<dependency>
<groupId>com.google.gwt</groupId>
Modified: projects/gwt-console/trunk/rpc/pom.xml
===================================================================
--- projects/gwt-console/trunk/rpc/pom.xml 2009-02-09 14:06:18 UTC (rev 3811)
+++ projects/gwt-console/trunk/rpc/pom.xml 2009-02-09 14:49:25 UTC (rev 3812)
@@ -3,14 +3,14 @@
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 jBPM3 - GWT Console (RPC)</name>
- <groupId>org.jbpm.jbpm3</groupId>
+ <name>JBoss BPM - GWT Console (RPC)</name>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-rpc</artifactId>
<packaging>jar</packaging>
<!-- Parent -->
<parent>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
Modified: projects/gwt-console/trunk/server/pom.xml
===================================================================
--- projects/gwt-console/trunk/server/pom.xml 2009-02-09 14:06:18 UTC (rev 3811)
+++ projects/gwt-console/trunk/server/pom.xml 2009-02-09 14:49:25 UTC (rev 3812)
@@ -1,16 +1,16 @@
<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 jBPM3 - GWT Console (Server)</name>
- <groupId>org.jbpm.jbpm3</groupId>
+ <name>JBoss BPM - GWT Console (Server)</name>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-server</artifactId>
<packaging>war</packaging>
<!-- Parent -->
<parent>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -23,10 +23,15 @@
<dependencies>
<!-- Module -->
<dependency>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-rpc</artifactId>
<version>${version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>gwt-console-server-integration</artifactId>
+ <version>${version}</version>
+ </dependency>
<!-- GWT related -->
<dependency>
Deleted:
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
===================================================================
---
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java 2009-02-09
14:06:18 UTC (rev 3811)
+++
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java 2009-02-09
14:49:25 UTC (rev 3812)
@@ -1,244 +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.server.util;
-
-import java.io.*;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Properties;
-
-/**
- * Load a service class using this ordered lookup procedure
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 14-Dec-2006
- */
-public abstract class ServiceLoader
-{
- /**
- * This method uses the algorithm below using the JAXWS Provider as an example.
- *
- * 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider
exists, then
- * its first line, if present, is used as the UTF-8 encoded name of the implementation
class.
- *
- * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the
- * java.util.Properties.load(InputStream) method and it contains an entry whose key
is
- * javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the
implementation class.
- *
- * 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then
its value is used
- * as the name of the implementation class.
- *
- * 4. Finally, a default implementation class name is used.
- */
- public static Object loadService(String propertyName, String defaultFactory)
- {
- Object factory = loadFromServices(propertyName, null);
- if (factory == null)
- {
- factory = loadFromPropertiesFile(propertyName, null);
- }
- if (factory == null)
- {
- factory = loadFromSystemProperty(propertyName, defaultFactory);
- }
- return factory;
- }
-
- /** Use the Services API (as detailed in the JAR specification), if available, to
determine the classname.
- */
- public static Object loadFromServices(String propertyName, String defaultFactory)
- {
- Object factory = null;
- String factoryName = null;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
- // Use the Services API (as detailed in the JAR specification), if available, to
determine the classname.
- String filename = "META-INF/services/" + propertyName;
- InputStream inStream = loader.getResourceAsStream(filename);
- if (inStream != null)
- {
- try
- {
- BufferedReader br = new BufferedReader(new InputStreamReader(inStream,
"UTF-8"));
- factoryName = br.readLine();
- br.close();
- if (factoryName != null)
- {
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
- }
- }
-
- // Use the default factory implementation class.
- if (factory == null && defaultFactory != null)
- {
- factory = loadDefault(defaultFactory);
- }
-
- return factory;
- }
-
- /** Use the system property
- */
- public static Object loadFromSystemProperty(String propertyName, String
defaultFactory)
- {
- Object factory = null;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
- PrivilegedAction action = new PropertyAccessAction(propertyName);
- String factoryName = (String)AccessController.doPrivileged(action);
- if (factoryName != null)
- {
- try
- {
- //if(log.isDebugEnabled()) log.debug("Load from system property: "
+ factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
- }
- }
-
- // Use the default factory implementation class.
- if (factory == null && defaultFactory != null)
- {
- factory = loadDefault(defaultFactory);
- }
-
- return factory;
- }
-
- /**
- * Use the properties file "${java.home}/lib/jaxws.properties" in the JRE
directory.
- * This configuration file is in standard java.util.Properties format and contains
the
- * fully qualified name of the implementation class with the key being the system
property defined above.
- */
- public static Object loadFromPropertiesFile(String propertyName, String
defaultFactory)
- {
- Object factory = null;
- String factoryName = null;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
- // Use the properties file "lib/jaxm.properties" in the JRE directory.
- // This configuration file is in standard java.util.Properties format and contains
the fully qualified name of the implementation class with the key being the system
property defined above.
- PrivilegedAction action = new PropertyAccessAction("java.home");
- String javaHome = (String)AccessController.doPrivileged(action);
- File jaxmFile = new File(javaHome + "/lib/jaxws.properties");
- if (jaxmFile.exists())
- {
- try
- {
- action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
- Properties jaxmProperties =
(Properties)AccessController.doPrivileged(action);
- factoryName = jaxmProperties.getProperty(propertyName);
- if (factoryName != null)
- {
- //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile +
": " + factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
- }
- }
-
- // Use the default factory implementation class.
- if (factory == null && defaultFactory != null)
- {
- factory = loadDefault(defaultFactory);
- }
-
- return factory;
- }
-
- private static Object loadDefault(String defaultFactory)
- {
- Object factory = null;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
- // Use the default factory implementation class.
- if (defaultFactory != null)
- {
- try
- {
- //if(log.isDebugEnabled()) log.debug("Load from default: " +
factoryName);
- Class factoryClass = loader.loadClass(defaultFactory);
- factory = factoryClass.newInstance();
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load: " +
defaultFactory, t);
- }
- }
-
- return factory;
- }
-
- private static class PropertyAccessAction implements PrivilegedAction
- {
- private String name;
-
- PropertyAccessAction(String name)
- {
- this.name = name;
- }
-
- public Object run()
- {
- return System.getProperty(name);
- }
- }
-
- private static class PropertyFileAccessAction implements PrivilegedAction
- {
- private String filename;
-
- PropertyFileAccessAction(String filename)
- {
- this.filename = filename;
- }
-
- public Object run()
- {
- try
- {
- InputStream inStream = new FileInputStream(filename);
- Properties props = new Properties();
- props.load(inStream);
- return props;
- }
- catch (IOException ex)
- {
- throw new SecurityException("Cannot load properties: " + filename,
ex);
- }
- }
- }
-}
Modified: projects/gwt-console/trunk/server/src/main/webapp/WEB-INF/web.xml
===================================================================
--- projects/gwt-console/trunk/server/src/main/webapp/WEB-INF/web.xml 2009-02-09 14:06:18
UTC (rev 3811)
+++ projects/gwt-console/trunk/server/src/main/webapp/WEB-INF/web.xml 2009-02-09 14:49:25
UTC (rev 3812)
@@ -15,11 +15,6 @@
<param-value>/rs</param-value>
</context-param>
- <context-param>
-
<param-name>org.jboss.bpm.console.server.dao.ManagementFactory</param-name>
-
<param-value>org.jboss.bpm.console.server.dao.internal.JBPM3ManagementFactory</param-value>
- </context-param>
-
<filter>
<filter-name>gwtJSON</filter-name>
<filter-class>org.jboss.bpm.console.server.util.GWTJsonFilter</filter-class>
Modified: projects/gwt-console/trunk/server/src/main/webapp/index.html
===================================================================
--- projects/gwt-console/trunk/server/src/main/webapp/index.html 2009-02-09 14:06:18 UTC
(rev 3811)
+++ projects/gwt-console/trunk/server/src/main/webapp/index.html 2009-02-09 14:49:25 UTC
(rev 3812)
@@ -95,51 +95,6 @@
<td>application/json</td>
</tr>
-<tr>
- <td colspan=4><h3>jBPM3 proprietary extensions</h3></td>
-</tr>
-
-<tr>
- <td>GET</td>
- <td><a
href="/gwt-console-server/rs/jbpm3/definitions/1/image">/rs/jbpm3/definitions/{processId}/image</a></td>
- <td>Retrieve a process definition image (GPD), if deployed</td>
- <td>image/jpeg</td>
-</tr>
-
-<tr>
- <td>GET</td>
- <td>/rs/jbpm3/definitions/{processId}/diagramInfo</td>
- <td>Retrieve a process definition coordinates (GPD)</td>
- <td>application/json</td>
-</tr>
-
-<tr>
- <td>GET</td>
- <td>/rs/jbpm3/instances/{instanceId}/activeNodeInfo</td>
- <td>Retrieve a process definition coordinates (GPD) of the active
node</td>
- <td>application/json</td>
-</tr>
-
-<tr>
- <td>POST</td>
- <td>/rs/jbpm3/definitions/new</td>
- <td>Upload a new process definition</td>
- <td>Accept:multipart/form-data<br>Produce:application/json</td>
-</tr>
-
-<tr>
- <td>POST</td>
- <td>/rs/jbpm3/tokens/{tokenId}/transition?signal={signalName}</td>
- <td>Signal a token by specifiy a transition</td>
- <td></td>
-</tr>
-<tr>
- <td>POST</td>
- <td>/rs/jbpm3/tokens/{tokenId}/transition/default</td>
- <td>Signal a token to take the default transition</td>
- <td></td>
-</tr>
-
</table>
<h2>Example usage</h2>
Added: projects/gwt-console/trunk/server-integration/gwt-server-integration.iml
===================================================================
--- projects/gwt-console/trunk/server-integration/gwt-server-integration.iml
(rev 0)
+++ projects/gwt-console/trunk/server-integration/gwt-server-integration.iml 2009-02-09
14:49:25 UTC (rev 3812)
@@ -0,0 +1,14 @@
+<?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" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Added: projects/gwt-console/trunk/server-integration/pom.xml
===================================================================
--- projects/gwt-console/trunk/server-integration/pom.xml (rev 0)
+++ projects/gwt-console/trunk/server-integration/pom.xml 2009-02-09 14:49:25 UTC (rev
3812)
@@ -0,0 +1,60 @@
+<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 - GWT Console (Server Integration)</name>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>gwt-console-server-integration</artifactId>
+ <packaging>jar</packaging>
+
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>gwt-console-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <!-- Module -->
+ <dependency>
+ <groupId>org.jboss.bpm</groupId>
+ <artifactId>gwt-console-rpc</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <!-- Include SOURCE in output artifact for GWT (GWT libraries must include
source) -->
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ <finalName>gwt-console-server-integration</finalName>
+ </build>
+</project>
Added:
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ExtensionManagement.java
===================================================================
---
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ExtensionManagement.java
(rev 0)
+++
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ExtensionManagement.java 2009-02-09
14:49:25 UTC (rev 3812)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration;
+
+import java.util.Map;
+
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
+import org.jboss.bpm.console.client.model.jbpm3.DiagramInfo;
+
+/**
+ * Proprietary to jBPM3, no sure if it will stay.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface ExtensionManagement
+{
+ byte[] getProcessImage(long processId);
+
+ DiagramInfo getDiagramInfo(long processId);
+
+ ActiveNodeInfo getActivNodeInfo(long instanceId);
+
+ Map<String, String> getAvailableTaskForms(long processId);
+
+ byte[] getTaskFormByTaskName(long processId, long taskId);
+
+ ProcessDefinitionRef deployNewDefinition(byte[] data);
+}
Added:
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java
===================================================================
---
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java
(rev 0)
+++
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ManagementFactory.java 2009-02-09
14:49:25 UTC (rev 3812)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration;
+
+// $Id: $
+
+import org.jboss.bpm.console.server.util.ServiceLoader;
+
+/**
+ * Construct management implementation.
+ * It uses the {@link org.jboss.bpm.console.server.util.ServiceLoader} to load concrete
+ * factory implementations.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ * @author Thomas.Diesler(a)jboss.com
+ */
+public abstract class ManagementFactory
+{
+ public static ManagementFactory newInstance()
+ {
+ return (ManagementFactory)
+ ServiceLoader.loadService(
+ ManagementFactory.class.getName(),
+ "org.jbpm.enterprise.mgmt.ManagementFactoryImpl"
+ );
+ }
+
+ public abstract ProcessManagement createProcessManagement();
+
+ public abstract TaskManagement createTaskManagement();
+
+ public abstract UserManagement createUserManagement();
+
+ public abstract ExtensionManagement createExtensionManagement();
+}
Added:
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ProcessManagement.java
===================================================================
---
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ProcessManagement.java
(rev 0)
+++
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/ProcessManagement.java 2009-02-09
14:49:25 UTC (rev 3812)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration;
+
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef;
+import org.jboss.bpm.console.client.model.ProcessInstanceRef.STATE;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ * @author Thomas.Diesler(a)jboss.com
+ */
+public interface ProcessManagement
+{
+ List<ProcessDefinitionRef> getProcessDefinitions();
+
+ ProcessDefinitionRef getProcessDefinition(long procDefId);
+
+ List<ProcessDefinitionRef> removeProcessDefinition(long procDefId);
+
+ List<ProcessInstanceRef> getProcessInstances(long procDefId);
+
+ ProcessInstanceRef getProcessInstance(long procId);
+
+ ProcessInstanceRef newInstance(long procDefId);
+
+ void setProcessState(long procId, STATE nextState);
+
+ void signalToken(long tokenId, String signal);
+}
Added:
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/TaskManagement.java
===================================================================
---
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/TaskManagement.java
(rev 0)
+++
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/TaskManagement.java 2009-02-09
14:49:25 UTC (rev 3812)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration;
+
+import org.jboss.bpm.console.client.model.TaskRef;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface TaskManagement
+{
+ List<TaskRef> getTasksByActor(String actorName);
+
+ TaskRef getTaskById(long taskId);
+
+ void reassignTask(long taskId, String actorId);
+
+ void closeTask(long taskId, String signalName);
+}
Added:
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/UserManagement.java
===================================================================
---
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/UserManagement.java
(rev 0)
+++
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/integration/UserManagement.java 2009-02-09
14:49:25 UTC (rev 3812)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.integration;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface UserManagement
+{
+ List<String> getGroupsForActor(String actorId);
+
+ List<String> getActorsForGroup(String groupName);
+}
Copied:
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
(from rev 3811,
projects/gwt-console/trunk/server/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java)
===================================================================
---
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java
(rev 0)
+++
projects/gwt-console/trunk/server-integration/src/main/java/org/jboss/bpm/console/server/util/ServiceLoader.java 2009-02-09
14:49:25 UTC (rev 3812)
@@ -0,0 +1,244 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.bpm.console.server.util;
+
+import java.io.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+/**
+ * Load a service class using this ordered lookup procedure
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 14-Dec-2006
+ */
+public abstract class ServiceLoader
+{
+ /**
+ * This method uses the algorithm below using the JAXWS Provider as an example.
+ *
+ * 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider
exists, then
+ * its first line, if present, is used as the UTF-8 encoded name of the implementation
class.
+ *
+ * 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the
+ * java.util.Properties.load(InputStream) method and it contains an entry whose key
is
+ * javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the
implementation class.
+ *
+ * 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then
its value is used
+ * as the name of the implementation class.
+ *
+ * 4. Finally, a default implementation class name is used.
+ */
+ public static Object loadService(String propertyName, String defaultFactory)
+ {
+ Object factory = loadFromServices(propertyName, null);
+ if (factory == null)
+ {
+ factory = loadFromPropertiesFile(propertyName, null);
+ }
+ if (factory == null)
+ {
+ factory = loadFromSystemProperty(propertyName, defaultFactory);
+ }
+ return factory;
+ }
+
+ /** Use the Services API (as detailed in the JAR specification), if available, to
determine the classname.
+ */
+ public static Object loadFromServices(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ String factoryName = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the Services API (as detailed in the JAR specification), if available, to
determine the classname.
+ String filename = "META-INF/services/" + propertyName;
+ InputStream inStream = loader.getResourceAsStream(filename);
+ if (inStream != null)
+ {
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(inStream,
"UTF-8"));
+ factoryName = br.readLine();
+ br.close();
+ if (factoryName != null)
+ {
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ /** Use the system property
+ */
+ public static Object loadFromSystemProperty(String propertyName, String
defaultFactory)
+ {
+ Object factory = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ PrivilegedAction action = new PropertyAccessAction(propertyName);
+ String factoryName = (String)AccessController.doPrivileged(action);
+ if (factoryName != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from system property: "
+ factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ /**
+ * Use the properties file "${java.home}/lib/jaxws.properties" in the JRE
directory.
+ * This configuration file is in standard java.util.Properties format and contains
the
+ * fully qualified name of the implementation class with the key being the system
property defined above.
+ */
+ public static Object loadFromPropertiesFile(String propertyName, String
defaultFactory)
+ {
+ Object factory = null;
+ String factoryName = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the properties file "lib/jaxm.properties" in the JRE directory.
+ // This configuration file is in standard java.util.Properties format and contains
the fully qualified name of the implementation class with the key being the system
property defined above.
+ PrivilegedAction action = new PropertyAccessAction("java.home");
+ String javaHome = (String)AccessController.doPrivileged(action);
+ File jaxmFile = new File(javaHome + "/lib/jaxws.properties");
+ if (jaxmFile.exists())
+ {
+ try
+ {
+ action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
+ Properties jaxmProperties =
(Properties)AccessController.doPrivileged(action);
+ factoryName = jaxmProperties.getProperty(propertyName);
+ if (factoryName != null)
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile +
": " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ factory = loadDefault(defaultFactory);
+ }
+
+ return factory;
+ }
+
+ private static Object loadDefault(String defaultFactory)
+ {
+ Object factory = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the default factory implementation class.
+ if (defaultFactory != null)
+ {
+ try
+ {
+ //if(log.isDebugEnabled()) log.debug("Load from default: " +
factoryName);
+ Class factoryClass = loader.loadClass(defaultFactory);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load: " +
defaultFactory, t);
+ }
+ }
+
+ return factory;
+ }
+
+ private static class PropertyAccessAction implements PrivilegedAction
+ {
+ private String name;
+
+ PropertyAccessAction(String name)
+ {
+ this.name = name;
+ }
+
+ public Object run()
+ {
+ return System.getProperty(name);
+ }
+ }
+
+ private static class PropertyFileAccessAction implements PrivilegedAction
+ {
+ private String filename;
+
+ PropertyFileAccessAction(String filename)
+ {
+ this.filename = filename;
+ }
+
+ public Object run()
+ {
+ try
+ {
+ InputStream inStream = new FileInputStream(filename);
+ Properties props = new Properties();
+ props.load(inStream);
+ return props;
+ }
+ catch (IOException ex)
+ {
+ throw new SecurityException("Cannot load properties: " + filename,
ex);
+ }
+ }
+ }
+}
Modified: projects/gwt-console/trunk/war/pom.xml
===================================================================
--- projects/gwt-console/trunk/war/pom.xml 2009-02-09 14:06:18 UTC (rev 3811)
+++ projects/gwt-console/trunk/war/pom.xml 2009-02-09 14:49:25 UTC (rev 3812)
@@ -1,14 +1,14 @@
<?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>
+ <name>JBoss BPM - GWT Console (WAR)</name>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console</artifactId>
<packaging>war</packaging>
<!-- Parent -->
<parent>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
@@ -23,19 +23,19 @@
<!-- JBPM -->
<dependency>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-rpc</artifactId>
<version>${version}</version>
</dependency>
<dependency>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-plugin</artifactId>
<version>${version}</version>
</dependency>
<dependency>
- <groupId>org.jbpm.jbpm3</groupId>
+ <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-plugin</artifactId>
<classifier>sources</classifier>
<version>${version}</version>