Enhance refactoring, bug shooting
authorbsinou <bsinou@argeo.org>
Fri, 17 Feb 2017 20:25:28 +0000 (21:25 +0100)
committerbsinou <bsinou@argeo.org>
Fri, 17 Feb 2017 20:25:28 +0000 (21:25 +0100)
15 files changed:
org.argeo.suite.core/META-INF/spring/application.xml [deleted file]
org.argeo.suite.core/META-INF/spring/osgi.xml
org.argeo.suite.core/META-INF/spring/services.xml [new file with mode: 0644]
org.argeo.suite.core/pom.xml
org.argeo.suite.core/src/org/argeo/suite/core/DefaultSuiteMaintenanceService.java [moved from org.argeo.suite.core/src/org/argeo/suite/SuiteMaintenanceService.java with 71% similarity]
org.argeo.suite.core/src/org/argeo/suite/people/PeopleSuiteServiceImpl.java
org.argeo.suite.web/META-INF/spring/osgi.xml
org.argeo.suite.web/META-INF/spring/people.xml
org.argeo.suite.web/src/org/argeo/suite/web/DefaultDashboard.java
org.argeo.suite.web/src/org/argeo/suite/web/DefaultMainPage.java
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/commands/OpenDashboardEditor.java
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/parts/AbstractSuiteDashboard.java
org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/parts/DefaultDashboardEditor.java
org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/delete_small.gif [new file with mode: 0644]
org.argeo.suite.workbench.rap/theme/argeo-classic/workbench-ext.css

diff --git a/org.argeo.suite.core/META-INF/spring/application.xml b/org.argeo.suite.core/META-INF/spring/application.xml
deleted file mode 100644 (file)
index d3af814..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:p="http://www.springframework.org/schema/p"
-       xsi:schemaLocation="
-               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
-
-       <bean id="peopleService" class="org.argeo.suite.people.PeopleSuiteServiceImpl"
-               init-method="init" destroy-method="destroy">
-               <property name="repository" ref="repository" />
-               <property name="workspaceName" value="main" />
-               <property name="userAdminService" ref="userAdminService" />
-       </bean>
-
-       <bean id="userAdminService" class="org.argeo.connect.UserAdminServiceImpl"
-               scope="singleton" lazy-init="false">
-               <property name="userTransaction" ref="userTransaction" />
-               <property name="userAdmin" ref="userAdmin" />
-               <property name="userAdminServiceReference" ref="userAdmin" />
-       </bean>
-
-       <!-- Execute initialization with a system authentication -->
-       <bean
-               class="org.argeo.cms.spring.AuthenticatedApplicationContextInitialization" />
-
-</beans>
index 330172969e92f100cb5cd422c8b86e792d9a127f..53352528437a14f9797f8000ac3260ba9aa97a0a 100644 (file)
@@ -7,14 +7,9 @@
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
 \r
        <!-- REFERENCES -->\r
-       <!--  Insure a home is present for each user that logs in -->\r
-       <reference id="repository" interface="javax.jcr.Repository" filter="(cn=home)" />\r
-       <reference id="userAdmin" interface="org.osgi.service.useradmin.UserAdmin" />\r
-       <reference id="userTransaction" interface="javax.transaction.UserTransaction" />\r
-       <reference id="nodeFileSystemProvider" interface="java.nio.file.spi.FileSystemProvider"\r
-               filter="(service.pid=org.argeo.node.fsProvider)" />\r
+       <reference id="repository" interface="javax.jcr.Repository" filter="(cn=node)" />\r
        \r
        <!-- SERVICES -->\r
-       <!-- Exposes Argeo Suite specific implementation of the People Service -->\r
-       <service ref="peopleService" interface="org.argeo.connect.people.PeopleService" />\r
+       <!-- Exposes the Argeo Suite specific maintenance service -->\r
+       <service ref="suiteMaintenanceService" interface="org.argeo.connect.AppMaintenanceService" />\r
 </beans:beans>\r
