Remove core module
authorMathieu Baudier <mbaudier@argeo.org>
Sun, 27 Aug 2017 11:40:42 +0000 (13:40 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Sun, 27 Aug 2017 11:40:42 +0000 (13:40 +0200)
23 files changed:
org.argeo.suite.apps/META-INF/spring/backend-services.xml
org.argeo.suite.apps/META-INF/spring/maintenance-services.xml
org.argeo.suite.apps/META-INF/spring/workbench-services.xml
org.argeo.suite.core/.classpath [deleted file]
org.argeo.suite.core/.gitignore [deleted file]
org.argeo.suite.core/.project [deleted file]
org.argeo.suite.core/META-INF/.gitignore [deleted file]
org.argeo.suite.core/bnd.bnd [deleted file]
org.argeo.suite.core/build.properties [deleted file]
org.argeo.suite.core/pom.xml [deleted file]
org.argeo.suite.core/src/org/argeo/suite/ArgeoSuiteRole.java [deleted file]
org.argeo.suite.core/src/org/argeo/suite/SuiteConstants.java [deleted file]
org.argeo.suite.core/src/org/argeo/suite/SuiteException.java [deleted file]
org.argeo.suite.core/src/org/argeo/suite/core/DefaultSuiteAppService.java [deleted file]
org.argeo.suite.core/src/org/argeo/suite/core/DefaultSuiteMaintenanceService.java [deleted file]
org.argeo.suite.web/pom.xml
org.argeo.suite.workbench.rap/pom.xml
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/DefaultSuiteWorkbenchService.java [deleted file]
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/SuiteWorkbenchException.java [new file with mode: 0644]
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/ImportEntities.java
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/parts/DefaultDashboardEditor.java
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/parts/QuickSearchView.java
pom.xml

index 3a6aad6c4e5a527e80f41d47aadc7dd38875c02c..d8b2e4eaab7bb9a16da620c41ec099ba86c6db0a 100644 (file)
@@ -37,7 +37,7 @@
                <ref bean="resourcesService" />\r
        </util:list>\r
 \r
                <ref bean="resourcesService" />\r
        </util:list>\r
 \r
-       <bean id="suiteAppService" class="org.argeo.suite.core.DefaultSuiteAppService">\r
+       <bean id="suiteAppService" class="org.argeo.connect.core.DefaultSystemAppService">\r
                <property name="knownAppServices" ref="knownAppServices" />\r
        </bean>\r
 </beans>\r
                <property name="knownAppServices" ref="knownAppServices" />\r
        </bean>\r
 </beans>\r
index 2c0e5151911f57f5b9eb5d743eee83f73e476b55..d4678f1d1e4cae96846758eeaadd4082d21aefc2 100644 (file)
@@ -24,7 +24,7 @@
        </util:list>\r
 \r
        <!-- Make the DJ-aying between the various known Apps Maintenance -->\r
        </util:list>\r
 \r
        <!-- Make the DJ-aying between the various known Apps Maintenance -->\r
-       <bean id="suiteMaintenanceService" class="org.argeo.suite.core.DefaultSuiteMaintenanceService"\r
+       <bean id="suiteMaintenanceService" class="org.argeo.connect.core.DefaultSystemMaintenanceService"\r
                init-method="init" destroy-method="destroy">\r
                <property name="repository" ref="repository" />\r
                <property name="workspaceName" value="main" />\r
                init-method="init" destroy-method="destroy">\r
                <property name="repository" ref="repository" />\r
                <property name="workspaceName" value="main" />\r
index d1fcfcd9ea33972dbbe32967726f6755780dfbae..9b0b6e2c2b720ed8601fc85edb8de423480d408c 100644 (file)
@@ -34,7 +34,7 @@
                <ref bean="resourcesWorkbenchService" />\r
        </util:list>\r
 \r
                <ref bean="resourcesWorkbenchService" />\r
        </util:list>\r
 \r
-       <bean id="suiteWorkbenchService" class="org.argeo.suite.workbench.DefaultSuiteWorkbenchService">\r
+       <bean id="suiteWorkbenchService" class="org.argeo.connect.workbench.DefaultSystemWorkbenchService">\r
                <property name="knownAppWbServices" ref="knownWbServices" />\r
        </bean>\r
 \r
                <property name="knownAppWbServices" ref="knownWbServices" />\r
        </bean>\r
 \r
diff --git a/org.argeo.suite.core/.classpath b/org.argeo.suite.core/.classpath
deleted file mode 100644 (file)
index 191b71a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" output="bin" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.argeo.suite.core/.gitignore b/org.argeo.suite.core/.gitignore
deleted file mode 100644 (file)
index 016bb39..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/target
-/*.target
-/bin/
diff --git a/org.argeo.suite.core/.project b/org.argeo.suite.core/.project
deleted file mode 100644 (file)
index e3b8ec5..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.argeo.suite.core</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments />
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments />
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments />
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.argeo.suite.core/META-INF/.gitignore b/org.argeo.suite.core/META-INF/.gitignore
deleted file mode 100644 (file)
index 4854a41..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/MANIFEST.MF
diff --git a/org.argeo.suite.core/bnd.bnd b/org.argeo.suite.core/bnd.bnd
deleted file mode 100644 (file)
index f18e99f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Require-Capability: cms.datamodel; filter:="(name=people)",\
-cms.datamodel; filter:="(name=documents)",\
-cms.datamodel; filter:="(name=tracker)"
-Import-Package:\
-javax.jcr.nodetype,\
-org.argeo.connect.resources,\
-org.argeo.node,\
-org.argeo.util,\
-javax.jcr.security,\
-*
-    
diff --git a/org.argeo.suite.core/build.properties b/org.argeo.suite.core/build.properties
deleted file mode 100644 (file)
index 3166058..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-source.. = src/
-output.. = bin/
-
diff --git a/org.argeo.suite.core/pom.xml b/org.argeo.suite.core/pom.xml
deleted file mode 100644 (file)
index aacf2e7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-       <modelVersion>4.0.0</modelVersion>
-       <parent>
-               <groupId>org.argeo.suite</groupId>
-               <artifactId>argeo-suite</artifactId>
-               <version>0.1.12-SNAPSHOT</version>
-               <relativePath>..</relativePath>
-       </parent>
-       <artifactId>org.argeo.suite.core</artifactId>
-       <name>Argeo Suite Core</name>
-       <packaging>jar</packaging>
-
-       <dependencies>
-               <dependency>
-                       <groupId>org.argeo.connect</groupId>
-                       <artifactId>org.argeo.tracker</artifactId>
-                       <version>${version.argeo-connect}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.connect</groupId>
-                       <artifactId>org.argeo.people.core</artifactId>
-                       <version>${version.argeo-connect}</version>
-               </dependency>
-               <dependency>
-                       <groupId>org.argeo.connect</groupId>
-                       <artifactId>org.argeo.documents</artifactId>
-                       <version>${version.argeo-connect}</version>
-               </dependency>
-       </dependencies>
-</project>
diff --git a/org.argeo.suite.core/src/org/argeo/suite/ArgeoSuiteRole.java b/org.argeo.suite.core/src/org/argeo/suite/ArgeoSuiteRole.java
deleted file mode 100644 (file)
index 31ddca3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.argeo.suite;
-
-import org.argeo.naming.LdapAttrs;
-import org.argeo.node.NodeConstants;
-
-/** Argeo Office specific roles used in the code */
-public enum ArgeoSuiteRole {
-       coworker, manager;
-
-       public String dn() {
-               return new StringBuilder(LdapAttrs.cn.name()).append("=").append(SuiteConstants.SUITE_APP_PREFIX).append(".")
-                               .append(name()).append(",").append(NodeConstants.ROLES_BASEDN).toString();
-       }
-}
diff --git a/org.argeo.suite.core/src/org/argeo/suite/SuiteConstants.java b/org.argeo.suite.core/src/org/argeo/suite/SuiteConstants.java
deleted file mode 100644 (file)
index 06c28e4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.argeo.suite;
-
-/** Argeo Suite constants */
-public interface SuiteConstants {
-
-       String SUITE_APP_PREFIX = "org.argeo.suite";
-       String SUITE_APP_BASE_NAME = "suite";
-
-}
diff --git a/org.argeo.suite.core/src/org/argeo/suite/SuiteException.java b/org.argeo.suite.core/src/org/argeo/suite/SuiteException.java
deleted file mode 100644 (file)
index 6351804..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.argeo.suite;
-
-/** Argeo Suite specific exception. Wraps a usual RuntimeException */
-public class SuiteException extends RuntimeException {
-       private static final long serialVersionUID = 9048360857209165816L;
-
-       public SuiteException(String message) {
-               super(message);
-       }
-
-       public SuiteException(String message, Throwable e) {
-               super(message, e);
-       }
-}
diff --git a/org.argeo.suite.core/src/org/argeo/suite/core/DefaultSuiteAppService.java b/org.argeo.suite.core/src/org/argeo/suite/core/DefaultSuiteAppService.java
deleted file mode 100644 (file)
index b87527a..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.argeo.suite.core;
-
-import java.util.List;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.argeo.connect.AppService;
-import org.argeo.connect.SystemAppService;
-import org.argeo.eclipse.ui.EclipseUiUtils;
-import org.argeo.suite.SuiteConstants;
-import org.argeo.suite.SuiteException;
-
-public class DefaultSuiteAppService implements SystemAppService {
-
-       // Injected known AppWorkbenchServices: order is important, first found
-       // result will be returned by the various methods.
-       private List<AppService> knownAppServices;
-
-       @Override
-       public Node publishEntity(Node parent, String nodeType, Node srcNode, boolean removeSrcNode)
-                       throws RepositoryException {
-               for (AppService appService : knownAppServices) {
-                       if (appService.isKnownType(nodeType))
-                               return appService.publishEntity(parent, nodeType, srcNode, removeSrcNode);
-               }
-               return null;
-       }
-
-       @Override
-       public String getAppBaseName() {
-               return SuiteConstants.SUITE_APP_BASE_NAME;
-       }
-
-       @Override
-       public String getBaseRelPath(String nodeType) {
-               for (AppService appService : knownAppServices) {
-                       if (appService.isKnownType(nodeType))
-                               return appService.getBaseRelPath(nodeType);
-               }
-               return null;
-               // return getAppBaseName();
-       }
-
-       @Override
-       public String getDefaultRelPath(Node entity) throws RepositoryException {
-               for (AppService appService : knownAppServices) {
-                       if (appService.isKnownType(entity))
-                               return appService.getDefaultRelPath(entity);
-               }
-               return null;
-       }
-
-       @Override
-       public String getMainNodeType(Node node) {
-               for (AppService appService : knownAppServices) {
-                       String foundType = appService.getMainNodeType(node);
-                       if (EclipseUiUtils.notEmpty(foundType))
-                               return foundType;
-               }
-               return null;
-       }
-
-       @Override
-       public String getDefaultRelPath(Session session, String nodetype, String id) {
-               for (AppService appService : knownAppServices) {
-                       if (appService.isKnownType(nodetype))
-                               return appService.getDefaultRelPath(session, nodetype, id);
-               }
-               return null;
-       }
-
-       /** Insures the correct service is called on save */
-       @Override
-       public Node saveEntity(Node entity, boolean publish) {
-               for (AppService appService : knownAppServices) {
-                       if (appService.isKnownType(entity))
-                               return appService.saveEntity(entity, publish);
-               }
-               throw new SuiteException("Unknown NodeType for " + entity + ". Cannot save");
-               // return AppService.super.saveEntity(entity, publish);
-       }
-
-       @Override
-       public boolean isKnownType(Node entity) {
-               for (AppService appService : knownAppServices) {
-                       if (appService.isKnownType(entity))
-                               return true;
-               }
-               return false;
-       }
-
-       @Override
-       public boolean isKnownType(String nodeType) {
-               for (AppService appService : knownAppServices) {
-                       if (appService.isKnownType(nodeType))
-                               return true;
-               }
-               return false;
-       }
-
-       public void setKnownAppServices(List<AppService> knownAppServices) {
-               this.knownAppServices = knownAppServices;
-       }
-
-}
diff --git a/org.argeo.suite.core/src/org/argeo/suite/core/DefaultSuiteMaintenanceService.java b/org.argeo.suite.core/src/org/argeo/suite/core/DefaultSuiteMaintenanceService.java
deleted file mode 100644 (file)
index 1c9feb2..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-package org.argeo.suite.core;
-
-import java.util.List;
-
-import javax.jcr.Repository;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.security.Privilege;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.connect.AppMaintenanceService;
-import org.argeo.connect.SystemMaintenanceService;
-import org.argeo.jcr.JcrUtils;
-import org.argeo.node.NodeConstants;
-import org.argeo.suite.ArgeoSuiteRole;
-import org.argeo.suite.SuiteException;
-
-/** Make the DJay-ing to provide a full running Suite platform */
-public class DefaultSuiteMaintenanceService implements SystemMaintenanceService {
-       private final static Log log = LogFactory.getLog(DefaultSuiteMaintenanceService.class);
-
-       /* DEPENDENCY INJECTION */
-       private Repository repository;
-       private String workspaceName;
-       private List<AppMaintenanceService> maintenanceServices;
-
-       public void init() {
-               Session adminSession = null;
-               try {
-                       adminSession = repository.login(workspaceName);
-                       if (prepareJcrTree(adminSession)) {
-                               configurePrivileges(adminSession);
-                       }
-               } catch (Exception e) {
-                       throw new SuiteException("Cannot initialise model", e);
-               } finally {
-                       JcrUtils.logoutQuietly(adminSession);
-               }
-       }
-
-       // To be cleaned once first init and config mechanisms have been implemented
-       // private final static String publicPath = "/public";
-       // FIXME Users must have read access on the jcr:system/jcr:versionStorage
-       // node under JackRabbit to be able to manage versions
-       private final static String jackRabbitVersionSystemPath = "/jcr:system";
-
-       @Override
-       public boolean prepareJcrTree(Session session) {
-               boolean hasCHanged = false;
-               try {
-                       // JcrUtils.mkdirs(session, publicPath, NodeType.NT_UNSTRUCTURED);
-                       if (session.hasPendingChanges()) {
-                               session.save();
-                               hasCHanged = true;
-                       }
-               } catch (RepositoryException e) {
-                       throw new SuiteException("Cannot build model", e);
-               }
-               for (AppMaintenanceService service : maintenanceServices)
-                       hasCHanged |= service.prepareJcrTree(session);
-               if (hasCHanged)
-                       log.info("Repository has been initialised with Argeo Suite model");
-               return hasCHanged;
-       }
-
-       @Override
-       public void configurePrivileges(Session session) {
-               try {
-                       // Remove unused default JCR rights
-                       JcrUtils.clearAccessControList(session, "/", "everyone");
-
-                       JcrUtils.addPrivilege(session, jackRabbitVersionSystemPath, ArgeoSuiteRole.coworker.dn(),
-                                       Privilege.JCR_READ);
-                       // Default configuration of the workspace
-                       JcrUtils.addPrivilege(session, "/", NodeConstants.ROLE_ADMIN, Privilege.JCR_ALL);
-                       // JcrUtils.addPrivilege(session, publicPath, NodeConstants.ROLE_USER, Privilege.JCR_READ);
-                       // JcrUtils.addPrivilege(session, publicPath, "anonymous", Privilege.JCR_READ);
-                       // JcrUtils.addPrivilege(session, publicPath, NodeConstants.ROLE_ANONYMOUS, Privilege.JCR_READ);
-
-                       session.save();
-               } catch (RepositoryException e) {
-                       throw new SuiteException("Cannot build model", e);
-               }
-               for (AppMaintenanceService service : maintenanceServices)
-                       service.configurePrivileges(session);
-               log.info("Access control configured");
-       }
-
-       public void destroy() {
-       }
-
-       /* DEPENDENCY INJECTION */
-       public void setRepository(Repository repository) {
-               this.repository = repository;
-       }
-
-       public void setWorkspaceName(String workspaceName) {
-               this.workspaceName = workspaceName;
-       }
-
-       public void setMaintenanceServices(List<AppMaintenanceService> maintenanceServices) {
-               this.maintenanceServices = maintenanceServices;
-       }
-}
index 25494aad09f71f3cc593b90cc04630a7d7208148..31e64e4313093e8ae2b2a91570a21ca17b26a7a0 100644 (file)
        <name>Argeo Suite Web UI</name>
        <packaging>jar</packaging>
        <dependencies>
        <name>Argeo Suite Web UI</name>
        <packaging>jar</packaging>
        <dependencies>
-               <dependency>
-                       <groupId>org.argeo.suite</groupId>
-                       <artifactId>org.argeo.suite.core</artifactId>
-                       <version>0.1.12-SNAPSHOT</version>
-               </dependency>
                <dependency>
                        <groupId>org.argeo.connect</groupId>
                        <artifactId>org.argeo.people.web</artifactId>
                <dependency>
                        <groupId>org.argeo.connect</groupId>
                        <artifactId>org.argeo.people.web</artifactId>
index 7f3cffbaa7b973842f3ae858af4cc2e5b0dc6b75..9314021238591b0e05b632aaa8e942937462e716 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.suite</groupId>
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.suite</groupId>
        <packaging>jar</packaging>
        <dependencies>
                <dependency>
        <packaging>jar</packaging>
        <dependencies>
                <dependency>
-                       <groupId>org.argeo.suite</groupId>
-                       <artifactId>org.argeo.suite.core</artifactId>
-                       <version>0.1.12-SNAPSHOT</version>
+                       <groupId>org.argeo.connect</groupId>
+                       <artifactId>org.argeo.documents</artifactId>
+                       <version>${version.argeo-connect}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.connect</groupId>
+                       <artifactId>org.argeo.tracker</artifactId>
+                       <version>${version.argeo-connect}</version>
                </dependency>
                <dependency>
                        <groupId>org.argeo.connect</groupId>
                </dependency>
                <dependency>
                        <groupId>org.argeo.connect</groupId>
diff --git a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/DefaultSuiteWorkbenchService.java b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/DefaultSuiteWorkbenchService.java
deleted file mode 100644 (file)
index ea909bf..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.argeo.suite.workbench;
-
-import java.util.List;
-
-import javax.jcr.Node;
-
-import org.argeo.connect.workbench.AppWorkbenchService;
-import org.argeo.connect.workbench.SystemWorkbenchService;
-import org.argeo.eclipse.ui.EclipseUiUtils;
-import org.argeo.suite.workbench.parts.DefaultDashboardEditor;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.graphics.Image;
-
-/** Centralise workbench services from the various base apps */
-public class DefaultSuiteWorkbenchService implements SystemWorkbenchService {
-
-       // Injected known AppWorkbenchServices: order is important, first found
-       // result will be returned by the various methods.
-       private List<AppWorkbenchService> knownAppWbServices;
-       private String defaultEditorId = DefaultDashboardEditor.ID;
-
-       @Override
-       public String getDefaultEditorId() {
-               String result = null;
-               for (AppWorkbenchService appWbService : knownAppWbServices) {
-                       result = appWbService.getDefaultEditorId();
-                       if (EclipseUiUtils.notEmpty(result))
-                               return result;
-               }
-               return defaultEditorId;
-       }
-
-       @Override
-       public String getEntityEditorId(Node entity) {
-               String result = null;
-               for (AppWorkbenchService appWbService : knownAppWbServices) {
-                       result = appWbService.getEntityEditorId(entity);
-                       if (EclipseUiUtils.notEmpty(result))
-                               return result;
-               }
-               return null;
-       }
-
-       @Override
-       public String getSearchEntityEditorId(String nodeType) {
-               String result = null;
-               for (AppWorkbenchService appWbService : knownAppWbServices) {
-                       result = appWbService.getSearchEntityEditorId(nodeType);
-                       if (EclipseUiUtils.notEmpty(result))
-                               return result;
-               }
-               return null;
-       }
-
-       @Override
-       public Image getIconForType(Node entity) {
-               Image result = null;
-               for (AppWorkbenchService appWbService : knownAppWbServices) {
-                       result = appWbService.getIconForType(entity);
-                       if (result != null)
-                               return result;
-               }
-               return null;
-       }
-
-       @Override
-       public Wizard getCreationWizard(Node node) {
-               Wizard result = null;
-               for (AppWorkbenchService appWbService : knownAppWbServices) {
-                       result = appWbService.getCreationWizard(node);
-                       if (result != null)
-                               return result;
-               }
-               return null;
-       }
-
-       /* DEPENDENCY INJECTION */
-       public void setKnownAppWbServices(List<AppWorkbenchService> knownAppWbServices) {
-               this.knownAppWbServices = knownAppWbServices;
-       }
-
-       public void setDefaultEditorId(String defaultEditorId) {
-               this.defaultEditorId = defaultEditorId;
-       }
-}
diff --git a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/SuiteWorkbenchException.java b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/SuiteWorkbenchException.java
new file mode 100644 (file)
index 0000000..dbc3333
--- /dev/null
@@ -0,0 +1,17 @@
+package org.argeo.suite.workbench;
+
+public class SuiteWorkbenchException extends RuntimeException {
+       private static final long serialVersionUID = 5276857785523513563L;
+
+       public SuiteWorkbenchException(String message) {
+               super(message);
+       }
+
+       public SuiteWorkbenchException(Throwable cause) {
+               super(cause);
+       }
+
+       public SuiteWorkbenchException(String message, Throwable cause) {
+               super(message, cause);
+       }
+}
index 39655065d427137e3556d4c6a4566a5a0f1f980c..1771486a85d71d8d8bb553d88c132090d55d8712 100644 (file)
@@ -41,7 +41,7 @@ import org.argeo.people.PeopleService;
 import org.argeo.people.PeopleTypes;
 import org.argeo.people.util.PeopleJcrUtils;
 import org.argeo.people.util.PersonJcrUtils;
 import org.argeo.people.PeopleTypes;
 import org.argeo.people.util.PeopleJcrUtils;
 import org.argeo.people.util.PersonJcrUtils;
-import org.argeo.suite.SuiteException;
+import org.argeo.suite.workbench.SuiteWorkbenchException;
 import org.argeo.suite.workbench.AsUiPlugin;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.argeo.suite.workbench.AsUiPlugin;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
@@ -130,7 +130,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames {
                                userInputPage = new UserInputPage("User input page");
                                addPage(userInputPage);
                        } catch (Exception e) {
                                userInputPage = new UserInputPage("User input page");
                                addPage(userInputPage);
                        } catch (Exception e) {
-                               throw new SuiteException("Cannot add page to wizard", e);
+                               throw new SuiteWorkbenchException("Cannot add page to wizard", e);
                        }
                }
 
                        }
                }
 
