From: Mathieu Baudier Date: Mon, 3 May 2021 07:45:47 +0000 (+0200) Subject: Merge branch 'v2.x' X-Git-Tag: argeo-suite-2.3.1~55 X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=commitdiff_plain;h=34148928e47a56bde06635334fb06d4d5bb70d50;hp=0481faf35acca653929b52aced8815a7cfa3f885 Merge branch 'v2.x' Conflicts: core/org.argeo.entity.api/pom.xml core/org.argeo.entity.core/pom.xml core/org.argeo.entity.ui/pom.xml core/org.argeo.suite.core/pom.xml core/org.argeo.suite.theme.default/pom.xml core/org.argeo.suite.ui.rap/pom.xml core/org.argeo.suite.ui/pom.xml core/pom.xml dep/org.argeo.suite.dep.e4.rap/pom.xml dep/org.argeo.suite.dep.ui.rap/pom.xml dep/pom.xml dist/argeo-office/pom.xml dist/argeo-suite-demo/pom.xml dist/pom.xml environment/org.argeo.geo.ui/pom.xml environment/pom.xml knowledge/org.argeo.support.geonames/pom.xml knowledge/org.argeo.support.odk/pom.xml knowledge/org.argeo.support.xforms/pom.xml knowledge/pom.xml lib/pom.xml library/org.argeo.documents.ui/pom.xml library/pom.xml people/org.argeo.people.ui/pom.xml people/pom.xml pom.xml publishing/org.argeo.publishing.ui/pom.xml publishing/pom.xml --- diff --git a/core/org.argeo.entity.api/pom.xml b/core/org.argeo.entity.api/pom.xml index 1d2e27f..c0723fe 100644 --- a/core/org.argeo.entity.api/pom.xml +++ b/core/org.argeo.entity.api/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.entity.api diff --git a/core/org.argeo.entity.api/src/org/argeo/entity/entity.cnd b/core/org.argeo.entity.api/src/org/argeo/entity/entity.cnd index b30657d..b64a275 100644 --- a/core/org.argeo.entity.api/src/org/argeo/entity/entity.cnd +++ b/core/org.argeo.entity.api/src/org/argeo/entity/entity.cnd @@ -43,7 +43,7 @@ mixin [entity:term] orderable -- name (NAME) m +- name (NAME) - * (*) + term (entity:term) = entity:term * diff --git a/core/org.argeo.entity.core/pom.xml b/core/org.argeo.entity.core/pom.xml index 210aa22..39b697e 100644 --- a/core/org.argeo.entity.core/pom.xml +++ b/core/org.argeo.entity.core/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.entity.core @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.entity.api - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/core/org.argeo.entity.ui/pom.xml b/core/org.argeo.entity.ui/pom.xml index 469fc80..d635fbf 100644 --- a/core/org.argeo.entity.ui/pom.xml +++ b/core/org.argeo.entity.ui/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.entity.ui @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.entity.core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/core/org.argeo.suite.core/pom.xml b/core/org.argeo.suite.core/pom.xml index 2ca0e5b..0c1d40b 100644 --- a/core/org.argeo.suite.core/pom.xml +++ b/core/org.argeo.suite.core/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.suite.core @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.entity.core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/core/org.argeo.suite.core/src/org/argeo/suite/core/CustomMaintenanceService.java b/core/org.argeo.suite.core/src/org/argeo/suite/core/CustomMaintenanceService.java index aaaaafa..5d76eb1 100644 --- a/core/org.argeo.suite.core/src/org/argeo/suite/core/CustomMaintenanceService.java +++ b/core/org.argeo.suite.core/src/org/argeo/suite/core/CustomMaintenanceService.java @@ -36,6 +36,7 @@ public abstract class CustomMaintenanceService extends AbstractMaintenanceServic for (String terms : typologies) { loadTerms(termsBase, terms); } + // TODO do not save here, so that upper layers can decide when to save termsBase.getSession().save(); } } @@ -62,6 +63,7 @@ public abstract class CustomMaintenanceService extends AbstractMaintenanceServic } if (log.isDebugEnabled()) log.debug("Terms '" + name + "' loaded."); + // TODO do not save here, so that upper layers can decide when to save termsBase.getSession().save(); } catch (RepositoryException | IOException e) { log.error("Cannot load terms '" + name + "': " + e.getMessage()); diff --git a/core/org.argeo.suite.theme.default/pom.xml b/core/org.argeo.suite.theme.default/pom.xml index 5afd257..e9f0092 100644 --- a/core/org.argeo.suite.theme.default/pom.xml +++ b/core/org.argeo.suite.theme.default/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.suite.theme.default diff --git a/core/org.argeo.suite.ui.rap/pom.xml b/core/org.argeo.suite.ui.rap/pom.xml index 35d1ccf..a8a1e80 100644 --- a/core/org.argeo.suite.ui.rap/pom.xml +++ b/core/org.argeo.suite.ui.rap/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.suite.ui.rap @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.suite.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/core/org.argeo.suite.ui/OSGI-INF/l10n/bundle.properties b/core/org.argeo.suite.ui/OSGI-INF/l10n/bundle.properties index 3d08155..5716780 100644 --- a/core/org.argeo.suite.ui/OSGI-INF/l10n/bundle.properties +++ b/core/org.argeo.suite.ui/OSGI-INF/l10n/bundle.properties @@ -1,5 +1,5 @@ dashboard=dashboard -people=contacts +#people=contacts documents=documents locations=locations recentItems=recent items diff --git a/core/org.argeo.suite.ui/OSGI-INF/leadPane.xml b/core/org.argeo.suite.ui/OSGI-INF/leadPane.xml index 0775c57..1aeec0a 100644 --- a/core/org.argeo.suite.ui/OSGI-INF/leadPane.xml +++ b/core/org.argeo.suite.ui/OSGI-INF/leadPane.xml @@ -7,6 +7,8 @@ argeo.suite.ui.dashboardLayer argeo.documents.ui.documentsLayer +argeo.people.ui.peopleLayer +argeo.geo.ui.mapLayer diff --git a/core/org.argeo.suite.ui/pom.xml b/core/org.argeo.suite.ui/pom.xml index c1bf9b4..2436864 100644 --- a/core/org.argeo.suite.ui/pom.xml +++ b/core/org.argeo.suite.ui/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.suite.ui @@ -14,12 +14,12 @@ org.argeo.suite org.argeo.suite.core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.entity.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultLeadPane.java b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultLeadPane.java index b2ebcb2..46de177 100644 --- a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultLeadPane.java +++ b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/DefaultLeadPane.java @@ -59,15 +59,20 @@ public class DefaultLeadPane implements CmsUiProvider { appLayersC.setLayout(layout); appLayersC.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false)); - Composite adminLayersC = new Composite(parent, SWT.NONE); - CmsUiUtils.style(adminLayersC, SuiteStyle.leadPane); - GridLayout adminLayout = new GridLayout(); - adminLayout.verticalSpacing = 10; - adminLayout.marginBottom = 10; - adminLayout.marginLeft = 10; - adminLayout.marginRight = 10; - adminLayersC.setLayout(adminLayout); - adminLayersC.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, true)); + Composite adminLayersC; + if (!adminLayers.isEmpty()) { + adminLayersC = new Composite(parent, SWT.NONE); + CmsUiUtils.style(adminLayersC, SuiteStyle.leadPane); + GridLayout adminLayout = new GridLayout(); + adminLayout.verticalSpacing = 10; + adminLayout.marginBottom = 10; + adminLayout.marginLeft = 10; + adminLayout.marginRight = 10; + adminLayersC.setLayout(adminLayout); + adminLayersC.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, true)); + } else { + adminLayersC = null; + } // boolean isAdmin = cmsView.doAs(() -> CurrentUser.isInRole(NodeConstants.ROLE_USER_ADMIN)); Set userRoles = cmsView.doAs(() -> CurrentUser.roles()); diff --git a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java index 816c658..ca2d9c3 100644 --- a/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java +++ b/core/org.argeo.suite.ui/src/org/argeo/suite/ui/SuiteUi.java @@ -32,7 +32,7 @@ class SuiteUi extends Composite { private Composite dynamicArea; private Session sysSession; -// private Session homeSession; + private Session homeSession; private Node userDir; private Map layers = new HashMap<>(); @@ -205,11 +205,11 @@ class SuiteUi extends Composite { // synchronized void initSessions(Repository repository, String userDirPath) throws RepositoryException { this.sysSession = repository.login(); -// this.homeSession = repository.login(NodeConstants.HOME_WORKSPACE); + this.homeSession = repository.login(NodeConstants.HOME_WORKSPACE); userDir = sysSession.getNode(userDirPath); addDisposeListener((e) -> { Jcr.logout(sysSession); -// Jcr.logout(homeSession); + Jcr.logout(homeSession); }); } @@ -226,8 +226,8 @@ class SuiteUi extends Composite { return sysSession; if (NodeConstants.SYS_WORKSPACE.equals(workspaceName)) return sysSession; -// else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName)) -// return homeSession; + else if (NodeConstants.HOME_WORKSPACE.equals(workspaceName)) + return homeSession; else throw new IllegalArgumentException("Unknown workspace " + workspaceName); } diff --git a/core/pom.xml b/core/pom.xml index 89a7048..a8ef5a0 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. core diff --git a/dep/org.argeo.suite.dep.e4.rap/pom.xml b/dep/org.argeo.suite.dep.e4.rap/pom.xml index 16f134a..30ff3b6 100644 --- a/dep/org.argeo.suite.dep.e4.rap/pom.xml +++ b/dep/org.argeo.suite.dep.e4.rap/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite dep - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.suite.dep.e4.rap @@ -15,7 +15,7 @@ org.argeo.suite org.argeo.suite.dep.ui.rap - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT pom diff --git a/dep/org.argeo.suite.dep.ui.rap/pom.xml b/dep/org.argeo.suite.dep.ui.rap/pom.xml index da08a36..a70a582 100644 --- a/dep/org.argeo.suite.dep.ui.rap/pom.xml +++ b/dep/org.argeo.suite.dep.ui.rap/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite dep - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.suite.dep.ui.rap @@ -15,17 +15,17 @@ org.argeo.suite org.argeo.entity.api - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.entity.core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.entity.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT @@ -39,67 +39,67 @@ org.argeo.suite org.argeo.suite.core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.suite.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.suite.theme.default - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.suite.ui.rap - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.people.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.documents.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.geo.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.publishing.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.support.xforms - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.support.odk - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.support.geonames - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/dep/pom.xml b/dep/pom.xml index 8db55f6..60dc034 100644 --- a/dep/pom.xml +++ b/dep/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. dep diff --git a/dist/argeo-office/pom.xml b/dist/argeo-office/pom.xml index 0d3aba3..dc4c578 100644 --- a/dist/argeo-office/pom.xml +++ b/dist/argeo-office/pom.xml @@ -3,7 +3,7 @@ org.argeo.suite dist - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. argeo-office @@ -28,7 +28,7 @@ org.argeo.suite org.argeo.suite.dep.e4.rap - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.commons diff --git a/dist/argeo-suite-demo/pom.xml b/dist/argeo-suite-demo/pom.xml index 53caf85..c31fc7d 100644 --- a/dist/argeo-suite-demo/pom.xml +++ b/dist/argeo-suite-demo/pom.xml @@ -3,7 +3,7 @@ org.argeo.suite dist - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. argeo-suite-demo diff --git a/dist/pom.xml b/dist/pom.xml index 83c971b..38c2521 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. dist diff --git a/environment/org.argeo.geo.ui/.project b/environment/org.argeo.geo.ui/.project index 7956c34..a25e06f 100644 --- a/environment/org.argeo.geo.ui/.project +++ b/environment/org.argeo.geo.ui/.project @@ -20,6 +20,11 @@ + + org.eclipse.pde.ds.core.builder + + + org.eclipse.pde.PluginNature diff --git a/environment/org.argeo.geo.ui/OSGI-INF/l10n/bundle.properties b/environment/org.argeo.geo.ui/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000..3ded5eb --- /dev/null +++ b/environment/org.argeo.geo.ui/OSGI-INF/l10n/bundle.properties @@ -0,0 +1 @@ +map=map diff --git a/environment/org.argeo.geo.ui/OSGI-INF/mapLayer.xml b/environment/org.argeo.geo.ui/OSGI-INF/mapLayer.xml new file mode 100644 index 0000000..7cf8487 --- /dev/null +++ b/environment/org.argeo.geo.ui/OSGI-INF/mapLayer.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/environment/org.argeo.geo.ui/OSGI-INF/overviewMap.xml b/environment/org.argeo.geo.ui/OSGI-INF/overviewMap.xml new file mode 100644 index 0000000..c75200a --- /dev/null +++ b/environment/org.argeo.geo.ui/OSGI-INF/overviewMap.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/environment/org.argeo.geo.ui/bnd.bnd b/environment/org.argeo.geo.ui/bnd.bnd index 9a3ff7b..a50ed43 100644 --- a/environment/org.argeo.geo.ui/bnd.bnd +++ b/environment/org.argeo.geo.ui/bnd.bnd @@ -8,3 +8,7 @@ org.eclipse.swt,\ org.eclipse.jface.viewers,\ org.osgi.framework,\ * + +Service-Component:\ +OSGI-INF/mapLayer.xml,\ +OSGI-INF/overviewMap.xml diff --git a/environment/org.argeo.geo.ui/config/mapLayer.properties b/environment/org.argeo.geo.ui/config/mapLayer.properties new file mode 100644 index 0000000..37bf3c7 --- /dev/null +++ b/environment/org.argeo.geo.ui/config/mapLayer.properties @@ -0,0 +1,6 @@ +service.pid=argeo.geo.ui.mapLayer + +title=%map +icon=map + +entity.type=entity:geopoint diff --git a/environment/org.argeo.geo.ui/config/overviewMap.properties b/environment/org.argeo.geo.ui/config/overviewMap.properties new file mode 100644 index 0000000..d842c98 --- /dev/null +++ b/environment/org.argeo.geo.ui/config/overviewMap.properties @@ -0,0 +1 @@ +service.pid=argeo.geo.ui.overviewMap diff --git a/environment/org.argeo.geo.ui/pom.xml b/environment/org.argeo.geo.ui/pom.xml index 01c8d3d..a5a4711 100644 --- a/environment/org.argeo.geo.ui/pom.xml +++ b/environment/org.argeo.geo.ui/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite environment - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.geo.ui @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.suite.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/environment/org.argeo.geo.ui/src/org/argeo/support/openlayers/OverviewMap.java b/environment/org.argeo.geo.ui/src/org/argeo/support/openlayers/OverviewMap.java new file mode 100644 index 0000000..8ecdc1c --- /dev/null +++ b/environment/org.argeo.geo.ui/src/org/argeo/support/openlayers/OverviewMap.java @@ -0,0 +1,66 @@ +package org.argeo.support.openlayers; + +import java.util.List; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; +import javax.jcr.observation.Event; +import javax.jcr.observation.EventIterator; +import javax.jcr.observation.EventListener; +import javax.jcr.query.Query; + +import org.argeo.cms.ui.CmsUiProvider; +import org.argeo.cms.ui.util.CmsUiUtils; +import org.argeo.entity.EntityType; +import org.argeo.jcr.JcrException; +import org.argeo.jcr.JcrUtils; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; + +/** Displays an overview map. */ +public class OverviewMap implements CmsUiProvider { + + @Override + public Control createUi(Composite parent, Node context) throws RepositoryException { + parent.setLayout(new GridLayout()); + refreshUi(parent, context); + + try { + String[] nodeTypes = { EntityType.geopoint.get() }; + context.getSession().getWorkspace().getObservationManager().addEventListener(new EventListener() { + + @Override + public void onEvent(EventIterator events) { + if (!parent.isDisposed()) + parent.getDisplay().asyncExec(() -> { + try { + refreshUi(parent, context); + } catch (RepositoryException e) { + throw new JcrException(e); + } + }); + } + }, Event.PROPERTY_CHANGED | Event.NODE_ADDED | Event.NODE_REMOVED | Event.PROPERTY_ADDED, "/", true, null, + nodeTypes, false); + } catch (RepositoryException e) { + throw new IllegalStateException("Cannot add JCR observer", e); + } + + return parent; + } + + protected void refreshUi(Composite parent, Node context) throws RepositoryException { + CmsUiUtils.clear(parent); + Query query = context.getSession().getWorkspace().getQueryManager() + .createQuery("SELECT * FROM [" + EntityType.geopoint.get() + "]", Query.JCR_SQL2); + List geoPoints = JcrUtils.nodeIteratorToList(query.execute().getNodes()); + OpenLayersMap apafMap = new OpenLayersMap(parent, SWT.NONE, getClass().getResource("map-osm.html")); + apafMap.setLayoutData(CmsUiUtils.fillAll()); + + // apafMap.setZoom(7); + // apafMap.setCenter(-2.472, 8.010); + apafMap.addPoints(geoPoints); + } +} diff --git a/environment/org.argeo.geo.ui/src/org/argeo/support/openlayers/map-osm.html b/environment/org.argeo.geo.ui/src/org/argeo/support/openlayers/map-osm.html new file mode 100644 index 0000000..157d708 --- /dev/null +++ b/environment/org.argeo.geo.ui/src/org/argeo/support/openlayers/map-osm.html @@ -0,0 +1,41 @@ + + + + + + + +
+ + + \ No newline at end of file diff --git a/environment/pom.xml b/environment/pom.xml index 1fc61bd..7e13702 100644 --- a/environment/pom.xml +++ b/environment/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. environment diff --git a/knowledge/org.argeo.support.geonames/pom.xml b/knowledge/org.argeo.support.geonames/pom.xml index 6f725fa..7587ef3 100644 --- a/knowledge/org.argeo.support.geonames/pom.xml +++ b/knowledge/org.argeo.support.geonames/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite knowledge - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.support.geonames diff --git a/knowledge/org.argeo.support.odk/pom.xml b/knowledge/org.argeo.support.odk/pom.xml index 76f855c..2b68347 100644 --- a/knowledge/org.argeo.support.odk/pom.xml +++ b/knowledge/org.argeo.support.odk/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite knowledge - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.support.odk @@ -14,12 +14,12 @@ org.argeo.suite org.argeo.suite.core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT org.argeo.suite org.argeo.support.xforms - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/knowledge/org.argeo.support.xforms/pom.xml b/knowledge/org.argeo.support.xforms/pom.xml index f02a502..d97f8c7 100644 --- a/knowledge/org.argeo.support.xforms/pom.xml +++ b/knowledge/org.argeo.support.xforms/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite knowledge - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.support.xforms @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.suite.core - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/knowledge/pom.xml b/knowledge/pom.xml index e5079d9..6a0890e 100644 --- a/knowledge/pom.xml +++ b/knowledge/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. knowledge diff --git a/lib/pom.xml b/lib/pom.xml index 4f5cbca..81d3d89 100644 --- a/lib/pom.xml +++ b/lib/pom.xml @@ -10,7 +10,7 @@ pom Parent POM for Argeo Suite Extensions - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT 2.1.27 @@ -18,7 +18,7 @@ [2.1.102,2.3.0-SNAPSHOT) [2.1.1,2.3.0-SNAPSHOT) - /srv/rpmfactory/testing/argeo + /srv/rpmfactory/unstable/argeo @@ -30,7 +30,7 @@ org.argeo.suite org.argeo.suite.dep.ui.rap - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT provided @@ -92,6 +92,18 @@ false + + argeo-unstable + http://forge.argeo.org/data/java/argeo-2.3/ + + true + never + warn + + + false + + @@ -160,8 +172,4 @@ - - - v2.x - diff --git a/library/org.argeo.documents.ui/OSGI-INF/l10n/bundle.properties b/library/org.argeo.documents.ui/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000..8015421 --- /dev/null +++ b/library/org.argeo.documents.ui/OSGI-INF/l10n/bundle.properties @@ -0,0 +1 @@ +content=content diff --git a/library/org.argeo.documents.ui/config/documentsLayer.properties b/library/org.argeo.documents.ui/config/documentsLayer.properties index 1c62222..78382a6 100644 --- a/library/org.argeo.documents.ui/config/documentsLayer.properties +++ b/library/org.argeo.documents.ui/config/documentsLayer.properties @@ -1,4 +1,6 @@ service.pid=argeo.documents.ui.documentsLayer -title=Documents -icon=documents \ No newline at end of file +title=%content +icon=documents + +entity.type=nt:folder diff --git a/library/org.argeo.documents.ui/pom.xml b/library/org.argeo.documents.ui/pom.xml index a5da9fb..2c59ff3 100644 --- a/library/org.argeo.documents.ui/pom.xml +++ b/library/org.argeo.documents.ui/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite library - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.documents.ui @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.suite.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/library/org.argeo.documents.ui/src/org/argeo/documents/ui/DocumentsFolderUiProvider.java b/library/org.argeo.documents.ui/src/org/argeo/documents/ui/DocumentsFolderUiProvider.java index 2210b9f..e525a9e 100644 --- a/library/org.argeo.documents.ui/src/org/argeo/documents/ui/DocumentsFolderUiProvider.java +++ b/library/org.argeo.documents.ui/src/org/argeo/documents/ui/DocumentsFolderUiProvider.java @@ -1,5 +1,6 @@ package org.argeo.documents.ui; +import java.nio.file.Path; import java.nio.file.spi.FileSystemProvider; import javax.jcr.Node; @@ -9,6 +10,8 @@ import org.argeo.cms.fs.CmsFsUtils; import org.argeo.cms.ui.CmsUiProvider; import org.argeo.cms.ui.CmsView; import org.argeo.cms.ui.util.CmsUiUtils; +import org.argeo.jcr.Jcr; +import org.argeo.suite.ui.SuiteEvent; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -20,7 +23,15 @@ public class DocumentsFolderUiProvider implements CmsUiProvider { @Override public Control createUi(Composite parent, Node context) throws RepositoryException { CmsView cmsView = CmsView.getCmsView(parent); - DocumentsFolderComposite dfc = new DocumentsFolderComposite(parent, SWT.NONE, context); + DocumentsFolderComposite dfc = new DocumentsFolderComposite(parent, SWT.NONE, context) { + + @Override + protected void externalNavigateTo(Path path) { + Node folderNode = cmsView.doAs(() -> CmsFsUtils.getNode(Jcr.getSession(context).getRepository(), path)); + parent.addDisposeListener((e1) -> Jcr.logout(folderNode)); + cmsView.sendEvent(SuiteEvent.openNewPart.topic(), SuiteEvent.eventProperties(folderNode)); + } + }; dfc.setLayoutData(CmsUiUtils.fillAll()); dfc.populate(cmsView.doAs(() -> CmsFsUtils.getPath(nodeFileSystemProvider, context))); return dfc; diff --git a/library/pom.xml b/library/pom.xml index 4d2e6a7..ea3ef63 100644 --- a/library/pom.xml +++ b/library/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. library diff --git a/people/org.argeo.people.ui/.project b/people/org.argeo.people.ui/.project index 1df2bce..b3d17df 100644 --- a/people/org.argeo.people.ui/.project +++ b/people/org.argeo.people.ui/.project @@ -20,6 +20,11 @@ + + org.eclipse.pde.ds.core.builder + + + org.eclipse.pde.PluginNature diff --git a/people/org.argeo.people.ui/OSGI-INF/l10n/bundle.properties b/people/org.argeo.people.ui/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000..e619de4 --- /dev/null +++ b/people/org.argeo.people.ui/OSGI-INF/l10n/bundle.properties @@ -0,0 +1 @@ +people=people diff --git a/people/org.argeo.people.ui/OSGI-INF/peopleEntryArea.xml b/people/org.argeo.people.ui/OSGI-INF/peopleEntryArea.xml new file mode 100644 index 0000000..9601294 --- /dev/null +++ b/people/org.argeo.people.ui/OSGI-INF/peopleEntryArea.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/people/org.argeo.people.ui/OSGI-INF/peopleLayer.xml b/people/org.argeo.people.ui/OSGI-INF/peopleLayer.xml new file mode 100644 index 0000000..09392aa --- /dev/null +++ b/people/org.argeo.people.ui/OSGI-INF/peopleLayer.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/people/org.argeo.people.ui/OSGI-INF/personUiProvider.xml b/people/org.argeo.people.ui/OSGI-INF/personUiProvider.xml new file mode 100644 index 0000000..f727bf8 --- /dev/null +++ b/people/org.argeo.people.ui/OSGI-INF/personUiProvider.xml @@ -0,0 +1,16 @@ + + + + + + + + +cn=APAF Internationale,ou=Groups,dc=apaf,dc=on,dc=djapps,dc=org +cn=APAF Côte d'Ivoire Admin,ou=Groups,dc=apaf,dc=on,dc=djapps,dc=org +cn=APAF Côte d'Ivoire,ou=Groups,dc=apaf,dc=on,dc=djapps,dc=org +cn=APAF Togo Admin,ou=Groups,dc=apaf,dc=on,dc=djapps,dc=org +cn=APAF Togo,ou=Groups,dc=apaf,dc=on,dc=djapps,dc=org + + + diff --git a/people/org.argeo.people.ui/bnd.bnd b/people/org.argeo.people.ui/bnd.bnd index 50f4364..1b92ebb 100644 --- a/people/org.argeo.people.ui/bnd.bnd +++ b/people/org.argeo.people.ui/bnd.bnd @@ -8,3 +8,9 @@ org.eclipse.jface.viewers,\ org.eclipse.jface.window,\ org.osgi.framework,\ * + +Service-Component:\ +OSGI-INF/peopleLayer.xml,\ +OSGI-INF/personUiProvider.xml,\ +OSGI-INF/peopleEntryArea.xml + diff --git a/people/org.argeo.people.ui/config/peopleEntryArea.properties b/people/org.argeo.people.ui/config/peopleEntryArea.properties new file mode 100644 index 0000000..37b28f9 --- /dev/null +++ b/people/org.argeo.people.ui/config/peopleEntryArea.properties @@ -0,0 +1 @@ +service.pid=argeo.people.ui.peopleEntryArea diff --git a/people/org.argeo.people.ui/config/peopleLayer.properties b/people/org.argeo.people.ui/config/peopleLayer.properties new file mode 100644 index 0000000..adadb7b --- /dev/null +++ b/people/org.argeo.people.ui/config/peopleLayer.properties @@ -0,0 +1,7 @@ +service.pid=argeo.people.ui.peopleLayer + +icon=people +weights=5000,5000 +title=%people + +entity.type=entity:person \ No newline at end of file diff --git a/people/org.argeo.people.ui/config/personUiProvider.properties b/people/org.argeo.people.ui/config/personUiProvider.properties new file mode 100644 index 0000000..8c40c7d --- /dev/null +++ b/people/org.argeo.people.ui/config/personUiProvider.properties @@ -0,0 +1,3 @@ +service.pid=argeo.people.ui.personUiProvider + +entity.type=entity:person \ No newline at end of file diff --git a/people/org.argeo.people.ui/pom.xml b/people/org.argeo.people.ui/pom.xml index b96cf4c..07589a4 100644 --- a/people/org.argeo.people.ui/pom.xml +++ b/people/org.argeo.people.ui/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite people - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.people.ui @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.suite.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/people/org.argeo.people.ui/src/org/argeo/people/ui/PeopleEntryArea.java b/people/org.argeo.people.ui/src/org/argeo/people/ui/PeopleEntryArea.java new file mode 100644 index 0000000..2fd38da --- /dev/null +++ b/people/org.argeo.people.ui/src/org/argeo/people/ui/PeopleEntryArea.java @@ -0,0 +1,184 @@ +package org.argeo.people.ui; + +import java.util.Set; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; + +import org.argeo.cms.CmsUserManager; +import org.argeo.cms.ui.CmsTheme; +import org.argeo.cms.ui.CmsUiProvider; +import org.argeo.cms.ui.CmsView; +import org.argeo.cms.ui.dialogs.CmsWizardDialog; +import org.argeo.cms.ui.util.CmsUiUtils; +import org.argeo.eclipse.ui.Selected; +import org.argeo.naming.LdapAttrs; +import org.argeo.suite.SuiteRole; +import org.argeo.suite.ui.SuiteEvent; +import org.argeo.suite.ui.SuiteIcon; +import org.argeo.suite.ui.dialogs.NewUserWizard; +import org.eclipse.jface.viewers.ColumnLabelProvider; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TableViewerColumn; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.window.Window; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.ToolBar; +import org.eclipse.swt.widgets.ToolItem; +import org.osgi.service.useradmin.User; + +/** Entry to the admin area. */ +public class PeopleEntryArea implements CmsUiProvider { + + private CmsUserManager cmsUserManager; + + @Override + public Control createUi(Composite parent, Node context) throws RepositoryException { + CmsTheme theme = CmsTheme.getCmsTheme(parent); + parent.setLayout(new GridLayout()); + TableViewer usersViewer = new TableViewer(parent); + usersViewer.setContentProvider(new UsersContentProvider()); + + TableViewerColumn idCol = new TableViewerColumn(usersViewer, SWT.NONE); + idCol.getColumn().setWidth(70); + idCol.setLabelProvider(new ColumnLabelProvider() { + + @Override + public String getText(Object element) { + + return getUserProperty(element, LdapAttrs.uid.name()); + } + }); + + TableViewerColumn givenNameCol = new TableViewerColumn(usersViewer, SWT.NONE); + givenNameCol.getColumn().setWidth(150); + givenNameCol.setLabelProvider(new ColumnLabelProvider() { + + @Override + public String getText(Object element) { + + return getUserProperty(element, LdapAttrs.givenName.name()); + } + }); + + TableViewerColumn snCol = new TableViewerColumn(usersViewer, SWT.NONE); + snCol.getColumn().setWidth(150); + snCol.setLabelProvider(new ColumnLabelProvider() { + + @Override + public String getText(Object element) { + + return getUserProperty(element, LdapAttrs.sn.name()); + } + }); + + TableViewerColumn mailCol = new TableViewerColumn(usersViewer, SWT.NONE); + mailCol.getColumn().setWidth(400); + mailCol.setLabelProvider(new ColumnLabelProvider() { + + @Override + public String getText(Object element) { + + return getUserProperty(element, LdapAttrs.mail.name()); + } + }); + + Composite bottom = new Composite(parent, SWT.NONE); + bottom.setLayoutData(CmsUiUtils.fillWidth()); + bottom.setLayout(CmsUiUtils.noSpaceGridLayout()); + ToolBar bottomToolBar = new ToolBar(bottom, SWT.NONE); + bottomToolBar.setLayoutData(new GridData(SWT.END, SWT.FILL, true, false)); + ToolItem deleteItem = new ToolItem(bottomToolBar, SWT.FLAT); + deleteItem.setEnabled(false); +// CmsUiUtils.style(deleteItem, SuiteStyle.recentItems); + deleteItem.setImage(SuiteIcon.delete.getSmallIcon(theme)); + ToolItem addItem = new ToolItem(bottomToolBar, SWT.FLAT); + addItem.setImage(SuiteIcon.add.getSmallIcon(theme)); + usersViewer.addDoubleClickListener(new IDoubleClickListener() { + + @Override + public void doubleClick(DoubleClickEvent event) { + User user = (User) usersViewer.getStructuredSelection().getFirstElement(); + if (user != null) { +// Node userNode = getOrCreateUserNode(user, context); + CmsView.getCmsView(parent).sendEvent(SuiteEvent.openNewPart.topic(), + SuiteEvent.eventProperties(user)); + } + + } + }); + usersViewer.addSelectionChangedListener(new ISelectionChangedListener() { + public void selectionChanged(SelectionChangedEvent event) { + User user = (User) usersViewer.getStructuredSelection().getFirstElement(); + if (user != null) { +// Node userNode = getOrCreateUserNode(user, context); + CmsView.getCmsView(parent).sendEvent(SuiteEvent.refreshPart.topic(), + SuiteEvent.eventProperties(user)); + deleteItem.setEnabled(true); + } else { + deleteItem.setEnabled(false); + } + } + }); + + addItem.addSelectionListener((Selected) (e) -> { + // SuiteUtils.getOrCreateUserNode(adminSession, userDn); + Wizard wizard = new NewUserWizard(null); + CmsWizardDialog dialog = new CmsWizardDialog(parent.getShell(), wizard); + // WizardDialog dialog = new WizardDialog(shell, wizard); + if (dialog.open() == Window.OK) { + // TODO create + } + }); + + usersViewer.getTable().setLayoutData(CmsUiUtils.fillAll()); + usersViewer.setInput(cmsUserManager); + + return usersViewer.getTable(); + } + +// private Node getOrCreateUserNode(User user, Node context) { +// return JcrUtils.mkdirs(Jcr.getSession(context), +// "/" + EntityType.user.name() + "/" + getUserProperty(user, LdapAttrs.uid.name()), +// EntityType.user.get()); +// } + + private String getUserProperty(Object element, String key) { + Object value = ((User) element).getProperties().get(key); + return value != null ? value.toString() : null; + } + + class UsersContentProvider implements IStructuredContentProvider { + + @Override + public Object[] getElements(Object inputElement) { + CmsUserManager cum = (CmsUserManager) inputElement; + Set users = cum.listUsersInGroup(SuiteRole.coworker.dn(), null); + return users.toArray(); + } + + @Override + public void dispose() { + } + + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + } + + } + + public void setCmsUserManager(CmsUserManager cmsUserManager) { + this.cmsUserManager = cmsUserManager; + } + +} diff --git a/people/org.argeo.people.ui/src/org/argeo/people/ui/PersonUiProvider.java b/people/org.argeo.people.ui/src/org/argeo/people/ui/PersonUiProvider.java new file mode 100644 index 0000000..d2ea2fe --- /dev/null +++ b/people/org.argeo.people.ui/src/org/argeo/people/ui/PersonUiProvider.java @@ -0,0 +1,88 @@ +package org.argeo.people.ui; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import javax.jcr.Node; +import javax.jcr.RepositoryException; + +import org.argeo.cms.CmsUserManager; +import org.argeo.cms.ui.CmsUiProvider; +import org.argeo.cms.ui.util.CmsUiUtils; +import org.argeo.cms.ui.viewers.Section; +import org.argeo.naming.LdapAttrs; +import org.argeo.suite.ui.SuiteMsg; +import org.argeo.suite.ui.SuiteUiUtils; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Text; +import org.osgi.service.useradmin.User; + +/** Edit a suite user. */ +public class PersonUiProvider implements CmsUiProvider { + private String[] availableRoles; + private CmsUserManager cmsUserManager; + + @Override + public Control createUi(Composite parent, Node context) throws RepositoryException { + Section main = new Section(parent, SWT.NONE, context); + main.setLayoutData(CmsUiUtils.fillAll()); + + String uid = context.getName(); + User user = cmsUserManager.getUserFromLocalId(uid); + +// Text givenName = new Text(main, SWT.SINGLE); +// givenName.setText(getUserProperty(user, LdapAttrs.givenName.name())); + Text givenName = SuiteUiUtils.addFormInput(main, SuiteMsg.firstName.lead(), + getUserProperty(user, LdapAttrs.givenName.name())); + + Text sn = SuiteUiUtils.addFormInput(main, SuiteMsg.lastName.lead(), getUserProperty(user, LdapAttrs.sn.name())); + // sn.setText(getUserProperty(user, LdapAttrs.sn.name())); + + Text email = SuiteUiUtils.addFormInput(main, SuiteMsg.email.lead(), + getUserProperty(user, LdapAttrs.mail.name())); + // email.setText(getUserProperty(user, LdapAttrs.mail.name())); + + Text uidT = SuiteUiUtils.addFormLine(main, "uid", getUserProperty(user, LdapAttrs.uid.name())); + uidT.setText(uid); + +// Label dnL = new Label(main, SWT.NONE); +// dnL.setText(user.getName()); + + // roles + // Section rolesSection = new Section(main, SWT.NONE, context); + Group rolesSection = new Group(main, SWT.NONE); + rolesSection.setText("Roles"); + rolesSection.setLayoutData(CmsUiUtils.fillWidth()); + rolesSection.setLayout(new GridLayout()); + // new Label(rolesSection, SWT.NONE).setText("Roles:"); + List roles = Arrays.asList(cmsUserManager.getUserRoles(user.getName())); + for (String role : availableRoles) { + // new Label(rolesSection, SWT.NONE).setText(role); + Button radio = new Button(rolesSection, SWT.CHECK); + radio.setText(role); + if (roles.contains(role)) + radio.setSelection(true); + } + + return main; + } + + public void setCmsUserManager(CmsUserManager cmsUserManager) { + this.cmsUserManager = cmsUserManager; + } + + private String getUserProperty(Object element, String key) { + Object value = ((User) element).getProperties().get(key); + return value != null ? value.toString() : null; + } + + public void init(Map properties) { + availableRoles = (String[]) properties.get("availableRoles"); + } +} diff --git a/people/pom.xml b/people/pom.xml index c422ff7..193f633 100644 --- a/people/pom.xml +++ b/people/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. people diff --git a/pom.xml b/pom.xml index 4355c45..bee12d0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,6 @@ - + 4.0.0 org.argeo.maven @@ -7,7 +9,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT Argeo Suite pom http://www.argeo.org/ @@ -18,7 +20,7 @@ [2.1.102,2.3.0-SNAPSHOT) [2.1.1,2.3.0-SNAPSHOT) - /srv/rpmfactory/testing/argeo-osgi-2/argeo + /srv/rpmfactory/unstable/argeo-osgi-2/argeo
@@ -39,7 +41,7 @@ scm:git:http://git.argeo.org/gpl/argeo-suite.git http://git.argeo.org/?p=gpl/argeo-suite.git;a=summary scm:git:https://code.argeo.org/git/gpl/argeo-suite.git - v2.x + HEAD Argeo GmbH @@ -106,6 +108,18 @@ false + + argeo-unstable + http://forge.argeo.org/data/java/argeo-2.3/ + + true + never + warn + + + false + + @@ -177,7 +191,7 @@ staging - dav:https://forge.argeo.org/data/java/argeo-2.1 + dav:https://forge.argeo.org/data/java/argeo-2.3 false diff --git a/publishing/org.argeo.publishing.ui/pom.xml b/publishing/org.argeo.publishing.ui/pom.xml index 96a759e..b70057c 100644 --- a/publishing/org.argeo.publishing.ui/pom.xml +++ b/publishing/org.argeo.publishing.ui/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite publishing - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. org.argeo.publishing.ui @@ -14,7 +14,7 @@ org.argeo.suite org.argeo.suite.ui - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT diff --git a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/DbkUtils.java b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/DbkUtils.java index 226df4b..6bcecb7 100644 --- a/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/DbkUtils.java +++ b/publishing/org.argeo.publishing.ui/src/org/argeo/docbook/DbkUtils.java @@ -3,10 +3,12 @@ package org.argeo.docbook; import static org.argeo.docbook.DbkType.para; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; +import javax.jcr.ImportUUIDBehavior; import javax.jcr.Node; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; @@ -151,6 +153,16 @@ public class DbkUtils { } } + public static void importXml(Node baseNode, InputStream in) throws IOException { + try { + baseNode.getSession().importXML(baseNode.getPath(), in, + ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING); + } catch (RepositoryException e) { + throw new JcrException("Cannot import XML to " + baseNode, e); + } + + } + /** Singleton. */ private DbkUtils() { } diff --git a/publishing/pom.xml b/publishing/pom.xml index 2736015..5dfdd44 100644 --- a/publishing/pom.xml +++ b/publishing/pom.xml @@ -4,7 +4,7 @@ org.argeo.suite argeo-suite - 2.1.23-SNAPSHOT + 2.3.1-SNAPSHOT .. publishing diff --git a/sdk/argeo-suite-rap.properties b/sdk/argeo-suite-rap.properties index b9981f9..60f0b9b 100644 --- a/sdk/argeo-suite-rap.properties +++ b/sdk/argeo-suite-rap.properties @@ -17,7 +17,10 @@ org.argeo.suite.theme.default,\ org.argeo.suite.ui.rap argeo.osgi.start.6.suite=\ -org.argeo.documents.ui +org.argeo.documents.ui,\ +org.argeo.people.ui,\ +org.argeo.geo.ui + # Local argeo.node.repo.type=h2