diff --git a/org.argeo.suite.core/META-INF/spring/services.xml b/org.argeo.suite.core/META-INF/spring/services.xml
new file mode 100644 (file)
index 0000000..ffbcc47
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+       xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">\r
+\r
+       <!-- Instantiate the default MaintenanceService of the various Known Apps -->\r
+       <bean id="resourcesMaintenanceService"\r
+               class="org.argeo.connect.resources.core.ResourcesMaintenanceService" />\r
+\r
+       <bean id="activitiesMaintenanceService"\r
+               class="org.argeo.connect.activities.core.ActivitiesMaintenanceService" />\r
+\r
+       <bean id="peopleMaintenanceService"\r
+               class="org.argeo.connect.people.core.PeopleMaintenanceService" />\r
+\r
+       <bean id="trackerMaintenanceService"\r
+               class="org.argeo.connect.tracker.core.TrackerMaintenanceService" />\r
+\r
+       <!--  Ther is no miantenance Service for the Documents app yet  -->\r
+\r
+       <!--order is important -->\r
+       <util:list id="knownMaintenanceServices">\r
+               <ref bean="resourcesMaintenanceService" />\r
+               <ref bean="activitiesMaintenanceService" />\r
+               <ref bean="peopleMaintenanceService" />\r
+               <ref bean="trackerMaintenanceService" />\r
+       </util:list>\r
+\r
+       <bean id="suiteMaintenanceService" class="org.argeo.suite.core.DefaultSuiteMaintenanceService"\r
+               init-method="init" destroy-method="destroy">\r
+               <property name="repository" ref="repository" />\r
+               <property name="workspaceName" value="main" />\r
+               <property name="maintenanceServices" ref="knownMaintenanceServices" />\r
+       </bean>\r
+\r
+       <!-- Execute initialization with a system authentication -->\r
+       <bean\r
+               class="org.argeo.cms.spring.AuthenticatedApplicationContextInitialization" />\r
+</beans>\r
index d64a19471b9f4cf96c0920cf58b3362192fe3d41..580782840d877ffc44e9895e89fa5986b2d16075 100644 (file)
        <dependencies>
                <dependency>
                        <groupId>org.argeo.connect</groupId>
-                       <artifactId>org.argeo.connect.people.core</artifactId>
+                       <artifactId>org.argeo.connect.tracker</artifactId>
+                       <version>${version.argeo-connect}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.argeo.connect</groupId>
+                       <artifactId>org.argeo.connect.people</artifactId>
                        <version>${version.argeo-connect}</version>
                </dependency>
                <dependency>
similarity index 71%
rename from org.argeo.suite.core/src/org/argeo/suite/SuiteMaintenanceService.java
rename to org.argeo.suite.core/src/org/argeo/suite/core/DefaultSuiteMaintenanceService.java
index ef1ade057c06da70e96e601aeac1b792d989e272..d0a04684a61ba29e81a3de411aa73d2322279a35 100644 (file)
@@ -1,8 +1,6 @@
-package org.argeo.suite;
+package org.argeo.suite.core;
 
-import java.net.URI;
 import java.util.List;
-import java.util.Map;
 
 import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