@@ -147,7 +147,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames {
                                else if (PeopleTypes.PEOPLE_PERSON.equals(type))
                                        importDefaultPersonFile(in);
                        } catch (IOException e) {
                                else if (PeopleTypes.PEOPLE_PERSON.equals(type))
                                        importDefaultPersonFile(in);
                        } catch (IOException e) {
-                               throw new SuiteException("Cannot import mapping file", e);
+                               throw new SuiteWorkbenchException("Cannot import mapping file", e);
                        } finally {
                                IOUtils.closeQuietly(in);
                        }
                        } finally {
                                IOUtils.closeQuietly(in);
                        }
@@ -400,7 +400,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames {
                        resourcesService.refreshKnownTags(mlParent);
 
                } catch (PeopleException | RepositoryException e) {
                        resourcesService.refreshKnownTags(mlParent);
 
                } catch (PeopleException | RepositoryException e) {
-                       throw new SuiteException("Cannot import mapping file, error at line: " + (i + 1), e);
+                       throw new SuiteWorkbenchException("Cannot import mapping file, error at line: " + (i + 1), e);
                } finally {
                        JcrUtils.logoutQuietly(session);
                }
                } finally {
                        JcrUtils.logoutQuietly(session);
                }
@@ -570,7 +570,7 @@ public class ImportEntities extends AbstractHandler implements PeopleNames {
                        String message = "Cannot import mapping file, error at line: " + (i + 1);
                        // TODO Check why the error is swallowed.
                        log.error(message, e);
                        String message = "Cannot import mapping file, error at line: " + (i + 1);
                        // TODO Check why the error is swallowed.
                        log.error(message, e);
-                       throw new SuiteException(message, e);
+                       throw new SuiteWorkbenchException(message, e);
                } finally {
                        JcrUtils.logoutQuietly(session);
                }
                } finally {
                        JcrUtils.logoutQuietly(session);
                }
