summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntje Fuhrmann2013-04-29 03:15:36 (EDT)
committerStephan Born2013-04-29 07:05:57 (EDT)
commitbbc7f13e59e500092381e76105bd68d11444aa01 (patch)
treeb5764788cd4bffa15f72a5fe8ae15654a9781c54
parent1d18cbe4a9f93351ff3707db5ade2ed5daa6924a (diff)
downloadorg.eclipse.stardust.ui.web-bbc7f13e59e500092381e76105bd68d11444aa01.zip
org.eclipse.stardust.ui.web-bbc7f13e59e500092381e76105bd68d11444aa01.tar.gz
org.eclipse.stardust.ui.web-bbc7f13e59e500092381e76105bd68d11444aa01.tar.bz2
CRNT-28701: BugZilla import [405694]: Remove atmosphere* usage for Stardust Kepler buildrefs/changes/22/12322/2
-rw-r--r--stardust-web-modeler-bpmn2/pom.xml4
-rw-r--r--web-modeler/ivy.xml167
-rw-r--r--web-modeler/pom.xml491
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/ModelChangeBroadcaster.java39
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/portal/InviteParticipantsDialog.java15
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java201
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/rest/ModelerResource.java31
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/streaming/ChatController.java118
-rw-r--r--web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/streaming/JointModellingSessionsController.java251
9 files changed, 357 insertions, 960 deletions
diff --git a/stardust-web-modeler-bpmn2/pom.xml b/stardust-web-modeler-bpmn2/pom.xml
index 01ca555..424dc76 100644
--- a/stardust-web-modeler-bpmn2/pom.xml
+++ b/stardust-web-modeler-bpmn2/pom.xml
@@ -103,10 +103,6 @@
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
- <exclusion>
- <groupId>org.atmosphere</groupId>
- <artifactId>atmosphere-runtime</artifactId>
- </exclusion>
<exclusion>
<groupId>org.eclipse.stardust.modeling.model</groupId>
diff --git a/web-modeler/ivy.xml b/web-modeler/ivy.xml
index a31a575..c396523 100644
--- a/web-modeler/ivy.xml
+++ b/web-modeler/ivy.xml
@@ -1,85 +1,82 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2011 SunGard CSA LLC and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- SunGard CSA LLC - initial API and implementation and/or initial documentation
- -->
-
-<ivy-module version="2.0"
- xmlns:m="http://ant.apache.org/ivy/maven"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
-
- <info organisation="org.eclipse.stardust.ui.web" module="stardust-web-modeler" revision="${ipp.version.full}"/>
-
- <configurations>
- <conf name="stardust-web-modeler-compile" description="Web Modeler - Compile Scope" />
- <conf name="stardust-web-modeler-runtime" extends="stardust-web-modeler-compile" description="Web Modeler - Runtime Scope" />
-
- <conf name="test" visibility="private" description="Test dependencies" />
-
- <!-- compound configurations which encapsulates the above mentioned configs -->
- <conf name="compile" visibility="private" extends="stardust-web-modeler-compile" />
- <conf name="runtime" visibility="private" extends="stardust-web-modeler-runtime" />
- <conf name="all" visibility="private" extends="compile, runtime, test" />
-
- <conf name="pom" description="PDL Modeler - POMs" />
- </configurations>
-
- <publications>
- <artifact name="stardust-web-modeler" type="jar" conf="stardust-web-modeler-compile,stardust-web-modeler-runtime" ext="jar" />
- <artifact name="stardust-web-modeler" type="pom" conf="pom" ext="pom" />
- </publications>
-
- <dependencies>
- <!-- compile -->
- <dependency org="org.eclipse.stardust.engine" name="infinity-process-engine" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->carnot-engine-compile" />
- <!-- TODO: change to ipp-engine-ws-cxf! -->
- <!-- dependency org="com.infinity.bpm" name="ipp-engine-ws-metro" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-engine-ws-metro-compile" / -->
- <dependency org="wsdl4j" name="wsdl4j" rev="${wsdl4j.version}" conf="stardust-web-modeler-compile->default" />
-
- <dependency org="org.eclipse.stardust.modeling.model" name="ipp-bpm-model" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-bpm-model-runtime"/>
- <dependency org="org.eclipse.stardust.modeling.core" name="ipp-bpm-model-validation" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-bpm-model-validation-runtime"/>
- <dependency org="org.eclipse.stardust.modeling.model" name="ipp-bpm-model-builder" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-bpm-model-builder-compile"/>
-
- <!-- The following Eclipse dependencies are part of Eclipse 3.6.2 -->
- <dependency org="org.eclipse.emf" name="org.eclipse.emf.common" rev="${org.eclipse.emf.common.version}" conf="stardust-web-modeler-compile->default"/>
- <dependency org="org.eclipse.emf" name="org.eclipse.emf.ecore" rev="${org.eclipse.emf.ecore.version}" conf="stardust-web-modeler-compile->default">
- <exclude org="org.eclipse.emf" module="org.eclipse.emf.common" />
- </dependency>
- <dependency org="org.eclipse.emf" name="org.eclipse.emf.ecore.xmi" rev="${org.eclipse.emf.ecore.xmi.version}" conf="stardust-web-modeler-compile->default">
- <exclude org="org.eclipse.emf" module="org.eclipse.emf.ecore" />
- </dependency>
- <dependency org="org.eclipse.emf" name="org.eclipse.emf.ecore.change" rev="${org.eclipse.emf.ecore.change.version}" conf="stardust-web-modeler-compile->default">
- <exclude org="org.eclipse.emf" module="org.eclipse.emf.ecore" />
- </dependency>
- <dependency org="org.eclipse.xsd" name="org.eclipse.xsd" rev="${org.eclipse.xsd.version}" conf="stardust-web-modeler-compile->default"/>
-
- <dependency org="org.eclipse.stardust.ui.web" name="ipp-portal-common" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-portal-common-compile"/>
- <dependency org="org.eclipse.stardust.ui.web" name="ipp-views-common" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-views-common-compile"/>
-
- <dependency org="org.apache.myfaces.core" name="myfaces-api" rev="${myfaces-api.version}" conf="stardust-web-modeler-compile->default">
- <exclude org="commons-beanutils" module="commons-beanutils"/>
- <exclude org="commons-lang" module="commons-lang" />
- <exclude org="commons-digester" module="commons-digester"/>
- <exclude org="commons-logging" module="commons-logging"/>
- <exclude org="javax.servlet" module="jstl"/>
- </dependency>
- <dependency org="commons-beanutils" name="commons-beanutils" rev="${commons-beanutils.version}" conf="stardust-web-modeler-compile->default"/>
- <dependency org="javax.servlet" name="servlet-api" rev="${servlet-api.version}" conf="stardust-web-modeler-compile->default"/>
- <dependency org="com.google.code.gson" name="gson" rev="${gson.version}" conf="stardust-web-modeler-compile->default"/>
- <!-->dependency org="org.apache.httpcomponents" name="httpclient" rev="${commons-httpclient.version}" conf="stardust-web-modeler-compile->default"/-->
- <dependency org="org.atmosphere" name="atmosphere-runtime" rev="${atmosphere-runtime.version}" conf="stardust-web-modeler-compile->default">
- <exclude org="org.slf4j" module="slf4j-api"/>
- </dependency>
-
- <dependency org="junit" name="junit" rev="${junit.version}" conf="test->default">
- <exclude org="org.hamcrest" module="hamcrest-core" />
- </dependency>
- <dependency org="org.hamcrest" name="hamcrest-core" rev="${hamcrest-core.version}" conf="test->default" />
- </dependencies>
-</ivy-module>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2011 SunGard CSA LLC and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ SunGard CSA LLC - initial API and implementation and/or initial documentation
+ -->
+
+<ivy-module version="2.0"
+ xmlns:m="http://ant.apache.org/ivy/maven"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
+
+ <info organisation="org.eclipse.stardust.ui.web" module="stardust-web-modeler" revision="${ipp.version.full}"/>
+
+ <configurations>
+ <conf name="stardust-web-modeler-compile" description="Web Modeler - Compile Scope" />
+ <conf name="stardust-web-modeler-runtime" extends="stardust-web-modeler-compile" description="Web Modeler - Runtime Scope" />
+
+ <conf name="test" visibility="private" description="Test dependencies" />
+
+ <!-- compound configurations which encapsulates the above mentioned configs -->
+ <conf name="compile" visibility="private" extends="stardust-web-modeler-compile" />
+ <conf name="runtime" visibility="private" extends="stardust-web-modeler-runtime" />
+ <conf name="all" visibility="private" extends="compile, runtime, test" />
+
+ <conf name="pom" description="PDL Modeler - POMs" />
+ </configurations>
+
+ <publications>
+ <artifact name="stardust-web-modeler" type="jar" conf="stardust-web-modeler-compile,stardust-web-modeler-runtime" ext="jar" />
+ <artifact name="stardust-web-modeler" type="pom" conf="pom" ext="pom" />
+ </publications>
+
+ <dependencies>
+ <!-- compile -->
+ <dependency org="org.eclipse.stardust.engine" name="infinity-process-engine" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->carnot-engine-compile" />
+ <!-- TODO: change to ipp-engine-ws-cxf! -->
+ <!-- dependency org="com.infinity.bpm" name="ipp-engine-ws-metro" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-engine-ws-metro-compile" / -->
+ <dependency org="wsdl4j" name="wsdl4j" rev="${wsdl4j.version}" conf="stardust-web-modeler-compile->default" />
+
+ <dependency org="org.eclipse.stardust.modeling.model" name="ipp-bpm-model" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-bpm-model-runtime"/>
+ <dependency org="org.eclipse.stardust.modeling.core" name="ipp-bpm-model-validation" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-bpm-model-validation-runtime"/>
+ <dependency org="org.eclipse.stardust.modeling.model" name="ipp-bpm-model-builder" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-bpm-model-builder-compile"/>
+
+ <!-- The following Eclipse dependencies are part of Eclipse 3.6.2 -->
+ <dependency org="org.eclipse.emf" name="org.eclipse.emf.common" rev="${org.eclipse.emf.common.version}" conf="stardust-web-modeler-compile->default"/>
+ <dependency org="org.eclipse.emf" name="org.eclipse.emf.ecore" rev="${org.eclipse.emf.ecore.version}" conf="stardust-web-modeler-compile->default">
+ <exclude org="org.eclipse.emf" module="org.eclipse.emf.common" />
+ </dependency>
+ <dependency org="org.eclipse.emf" name="org.eclipse.emf.ecore.xmi" rev="${org.eclipse.emf.ecore.xmi.version}" conf="stardust-web-modeler-compile->default">
+ <exclude org="org.eclipse.emf" module="org.eclipse.emf.ecore" />
+ </dependency>
+ <dependency org="org.eclipse.emf" name="org.eclipse.emf.ecore.change" rev="${org.eclipse.emf.ecore.change.version}" conf="stardust-web-modeler-compile->default">
+ <exclude org="org.eclipse.emf" module="org.eclipse.emf.ecore" />
+ </dependency>
+ <dependency org="org.eclipse.xsd" name="org.eclipse.xsd" rev="${org.eclipse.xsd.version}" conf="stardust-web-modeler-compile->default"/>
+
+ <dependency org="org.eclipse.stardust.ui.web" name="ipp-portal-common" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-portal-common-compile"/>
+ <dependency org="org.eclipse.stardust.ui.web" name="ipp-views-common" rev="${ipp.version.full}" conf="stardust-web-modeler-compile->ipp-views-common-compile"/>
+
+ <dependency org="org.apache.myfaces.core" name="myfaces-api" rev="${myfaces-api.version}" conf="stardust-web-modeler-compile->default">
+ <exclude org="commons-beanutils" module="commons-beanutils"/>
+ <exclude org="commons-lang" module="commons-lang" />
+ <exclude org="commons-digester" module="commons-digester"/>
+ <exclude org="commons-logging" module="commons-logging"/>
+ <exclude org="javax.servlet" module="jstl"/>
+ </dependency>
+ <dependency org="commons-beanutils" name="commons-beanutils" rev="${commons-beanutils.version}" conf="stardust-web-modeler-compile->default"/>
+ <dependency org="javax.servlet" name="servlet-api" rev="${servlet-api.version}" conf="stardust-web-modeler-compile->default"/>
+ <dependency org="com.google.code.gson" name="gson" rev="${gson.version}" conf="stardust-web-modeler-compile->default"/>
+ <!-->dependency org="org.apache.httpcomponents" name="httpclient" rev="${commons-httpclient.version}" conf="stardust-web-modeler-compile->default"/-->
+
+ <dependency org="junit" name="junit" rev="${junit.version}" conf="test->default">
+ <exclude org="org.hamcrest" module="hamcrest-core" />
+ </dependency>
+ <dependency org="org.hamcrest" name="hamcrest-core" rev="${hamcrest-core.version}" conf="test->default" />
+ </dependencies>
+</ivy-module>
diff --git a/web-modeler/pom.xml b/web-modeler/pom.xml
index 7ac24af..65969b7 100644
--- a/web-modeler/pom.xml
+++ b/web-modeler/pom.xml
@@ -1,253 +1,238 @@
-<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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.stardust</groupId>
- <artifactId>product-parent</artifactId>
- <version>9.9.9-SNAPSHOT</version>
- <relativePath>../../product/product-parent/pom.xml</relativePath>
- </parent>
-
- <groupId>org.eclipse.stardust.ui.web</groupId>
- <artifactId>stardust-web-modeler</artifactId>
- <version>0.0.1-SNAPSHOT</version>
-
- <packaging>jar</packaging>
-
-<!--
- <parent>
- <groupId>com.infinity.bpm.pepper</groupId>
- <artifactId>pepper-common</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../pepper-common/pom.xml</relativePath>
- </parent>
--->
-
- <properties>
- <ipp.version>1.0.0-NIGHTLY-SNAPSHOT</ipp.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <!-- IMPORTANT: these dependencies must be in sync with those of ivy.xml -->
-
- <dependency>
- <groupId>org.eclipse.stardust.engine</groupId>
- <artifactId>carnot-engine</artifactId>
- <version>${ipp.version}</version>
- </dependency>
- <dependency>
- <groupId>wsdl4j</groupId>
- <artifactId>wsdl4j</artifactId>
- <version>${wsdl4j.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.stardust.modeling.model</groupId>
- <artifactId>ipp-bpm-model</artifactId>
- <version>${ipp.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.stardust.modeling.core</groupId>
- <artifactId>ipp-bpm-model-validation</artifactId>
- <version>${ipp.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.stardust.modeling.model</groupId>
- <artifactId>org.eclipse.stardust.model.xpdl.builder</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.stardust.ui.web</groupId>
- <artifactId>ipp-portal-common</artifactId>
- <version>${ipp.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.stardust.ui.web</groupId>
- <artifactId>ipp-views-common</artifactId>
- <version>${ipp.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.myfaces.core</groupId>
- <artifactId>myfaces-api</artifactId>
- <version>${myfaces-api.version}</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${servlet-api.version}</version>
- </dependency>
-
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>${gson.version}</version>
- </dependency>
-
- <!-->dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>${commons-httpclient.version}</version>
- </dependency-->
-
- <!-- The following Eclipse dependencies are part of Eclipse 3.6.2 -->
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.common</artifactId>
- <version>${org.eclipse.emf.common.version}</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore</artifactId>
- <version>${org.eclipse.emf.ecore.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.common</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore.xmi</artifactId>
- <version>${org.eclipse.emf.ecore.xmi.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore.change</artifactId>
- <version>${org.eclipse.emf.ecore.change.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.eclipse.xsd</groupId>
- <artifactId>org.eclipse.xsd</artifactId>
- <version>${org.eclipse.xsd.version}</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.atmosphere</groupId>
- <artifactId>atmosphere-runtime</artifactId>
- <version>${atmosphere-runtime.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- <!-- <exclusion> <groupId>org.atmosphere</groupId> <artifactId>atmosphere-compat-tomcat7</artifactId>
- </exclusion> <exclusion> <groupId>org.atmosphere</groupId> <artifactId>atmosphere-compat-tomcat</artifactId>
- </exclusion> <exclusion> <groupId>org.atmosphere</groupId> <artifactId>atmosphere-compat-jbossweb</artifactId>
- </exclusion> -->
- </exclusions>
- </dependency>
- <!-- <dependency> <groupId>com.ning</groupId> <artifactId>async-http-client</artifactId>
- <version>1.7.4</version> </dependency> -->
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <encoding>UTF-8</encoding>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.3</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>ipp-repo</id>
- <url>https://infinity.sungard.com/repository/ipp-libs</url>
- </repository>
- <repository>
- <id>ipp-repo-dev</id>
- <url>https://infinity.sungard.com/repository/ipp-libs-dev</url>
- </repository>
- </repositories>
-
- <profiles>
- <profile>
- <id>with-emfcompare</id>
-
- <properties>
- <use-emfcompare>true</use-emfcompare>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>org.eclipse.emf.compare.match</artifactId>
- <version>1.3.1.v20120605-0748</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf.compare</groupId>
- <artifactId>org.eclipse.emf.compare.diff</artifactId>
- <version>1.3.1.v20120605-0748</version>
- </dependency>
- </dependencies>
- </profile>
-
- <profile>
- <id>not-with-emfcompare</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/web/modeler/edit/twophase/**</exclude>
- </excludes>
- <testExcludes>
- <testExclude>**/web/modeler/edit/twophase/**</testExclude>
- </testExcludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.stardust</groupId>
+ <artifactId>product-parent</artifactId>
+ <version>9.9.9-SNAPSHOT</version>
+ <relativePath>../../product/product-parent/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.eclipse.stardust.ui.web</groupId>
+ <artifactId>stardust-web-modeler</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+ <packaging>jar</packaging>
+
+<!--
+ <parent>
+ <groupId>com.infinity.bpm.pepper</groupId>
+ <artifactId>pepper-common</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../pepper-common/pom.xml</relativePath>
+ </parent>
+-->
+
+ <properties>
+ <ipp.version>1.0.0-NIGHTLY-SNAPSHOT</ipp.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <!-- IMPORTANT: these dependencies must be in sync with those of ivy.xml -->
+
+ <dependency>
+ <groupId>org.eclipse.stardust.engine</groupId>
+ <artifactId>carnot-engine</artifactId>
+ <version>${ipp.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <version>${wsdl4j.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.stardust.modeling.model</groupId>
+ <artifactId>ipp-bpm-model</artifactId>
+ <version>${ipp.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.stardust.modeling.core</groupId>
+ <artifactId>ipp-bpm-model-validation</artifactId>
+ <version>${ipp.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.stardust.modeling.model</groupId>
+ <artifactId>org.eclipse.stardust.model.xpdl.builder</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.stardust.ui.web</groupId>
+ <artifactId>ipp-portal-common</artifactId>
+ <version>${ipp.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.stardust.ui.web</groupId>
+ <artifactId>ipp-views-common</artifactId>
+ <version>${ipp.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>${myfaces-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${servlet-api.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>${gson.version}</version>
+ </dependency>
+
+ <!-->dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>${commons-httpclient.version}</version>
+ </dependency-->
+
+ <!-- The following Eclipse dependencies are part of Eclipse 3.6.2 -->
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>org.eclipse.emf.common</artifactId>
+ <version>${org.eclipse.emf.common.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>org.eclipse.emf.ecore</artifactId>
+ <version>${org.eclipse.emf.ecore.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>org.eclipse.emf.common</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>org.eclipse.emf.ecore.xmi</artifactId>
+ <version>${org.eclipse.emf.ecore.xmi.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>org.eclipse.emf.ecore</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>org.eclipse.emf.ecore.change</artifactId>
+ <version>${org.eclipse.emf.ecore.change.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>org.eclipse.emf.ecore</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.xsd</groupId>
+ <artifactId>org.eclipse.xsd</artifactId>
+ <version>${org.eclipse.xsd.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- <dependency> <groupId>com.ning</groupId> <artifactId>async-http-client</artifactId>
+ <version>1.7.4</version> </dependency> -->
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.4.3</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>ipp-repo</id>
+ <url>https://infinity.sungard.com/repository/ipp-libs</url>
+ </repository>
+ <repository>
+ <id>ipp-repo-dev</id>
+ <url>https://infinity.sungard.com/repository/ipp-libs-dev</url>
+ </repository>
+ </repositories>
+
+ <profiles>
+ <profile>
+ <id>with-emfcompare</id>
+
+ <properties>
+ <use-emfcompare>true</use-emfcompare>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.emf.compare</groupId>
+ <artifactId>org.eclipse.emf.compare.match</artifactId>
+ <version>1.3.1.v20120605-0748</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.emf.compare</groupId>
+ <artifactId>org.eclipse.emf.compare.diff</artifactId>
+ <version>1.3.1.v20120605-0748</version>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <id>not-with-emfcompare</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/web/modeler/edit/twophase/**</exclude>
+ </excludes>
+ <testExcludes>
+ <testExclude>**/web/modeler/edit/twophase/**</testExclude>
+ </testExcludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/ModelChangeBroadcaster.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/ModelChangeBroadcaster.java
deleted file mode 100644
index 4e6529e..0000000
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/edit/ModelChangeBroadcaster.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.stardust.ui.web.modeler.edit;
-
-import static org.eclipse.stardust.ui.web.modeler.service.streaming.JointModellingSessionsController.lookupModelChangeBroadcaster;
-
-import org.atmosphere.cpr.Broadcaster;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import com.google.gson.JsonObject;
-
-import org.eclipse.stardust.common.log.LogManager;
-import org.eclipse.stardust.common.log.Logger;
-import org.eclipse.stardust.model.xpdl.builder.session.EditingSession;
-
-@Component
-@Scope("singleton")
-public class ModelChangeBroadcaster implements IChangeListener
-{
- private static final Logger trace = LogManager.getLogger(ModelChangeBroadcaster.class);
-
- @Override
- public void onCommand(EditingSession session, JsonObject commandJson)
- {
- Broadcaster b = lookupModelChangeBroadcaster(session.getId());
- if (null != b)
- {
- if (trace.isDebugEnabled())
- {
- trace.debug("About to broadcast model change: " + commandJson);
- }
- b.broadcast(commandJson);
- }
- else
- {
- trace.info("Skipping broadcast of model change (no subscribers):");
- }
- }
-
-}
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/portal/InviteParticipantsDialog.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/portal/InviteParticipantsDialog.java
index 95503e5..90a701e 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/portal/InviteParticipantsDialog.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/portal/InviteParticipantsDialog.java
@@ -110,21 +110,6 @@ public class InviteParticipantsDialog extends PopupUIComponentBean
/**
*
- */
- public void inviteParticipants()
- {
- ServletContext context = (ServletContext) FacesContext.getCurrentInstance()
- .getExternalContext()
- .getContext();
- String user = modelService.getLoggedInUser(context);
- JsonObject userJson = new JsonMarshaller().readJsonObject(user);
- getModelService().requestInvite(newArrayList(selectedUserAccounts),
- extractAsString(userJson, "account"));
- closePopup();
- }
-
- /**
- *
* @return
*/
public boolean isNotifyViaEmail()
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
index f57a31e..c8a261d 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java
@@ -19,12 +19,15 @@ import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractIn
import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractLong;
import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractString;
import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.hasNotJsonNull;
-import static org.eclipse.stardust.ui.web.modeler.service.streaming.JointModellingSessionsController.lookupInviteBroadcaster;
import java.io.IOException;
import java.io.Serializable;
-import java.util.*;
-import java.util.concurrent.Future;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
@@ -33,7 +36,6 @@ import javax.wsdl.*;
import javax.wsdl.Service;
import javax.xml.namespace.QName;
-import org.atmosphere.cpr.Broadcaster;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
@@ -57,7 +59,31 @@ import org.eclipse.stardust.model.xpdl.builder.strategy.ModelManagementStrategy;
import org.eclipse.stardust.model.xpdl.builder.utils.*;
import org.eclipse.stardust.model.xpdl.carnot.*;
import org.eclipse.stardust.model.xpdl.carnot.AttributeType;
-import org.eclipse.stardust.model.xpdl.carnot.util.*;
+import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
+import org.eclipse.stardust.model.xpdl.carnot.ContextType;
+import org.eclipse.stardust.model.xpdl.carnot.DataMappingConnectionType;
+import org.eclipse.stardust.model.xpdl.carnot.DataSymbolType;
+import org.eclipse.stardust.model.xpdl.carnot.DataType;
+import org.eclipse.stardust.model.xpdl.carnot.DescriptionType;
+import org.eclipse.stardust.model.xpdl.carnot.DiagramType;
+import org.eclipse.stardust.model.xpdl.carnot.DirectionType;
+import org.eclipse.stardust.model.xpdl.carnot.EndEventSymbol;
+import org.eclipse.stardust.model.xpdl.carnot.IIdentifiableModelElement;
+import org.eclipse.stardust.model.xpdl.carnot.IModelParticipant;
+import org.eclipse.stardust.model.xpdl.carnot.LaneSymbol;
+import org.eclipse.stardust.model.xpdl.carnot.ModelType;
+import org.eclipse.stardust.model.xpdl.carnot.PoolSymbol;
+import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
+import org.eclipse.stardust.model.xpdl.carnot.StartEventSymbol;
+import org.eclipse.stardust.model.xpdl.carnot.TransitionConnectionType;
+import org.eclipse.stardust.model.xpdl.carnot.TriggerType;
+import org.eclipse.stardust.model.xpdl.carnot.XmlTextNode;
+import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
+import org.eclipse.stardust.model.xpdl.carnot.util.CarnotConstants;
+import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
+import org.eclipse.stardust.model.xpdl.carnot.util.ModelVariable;
+import org.eclipse.stardust.model.xpdl.carnot.util.VariableContext;
+import org.eclipse.stardust.model.xpdl.carnot.util.VariableContextHelper;
import org.eclipse.stardust.model.xpdl.xpdl2.FormalParameterType;
import org.eclipse.stardust.model.xpdl.xpdl2.ModeType;
import org.eclipse.stardust.model.xpdl.xpdl2.TypeDeclarationType;
@@ -519,114 +545,6 @@ public class ModelService
}
- /**
- * Invite Mechanism works the following:
- *
- * When the user is logged in any messages can be broadcasted directly to him. The user
- * recives a broadcast about a notification that he was in invited. He can decide now
- * if he really wants to join the session or not. It broadcasts a JsonObject to every
- * user online directly.
- *
- * @param userAccountList
- * A list of all invited users provided by the icefaces backing bean
- * @param sessionOwnerId
- * The user who invited everyone in userAccountList
- */
- public void requestInvite(List<String> userAccountList, String sessionOwnerId)
- {
- JsonObject requestJoinJson = new JsonObject();
- UserService userService = getUserService();
- User sessionOwner = userService.getUser(sessionOwnerId);
- String uniqueID = ModelingSessionManager.getUniqueId(sessionOwner);
-
- ModelingSession currentSession = sessionManager.currentSession(uniqueID);
-
- requestJoinJson.addProperty("account", sessionOwnerId);
- requestJoinJson.addProperty("timestamp", System.currentTimeMillis());
- requestJoinJson.addProperty("path", "/users");
- requestJoinJson.addProperty("operation", "requestJoin");
-
- for (String inviteeId : userAccountList)
- {
- User invitee = userService.getUser(inviteeId);
- JsonObject oldObject = new JsonObject();
- String inviteeUniqueId = ModelingSessionManager.getUniqueId(invitee);
- if ( !currentSession.participantContainsUser(invitee)
- && !currentSession.prospectContainsUser(invitee)
- && !currentSession.isOwner(inviteeUniqueId))
- {
- requestJoinJson.addProperty(TYPE_PROPERTY, "REQUEST_JOIN_COMMAND");
-
- oldObject.addProperty("account", invitee.getAccount());
- oldObject.addProperty("sessionId", currentSession.getId());
- oldObject.addProperty("firstName", invitee.getFirstName());
- oldObject.addProperty("lastName", invitee.getLastName());
- oldObject.addProperty("email", invitee.getEMail());
- oldObject.addProperty("imageUrl", "");
- // newJson.addProperty("modelSession",
- // sessionManager.currentSession(account).getId());
- JsonObject newObject = new JsonObject();
-
- requestJoinJson.add("newObject", newObject);
- requestJoinJson.add("oldObject", oldObject);
-
- trace.info(">>>>>>>Created Join Json Object the following way: "
- + requestJoinJson.toString());
-
- Broadcaster inviteBroadcaster = lookupInviteBroadcaster(inviteeId);
- if ((null != inviteBroadcaster) && (inviteeId != sessionOwnerId))
- {
- trace.info(">>>>>>>>>>>>> Broadcasting Message REQUEST_JOIN_COMMAND to invitee "
- + inviteeId);
- inviteBroadcaster.broadcast(requestJoinJson.toString());
- }
- currentSession.inviteUser(invitee);
-
- }
- else if ( !currentSession.participantContainsUser(invitee)
- && currentSession.prospectContainsUser(invitee))
- {
- requestJoinJson.addProperty(TYPE_PROPERTY, "ERROR");
- oldObject.addProperty(
- "errormessage",
- "You are trying to invite a user already invited. Please confirm the pending invite or decline it");
- requestJoinJson.add("newObject", new JsonObject());
- requestJoinJson.add("oldObject", oldObject);
-
- }
- else if (currentSession.participantContainsUser(invitee)
- && !currentSession.prospectContainsUser(invitee))
- {
- requestJoinJson.addProperty(TYPE_PROPERTY, "ERROR");
- oldObject.addProperty("errormessage",
- "You are trying to invite a user who has already joined the session.");
- requestJoinJson.add("newObject", new JsonObject());
- requestJoinJson.add("oldObject", oldObject);
-
- }
- else if (currentSession.isOwner(inviteeUniqueId))
- {
- requestJoinJson.addProperty(TYPE_PROPERTY, "ERROR");
- oldObject.addProperty("errormessage", "You are trying to invite yourself.");
- requestJoinJson.add("newObject", new JsonObject());
- requestJoinJson.add("oldObject", oldObject);
- }
- else
- {
- requestJoinJson.addProperty(TYPE_PROPERTY, "ERROR");
- oldObject.addProperty("errormessage", "An unknown error occured.");
- requestJoinJson.add("newObject", new JsonObject());
- requestJoinJson.add("oldObject", oldObject);
- }
-
- Broadcaster ownerBroadcaster = lookupInviteBroadcaster(sessionOwnerId);
- trace.info(">>>>>>>>>>>>> Broadcasting Message REQUEST_JOIN_COMMAND to session owner "
- + sessionOwnerId);
- ownerBroadcaster.broadcast(requestJoinJson.toString());
- }
-
- }
-
public String getLoggedInUser(ServletContext context)
{
PortalApplication app = WebApplicationContextUtils.getWebApplicationContext(context)
@@ -654,63 +572,6 @@ public class ModelService
return currentUserJson.toString();
}
- /**
- * Uses the ModelingSessionManager to check whether a given user was invited to session
- * while he was offline. Broadcasts a REQUEST_JOIN_JSON Object back to the requester
- * specified through the username.
- *
- * @param username
- *
- */
- public void getOfflineInvites(String username)
- {
- UserService us = getUserService();
- User currentUser = us.getUser(username);
- List<String> sessionOwners = sessionManager.getUserInvitedToSession(currentUser);
-
- JsonObject offlineInvite = new JsonObject();
- JsonObject oldObject = new JsonObject();
- JsonObject newObject = new JsonObject();
-
- oldObject.addProperty("account", currentUser.getAccount());
- oldObject.addProperty("firstName", currentUser.getFirstName());
- oldObject.addProperty("lastName", currentUser.getLastName());
- oldObject.addProperty("email", currentUser.getEMail());
- oldObject.addProperty("imageUrl", "");
- if ( !sessionOwners.isEmpty())
- {
- for (String owner : sessionOwners)
- {
- String ownername = unwrapUsername(owner);
- User sessionOwner = us.getUser(ownername);
- trace.info(">>>>>>>>>>>>> Session owner " + ownername);
- offlineInvite.addProperty(TYPE_PROPERTY, "REQUEST_JOIN_COMMAND");
- offlineInvite.addProperty("account", sessionOwner.getAccount());
- offlineInvite.addProperty("timestamp", System.currentTimeMillis());
- offlineInvite.addProperty("path", "/users");
- offlineInvite.addProperty("operation", "requestJoin");
- offlineInvite.add("oldObject", oldObject);
- offlineInvite.add("newObject", newObject);
-
- Broadcaster b = lookupInviteBroadcaster(username);
- if (null != b)
- {
- trace.info(">>>>>>>>>>>>> Broadcasting Message REQUEST_JOIN_COMMAND to "
- + username);
- Future<String> myFuture = b.broadcast(offlineInvite.toString());
- }
- else
- {
- trace.info(">>>>>>>>>>>>> Broadcaster null for " + username);
- }
- }
- }
- else
- {
- trace.info(">>>>>>>>>>>>> No current Session found where user" + username
- + " was invited");
- }
- }
private String unwrapUsername(String owner)
{
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/rest/ModelerResource.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/rest/ModelerResource.java
index 7edb569..f109d8d 100644
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/rest/ModelerResource.java
+++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/rest/ModelerResource.java
@@ -190,7 +190,7 @@ public class ModelerResource
* Used to push models loaded on the client (e.g. from Orion) into a server-side cache.
* Switches the model management strategy to <code>clientModelManagementStrategy</code>
* .
- *
+ *
* @param modelId
* @param postedData
* @return
@@ -226,7 +226,7 @@ public class ModelerResource
/**
* Temporary, auxiliary service to load a text file. Used to provide access to Orion
* files from this URL domain.
- *
+ *
* @param path
* @return
*/
@@ -253,7 +253,7 @@ public class ModelerResource
/**
* Used by the auxiliary method above only.
- *
+ *
* @param path
* @return
*/
@@ -376,25 +376,6 @@ public class ModelerResource
}
}
- @HEAD
- @Path("users/getOfflineInvites")
- public Response getOfflineInvites()
- {
- try
- {
- PortalApplication app = WebApplicationContextUtils.getWebApplicationContext(
- servletContext).getBean(PortalApplication.class);
- org.eclipse.stardust.ui.web.common.spi.user.User currentUser = app.getLoggedInUser();
- getModelService().getOfflineInvites(currentUser.getLoginName());
- return Response.ok().build();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- }
-
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@@ -878,7 +859,7 @@ public class ModelerResource
}
/**
- *
+ *
* @return
*/
private JsonObject getInteractionDataObject()
@@ -1022,7 +1003,7 @@ public class ModelerResource
@Produces(MediaType.APPLICATION_JSON)
@Path("interactions/{interactionId}/outData")
/**
- * This method is not part of the Interaction Protocol, but used to retrieve output data submitted via the protocol from the
+ * This method is not part of the Interaction Protocol, but used to retrieve output data submitted via the protocol from the
* server-side state to display those.
*/
public Response getInteractionOutputData(
@@ -1319,7 +1300,7 @@ public class ModelerResource
@Produces(MediaType.APPLICATION_JSON)
@Path("/parseDrl")
/**
- *
+ *
*/
public Response parseDrlFile(String fileContent)
{
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/streaming/ChatController.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/streaming/ChatController.java
deleted file mode 100644
index ee56b0f..0000000
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/streaming/ChatController.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.eclipse.stardust.ui.web.modeler.service.streaming;
-
-import java.io.IOException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.atmosphere.cpr.ApplicationConfig;
-import org.atmosphere.cpr.AtmosphereResource;
-import org.atmosphere.cpr.Broadcaster;
-import org.atmosphere.cpr.BroadcasterFactory;
-import org.atmosphere.cpr.FrameworkConfig;
-import org.atmosphere.cpr.HeaderConfig;
-import org.atmosphere.websocket.WebSocketEventListenerAdapter;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-@Controller
-@Scope("prototype")
-@RequestMapping("/chat")
-public class ChatController
-{
- /**
- * This method takes a request to subscribe to the topic.
- *
- * @param request
- * @return ModelAndView
- */
- @RequestMapping(value = "{topicId}", method = RequestMethod.GET)
- @ResponseBody
- public String subscribe(@PathVariable("topicId") String topicId,
- HttpServletRequest request) throws Exception
- {
- AtmosphereResource resource = (AtmosphereResource) request.getAttribute(FrameworkConfig.ATMOSPHERE_RESOURCE);
-
- this.doGet(topicId, resource, resource.getResponse());
-
- String header = request.getHeader(HeaderConfig.X_ATMOSPHERE_TRANSPORT);
- if (HeaderConfig.LONG_POLLING_TRANSPORT.equalsIgnoreCase(header))
- {
- request.setAttribute(ApplicationConfig.RESUME_ON_BROADCAST, Boolean.TRUE);
- resource.suspend( -1, false);
- }
- else
- {
- resource.suspend( -1);
- }
-
- return null;
- }
-
- /**
- * Takes a request to post data and broadcasts it to everyone else.
- *
- * @param request
- * @return String
- */
- @RequestMapping(value = "{topicId}", method = RequestMethod.POST)
- @ResponseBody
- public String broadcastMessage(@PathVariable("topicId") String topicId,
- HttpServletRequest request) throws Exception
- {
- // @RequestBody does not work (at least on IE) due to missing/invalid content type
- String message = request.getReader().readLine();
-
- this.doPost(topicId, message);
-
- return null;
- }
-
- // See AtmosphereHandlerPubSub example - same code as GET
- private void doGet(String topicId, AtmosphereResource r, HttpServletResponse response)
- {
- // Log all events on the console, including WebSocket events.
- r.addEventListener(new WebSocketEventListenerAdapter());
-
- response.setContentType("application/json;charset=UTF-8");
-
- Broadcaster b = lookupBroadcaster(topicId);
- r.setBroadcaster(b);
- }
-
- // See AtmosphereHandlerPubSub example - same code as POST
- private void doPost(String topicId, String message) throws IOException
- {
- Broadcaster b = lookupBroadcaster(topicId);
-
- if (message != null && message.indexOf("message") != -1)
- {
- b.broadcast(message);
- }
- }
-
- /**
- * Retrieve the {@link Broadcaster} based on the request's path info.
- *
- * @param pathInfo
- * @return the {@link Broadcaster} based on the request's path info.
- */
- Broadcaster lookupBroadcaster(String pathInfo)
- {
- if (pathInfo == null)
- {
- return BroadcasterFactory.getDefault().lookup("/", true);
- }
- else
- {
- String[] decodedPath = pathInfo.split("/");
- return BroadcasterFactory.getDefault().lookup(
- decodedPath[decodedPath.length - 1], true);
- }
- }
-
-} \ No newline at end of file
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/streaming/JointModellingSessionsController.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/streaming/JointModellingSessionsController.java
deleted file mode 100644
index c6cc753..0000000
--- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/streaming/JointModellingSessionsController.java
+++ /dev/null
@@ -1,251 +0,0 @@
-package org.eclipse.stardust.ui.web.modeler.service.streaming;
-
-import static org.eclipse.stardust.ui.web.modeler.marshaling.GsonUtils.extractAsString;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-import org.atmosphere.cpr.ApplicationConfig;
-import org.atmosphere.cpr.AtmosphereResource;
-import org.atmosphere.cpr.Broadcaster;
-import org.atmosphere.cpr.BroadcasterFactory;
-import org.atmosphere.cpr.FrameworkConfig;
-import org.atmosphere.cpr.HeaderConfig;
-import org.atmosphere.websocket.WebSocketEventListenerAdapter;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import com.google.gson.JsonObject;
-
-import org.eclipse.stardust.common.log.LogManager;
-import org.eclipse.stardust.common.log.Logger;
-import org.eclipse.stardust.engine.api.runtime.User;
-import org.eclipse.stardust.ui.web.modeler.marshaling.JsonMarshaller;
-import org.eclipse.stardust.ui.web.modeler.service.ModelServiceFacade;
-
-@Controller
-@Scope("prototype")
-@RequestMapping("/bpm-modeling/collaboration")
-public class JointModellingSessionsController
-{
- private static final Logger trace = LogManager.getLogger(JointModellingSessionsController.class);
-
- @Resource
- private JsonMarshaller jsonIo;
-
- @Resource
- private ModelServiceFacade modelServiceFacade;
-
- public static Broadcaster lookupInviteBroadcaster(String userId)
- {
- return lookupInviteBroadcaster(userId, false);
- }
-
- public static Broadcaster lookupModelChangeBroadcaster(String sessionId)
- {
- return lookupModelChangeBroadcaster(sessionId, false);
- }
-
- protected static Broadcaster lookupInviteBroadcaster(String userId, boolean createIfMissing)
- {
- return BroadcasterFactory.getDefault().lookup(
- "/services/streaming/bpm-modeling/collaboration/invite/" + userId, createIfMissing);
- }
-
- protected static Broadcaster lookupModelChangeBroadcaster(String sessionId, boolean createIfMissing)
- {
- return BroadcasterFactory.getDefault().lookup(
- "/services/streaming/bpm-modeling/collaboration/model/" + sessionId, createIfMissing);
- }
-
- /**
- * This method takes a request to subscribe to the topic.
- *
- * @param request
- * @return ModelAndView
- */
- @RequestMapping(value = "invite/{userId}", method = RequestMethod.GET)
- @ResponseBody
- public String subscribeToInvites(@PathVariable("userId") String userId,
- HttpServletRequest request) throws Exception
- {
- AtmosphereResource resource = (AtmosphereResource) request.getAttribute(FrameworkConfig.ATMOSPHERE_RESOURCE);
-
- resource.getResponse().setContentType("application/json;charset=UTF-8");
-
- Broadcaster b = lookupInviteBroadcaster(userId, true);
- resource.setBroadcaster(b);
-
- trace.info("(Re-)Susbcribing for collaboration invites: " + userId + " (scope: "
- + b.getScope() + ").");
-
- // enable event logging for resource
- resource.addEventListener(new WebSocketEventListenerAdapter());
-
- initiateSuspend(request, resource);
-
- return null;
- }
-
- /**
- * Takes a request to post data and broadcasts it to everyone else.
- *
- * @param request
- * @return String
- */
- @RequestMapping(value = "invite/{userId}", method = RequestMethod.POST)
- @ResponseBody
- public String broadcastInvite(@PathVariable("userId") String userId,
- HttpServletRequest request) throws Exception
- {
- // @RequestBody does not work (at least on IE) due to missing/invalid content type
- // TODO read fully
- String message = request.getReader().readLine();
-
- trace.info("About to broadcast collaboration handshake message: " + userId);
-
- JsonObject obj = jsonIo.readJsonObject(message);
-
- String msgType = extractAsString(obj, "type");
- if ("ACCEPT_INVITE_COMMAND".equals(msgType))
- {
- String sessionId = extractAsString(obj.getAsJsonObject("newObject"), "sessionId");
- String joiner = extractAsString(obj.getAsJsonObject("newObject"), "account");
- modelServiceFacade.requestJoin(sessionId, joiner);
-
- for (User user : modelServiceFacade.getCollaborators(sessionId))
- {
- Broadcaster collabs = lookupInviteBroadcaster(user.getAccount());
- collabs.broadcast(message);
- }
-
- Broadcaster invitee = lookupInviteBroadcaster(joiner);
- invitee.broadcast(message);
-
- String sessionOwner = extractAsString(obj.getAsJsonObject("oldObject"), "sessionOwner");
- Broadcaster owner = lookupInviteBroadcaster(sessionOwner);
- owner.broadcast(message);
- }
- else if ("DECLINE_INVITE_COMMAND".equals(msgType))
- {
- String sessionId = extractAsString(obj.getAsJsonObject("newObject"), "sessionId");
- String joiner = extractAsString(obj.getAsJsonObject("newObject"), "account");
- modelServiceFacade.declineInvite(sessionId, joiner);
-
- for (User user : modelServiceFacade.getProspects(sessionId))
- {
- if(joiner.equals(user.getAccount()))
- {
- Broadcaster invitee = lookupInviteBroadcaster(user.getAccount());
- invitee.broadcast(message);
- }
- }
-
- String sessionOwner = extractAsString(obj.getAsJsonObject("oldObject"), "sessionOwner");
- Broadcaster owner = lookupInviteBroadcaster(sessionOwner);
- owner.broadcast(message);
- }
- else if ("CONFIRM_JOIN_COMMAND".equals(msgType))
- {
- String sessionId = extractAsString(obj.getAsJsonObject("oldObject"), "sessionId");
- String joiner = extractAsString(obj.getAsJsonObject("oldObject"), "account");
- modelServiceFacade.confirmJoin(sessionId, joiner);
-
- obj.addProperty("modelSession", sessionId);
-
- for (User user : modelServiceFacade.getCollaborators(sessionId))
- {
- Broadcaster invitee = lookupInviteBroadcaster(user.getAccount());
- invitee.broadcast(obj.toString());
- }
-
- String sessionOwner = extractAsString(obj, "account");
- Broadcaster owner = lookupInviteBroadcaster(sessionOwner);
- owner.broadcast(obj.toString());
- }
- else
- {
- trace.info("Unsupported message: " + message);
- }
-
- return null;
- }
-
- @RequestMapping(value = "model/{sessionId}", method = RequestMethod.GET)
- @ResponseBody
- public String subscribeToModelChanges(@PathVariable("sessionId") String sessionId,
- HttpServletRequest request) throws Exception
- {
- AtmosphereResource resource = (AtmosphereResource) request.getAttribute(FrameworkConfig.ATMOSPHERE_RESOURCE);
-
- resource.getResponse().setContentType("application/json;charset=UTF-8");
-
- Broadcaster b = lookupModelChangeBroadcaster(sessionId, true);
- resource.setBroadcaster(b);
-
- trace.info("(Re-)Susbcribing to collaboration session: " + sessionId);
-
- // enable event logging for resource
- resource.addEventListener(new WebSocketEventListenerAdapter());
-
- initiateSuspend(request, resource);
-
- return null;
- }
-
- /**
- * Takes a request to post data and broadcasts it to everyone else.
- *
- * @param request
- * @return String
- */
- @RequestMapping(value = "model/{sessionId}", method = RequestMethod.POST)
- @ResponseBody
- public String broadcastModelChange(@PathVariable("sessionId") String sessionId,
- HttpServletRequest request) throws Exception
- {
- if (trace.isDebugEnabled())
- {
- trace.debug("About to broadcast message within collaboration session: "
- + sessionId);
- }
-
- // @RequestBody does not work (at least on IE) due to missing/invalid content type
- // TODO read fully
- String message = request.getReader().readLine();
-
- Broadcaster forwarder = lookupModelChangeBroadcaster(sessionId);
- if (null != forwarder)
- {
- if (trace.isDebugEnabled())
- {
- trace.debug("About to broadcast model change: " + message);
- }
- forwarder.broadcast(message);
- }
- else
- {
- trace.info("Skipping broadcast of model change (no subscribers):");
- }
-
- return null;
- }
-
- private void initiateSuspend(HttpServletRequest request, AtmosphereResource resource)
- {
- String header = request.getHeader(HeaderConfig.X_ATMOSPHERE_TRANSPORT);
- if (HeaderConfig.LONG_POLLING_TRANSPORT.equalsIgnoreCase(header))
- {
- request.setAttribute(ApplicationConfig.RESUME_ON_BROADCAST, Boolean.TRUE);
- resource.suspend( -1, false);
- }
- else
- {
- resource.suspend( -1);
- }
- }
-} \ No newline at end of file