@@ -13,21 +11,19 @@ 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.resources.ResourceService;
 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 SuiteMaintenanceService implements AppMaintenanceService {
-       private final static Log log = LogFactory.getLog(SuiteMaintenanceService.class);
+public class DefaultSuiteMaintenanceService implements AppMaintenanceService {
+       private final static Log log = LogFactory.getLog(DefaultSuiteMaintenanceService.class);
 
        /* DEPENDENCY INJECTION */
        private Repository repository;
        private String workspaceName;
-       private ResourceService resourceService;
        private List<AppMaintenanceService> maintenanceServices;
-       private Map<String, URI> initResources = null;
-       private Map<String, URI> legacyResources = null;
 
        public void init() {
                Session adminSession = null;
@@ -35,7 +31,6 @@ public class SuiteMaintenanceService implements AppMaintenanceService {
                        adminSession = repository.login(workspaceName);
                        if (prepareJcrTree(adminSession)) {
                                configurePrivileges(adminSession);
-                               importResources(adminSession, null);
                        }
                } catch (Exception e) {
                        throw new SuiteException("Cannot initialise model", e);
@@ -65,14 +60,17 @@ public class SuiteMaintenanceService implements AppMaintenanceService {
                }
                for (AppMaintenanceService service : maintenanceServices)
                        hasCHanged |= service.prepareJcrTree(session);
-               log.info("Repository has been initialised with Argeo Suite model");
+               if (hasCHanged)
+                       log.info("Repository has been initialised with Argeo Suite model");
                return hasCHanged;
        }
 
        @Override
        public void configurePrivileges(Session session) {
-               // TODO check if first init.
                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
@@ -80,6 +78,7 @@ public class SuiteMaintenanceService implements AppMaintenanceService {
                        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);
@@ -89,26 +88,18 @@ public class SuiteMaintenanceService implements AppMaintenanceService {
                log.info("Access control configured");
        }
 
-       @Override
-       public void importResources(Session session, Map<String, URI> initialResources) {
-               for (AppMaintenanceService service : maintenanceServices)
-                       service.prepareJcrTree(session);
+       public void destroy() {
        }
 
-       @Override
-       public void importData(Session session, URI uri, Map<String, URI> resources) {
-               for (AppMaintenanceService service : maintenanceServices)
-                       service.prepareJcrTree(session);
-
+       /* DEPENDENCY INJECTION */
+       public void setRepository(Repository repository) {
+               this.repository = repository;
        }
 
-       @Override
-       public void doBackup(Session session, URI uri, Object resource) {
-               for (AppMaintenanceService service : maintenanceServices)
-                       service.prepareJcrTree(session);
+       public void setWorkspaceName(String workspaceName) {
+               this.workspaceName = workspaceName;
        }
 
-       /* DEPENDENCY INJECTION */
        public void setMaintenanceServices(List<AppMaintenanceService> maintenanceServices) {
                this.maintenanceServices = maintenanceServices;
        }
index d512bfb22403f6ae40df05783f496452de25ec29..1aaf15b68f5aa1ceeb4c17cd2b327a091445ece7 100644 (file)
@@ -14,7 +14,7 @@ import org.apache.commons.logging.LogFactory;
 import org.argeo.connect.people.PeopleConstants;
 import org.argeo.connect.people.PeopleService;
 import org.argeo.connect.people.core.PeopleServiceImpl;
-import org.argeo.connect.resources.ResourceService;
+import org.argeo.connect.resources.ResourcesService;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.node.NodeConstants;
 import org.argeo.suite.ArgeoSuiteRole;
@@ -31,7 +31,7 @@ public class PeopleSuiteServiceImpl extends PeopleServiceImpl implements PeopleS
        /* DEPENDENCY INJECTION */
        private Repository repository;
        private String workspaceName;
-       private ResourceService resourceService;
+       private ResourcesService resourceService;
        private Map<String, URI> initResources = null;
        private Map<String, URI> legacyResources = null;
 
index c00bc83f64798652cc93be0a8081c7d868f9676b..a19f910f2a8290f35882f6dafa3aa942a717fa08 100644 (file)
@@ -7,11 +7,13 @@
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
 \r
        <!-- REFERENCES -->\r
-       <!--  Insure a home is present for each user that logs in -->\r
-       <reference id="repository" interface="javax.jcr.Repository" filter="(cn=home)" />\r
+       <reference id="repository" interface="javax.jcr.Repository"\r
+               filter="(cn=home)" />\r
+       <reference id="resourcesService" interface="org.argeo.connect.resources.ResourcesService" />\r
+       <reference id="activitiesService"\r
+               interface="org.argeo.connect.activities.ActivitiesService" />\r
        <reference id="peopleService" interface="org.argeo.connect.people.PeopleService" />\r
        <reference id="nodeFileSystemProvider" interface="java.nio.file.spi.FileSystemProvider"\r
                filter="(service.pid=org.argeo.node.fsProvider)" />\r
-       \r
-       <!-- SERVICES -->\r
+\r
 </beans:beans>\r
index 036fe601f6bd74143733299cadc5a82e48c85544..1376ebfc915d91db0b549fde695648fd60176ebb 100644 (file)
@@ -9,7 +9,7 @@
        <bean id="people.mainPage" class="org.argeo.connect.people.web.pages.PeopleDynamicPages">
                <property name="dynamicPages" ref="people.dynamicPages" />
                <property name="peopleService" ref="peopleService" />
-               <property name="resourceService" ref="resourceService" />
+               <property name="resourcesService" ref="resourcesService" />
                <property name="iconPathes" ref="peopleEntityIcons" />
        </bean>
 
                <entry>
                        <key>
                                <util:constant
-                                       static-field="org.argeo.connect.people.PeopleTypes.PEOPLE_TAG_INSTANCE" />
+                                       static-field="org.argeo.connect.resources.ResourcesTypes.RESOURCES_TAG_INSTANCE" />
                        </key>
                        <bean class="org.argeo.connect.people.web.pages.TagLikeInstancePage">
                                <property name="peopleService" ref="peopleService" />
-                               <property name="resourceService" ref="resourceService" />
+                               <property name="resourcesService" ref="resourcesService" />
 
                                <property name="iconPathes" ref="peopleEntityIcons" />
                                <property name="propertyName" value="people:tags" />
@@ -76,8 +76,8 @@
                                        static-field="org.argeo.connect.people.PeopleTypes.PEOPLE_MAILING_LIST" />
                        </key>
                        <bean class="org.argeo.connect.people.web.pages.TagLikeInstancePage">
+                               <property name="resourcesService" ref="resourcesService" />
                                <property name="peopleService" ref="peopleService" />
-                               <property name="resourceService" ref="resourceService" />
                                <property name="iconPathes" ref="peopleEntityIcons" />
                                <property name="propertyName" value="people:mailingLists" />
                        </bean>
 
        <!-- Various headers -->
        <bean id="personHeaderPart" class="org.argeo.connect.people.web.parts.PersonHeaderPart">
+               <property name="resourcesService" ref="resourcesService" />
                <property name="peopleService" ref="peopleService" />
-               <property name="resourceService" ref="resourceService" />
                <property name="tagsPart" ref="tagsPart" />
                <property name="mailingListsPart" ref="mailingListsPart" />
        </bean>
 
        <bean id="orgHeaderPart" class="org.argeo.connect.people.web.parts.OrgHeaderPart">
+               <property name="resourcesService" ref="resourcesService" />
                <property name="peopleService" ref="peopleService" />
-               <property name="resourceService" ref="resourceService" />
                <property name="tagsPart" ref="tagsPart" />
                <property name="mailingListsPart" ref="mailingListsPart" />
        </bean>
                <property name="singleContactPart" ref="singleContactPart" />
        </bean>
        <bean id="singleContactPart" class="org.argeo.connect.people.web.parts.SingleContactPart">
-               <property name="peopleService" ref="peopleService" />
+               <property name="resourcesService" ref="resourcesService" />
                <property name="contactButtonsPart" ref="contactButtonsPart" />
        </bean>
        <bean id="contactButtonsPart" class="org.argeo.connect.people.web.parts.ContactButtonsPart">
index 8b0c78c3fcd5f07c9dca26887112ae5502cd8297..e1085f48d19ee3abed005e58810875ae6c1484f0 100644 (file)
@@ -10,7 +10,7 @@ import org.argeo.cms.util.CmsUtils;
 import org.argeo.connect.people.PeopleException;
 import org.argeo.connect.people.PeopleService;
 import org.argeo.connect.people.web.parts.PeopleSearchCmp;
-import org.argeo.connect.resources.ResourceService;
+import org.argeo.connect.resources.ResourcesService;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
@@ -27,14 +27,14 @@ import org.eclipse.swt.widgets.Label;
 /** Default dashboard layout for Argeo Suite */
 public class DefaultDashboard implements CmsUiProvider {
 
-       private ResourceService resourceService;
+       private ResourcesService resourceService;
        private PeopleService peopleService;
        private Map<String, String> peopleIconPaths;
 
        // Local UI Providers
        // private CmsUiProvider orgPage;
 
-       public DefaultDashboard(ResourceService resourceService, PeopleService peopleService, Map<String, String> peopleIconPaths) {
+       public DefaultDashboard(ResourcesService resourceService, PeopleService peopleService, Map<String, String> peopleIconPaths) {
                this.resourceService = resourceService;
                this.peopleService = peopleService;
                this.peopleIconPaths = peopleIconPaths;
index 6c4c74e8fdfb7b73c088cda7489b90439fb907cc..d22a5dd73d74cbdbb649b07146912fb7fa6c0025 100644 (file)
@@ -19,7 +19,7 @@ import org.argeo.cms.widgets.auth.CmsLogin;
 import org.argeo.connect.people.PeopleService;
 import org.argeo.connect.people.PeopleTypes;
 import org.argeo.connect.people.web.pages.PeopleDefaultPage;
-import org.argeo.connect.resources.ResourceService;
+import org.argeo.connect.resources.ResourcesService;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.suite.web.fs.MyFilesBrowserPage;
 import org.eclipse.swt.SWT;
@@ -42,7 +42,7 @@ public class DefaultMainPage implements LifeCycleUiProvider {
        private CmsUiProvider fsBrowserPage;
 
        /* DEPENDENCY INJECTION */
-       private ResourceService resourceService;
+       private ResourcesService resourceService;
        private PeopleService peopleService;
        private FileSystemProvider nodeFileSystemProvider;
        private Map<String, String> peopleIconPaths;
@@ -123,7 +123,7 @@ public class DefaultMainPage implements LifeCycleUiProvider {
        }
 
        /* DEPENDENCY INJECTION */
-       public void setResourceService(ResourceService resourceService) {
+       public void setResourceService(ResourcesService resourceService) {
                this.resourceService = resourceService;
        }
 
index 6f335cc4475dcaea6e8606571156e45192aa9b2d..6a9ef572ffa803683711e80a45bc060511f9ef01 100644 (file)
@@ -5,7 +5,7 @@ import javax.jcr.Repository;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.argeo.connect.people.workbench.rap.editors.util.EntityEditorInput;
+import org.argeo.connect.ui.workbench.parts.EntityEditorInput;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.node.NodeUtils;
 import org.argeo.suite.SuiteException;
index e18d202e035e6aea4b16c493fd83550c5267bb48..f356ca23a3f1b7fbe12be53214987b975c3b0576 100644 (file)
@@ -9,14 +9,13 @@ import javax.jcr.Session;
 
 import org.argeo.cms.ui.workbench.util.CommandUtils;
 import org.argeo.cms.util.CmsUtils;
+import org.argeo.connect.activities.ActivitiesService;
 import org.argeo.connect.documents.DocumentsService;
-import org.argeo.connect.resources.ResourceService;
-import org.argeo.connect.activities.ActivityService;
-import org.argeo.connect.activities.ActivitiesTypes;
 import org.argeo.connect.people.PeopleService;
-import org.argeo.connect.people.workbench.rap.PeopleStyles;
-import org.argeo.connect.people.workbench.rap.editors.util.EntityEditorInput;
+import org.argeo.connect.resources.ResourcesService;
+import org.argeo.connect.ui.ConnectUiStyles;
 import org.argeo.connect.ui.workbench.AppWorkbenchService;
+import org.argeo.connect.ui.workbench.parts.EntityEditorInput;
 import org.argeo.connect.util.ConnectJcrUtils;
 import org.argeo.eclipse.ui.EclipseUiUtils;
 import org.argeo.jcr.JcrUtils;
@@ -41,8 +40,8 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
 
        // DEPENDENCY INJECTION
        private Repository repository;
-       private ResourceService resourceService;
-       private ActivityService activityService;
+       private ResourcesService resourceService;
+       private ActivitiesService activityService;
        private PeopleService peopleService;
        private DocumentsService documentsService;
        private AppWorkbenchService appWorkbenchService;
@@ -106,20 +105,20 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
                gd.widthHint = widthHint;
                gd.heightHint = heightHint;
                gadgetCmp.setLayoutData(gd);
-               CmsUtils.style(gadgetCmp, PeopleStyles.PEOPLE_CLASS_GADGET);
+               CmsUtils.style(gadgetCmp, ConnectUiStyles.GADGET_BOX);
                return gadgetCmp;
        }
 
        protected Composite createGadgetTitleCmp(Composite parent, String title) {
                Composite titleCmp = toolkit.createComposite(parent, SWT.BACKGROUND | SWT.INHERIT_NONE);
-               CmsUtils.style(titleCmp, PeopleStyles.GADGET_HEADER);
+               CmsUtils.style(titleCmp, ConnectUiStyles.GADGET_HEADER);
                titleCmp.setBackground(null);
                GridData gd = new GridData(SWT.FILL, SWT.TOP, true, false);
                titleCmp.setLayoutData(gd);
                titleCmp.setLayout(new GridLayout());
 
                Label titleLbl = toolkit.createLabel(titleCmp, title + " ", SWT.BOLD);
-               CmsUtils.style(titleLbl, PeopleStyles.GADGET_HEADER);
+               CmsUtils.style(titleLbl, ConnectUiStyles.GADGET_HEADER);
                titleLbl.setBackground(null);
                return titleCmp;
        }
@@ -187,11 +186,11 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
                return session;
        }
 
-       public ResourceService getResourceService() {
+       public ResourcesService getResourceService() {
                return resourceService;
        }
-       
-       protected ActivityService getActivityService() {
+
+       protected ActivitiesService getActivityService() {
                return activityService;
        }
 
@@ -203,7 +202,6 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
                return documentsService;
        }
 
-
        protected AppWorkbenchService getAppWorkbenchService() {
                return appWorkbenchService;
        }
@@ -221,11 +219,11 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
                this.repository = repository;
        }
 
-       public void setResourceService(ResourceService resourceService) {
+       public void setResourceService(ResourcesService resourceService) {
                this.resourceService = resourceService;
        }
-       
-       public void setActivityService(ActivityService activityService) {
+
+       public void setActivityService(ActivitiesService activityService) {
                this.activityService = activityService;
        }
 
@@ -237,7 +235,6 @@ public abstract class AbstractSuiteDashboard extends EditorPart {
                this.peopleService = peopleService;
        }
 
-
        public void setAppWorkbenchService(AppWorkbenchService appWorkbenchService) {
                this.appWorkbenchService = appWorkbenchService;
        }
index e45e0682e4a099e1fc6e935b898141a91e19fd96..a9dd0e5e969b4c3d3e78514d7c2d592f4e6b1e4a 100644 (file)
@@ -8,8 +8,8 @@ import org.apache.commons.logging.LogFactory;
 import org.argeo.connect.ConnectConstants;
 import org.argeo.connect.activities.ActivitiesTypes;
 import org.argeo.connect.people.PeopleTypes;
-import org.argeo.connect.people.workbench.rap.PeopleRapUtils;
 import org.argeo.connect.resources.ResourcesTypes;
+import org.argeo.connect.ui.workbench.ConnectWorkbenchUtils;
 import org.argeo.connect.ui.workbench.Refreshable;
 import org.argeo.connect.util.ConnectJcrUtils;
 import org.argeo.eclipse.ui.EclipseUiUtils;
@@ -83,22 +83,22 @@ public class DefaultDashboardEditor extends AbstractSuiteDashboard implements Re
                createGadgetTitleCmp(parent, "Contacts");
                Composite bodyCmp = createGadgetBodyCmp(parent);
 
-               PeopleRapUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Persons",
+               ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Persons",
                                PeopleTypes.PEOPLE_PERSON, getPeopleService().getBasePath(PeopleTypes.PEOPLE_PERSON));
 
-               PeopleRapUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Organisations",
+               ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Organisations",
                                PeopleTypes.PEOPLE_ORG, getPeopleService().getBasePath(PeopleTypes.PEOPLE_ORG));
 
                Node tagParent = getResourceService().getTagLikeResourceParent(getSession(), PeopleTypes.PEOPLE_MAILING_LIST);
-               PeopleRapUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Mailing lists",
+               ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Mailing lists",
                                PeopleTypes.PEOPLE_MAILING_LIST, ConnectJcrUtils.getPath(tagParent));
-               PeopleRapUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Tasks",
+               ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Tasks",
                                ActivitiesTypes.ACTIVITIES_TASK, getPeopleService().getBasePath(null));
 
                tagParent = getResourceService().getTagLikeResourceParent(getSession(), ConnectConstants.RESOURCE_TAG);
 
-               PeopleRapUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Tags",
-                               ResourcesTypes.PEOPLE_TAG_INSTANCE, ConnectJcrUtils.getPath(tagParent));
+               ConnectWorkbenchUtils.createOpenSearchEditorLink(getAppWorkbenchService(), bodyCmp, "Tags",
+                               ResourcesTypes.RESOURCES_TAG_INSTANCE, ConnectJcrUtils.getPath(tagParent));
 
        }
 }
diff --git a/org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/delete_small.gif b/org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/delete_small.gif
new file mode 100644 (file)
index 0000000..df0b869
Binary files /dev/null and b/org.argeo.suite.workbench.rap/theme/argeo-classic/icons/actions/delete_small.gif differ
index 7f673f7f3c4caa77e60cd6f629f7ba15dfb9bdf4..0f41a28f03b2360beae86647514ea71b3adcde18 100644 (file)
@@ -141,6 +141,27 @@ Text.workbench_form_text:focused {
        box-shadow: inset 0 0 1px #bdbdbd;
 }
 
+
+/****** DASHBOARD  *********/
+
+/** Gadgets  **/
+.gadget_box {
+       border: 1px solid #f3f3f4;
+       border-radius: 0px;
+       padding: 0px 0px;
+       margin: 0px 0px;
+       background-image: none;
+       background-color: transparent;
+}
+
+.gadget_header {
+       background-color: #f3f3f4;
+       font-color: white;
+       color: white; /*dont work */
+       font: bold 14px Helvetica, Verdana, "Lucida Sans", Arial, sans-serif;
+}
+
+
 /****** DOCUMENTS  *********/
 
 /* Breadcrumb ***/
@@ -266,22 +287,16 @@ Button[PUSH][FLAT].markAsDone_btn:pressed {
        background-color: #fde2d5;
 }
 
-/** Gadgets  **/
-.people_gadget {
-       border: 1px solid #f3f3f4;
+Button[PUSH][FLAT].small_delete_btn{
+       background-image: url( theme/argeo-classic/icons/actions/delete_small.gif);
+       border: 0px solid white;
        border-radius: 0px;
        padding: 0px 0px;
-       margin: 0px 0px;
-       background-image: none;
        background-color: transparent;
+       animation: hoverOut 500ms ease-out;
+       cursor: pointer;
 }
 
-.people_gadget_header {
-       background-color: #f3f3f4;
-       font-color: white;
-       color: white; /*dont work */
-       font: bold 14px Helvetica, Verdana, "Lucida Sans", Arial, sans-serif;
-}
 
 /** Header **/
 .people_entity_header {