index 82591e554ff47f9503b1cf8246ba1da20fd80cb6..535dc7c60cc97898a792edc6c554b5fec3f7462b 100644 (file)
@@ -26,7 +26,7 @@ import org.argeo.connect.workbench.commands.OpenEntityEditor;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.node.NodeUtils;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.node.NodeUtils;
-import org.argeo.suite.SuiteException;
+import org.argeo.suite.workbench.SuiteWorkbenchException;
 import org.argeo.suite.workbench.AsUiPlugin;
 import org.argeo.tracker.TrackerNames;
 import org.argeo.tracker.TrackerService;
 import org.argeo.suite.workbench.AsUiPlugin;
 import org.argeo.tracker.TrackerNames;
 import org.argeo.tracker.TrackerService;
@@ -168,7 +168,7 @@ public class DefaultDashboardEditor extends AbstractSuiteDashboard implements Re
                        Calendar now = GregorianCalendar.getInstance();
                        return node.hasProperty(propName) && node.getProperty(propName).getDate().before(now);
                } catch (RepositoryException e) {
                        Calendar now = GregorianCalendar.getInstance();
                        return node.hasProperty(propName) && node.getProperty(propName).getDate().before(now);
                } catch (RepositoryException e) {
-                       throw new SuiteException("Cannot check overdue status with property " + propName + " on " + node, e);
+                       throw new SuiteWorkbenchException("Cannot check overdue status with property " + propName + " on " + node, e);
                }
        }
 
                }
        }
 
