diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/.gitignore b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/.gitignore
deleted file mode 100644
index 8f436c3..0000000
--- a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-/target
-/local
-
-# Eclipse, Netbeans and IntelliJ files
-/.*
-!.gitignore
-/nbproject
-/*.ipr
-/*.iws
-/*.iml
-
-/*.tlog
-/*.db
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/pom.xml b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/pom.xml
deleted file mode 100644
index fa52e27..0000000
--- a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/pom.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
- 4.0.0
-
- org.jbpm
- uberfire-demo-example
- 6.0.1.Final
-
-
- uberfire-demo-client
- jar
-
- Uberfire Demo: Client
-
-
-
- org.jbpm
- uberfire-demo-api
- 6.0.1.Final
-
-
-
- org.uberfire
- uberfire-backend-api
-
-
-
- org.uberfire
- uberfire-widgets-commons
-
-
-
- org.uberfire
- uberfire-workbench
-
-
-
- javax.inject
- javax.inject
- 1
-
-
-
- javax.enterprise
- cdi-api
- 1.0-SP4
-
-
-
-
- org.jboss.errai
- errai-ioc
-
-
-
- org.jboss.errai
- errai-bus
-
-
-
-
-
-
- org.jboss.errai
- errai-ui
-
-
-
- org.jboss.errai
- errai-data-binding
-
-
-
-
- com.google.gwt
- gwt-user
-
-
-
-
-
-
-
- src/main/java
-
-
-
- src/main/resources
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.2.1
-
-
- attach-sources
-
- jar
-
-
-
-
- true
-
-
-
-
-
-
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListPresenter$MessageListView.class b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListPresenter$MessageListView.class
deleted file mode 100644
index 1073a97..0000000
Binary files a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListPresenter$MessageListView.class and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListPresenter.class b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListPresenter.class
deleted file mode 100644
index b053523..0000000
Binary files a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListPresenter.class and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListViewImpl.class b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListViewImpl.class
deleted file mode 100644
index b901545..0000000
Binary files a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListViewImpl.class and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListViewImpl.html b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListViewImpl.html
deleted file mode 100644
index e365bd5..0000000
--- a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/messagelist/MessageListViewImpl.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessagePresenter$NewMessageView.class b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessagePresenter$NewMessageView.class
deleted file mode 100644
index 575a3bd..0000000
Binary files a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessagePresenter$NewMessageView.class and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessagePresenter.class b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessagePresenter.class
deleted file mode 100644
index 63d98e4..0000000
Binary files a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessagePresenter.class and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessageViewImpl.class b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessageViewImpl.class
deleted file mode 100644
index 78a0d08..0000000
Binary files a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessageViewImpl.class and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessageViewImpl.html b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessageViewImpl.html
deleted file mode 100644
index 0e5e0b1..0000000
--- a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/editors/newmessage/NewMessageViewImpl.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/i18n/Constants.class b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/i18n/Constants.class
deleted file mode 100644
index 31b76f6..0000000
Binary files a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/i18n/Constants.class and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/perspectives/MessageListPerspective.class b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/perspectives/MessageListPerspective.class
deleted file mode 100644
index 6b71256..0000000
Binary files a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/java/com/plugtree/training/demo/client/perspectives/MessageListPerspective.class and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/ErraiApp.properties b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/ErraiApp.properties
deleted file mode 100644
index a3e8362..0000000
--- a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/ErraiApp.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# ErraiApp.properties
-#
-# Do not remove, even if empty!
-#
-
-# This is a marker file. When it is detected inside a JAR or at the
-# top of any classpath, the subdirectories are scanned for deployable
-# components. As such, all Errai application modules in a project
-# should contain an ErraiApp.properties at the root of all classpaths
-# that you wish to be scanned.
-#
-# There are also some configuration options that can be set in this
-# file, although it is rarely necessary. See the documentation at
-# https://docs.jboss.org/author/display/ERRAI/ErraiApp.properties
-# for details.
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/UberfireDemoClient.gwt.xml b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/UberfireDemoClient.gwt.xml
deleted file mode 100644
index f9c655f..0000000
--- a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/UberfireDemoClient.gwt.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/client/i18n/Constants.properties b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/client/i18n/Constants.properties
deleted file mode 100644
index 4c38fa0..0000000
--- a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/client/i18n/Constants.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-Messages=Messages
-SendMessage=Send Message
-NewMessage=New Message
-NoMessages=No messages loaded
diff --git a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/client/i18n/Constants_es_AR.properties b/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/client/i18n/Constants_es_AR.properties
deleted file mode 100644
index 0b55f73..0000000
--- a/uberfire-demo/uberfire-demo-example/uberfire-demo-client/bin/src/main/resources/com/plugtree/training/demo/client/i18n/Constants_es_AR.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-Messages=Mensajes
-SendMessage=Enviar Mensaje
-NewMessage=Nuevo Mensaje
-NoMessages=No hay mensajes cargados
diff --git a/uberfire-demo/uberfire-demo-showcase/pom.xml b/uberfire-demo/uberfire-demo-showcase/pom.xml
index d12d44c..7d3bb94 100644
--- a/uberfire-demo/uberfire-demo-showcase/pom.xml
+++ b/uberfire-demo/uberfire-demo-showcase/pom.xml
@@ -26,7 +26,7 @@
Form Builder NG - Showcase
-
+
org.uberfire
@@ -102,10 +102,6 @@
org.guvnor
guvnor-workingset-api
-
- org.jbpm
- jbpm-console-ng-business-domain-api
-
org.jbpm
jbpm-console-ng-business-domain-backend
@@ -116,10 +112,6 @@
-
- org.jbpm
- jbpm-console-ng-process-runtime-api
-
org.kie.workbench.screens
kie-wb-common-default-editor-client
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/ShowcaseImages.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/ShowcaseImages.java
index 2e09fbd..b68d9c0 100644
--- a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/ShowcaseImages.java
+++ b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/ShowcaseImages.java
@@ -26,13 +26,6 @@ public interface ShowcaseImages
ShowcaseImages INSTANCE = GWT.create( ShowcaseImages.class );
- @Source("images/monitoring.png")
- ImageResource monitoringScreenshot();
-
- @Source("images/hdrlogo_drools.gif")
- ImageResource hdrlogoDrools();
-
-
@Source("images/uf-logo.png")
ImageResource uberfireLogo();
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/images/hdrlogo_drools.gif b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/images/hdrlogo_drools.gif
deleted file mode 100644
index 20fbd0c..0000000
Binary files a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/images/hdrlogo_drools.gif and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/images/monitoring.png b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/images/monitoring.png
deleted file mode 100644
index 56e4b62..0000000
Binary files a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/client/resources/images/monitoring.png and /dev/null differ
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/fb/FormDatabaseProducer.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/fb/FormDatabaseProducer.java
deleted file mode 100644
index 1de9e56..0000000
--- a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/fb/FormDatabaseProducer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.jbpm.form.builder.ng.server.fb;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.Produces;
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-import javax.persistence.PersistenceUnit;
-
-/**
- *
- */
-
-public class FormDatabaseProducer {
-
- private EntityManagerFactory emf = null;
-
- @PersistenceUnit(unitName = "org.jbpm.form.builder")
- @ApplicationScoped
- @Produces
- public EntityManagerFactory getEmf() {
- if (emf == null) {
- emf = Persistence.createEntityManagerFactory("org.jbpm.form.builder");
- }
- return emf;
- }
-
- @Produces
- @ApplicationScoped
- public EntityManager getEntityManager() {
- EntityManager em = getEmf().createEntityManager();
- em.getTransaction().begin();
- return em;
- }
-
- @ApplicationScoped
- public void commitAndClose(@Disposes EntityManager em) {
- try {
- em.getTransaction().commit();
- em.close();
- } catch (Exception e) {
-
- }
- }
-}
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/AppServiceProvider.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/AppServiceProvider.java
deleted file mode 100644
index 948b1a4..0000000
--- a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/AppServiceProvider.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.jbpm.form.builder.ng.server.impl;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Produces;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.uberfire.backend.server.IOWatchServiceNonDotImpl;
-import org.uberfire.backend.server.config.ConfigurationService;
-import org.uberfire.backend.server.io.IOSecurityAuth;
-import org.uberfire.backend.server.io.IOSecurityAuthz;
-import org.uberfire.commons.cluster.ClusterServiceFactory;
-import org.uberfire.commons.services.cdi.Startup;
-import org.uberfire.commons.services.cdi.StartupType;
-import org.uberfire.io.IOService;
-import org.uberfire.io.impl.IOServiceDotFileImpl;
-import org.uberfire.io.impl.cluster.IOServiceClusterImpl;
-import org.uberfire.security.auth.AuthenticationManager;
-import org.uberfire.security.authz.AuthorizationManager;
-import org.uberfire.security.impl.authz.RuntimeAuthorizationManager;
-import org.uberfire.security.server.cdi.SecurityFactory;
-
-@Startup(StartupType.BOOTSTRAP)
-@ApplicationScoped
-public class AppServiceProvider {
-
- @Inject
- @IOSecurityAuth
- private AuthenticationManager authenticationManager;
-
- @Inject
- @IOSecurityAuthz
- private AuthorizationManager authorizationManager;
-
- @Inject
- private IOWatchServiceNonDotImpl watchService;
-
- @Inject
- @Named("clusterServiceFactory")
- private ClusterServiceFactory clusterServiceFactory;
-
- @Inject ConfigurationService configurationService;
-
- private IOService ioService;
-
- @ApplicationScoped
- @Produces
- @Named("ioStrategy")
- public IOService getIoService() {
- System.out.println("********************* AppServiceProvider");
- configurationService.toString(); // this line ensures the ConfigurationService bean is really instantiated. do not remove!
-
- if (ioService == null) {
- SecurityFactory.setAuthzManager( new RuntimeAuthorizationManager() );
- if ( clusterServiceFactory == null ) {
- ioService = new IOServiceDotFileImpl( watchService );
- } else {
- ioService = new IOServiceClusterImpl( new IOServiceDotFileImpl( watchService ), clusterServiceFactory, false );
- }
- ioService.setAuthenticationManager( authenticationManager );
- ioService.setAuthorizationManager( authorizationManager );
- }
- return ioService;
- }
-}
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/AppSetup.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/AppSetup.java
index 05153a9..1d8edca 100644
--- a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/AppSetup.java
+++ b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/AppSetup.java
@@ -1,91 +1,45 @@
-/*
- * Copyright 2012 JBoss Inc
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
package org.jbpm.form.builder.ng.server.impl;
-import java.net.URI;
-
+import java.util.HashMap;
import javax.annotation.PostConstruct;
-import javax.enterprise.event.Event;
+import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.jbpm.console.ng.bd.service.AdministrationService;
import org.uberfire.backend.repositories.Repository;
-import org.uberfire.backend.server.config.ConfigGroup;
-import org.uberfire.backend.server.config.ConfigType;
-import org.uberfire.backend.server.config.ConfigurationFactory;
-import org.uberfire.backend.server.config.ConfigurationService;
-import org.uberfire.commons.services.cdi.ApplicationStarted;
-import org.uberfire.io.FileSystemType;
-import org.uberfire.io.IOService;
+import org.uberfire.backend.repositories.RepositoryService;
-@Singleton
-public class AppSetup {
+import org.uberfire.commons.services.cdi.Startup;
+import org.uberfire.commons.services.cdi.StartupType;
- @Inject
- @Named("ioStrategy")
- private IOService ioService;
-
- @Inject
- @Named("system")
- private Repository systemRepository;
+@Startup(StartupType.BOOTSTRAP)
+@ApplicationScoped
+public class AppSetup {
- @Inject
- private ConfigurationService configurationService;
+ public AppSetup() {
+ }
- @Inject
- private ConfigurationFactory configurationFactory;
-
- @Inject
- private AdministrationService administrationService;
+ private static final String PLAYGROUND_SCHEME = "git";
+ private static final String PLAYGROUND_ALIAS = "wires-playground";
+ private static final String PLAYGROUND_ORIGIN = "https://github.com/hernsys/demo-playground.git";
+ private static final String PLAYGROUND_UID = "mock";
+ private static final String PLAYGROUND_PWD = "mock";
@Inject
- private Event applicationStartedEvent;
+ private RepositoryService repositoryService;
- private boolean done = false;
-
@PostConstruct
- public void onStartup() {
- if (!done) {
- done = true;
-
- if (ioService.getFileSystem( URI.create( systemRepository.getUri() ) ) == null) {
- ioService.newFileSystem( URI.create( systemRepository.getUri() ),
- systemRepository.getEnvironment(),
- FileSystemType.Bootstrap.BOOTSTRAP_INSTANCE
- );
- }
-
- administrationService.bootstrapRepository( "example", "repository1", null, "", "");
- administrationService.bootstrapProject( "repository1", "org.kie.example", "project1", "1.0.0-SNAPSHOT" );
- administrationService.bootstrapConfig();
- administrationService.bootstrapDeployments();
- configurationService.addConfiguration( getGlobalConfiguration() );
-
- // notify cluster service that bootstrap is completed to start synchronization
- applicationStartedEvent.fire(new ApplicationStarted());
- }
+ public void assertPlayground() {
+ final Repository repository = repositoryService.getRepository(PLAYGROUND_ALIAS);
+ if (repository == null) {
+ repositoryService.createRepository(PLAYGROUND_SCHEME, PLAYGROUND_ALIAS, new HashMap() {
+ {
+ put("origin", PLAYGROUND_ORIGIN);
+ put("username", PLAYGROUND_UID);
+ put("crypt:password", PLAYGROUND_PWD);
+ }
+ });
+ }
}
- private ConfigGroup getGlobalConfiguration() {
- final ConfigGroup group = configurationFactory.newConfigGroup( ConfigType.GLOBAL, "settings", "" );
- group.addConfigItem( configurationFactory.newConfigItem( "build.enable-incremental", "true" ) );
-
- return group;
- }
}
+
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ApplicationScopedProducer.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ApplicationScopedProducer.java
new file mode 100644
index 0000000..c454a39
--- /dev/null
+++ b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ApplicationScopedProducer.java
@@ -0,0 +1,67 @@
+package org.jbpm.form.builder.ng.server.impl;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+import javax.persistence.PersistenceUnit;
+
+import org.uberfire.backend.server.IOWatchServiceNonDotImpl;
+import org.uberfire.commons.cluster.ClusterServiceFactory;
+import org.uberfire.commons.services.cdi.Startup;
+import org.uberfire.commons.services.cdi.StartupType;
+import org.uberfire.io.IOService;
+import org.uberfire.io.impl.IOServiceDotFileImpl;
+import org.uberfire.io.impl.cluster.IOServiceClusterImpl;
+
+@Startup(StartupType.BOOTSTRAP)
+@ApplicationScoped
+public class ApplicationScopedProducer {
+
+ @Inject
+ IOWatchServiceNonDotImpl watchService;
+
+ @Inject
+ @Named("clusterServiceFactory")
+ private ClusterServiceFactory clusterServiceFactory;
+
+ private IOService ioService;
+
+ @PersistenceUnit(unitName = "org.jbpm.form.builder")
+ private EntityManagerFactory emf = null;
+
+ @PostConstruct
+ public void setup() {
+ if ( clusterServiceFactory == null ) {
+ ioService = new IOServiceDotFileImpl( watchService );
+ } else {
+ ioService = new IOServiceClusterImpl( new IOServiceDotFileImpl( watchService ), clusterServiceFactory );
+ }
+ }
+
+ @PreDestroy
+ public void onShutdown() {
+ ioService.dispose();
+ }
+
+ @Produces
+ @Named("ioStrategy")
+ public IOService ioService() {
+ return ioService;
+ }
+
+ @ApplicationScoped
+ @Produces
+ public EntityManagerFactory getEmf() {
+ if (emf == null) {
+ emf = Persistence.createEntityManagerFactory("org.jbpm.form.builder");
+ }
+ return this.emf;
+ }
+
+
+}
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/DownloadFileServlet.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/DownloadFileServlet.java
deleted file mode 100644
index b4d473f..0000000
--- a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/DownloadFileServlet.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.jbpm.form.builder.ng.server.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.URI;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-//import org.jbpm.form.builder.ng.server.fb.FormServiceEntryPointImpl;
-import org.uberfire.io.IOService;
-import org.uberfire.java.nio.file.Path;
-
-public class DownloadFileServlet extends HttpServlet {
-
- private static final long serialVersionUID = 3250248140464581566L;
-
- //private static final String FORMS_URL = FormServiceEntryPointImpl.FORMS_URL;
-
- @Inject
- @Named("ioStrategy")
- IOService ioService;
-
- @Override
- protected void doPost(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException {
-// String fileName = req.getParameter("fileName");
-// Path path = ioService.get(URI.create(FORMS_URL + "/" + fileName));
-// byte[] content = ioService.readAllBytes(path);
-// // Make sure to show the download dialog
-// resp.setContentType("application/octet-stream");
-// resp.setHeader("Content-disposition","attachment; filename=" + fileName);
-// OutputStream out = resp.getOutputStream();
-// out.write(content);
-// out.flush();
- }
-}
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ImportFileServlet.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ImportFileServlet.java
deleted file mode 100644
index 953ba2e..0000000
--- a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ImportFileServlet.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.jbpm.form.builder.ng.server.impl;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.List;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.FileUploadException;
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-//import org.jbpm.form.builder.ng.server.fb.FormServiceEntryPointImpl;
-import org.uberfire.io.IOService;
-import org.uberfire.java.nio.file.Path;
-
-public class ImportFileServlet extends HttpServlet {
-
- private static final long serialVersionUID = 3250248130464581566L;
- private static final Log log = LogFactory.getLog(ImportFileServlet.class);
-
- private ServletFileUpload upload;
-
- @Inject
- @Named("ioStrategy")
- IOService ioService;
-
- @Override
- public void init() throws ServletException {
- DiskFileItemFactory factory = new DiskFileItemFactory();
-
- // Configure a repository (to ensure a secure temp location is used)
- ServletContext servletContext = getServletConfig().getServletContext();
- File repository = (File) servletContext.getAttribute("javax.servlet.context.tempdir");
- factory.setRepository(repository);
-
- // Create a new file upload handler
- this.upload = new ServletFileUpload(factory);
- }
-
- @Override
- protected void doPost(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException {
-// if (ServletFileUpload.isMultipartContent(req)) {
-// // Parse the request
-// try {
-// List> items = upload.parseRequest(req);
-// if (items.size() > 0) {
-// Object obj = items.iterator().next();
-// FileItem item = (FileItem) obj;
-// Path path = ioService.get(URI.create(FormServiceEntryPointImpl.FORMS_URL + "/" + item.getName()));
-// if (!ioService.exists(path)) {
-// ioService.createFile(path);
-// }
-// ioService.write(path, item.get());
-// }
-// } catch (FileUploadException e) {
-// log.error("Problem importing file", e);
-// throw new IOException("Problem importing file", e);
-// }
-// }
- }
-}
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/TestCompleteFormServlet.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/TestCompleteFormServlet.java
deleted file mode 100644
index 09e7551..0000000
--- a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/TestCompleteFormServlet.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.jbpm.form.builder.ng.server.impl;
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.io.IOUtils;
-
-public class TestCompleteFormServlet extends HttpServlet {
-
- private static final long serialVersionUID = 3250248140464581566L;
-
- @Override
- protected void service(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException {
- StringBuilder sb = new StringBuilder();
- sb.append("Method: ").append(req.getMethod()).append("
");
- sb.append("Parameters:
");
- sb.append("");
- Enumeration e1 = req.getParameterNames();
- while(e1.hasMoreElements()) {
- String key = e1.nextElement();
- String value = req.getParameter(key);
- sb.append("").append(key).append(" | ").append(value).append(" |
");
- }
- sb.append("
");
- Enumeration e2 = req.getAttributeNames();
- sb.append("Attributes:
");
- sb.append("");
- while(e2.hasMoreElements()) {
- String key = e2.nextElement();
- Object value = req.getAttribute(key);
- sb.append("").append(key).append(" | ").append(value).append(" |
");
- }
- sb.append("
");
- IOUtils.write(sb.toString(), resp.getOutputStream());
- }
-}
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ViewFormServlet.java b/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ViewFormServlet.java
deleted file mode 100644
index 3a26911..0000000
--- a/uberfire-demo/uberfire-demo-showcase/src/main/java/org/jbpm/form/builder/ng/server/impl/ViewFormServlet.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.jbpm.form.builder.ng.server.impl;
-
-import java.io.IOException;
-import java.net.URI;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-//import org.jbpm.form.builder.ng.server.fb.FormServiceEntryPointImpl;
-import org.uberfire.io.IOService;
-import org.uberfire.java.nio.file.Path;
-
-public class ViewFormServlet extends HttpServlet {
-
- private static final long serialVersionUID = 3250248140464581566L;
-
- @Inject
- @Named("ioStrategy")
- IOService ioService;
-
- @Override
- protected void doGet(HttpServletRequest req, HttpServletResponse resp)
- throws ServletException, IOException {
-// String uuid = req.getParameter("uuid");
-// String html = "";
-// if (uuid != null && !"".equals(uuid)) {
-// Path path = ioService.get(URI.create(FormServiceEntryPointImpl.TEMP_URL + "/" + uuid));
-// if (ioService.exists(path)) {
-// html = ioService.readAllString(path);
-// } else {
-// html = "Path with UUID " + uuid + "not generated";
-// }
-// } else {
-// html = "uuid parameter must be passed to URL";
-// }
-// resp.getWriter().println(html);
- }
-}
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/uberfire-demo/uberfire-demo-showcase/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
new file mode 100644
index 0000000..20fa7b9
--- /dev/null
+++ b/uberfire-demo/uberfire-demo-showcase/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
@@ -0,0 +1,2 @@
+org.uberfire.commons.services.cdi.StartupBeanExtension
+org.uberfire.security.server.cdi.SecurityExtension
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/resources/app.html.template b/uberfire-demo/uberfire-demo-showcase/src/main/resources/app.html.template
index 8e697ac..0e681bb 100644
--- a/uberfire-demo/uberfire-demo-showcase/src/main/resources/app.html.template
+++ b/uberfire-demo/uberfire-demo-showcase/src/main/resources/app.html.template
@@ -12,9 +12,8 @@
- jBPM Console
+ UF - Uberfire Demo
-
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/resources/org/jbpm/form/builder/ng/public/css/FormBuilder.css b/uberfire-demo/uberfire-demo-showcase/src/main/resources/org/jbpm/form/builder/ng/public/css/FormBuilder.css
deleted file mode 100644
index 036447a..0000000
--- a/uberfire-demo/uberfire-demo-showcase/src/main/resources/org/jbpm/form/builder/ng/public/css/FormBuilder.css
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- Copyright 2011 JBoss Inc
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-* {
- margin: 0px;
- padding: 0px;
-}
-
-#loading-mask {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- z-index: 20000;
- background-color: white;
-}
-
-#loading {
- position: absolute;
- left: 45%;
- top: 40%;
- padding: 2px;
- z-index: 20001;
- height: auto;
-}
-
-#loading a {
- color: #225588;
-}
-
-#loading .loading-indicator {
- background: white;
- color: #444;
- font: bold 13px tahoma, arial, helvetica;
- padding: 10px;
- margin: 0;
- height: auto;
-}
-
-#loading-msg {
- font: normal 10px arial, tahoma, sans-serif;
-}
-
-.x-window {
- text-align: left;
-}
-
-.northeastCorner {
- background-image: url(images/resizablePanel/northeastCorner.gif);
- width: 10px;
- height: 10px;
- background-repeat: no-repeat;
-}
-
-.northwestCorner {
- background-image: url(images/resizablePanel/northwestCorner.gif);
- width: 10px;
- height: 10px;
- background-repeat: no-repeat;
-}
-
-.southwestCorner {
- background-image: url(images/resizablePanel/southwestCorner.gif);
- width: 10px;
- height: 10px;
- background-repeat: no-repeat;
-}
-
-.smallButton {
- background-image: url(images/resizablePanel/resizeButton.gif);
- width: 10px;
- height: 10px;
- background-repeat: no-repeat;
-}
-
-.horizontalLine {
- background-image: url(images/resizablePanel/horizontalLine.gif);
- height: 10px;
- background-repeat: repeat-x;
-}
-
-.verticalLine {
- background-image: url(images/resizablePanel/verticalLine.gif);
- width: 10px;
- background-repeat: repeat-y;
-}
-
-.formDisplay {
- vertical-align: top;
- background-color: #FFFFFF;
- color: #000000;
-}
-
-.greenNotification {
- color: #AADD00;
-}
-
-.orangeNotification {
- color: #FF5721
-}
-
-.redNotification {
- color: #FF3030;
-}
-
-.fbFormItemThinBorder {
- border: 1px dotted gray;
-}
-
-.phantomPanel {
- background-color: #88FFFF;
- border: 1px dashed gray;
-}
-
-.even {
- background-color: #BBBBBB;
-}
-
-.odd {
- background-color: #FFFFFF;
-}
-
-.notificationsViewWrapper {
- border: 1px solid grey;
- background-color: #BBBBBB;
-}
-
-.mainWrapper {
- color: #000000;
-}
-
-#mainRowWrapper {
- height: 90%;
-}
-
-#notificationsRowWrapper {
- height: 25px;
-}
-
-.notificationsView DIV {
- width: 100%;
- background-color: #EFEFEF;
-}
-
-.toolBarViewWrapper {
- background: url("images/hborder.png") repeat-x scroll 0 -989px #D3DEF6;
- border: 1px solid grey;
- border-bottom: none;
- border-left: none;
-}
-
-.layoutViewWrapper {
- border: 1px solid grey;
- border-bottom: none;
- border-left: none;
-}
-
-.toolViewWrapper {
- border: 1px solid grey;
- border-top: none;
-}
-
-.toolView {
-
-}
-
-.toolView .gwt-TabLayoutPanelTabs {
-
-}
-
-.toolView .gwt-TabLayoutPanelContent {
- border-color: #bcbcbc;
- border-style: solid;
- border-width: 1px;
- overflow: hidden;
- padding: 6px;
-}
-
-.toolView .gwt-TabLayoutPanelTab {
- background: url("images/hborder.png") repeat-x scroll 0 -989px #D3DEF6;
- border-color: #BBBBBB #BBBBBB -moz-use-text-color;
- border-style: solid solid none;
- border-width: 1px 1px 0;
- cursor: pointer;
- cursor: hand;
- margin-left: 2px;
- padding: 3px 5px 3px 5px;
- color: grey;
- font-weight: bold;
- text-align: center;
-}
-
-.toolView .gwt-TabLayoutPanelTab-selected {
- background: url("images/hborder.png") repeat-x scroll 0 -989px #D3DEF6;
- border-color: #BBBBBB #BBBBBB -moz-use-text-color;
- border-style: solid solid none;
- border-width: 1px 1px 0;
- cursor: default;
- margin-left: 2px;
- padding: 3px 5px 3px 5px;
- color: black;
- font-weight: bold;
- text-align: center;
-}
-
-.fbStackPanel .gwt-StackPanelItem {
- background: url("images/hborder.png") repeat-x scroll 0 -989px #D3DEF6;
- border-color: #BBBBBB #BBBBBB -moz-use-text-color;
- border-style: solid solid none;
- border-width: 1px 1px 0;
- cursor: pointer;
- font-size: 10pt;
- font-weight: bold;
- padding: 3px;
-}
-
-.fbStackPanel .gwt-StackPanelContent {
- background-color: #FFFFFF;
-}
-
-.commandPopupPanel {
- border: 10px solid #E3E3E3;
- -webkit-border-radius: 10px;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius: 10px;
- -moz-border-radius-topleft: 0;
- border-radius: 10px;
- border-top-left-radius: 0;
- padding: 0px;
- z-index: 15;
-}
-
-.commandContent {
- background: none repeat scroll 0 0 #E3E3E3;
-}
-
-.commandMenuBar {
- background: none repeat scroll 0 0 #E3E3E3;
-}
-
-.commandMenuBar-vertical {
- margin-left: 0;
- margin-top: 0;
-}
-
-.commandMenuItem {
- background: none repeat scroll 0 0 #E3E3E3;
- border-top: 2px;
- border-bottom: 2px;
- padding: 1px 0px 1px 0px;
-}
-
-.commandMenuItem-selected {
- background: none repeat scroll 0 0 #BCBCBC;
-}
-
-.fbStackPanel {
- border-bottom: 1px solid #BBBBBB;
- width: 100%;
- height: 100%;
-}
-
-.backgroundWrapper {
- background-image: url(images/header_background.png);
- background-repeat: repeat-x;
- background-color: #edf0f4;
- height: 99%;
- width: 99%;
-}
-
-.optionsViewWrapper .gwt-MenuBar-horizontal .gwt-MenuItem {
- color: #000000;
-}
-
-.selectedValidationRow {
- color: #FFFFFF;
- background-color: #0000FF;
-}
-
-.fbFilesDataPanelSelected {
- color: #FFFFFF;
- background-color: #0000FF;
-}
-
-.fbFilesDataPanel {
- color: #000000;
-}
-
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/resources/validations.json b/uberfire-demo/uberfire-demo-showcase/src/main/resources/validations.json
deleted file mode 100644
index 9a46689..0000000
--- a/uberfire-demo/uberfire-demo-showcase/src/main/resources/validations.json
+++ /dev/null
@@ -1,59 +0,0 @@
-[
- {
- "className": "org.jbpm.formbuilder.client.validation.NotEmptyValidationItem",
- "properties": {
- "errorMessage": "Should not be empty"
- }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.ANDValidationItem",
- "properties": { }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.ORValidationItem",
- "properties": { }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.XORValidationItem",
- "properties": { }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.SmallerThanValidationItem",
- "properties": {
- "errorMessage": "Should be smaller than ${value}",
- "value": ""
- }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.EqualToValidationItem",
- "properties": {
- "errorMessage": "Should be equal to ${value}",
- "value": ""
- }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.BiggerThanValidationItem",
- "properties": {
- "errorMessage": "Should be bigger than ${value}",
- "value": ""
- }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.IsEmailValidationItem",
- "properties": {
- "errorMessage": "Should be a valid email"
- }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.IsIntegerValidationItem",
- "properties": {
- "errorMessage": "Should be a valid integer"
- }
- },
- {
- "className": "org.jbpm.formbuilder.client.validation.IsNumberValidationItem",
- "properties": {
- "errorMessage": "Should be a valid number"
- }
- }
-]
\ No newline at end of file
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/webapp/WEB-INF/web.xml b/uberfire-demo/uberfire-demo-showcase/src/main/webapp/WEB-INF/web.xml
index 32eccdb..e9edfe2 100644
--- a/uberfire-demo/uberfire-demo-showcase/src/main/webapp/WEB-INF/web.xml
+++ b/uberfire-demo/uberfire-demo-showcase/src/main/webapp/WEB-INF/web.xml
@@ -5,12 +5,7 @@
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
-
- org.jboss.weld.environment.servlet.Listener
-
-
- org.jboss.solder.servlet.event.ServletEventBridgeListener
-
+
UberFire Security Filter
@@ -68,46 +63,10 @@ profile in pom.xml to use that. -->
ErraiServlet
*.erraiBus
-
-
- TestCompleteFormServlet
- org.jbpm.form.builder.ng.server.impl.TestCompleteFormServlet
-
-
-
- TestCompleteFormServlet
- /org.jbpm.form.builder.ng.FormBuilderShowcase/complete
-
-
-
- ViewFormServlet
- org.jbpm.form.builder.ng.server.impl.ViewFormServlet
-
-
-
- ViewFormServlet
- /org.jbpm.form.builder.ng.FormBuilderShowcase/viewForm
-
-
-
- DownloadFileServlet
- org.jbpm.form.builder.ng.server.impl.DownloadFileServlet
-
-
-
- DownloadFileServlet
- /org.jbpm.form.builder.ng.FormBuilderShowcase/downloadFile
-
-
-
- ImportFileServlet
- org.jbpm.form.builder.ng.server.impl.ImportFileServlet
-
-
- ImportFileServlet
- /org.jbpm.form.builder.ng.FormBuilderShowcase/uploadFile
-
+
+ org.jboss.weld.environment.servlet.Listener
+
Object factory for the CDI Bean Manager
diff --git a/uberfire-demo/uberfire-demo-showcase/src/main/webapp/login.jsp b/uberfire-demo/uberfire-demo-showcase/src/main/webapp/login.jsp
index d7f29dd..e3bb827 100644
--- a/uberfire-demo/uberfire-demo-showcase/src/main/webapp/login.jsp
+++ b/uberfire-demo/uberfire-demo-showcase/src/main/webapp/login.jsp
@@ -17,7 +17,7 @@
- jBPM Console NG
+ Uberfire Demo