Add Documents to Eclipse 4
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 26 Mar 2018 13:13:56 +0000 (15:13 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 26 Mar 2018 13:13:56 +0000 (15:13 +0200)
19 files changed:
org.argeo.suite.cms/META-INF/MANIFEST.MF
org.argeo.suite.cms/OSGI-INF/documentsService.xml [new file with mode: 0644]
org.argeo.suite.cms/OSGI-INF/trackerMaintenanceService.xml [new file with mode: 0644]
org.argeo.suite.cms/OSGI-INF/trackerService.xml [new file with mode: 0644]
org.argeo.suite.cms/bnd.bnd
org.argeo.suite.cms/build.properties
org.argeo.suite.e4.rap/META-INF/MANIFEST.MF
org.argeo.suite.e4.rap/build.properties
org.argeo.suite.e4/.project
org.argeo.suite.e4/META-INF/MANIFEST.MF
org.argeo.suite.e4/OSGI-INF/activitiesE4Service.xml [moved from org.argeo.suite.e4.rap/OSGI-INF/activitiesE4Service.xml with 91% similarity]
org.argeo.suite.e4/OSGI-INF/documentsE4Service.xml [new file with mode: 0644]
org.argeo.suite.e4/OSGI-INF/peopleE4Service.xml [moved from org.argeo.suite.e4.rap/OSGI-INF/peopleE4Service.xml with 83% similarity]
org.argeo.suite.e4/OSGI-INF/systemE4Service.xml [moved from org.argeo.suite.e4.rap/OSGI-INF/systemE4Service.xml with 100% similarity]
org.argeo.suite.e4/bnd.bnd [new file with mode: 0644]
org.argeo.suite.e4/e4xmi/argeo-office.e4xmi
org.argeo.suite.e4/src/org/argeo/suite/e4/parts/AbstractSuiteDashboard.java
org.argeo.suite.e4/src/org/argeo/suite/e4/parts/DefaultDashboardEditor.java
org.argeo.suite.e4/src/org/argeo/suite/e4/parts/EntitySingleColumnLabelProvider.java

index e0594fc0ac224e001ca29c9af113e179ec6425bd..893cb1ca15a658bf1c85bad3f3fad67afd093baa 100644 (file)
@@ -4,15 +4,8 @@ Bundle-Name: Cms
 Bundle-SymbolicName: org.argeo.suite.cms
 Bundle-Version: 1.0.0.qualifier
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Service-Component: OSGI-INF/resourcesService.xml,
- OSGI-INF/activitiesService.xml,
- OSGI-INF/systemAppService.xml,
- OSGI-INF/userManagerService.xml,
- OSGI-INF/peopleService.xml,
- OSGI-INF/systemMaintenanceService.xml,
- OSGI-INF/activitiesMaintenanceService.xml,
- OSGI-INF/resourcesMaintenanceService.xml,
- OSGI-INF/peopleMaintenanceService.xml
+Service-Component: OSGI-INF/resourcesService.xml,OSGI-INF/activitiesService.xml,OSGI-INF/systemAppService.xml,OSGI-INF/userManagerService.xml,OSGI-INF/peopleService.xml,OSGI-INF/systemMaintenanceService.xml,OSGI-INF/activitiesMaintenanceService.xml,OSGI-INF/resourcesMaintenanceService.xml,OSGI-INF/peopleMaintenanceService.xml,OSGI-INF/trackerService.xml,OSGI-INF/documentsService.xml,
+ OSGI-INF/trackerMaintenanceService.xml
 Import-Package: javax.jcr;version="2.0.0",
  javax.transaction,
  org.argeo.activities;version="2.1.79.SNAPSHOT-r201803241506",
@@ -21,7 +14,9 @@ Import-Package: javax.jcr;version="2.0.0",
  org.argeo.connect.core;version="2.1.79.SNAPSHOT-r201803241506",
  org.argeo.connect.resources;version="2.1.79.SNAPSHOT-r201803241506",
  org.argeo.connect.resources.core;version="2.1.79.SNAPSHOT-r201803241506",
+ org.argeo.documents.core;version="2.1.79.SNAPSHOT-r201803241506",
  org.argeo.people;version="2.1.79.SNAPSHOT-r201803241506",
  org.argeo.people.core;version="2.1.79.SNAPSHOT-r201803241506",
+ org.argeo.tracker.core;version="2.1.79.SNAPSHOT-r201803241506",
  org.osgi.service.useradmin;version="1.1.0"
 Bundle-ActivationPolicy: lazy
diff --git a/org.argeo.suite.cms/OSGI-INF/documentsService.xml b/org.argeo.suite.cms/OSGI-INF/documentsService.xml
new file mode 100644 (file)
index 0000000..c4cc045
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Documents Service">
+   <implementation class="org.argeo.documents.core.DocumentsServiceImpl"/>
+   <service>
+      <provide interface="org.argeo.connect.AppService"/>
+      <provide interface="org.argeo.documents.DocumentsService"/>
+   </service>
+</scr:component>
diff --git a/org.argeo.suite.cms/OSGI-INF/trackerMaintenanceService.xml b/org.argeo.suite.cms/OSGI-INF/trackerMaintenanceService.xml
new file mode 100644 (file)
index 0000000..ec9fa7c
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Tracker Maintenance Service">
+   <implementation class="org.argeo.tracker.core.TrackerMaintenanceService"/>
+   <service>
+      <provide interface="org.argeo.connect.AppMaintenanceService"/>
+   </service>
+</scr:component>
diff --git a/org.argeo.suite.cms/OSGI-INF/trackerService.xml b/org.argeo.suite.cms/OSGI-INF/trackerService.xml
new file mode 100644 (file)
index 0000000..9cb2a0d
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Tracker Service">
+   <implementation class="org.argeo.tracker.core.TrackerServiceImpl"/>
+   <service>
+      <provide interface="org.argeo.connect.AppService"/>
+      <provide interface="org.argeo.tracker.TrackerService"/>
+   </service>
+   <reference bind="setActivitiesService" cardinality="1..1" interface="org.argeo.activities.ActivitiesService" name="ActivitiesService" policy="static"/>
+</scr:component>
index 687d79b71e53102b797a2ed67bdea2a85ecf8a61..c3c1aa08f81cd389d5201ef1ca4554ff6de6322a 100644 (file)
@@ -4,8 +4,11 @@ Service-Component: OSGI-INF/systemAppService.xml,\
  OSGI-INF/resourcesService.xml,\
  OSGI-INF/activitiesService.xml,\
  OSGI-INF/peopleService.xml,\
+ OSGI-INF/trackerService.xml,\
+ OSGI-INF/documentsService.xml,\
  OSGI-INF/systemMaintenanceService.xml,\
  OSGI-INF/activitiesMaintenanceService.xml,\
  OSGI-INF/resourcesMaintenanceService.xml,\
- OSGI-INF/peopleMaintenanceService.xml
+ OSGI-INF/peopleMaintenanceService.xml,\
+ OSGI-INF/trackerMaintenanceService.xml
  
\ No newline at end of file
index f673b4253d4ca33d66a234abc197e99831fa6281..5833b74c0337879134ae0503fa73511b4721b55b 100644 (file)
@@ -9,5 +9,8 @@ bin.includes = META-INF/,\
                OSGI-INF/systemMaintenanceService.xml,\
                OSGI-INF/activitiesMaintenanceService.xml,\
                OSGI-INF/resourcesMaintenanceService.xml,\
-               OSGI-INF/peopleMaintenanceService.xml
+               OSGI-INF/peopleMaintenanceService.xml,\
+               OSGI-INF/trackerService.xml,\
+               OSGI-INF/documentsService.xml,\
+               OSGI-INF/trackerMaintenanceService.xml
 source.. = src/
index 96561634d06fb22f9b892cb3171d796040c51f99..79e43d2043aa08222e9525d7a17f8c5a64e41ee5 100644 (file)
@@ -11,5 +11,4 @@ Import-Package: org.argeo.activities.e4,
  org.argeo.connect.ui;version="2.1.79.SNAPSHOT-r201803241506",
  org.argeo.people.e4,
  org.eclipse.rap.rwt.application;version="3.4.0"
-Service-Component: OSGI-INF/argeo-office-rap.xml,OSGI-INF/systemE4Service.xml,OSGI-INF/activitiesE4Service.xml,
- OSGI-INF/peopleE4Service.xml
+Service-Component: OSGI-INF/argeo-office-rap.xml
index 7d8239f12f466570439f7bbb57a7d922ac25bc86..5cd458837d533af16a29bff7830a70b80f0f34cf 100644 (file)
@@ -3,5 +3,6 @@ bin.includes = META-INF/,\
                .,\
                OSGI-INF/systemE4Service.xml,\
                OSGI-INF/activitiesE4Service.xml,\
-               OSGI-INF/peopleE4Service.xml
+               OSGI-INF/peopleE4Service.xml,\
+               OSGI-INF/documentsE4Service.xml
 source.. = src/
index 78b39802e97660841248643095ea1abd3ba913b3..38541c07f4e576e88481001511df1a006f3a4f35 100644 (file)
                        <arguments>
                        </arguments>
                </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ds.core.builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
        </buildSpec>
        <natures>
                <nature>org.eclipse.pde.PluginNature</nature>
index 3531127c97bf041b621b0da40212996cee37e4ae..99ad621b48533a21eb1dfba93fa57273cdc99261 100644 (file)
@@ -11,17 +11,23 @@ Import-Package: javax.inject;version="1.0.0",
  javax.jcr.query;version="2.0.0",\r
  org.apache.commons.logging;version="1.1.1",\r
  org.argeo.activities;version="2.1.79.SNAPSHOT-r201803241506",\r
+ org.argeo.activities.e4,\r
+ org.argeo.activities.e4.parts,\r
  org.argeo.activities.ui;version="2.1.79.SNAPSHOT-r201803241506",\r
  org.argeo.cms.auth;version="2.1.73.SNAPSHOT-r201803221729",\r
  org.argeo.cms.ui.eclipse.forms;version="2.1.73.SNAPSHOT-r201803221729",\r
  org.argeo.cms.util;version="2.1.73.SNAPSHOT-r201803221729",\r
  org.argeo.connect;version="2.1.79.SNAPSHOT-r201803241506",\r
+ org.argeo.connect.e4,\r
  org.argeo.connect.e4.handlers,\r
+ org.argeo.connect.e4.parts,\r
  org.argeo.connect.resources;version="2.1.79.SNAPSHOT-r201803241506",\r
  org.argeo.connect.ui,\r
  org.argeo.connect.ui.util;version="2.1.79.SNAPSHOT-r201803241506",\r
  org.argeo.connect.ui.widgets;version="2.1.79.SNAPSHOT-r201803241506",\r
  org.argeo.connect.util;version="2.1.79.SNAPSHOT-r201803241506",\r
+ org.argeo.documents.e4,\r
+ org.argeo.documents.e4.parts,\r
  org.argeo.eclipse.ui;version="2.1.73.SNAPSHOT-r201803221729",\r
  org.argeo.jcr;version="2.1.73.SNAPSHOT-r201803221729",\r
  org.argeo.node;version="2.1.0",\r
@@ -44,4 +50,6 @@ Import-Package: javax.inject;version="1.0.0",
  org.eclipse.swt.graphics,\r
  org.eclipse.swt.layout,\r
  org.eclipse.swt.widgets\r
+Service-Component: OSGI-INF/systemE4Service.xml,OSGI-INF/activitiesE4Service.xml,OSGI-INF/peopleE4Service.xml,OSGI-INF/documentsE4Service.xml\r
+Bundle-ActivationPolicy: lazy\r
 \r
similarity index 91%
rename from org.argeo.suite.e4.rap/OSGI-INF/activitiesE4Service.xml
rename to org.argeo.suite.e4/OSGI-INF/activitiesE4Service.xml
index 109745de0d40c4616d0aa5cce218b43e984a9a62..f6eaccb28dc392df00c84c7eee6e56203fafe2bd 100644 (file)
@@ -3,6 +3,7 @@
    <implementation class="org.argeo.activities.e4.ActivitiesE4Service"/>
    <service>
       <provide interface="org.argeo.connect.ui.AppWorkbenchService"/>
+      <provide interface="org.argeo.connect.e4.AppE4Service"/>
    </service>
    <reference bind="setUserAdminService" cardinality="1..1" interface="org.argeo.connect.UserAdminService" name="UserAdminService" policy="static"/>
    <reference bind="setActivitiesService" cardinality="1..1" interface="org.argeo.activities.ActivitiesService" name="ActivitiesService" policy="static"/>
diff --git a/org.argeo.suite.e4/OSGI-INF/documentsE4Service.xml b/org.argeo.suite.e4/OSGI-INF/documentsE4Service.xml
new file mode 100644 (file)
index 0000000..8cd25e0
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="Documents E4 Service">
+   <implementation class="org.argeo.documents.e4.DocumentsE4Service"/>
+   <service>
+      <provide interface="org.argeo.connect.ui.AppWorkbenchService"/>
+      <provide interface="org.argeo.connect.e4.AppE4Service"/>
+   </service>
+</scr:component>
similarity index 83%
rename from org.argeo.suite.e4.rap/OSGI-INF/peopleE4Service.xml
rename to org.argeo.suite.e4/OSGI-INF/peopleE4Service.xml
index 32c6e5f072d68fcf039b2daf003da413945d99b0..088d4543d2273363dd8d866955949466675626c9 100644 (file)
@@ -3,5 +3,6 @@
    <implementation class="org.argeo.people.e4.PeopleE4Service"/>
    <service>
       <provide interface="org.argeo.connect.ui.AppWorkbenchService"/>
+      <provide interface="org.argeo.connect.e4.AppE4Service"/>
    </service>
 </scr:component>
diff --git a/org.argeo.suite.e4/bnd.bnd b/org.argeo.suite.e4/bnd.bnd
new file mode 100644 (file)
index 0000000..a29c7f1
--- /dev/null
@@ -0,0 +1,2 @@
+Bundle-ActivationPolicy: lazy
+Service-Component: OSGI-INF/systemE4Service.xml,OSGI-INF/activitiesE4Service.xml,OSGI-INF/peopleE4Service.xml,OSGI-INF/documentsE4Service.xml
index f7fd8c9d838f0eeab7a0c576344e4b6c973a6e8f..e9e7f3d268520395fcf0fdbddeee5ec86e1b1455 100644 (file)
@@ -9,6 +9,7 @@
           <children xsi:type="basic:PartStack" xmi:id="_orJxUDAVEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.partstack.0" containerData="3000">
             <tags>minimized</tags>
             <children xsi:type="basic:Part" xmi:id="_qAM4sDAVEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.part.search" containerData="" contributionURI="bundleclass://org.argeo.suite.e4/org.argeo.suite.e4.parts.QuickSearchView" label="Search" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/actions/search.png"/>
+            <children xsi:type="basic:Part" xmi:id="_xi1k0DDzEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.part.documents" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.documents.e4.parts.MyFilesView" label="Documents" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/documents.png"/>
           </children>
           <children xsi:type="basic:PartStack" xmi:id="_vLza4DAVEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.partstack.1" containerData="7000">
             <tags>entityEditorArea</tags>
   <handlers xmi:id="_9gu00DDgEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.handler.1" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.connect.e4.handlers.SavePart" command="_1lO94DDgEeiUfOa4rxEKwQ"/>
   <handlers xmi:id="_ADDAkDDhEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.handler.2" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.connect.e4.handlers.SaveAllParts" command="_5EpEADDgEeiUfOa4rxEKwQ"/>
   <handlers xmi:id="_ZBWe8DDmEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.handler.3" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.connect.e4.handlers.CloseAllParts" command="_VdldQDDmEeiUfOa4rxEKwQ"/>
-  <bindingTables xmi:id="_gxEm4DDqEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.bindingtable.0">
+  <bindingTables xmi:id="_gxEm4DDqEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.bindingtable.0" bindingContext="_Byl7gDD1EeiUfOa4rxEKwQ">
     <bindings xmi:id="_hj9cYDDqEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.keybinding.0" keySequence="CTRL+S" command="_1lO94DDgEeiUfOa4rxEKwQ"/>
     <bindings xmi:id="_pEAGYDDqEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.keybinding.1" keySequence="SHIFT+CTRL+S" command="_5EpEADDgEeiUfOa4rxEKwQ"/>
   </bindingTables>
+  <rootContext xmi:id="_Byl7gDD1EeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.bindingcontext.main" name="Main"/>
   <descriptors xmi:id="_pud7kDAtEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.partdescriptor.taskEditor" label="Task" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/task.png" allowMultiple="true" category="entityEditorArea" closeable="true" dirtyable="true" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.activities.e4.parts.TaskEditor"/>
   <descriptors xmi:id="_JsNs8DBiEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.partdescriptor.personEditor" label="Person" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/person.png" allowMultiple="true" category="entityEditorArea" closeable="true" dirtyable="true" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.people.e4.parts.PersonEditor"/>
   <descriptors xmi:id="_RxqxIDBiEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.partdescriptor.orgEditor" label="Organisation" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/organisation.png" allowMultiple="true" category="entityEditorArea" closeable="true" dirtyable="true" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.people.e4.parts.OrgEditor"/>
+  <descriptors xmi:id="_GkmucDD0EeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.partdescriptor.file" label="File" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/file.png" allowMultiple="true" category="entityEditorArea" closeable="true" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.documents.e4.parts.FileEditor"/>
+  <descriptors xmi:id="_NjQioDD0EeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.partdescriptor.folder" label="Folder" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/folder.png" allowMultiple="true" category="entityEditorArea" closeable="true" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.documents.e4.parts.FolderEditor"/>
   <commands xmi:id="_2Xkt8DApEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.command.createEntity" commandName="Create">
     <parameters xmi:id="_GnXrcDAsEei3AbO1ldMI0w" elementId="targetNodeType" name="targetNodeType" optional="false"/>
   </commands>
index 96919019f66ef66a11789ec0d0df8db6a1c84687..88067aab7f7cd0dd0f7b457c21a26a3ab8646167 100644 (file)
@@ -2,6 +2,7 @@ package org.argeo.suite.e4.parts;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
+import javax.inject.Inject;
 import javax.jcr.Node;
 import javax.jcr.Repository;
 import javax.jcr.Session;
@@ -30,9 +31,13 @@ import org.eclipse.swt.widgets.Link;
 public abstract class AbstractSuiteDashboard {
 
        // DEPENDENCY INJECTION
+       @Inject
        private Repository repository;
+       @Inject
        private ResourcesService resourcesService;
+       @Inject
        private SystemAppService systemAppService;
+       @Inject
        private SystemWorkbenchService systemWorkbenchService;
 
        private Session session;
index d068575eeccd1017f14711e64f44acd265638ea3..3a89fea5d97f0e32412cd389d69cd7e9d2bded2b 100644 (file)
@@ -6,6 +6,7 @@ import java.util.GregorianCalendar;
 import java.util.List;
 
 import javax.annotation.PostConstruct;
+import javax.inject.Inject;
 import javax.jcr.Node;
 import javax.jcr.NodeIterator;
 import javax.jcr.Property;
@@ -59,7 +60,9 @@ public class DefaultDashboardEditor extends AbstractSuiteDashboard implements Re
        // public final static String ID = AsUiPlugin.PLUGIN_ID +
        // ".defaultDashboardEditor";
 
+       @Inject
        private ActivitiesService activitiesService;
+       @Inject
        private TrackerService trackerService;
 
        private String datePattern = "dd MMM yyyy";
index 490ae13433b6c77db63d815f57e279bcc3732dbb..c0755745077c85298ef7502f5382c9cf01fc1f74 100644 (file)
@@ -22,15 +22,14 @@ import org.argeo.people.ui.providers.OrgListLabelProvider;
 import org.argeo.people.ui.providers.PersonListLabelProvider;
 import org.argeo.tracker.TrackerTypes;
 import org.argeo.tracker.ui.TrackerSingleColLP;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
 import org.eclipse.swt.graphics.Image;
 
 /**
  * Provide a single column label provider for entity lists. Icon and displayed
  * text vary with the element node type
  */
-public class EntitySingleColumnLabelProvider implements PeopleNames, ILabelProvider {
+public class EntitySingleColumnLabelProvider extends ColumnLabelProvider implements PeopleNames {
        private static final long serialVersionUID = 3111885324210673320L;
 
        private SystemWorkbenchService systemWorkbenchService;
@@ -87,28 +86,4 @@ public class EntitySingleColumnLabelProvider implements PeopleNames, ILabelProvi
                return systemWorkbenchService.getIconForType((Node) element);
        }
 
-       @Override
-       public void addListener(ILabelProviderListener listener) {
-               // TODO Auto-generated method stub
-
-       }
-
-       @Override
-       public void dispose() {
-               // TODO Auto-generated method stub
-
-       }
-
-       @Override
-       public boolean isLabelProperty(Object element, String property) {
-               // TODO Auto-generated method stub
-               return false;
-       }
-
-       @Override
-       public void removeListener(ILabelProviderListener listener) {
-               // TODO Auto-generated method stub
-
-       }
-
 }