index c9e9bf1e1009f2d2fb0087429a92fd17d2984c59..950b7c5b5ededa22968b4ff2efe61af9477174a2 100644 (file)
@@ -26,7 +26,7 @@ import org.argeo.connect.workbench.util.JcrViewerDClickListener;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.people.PeopleService;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.people.PeopleService;
-import org.argeo.suite.SuiteException;
+import org.argeo.suite.workbench.SuiteWorkbenchException;
 import org.argeo.suite.workbench.AsUiPlugin;
 import org.argeo.suite.workbench.internal.EntitySingleColumnLabelProvider;
 import org.eclipse.jface.layout.TableColumnLayout;
 import org.argeo.suite.workbench.AsUiPlugin;
 import org.argeo.suite.workbench.internal.EntitySingleColumnLabelProvider;
 import org.eclipse.jface.layout.TableColumnLayout;
@@ -202,7 +202,7 @@ public class QuickSearchView extends ViewPart implements Refreshable {
                                                + " ms by executing XPath query (" + xpathQueryStr + ").");
                        }
                } catch (RepositoryException e) {
                                                + " ms by executing XPath query (" + xpathQueryStr + ").");
                        }
                } catch (RepositoryException e) {
-                       throw new SuiteException("Unable to list entities", e);
+                       throw new SuiteWorkbenchException("Unable to list entities", e);
                }
        }
 
                }
        }
 
diff --git a/pom.xml b/pom.xml
index 9ce0c5f68d73a37694cfbe66a8045fc2021d7103..c6f09cdc06642d1390a418778268765781ab7b2d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,6 @@
        <description />
        <version>0.1.12-SNAPSHOT</version>
        <modules>
        <description />
        <version>0.1.12-SNAPSHOT</version>
        <modules>
-               <module>org.argeo.suite.core</module>
                <module>org.argeo.suite.web</module>
                <module>org.argeo.suite.workbench.rap</module>
                <module>org.argeo.suite.apps</module>
                <module>org.argeo.suite.web</module>
                <module>org.argeo.suite.workbench.rap</module>
                <module>org.argeo.suite.apps</module>