Removing the Camel extension (#371)
diff --git a/archetype/src/main/resources/archetype-resources/console/pom.xml b/archetype/src/main/resources/archetype-resources/console/pom.xml
index 85f1c8c..db5f4f5 100644
--- a/archetype/src/main/resources/archetype-resources/console/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/console/pom.xml
@@ -88,12 +88,6 @@
</dependency>
<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-client-console</artifactId>
- <version>${syncope.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
<artifactId>syncope-ext-saml2sp4ui-client-console</artifactId>
<version>${syncope.version}</version>
diff --git a/archetype/src/main/resources/archetype-resources/core/pom.xml b/archetype/src/main/resources/archetype-resources/core/pom.xml
index 12c5d22..c4e82b5 100644
--- a/archetype/src/main/resources/archetype-resources/core/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/core/pom.xml
@@ -120,22 +120,6 @@
</dependency>
<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-cxf</artifactId>
- <version>${syncope.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <version>${syncope.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-provisioning</artifactId>
- <version>${syncope.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
<artifactId>syncope-ext-saml2sp4ui-rest-cxf</artifactId>
<version>${syncope.version}</version>
diff --git a/client/idrepo/console/pom.xml b/client/idrepo/console/pom.xml
index b38f2c2..5f7b353 100644
--- a/client/idrepo/console/pom.xml
+++ b/client/idrepo/console/pom.xml
@@ -329,12 +329,6 @@
</dependency>
<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-client-console</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
<artifactId>syncope-ext-saml2sp4ui-client-console</artifactId>
<version>${project.version}</version>
diff --git a/docker/console/pom.xml b/docker/console/pom.xml
index a8786d7..dc374ee 100644
--- a/docker/console/pom.xml
+++ b/docker/console/pom.xml
@@ -72,12 +72,6 @@
</dependency>
<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-client-console</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
<artifactId>syncope-ext-saml2sp4ui-client-console</artifactId>
<version>${project.version}</version>
diff --git a/docker/core/pom.xml b/docker/core/pom.xml
index b6ed6ec..de821b5 100644
--- a/docker/core/pom.xml
+++ b/docker/core/pom.xml
@@ -82,23 +82,7 @@
<artifactId>syncope-ext-flowable-rest-cxf</artifactId>
<version>${project.version}</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-cxf</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-provisioning</artifactId>
- <version>${project.version}</version>
- </dependency>
-
+
<dependency>
<groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
<artifactId>syncope-ext-saml2sp4ui-rest-cxf</artifactId>
diff --git a/docker/core/src/main/resources/log4j2.xml b/docker/core/src/main/resources/log4j2.xml
index 496772d..770fc91 100644
--- a/docker/core/src/main/resources/log4j2.xml
+++ b/docker/core/src/main/resources/log4j2.xml
@@ -89,9 +89,6 @@
<asyncLogger name="org.apache.fop" additivity="false" level="ERROR">
<appender-ref ref="console"/>
</asyncLogger>
- <asyncLogger name="org.apache.camel" additivity="false" level="ERROR">
- <appender-ref ref="console"/>
- </asyncLogger>
<asyncLogger name="org.apache.wss4j" additivity="false" level="ERROR">
<appender-ref ref="console"/>
</asyncLogger>
diff --git a/ext/camel/client-console/pom.xml b/ext/camel/client-console/pom.xml
deleted file mode 100644
index 45bc6a9..0000000
--- a/ext/camel/client-console/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel Client Console</name>
- <description>Apache Syncope Ext: Camel Client Console</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-client-console</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-common-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.client.idm</groupId>
- <artifactId>syncope-client-idm-console</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
-
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </build>
-</project>
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRoutes.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRoutes.java
deleted file mode 100644
index d46ac02..0000000
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/pages/CamelRoutes.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.pages;
-
-import de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.syncope.client.console.BookmarkablePageLinkBuilder;
-import org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel;
-import org.apache.syncope.client.console.rest.CamelRoutesRestClient;
-import org.apache.syncope.client.ui.commons.annotations.ExtPage;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.CamelEntitlement;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
-import org.apache.wicket.extensions.markup.html.tabs.ITab;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-
-@ExtPage(label = "Camel Routes", icon = "fa fa-road", listEntitlement = CamelEntitlement.ROUTE_LIST, priority = 100)
-public class CamelRoutes extends BaseExtPage {
-
- private static final long serialVersionUID = 1965360932245590233L;
-
- public static final String PREF_CAMEL_ROUTES_PAGINATOR_ROWS = "camel.routes.paginator.rows";
-
- public CamelRoutes(final PageParameters parameters) {
- super(parameters);
-
- body.add(BookmarkablePageLinkBuilder.build("dashboard", "dashboardBr", Dashboard.class));
-
- WebMarkupContainer content = new WebMarkupContainer("content");
- content.setOutputMarkupId(true);
- AjaxBootstrapTabbedPanel<ITab> tabbedPanel = new AjaxBootstrapTabbedPanel<>("tabbedPanel", buildTabList());
- content.add(tabbedPanel);
-
- MetaDataRoleAuthorizationStrategy.authorize(content, ENABLE, CamelEntitlement.ROUTE_LIST);
- body.add(content);
- }
-
- private List<ITab> buildTabList() {
- List<ITab> tabs = new ArrayList<>(3);
-
- tabs.add(new AbstractTab(new Model<>(AnyTypeKind.USER.name())) {
-
- private static final long serialVersionUID = -6815067322125799251L;
-
- @Override
- public Panel getPanel(final String panelId) {
- CamelRoutesDirectoryPanel panel =
- new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.USER);
- panel.setEnabled(CamelRoutesRestClient.isCamelEnabledFor(AnyTypeKind.USER));
- return panel;
- }
- });
-
- tabs.add(new AbstractTab(new Model<>(AnyTypeKind.GROUP.name())) {
-
- private static final long serialVersionUID = -6815067322125799251L;
-
- @Override
- public Panel getPanel(final String panelId) {
- CamelRoutesDirectoryPanel panel =
- new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.GROUP);
- panel.setEnabled(CamelRoutesRestClient.isCamelEnabledFor(AnyTypeKind.GROUP));
- return panel;
- }
- });
-
- tabs.add(new AbstractTab(new Model<>(AnyTypeKind.ANY_OBJECT.name())) {
-
- private static final long serialVersionUID = -6815067322125799251L;
-
- @Override
- public Panel getPanel(final String panelId) {
- CamelRoutesDirectoryPanel panel =
- new CamelRoutesDirectoryPanel(panelId, getPageReference(), AnyTypeKind.ANY_OBJECT);
- panel.setEnabled(CamelRoutesRestClient.isCamelEnabledFor(AnyTypeKind.ANY_OBJECT));
- return panel;
- }
- });
-
- return tabs;
- }
-
-}
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.java
deleted file mode 100644
index 251de8b..0000000
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels;
-
-import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.client.console.panels.CamelRoutesDirectoryPanel.CamelRoutesProvider;
-import org.apache.syncope.client.console.rest.CamelRoutesRestClient;
-import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionsPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.XMLEditorPanel;
-import org.apache.syncope.client.console.wizards.WizardMgtPanel;
-import org.apache.syncope.client.ui.commons.Constants;
-import org.apache.syncope.client.ui.commons.DirectoryDataProvider;
-import org.apache.syncope.client.ui.commons.pages.BaseWebPage;
-import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.CamelEntitlement;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
-import org.apache.wicket.model.CompoundPropertyModel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.model.ResourceModel;
-
-public class CamelRoutesDirectoryPanel extends DirectoryPanel<
- CamelRouteTO, CamelRouteTO, CamelRoutesProvider, CamelRoutesRestClient> {
-
- private static final long serialVersionUID = 3727444742501082182L;
-
- private static final String PREF_CAMEL_ROUTES_PAGINATOR_ROWS = "camel.routes.paginator.rows";
-
- private final BaseModal<String> utilityModal = new BaseModal<>("outer");
-
- private final AnyTypeKind anyTypeKind;
-
- public CamelRoutesDirectoryPanel(final String id, final PageReference pageRef, final AnyTypeKind anyTypeKind) {
- super(id, new Builder<CamelRouteTO, CamelRouteTO, CamelRoutesRestClient>(new CamelRoutesRestClient(), pageRef) {
-
- private static final long serialVersionUID = 8769126634538601689L;
-
- @Override
- protected WizardMgtPanel<CamelRouteTO> newInstance(final String id, final boolean wizardInModal) {
- throw new UnsupportedOperationException();
- }
- }.disableCheckBoxes());
- setOutputMarkupId(true);
-
- this.anyTypeKind = anyTypeKind;
- setFooterVisibility(true);
-
- addOuterObject(utilityModal);
- setWindowClosedReloadCallback(utilityModal);
- utilityModal.size(Modal.Size.Large);
- utilityModal.addSubmitButton();
-
- initResultTable();
- }
-
- @Override
- protected CamelRoutesProvider dataProvider() {
- return new CamelRoutesProvider(anyTypeKind, rows);
- }
-
- @Override
- protected String paginatorRowsKey() {
- return PREF_CAMEL_ROUTES_PAGINATOR_ROWS;
- }
-
- @Override
- protected Collection<ActionLink.ActionType> getBatches() {
- return List.of();
- }
-
- @Override
- protected List<IColumn<CamelRouteTO, String>> getColumns() {
- final List<IColumn<CamelRouteTO, String>> columns = new ArrayList<>();
- columns.add(new PropertyColumn<>(new ResourceModel("key"), "key", "key"));
- return columns;
- }
-
- @Override
- public ActionsPanel<CamelRouteTO> getActions(final IModel<CamelRouteTO> model) {
- final ActionsPanel<CamelRouteTO> panel = super.getActions(model);
-
- panel.add(new ActionLink<>() {
-
- private static final long serialVersionUID = -3722207913631435501L;
-
- @Override
- public void onClick(final AjaxRequestTarget target, final CamelRouteTO ignore) {
- final CamelRouteTO route = CamelRoutesRestClient.read(anyTypeKind, model.getObject().getKey());
-
- utilityModal.header(Model.of(route.getKey()));
- utilityModal.setContent(new XMLEditorPanel(
- utilityModal, new PropertyModel<>(route, "content"), filtered, pageRef) {
-
- private static final long serialVersionUID = 5488080606102212554L;
-
- @Override
- public void onSubmit(final AjaxRequestTarget target) {
- try {
- CamelRoutesRestClient.update(anyTypeKind, route);
- SyncopeConsoleSession.get().success(getString(Constants.OPERATION_SUCCEEDED));
- modal.close(target);
- } catch (Exception e) {
- LOG.error("While creating or updating CamelRouteTO", e);
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- }
- ((BaseWebPage) pageRef.getPage()).getNotificationPanel().refresh(target);
- }
-
- });
- utilityModal.show(true);
- target.add(utilityModal);
- }
- }, ActionLink.ActionType.EDIT, CamelEntitlement.ROUTE_UPDATE);
-
- return panel;
- }
-
- protected static final class CamelRoutesProvider extends DirectoryDataProvider<CamelRouteTO> {
-
- private static final long serialVersionUID = -185944053385660794L;
-
- private final AnyTypeKind anyTypeKind;
-
- private final SortableDataProviderComparator<CamelRouteTO> comparator;
-
- private CamelRoutesProvider(final AnyTypeKind anyTypeKind, final int paginatorRows) {
- super(paginatorRows);
- this.anyTypeKind = anyTypeKind;
- comparator = new SortableDataProviderComparator<>(this);
- }
-
- @Override
- public Iterator<CamelRouteTO> iterator(final long first, final long count) {
- List<CamelRouteTO> list = CamelRoutesRestClient.list(anyTypeKind);
- list.sort(comparator);
- return list.subList((int) first, (int) first + (int) count).iterator();
- }
-
- @Override
- public long size() {
- return CamelRoutesRestClient.list(anyTypeKind).size();
- }
-
- @Override
- public IModel<CamelRouteTO> model(final CamelRouteTO object) {
- return new CompoundPropertyModel<>(object);
- }
- }
-}
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRoutesRestClient.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRoutesRestClient.java
deleted file mode 100644
index d3873ea..0000000
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRoutesRestClient.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.rest;
-
-import java.util.List;
-import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.syncope.common.lib.to.CamelMetrics;
-import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.rest.api.service.CamelRouteService;
-
-public class CamelRoutesRestClient extends BaseRestClient {
-
- private static final long serialVersionUID = -2018208424159468912L;
-
- public static List<CamelRouteTO> list(final AnyTypeKind anyTypeKind) {
- return isCamelEnabledFor(anyTypeKind)
- ? getService(CamelRouteService.class).list(anyTypeKind)
- : List.of();
- }
-
- public static CamelRouteTO read(final AnyTypeKind anyTypeKind, final String key) {
- return getService(CamelRouteService.class).read(anyTypeKind, key);
- }
-
- public static void update(final AnyTypeKind anyTypeKind, final CamelRouteTO routeTO) {
- getService(CamelRouteService.class).update(anyTypeKind, routeTO);
- }
-
- public static boolean isCamelEnabledFor(final AnyTypeKind anyTypeKind) {
- return anyTypeKind == AnyTypeKind.USER
- ? SyncopeConsoleSession.get().getPlatformInfo().
- getProvisioningInfo().getUserProvisioningManager().contains("Camel")
- : anyTypeKind == AnyTypeKind.ANY_OBJECT
- ? SyncopeConsoleSession.get().getPlatformInfo().getProvisioningInfo().
- getAnyObjectProvisioningManager().contains("Camel")
- : SyncopeConsoleSession.get().getPlatformInfo().getProvisioningInfo().
- getGroupProvisioningManager().contains("Camel");
-
- }
-
- public static CamelMetrics metrics() {
- return getService(CamelRouteService.class).metrics();
- }
-}
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/widgets/CamelMetricsWidget.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/widgets/CamelMetricsWidget.java
deleted file mode 100644
index 582894e..0000000
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/widgets/CamelMetricsWidget.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.widgets;
-
-import java.time.Duration;
-import java.time.temporal.ChronoUnit;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-import org.apache.syncope.client.console.chartjs.Bar;
-import org.apache.syncope.client.console.chartjs.BarDataSet;
-import org.apache.syncope.client.console.chartjs.ChartJSPanel;
-import org.apache.syncope.client.console.rest.CamelRoutesRestClient;
-import org.apache.syncope.client.console.wicket.ajax.IndicatorAjaxTimerBehavior;
-import org.apache.syncope.client.ui.commons.annotations.ExtWidget;
-import org.apache.syncope.common.lib.to.CamelMetrics;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.model.Model;
-
-@ExtWidget(cssClass = "col-md-6")
-public class CamelMetricsWidget extends BaseExtWidget {
-
- private static final long serialVersionUID = 4157815058487313617L;
-
- private List<CamelMetrics.MeanRate> meanRates;
-
- private final ChartJSPanel chart;
-
- public CamelMetricsWidget(final String id, final PageReference pageRef) {
- super(id, pageRef);
-
- WebMarkupContainer container = new WebMarkupContainer("container");
- container.setOutputMarkupId(true);
- add(container);
-
- CamelMetrics metrics = CamelRoutesRestClient.metrics();
- meanRates = new ArrayList<>(5);
- for (int i = 0; i < 5; i++) {
- meanRates.add(metrics.getResponseMeanRates().get(i));
- }
-
- chart = new ChartJSPanel("chart", Model.of(build(meanRates)));
- container.add(chart);
-
- container.add(new IndicatorAjaxTimerBehavior(Duration.of(60, ChronoUnit.SECONDS)) {
-
- private static final long serialVersionUID = -4426283634345968585L;
-
- @Override
- protected void onTimer(final AjaxRequestTarget target) {
- CamelMetrics metrics = CamelRoutesRestClient.metrics();
- List<CamelMetrics.MeanRate> updatedMeanRates = new ArrayList<>(5);
- for (int i = 0; i < 5; i++) {
- updatedMeanRates.add(metrics.getResponseMeanRates().get(i));
- }
-
- if (refresh(updatedMeanRates)) {
- target.add(CamelMetricsWidget.this);
- }
- }
- });
- }
-
- private static Bar build(final List<CamelMetrics.MeanRate> meanRates) {
- Bar bar = new Bar();
- bar.getOptions().setScaleBeginAtZero(true);
- bar.getOptions().setBarShowStroke(true);
- bar.getOptions().setBarStrokeWidth(2);
- bar.getOptions().setBarValueSpacing(5);
- bar.getOptions().setBarDatasetSpacing(1);
- bar.getOptions().setResponsive(true);
- bar.getOptions().setMaintainAspectRatio(true);
-
- bar.getData().getLabels().addAll(
- meanRates.stream().map(CamelMetrics.MeanRate::getRouteId).collect(Collectors.toList()));
-
- BarDataSet dataset = new BarDataSet(
- meanRates.stream().map(CamelMetrics.MeanRate::getValue).collect(Collectors.toList()));
- dataset.setFillColor("blue");
- bar.getData().getDatasets().add(dataset);
-
- return bar;
- }
-
- private boolean refresh(final List<CamelMetrics.MeanRate> meanRates) {
- if (!this.meanRates.equals(meanRates)) {
- this.meanRates = meanRates;
-
- chart.setDefaultModelObject(build(meanRates));
- return true;
- }
- return false;
- }
-}
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes.html b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes.html
deleted file mode 100644
index 1f61c8e..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:extend>
- <section class="content-header">
- <div class="container-fluid">
- <div class="row mb-2">
- <div class="col-sm-6">
- <h1> </h1>
- </div>
- <div class="col-sm-6">
- <ol class="breadcrumb float-sm-right">
- <li class="breadcrumb-item">
- <a wicket:id="dashboardBr"><i class="fa fa-tachometer-alt"></i> <wicket:message key="dashboard"></wicket:message></a>
- </li>
- <li class="breadcrumb-item"><wicket:message key="extensions"/></li>
- <li class="breadcrumb-item active"><wicket:message key="camelRoutes"/></li>
- </ol>
- </div>
- </div>
- </div><!-- /.container-fluid -->
- </section>
-
- <section class="content" wicket:id="content">
- <div class="container-fluid">
- <div class="card card-outline">
- <div class="card-body" wicket:id="tabbedPanel"/>
- </div>
- </div>
- </section>
- </wicket:extend>
-</html>
\ No newline at end of file
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes.properties
deleted file mode 100644
index bd959d5..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-camelRoutes=Camel Routes
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes_it.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes_it.properties
deleted file mode 100644
index 5e5b7c0..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes_it.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-camelRoutes=Rotte Camel
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes_pt_BR.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes_pt_BR.properties
deleted file mode 100644
index 46ecbfd..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/pages/CamelRoutes_pt_BR.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-camelRoutes=Rotas Camel
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.properties
deleted file mode 100644
index bbb89ab..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-any.edit=Edit Camel Route ${key}
-any.new=New Camel Route
-any.finish=Update
-any.cancel=Cancel
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel_it.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel_it.properties
deleted file mode 100644
index 07d463e..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel_it.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-any.edit=Modifica Camel Route ${key}
-any.new=Nuova Camel Route
-any.finish=Aggiorna
-any.cancel=Annulla
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel_pt_BR.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel_pt_BR.properties
deleted file mode 100644
index a25f1a1..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/panels/CamelRoutesDirectoryPanel_pt_BR.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-any.edit=Alterar Camel Route ${key}
-any.new=Nova Camel Route
-any.finish=Atualizar
-any.cancel=Cancelar
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget.html b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget.html
deleted file mode 100644
index b2c917f..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
- <wicket:panel>
- <div class="card card-gray">
- <div class="card-header">
- <h3 class="card-title"><wicket:message key="camelMetrics"/></h3>
-
- <div class="card-tools">
- <button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i>
- </button>
- </div>
- </div>
- <div class="card-body" wicket:id="container">
- <div class="chart" wicket:id="chart"/>
- </div>
- </div>
- </wicket:panel>
-</html>
\ No newline at end of file
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget.properties
deleted file mode 100644
index c8bdd12..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-camelMetrics=Camel Metrics
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget_it.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget_it.properties
deleted file mode 100644
index 7df012d..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget_it.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-camelMetrics=Metriche Camel
diff --git a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget_pt_BR.properties b/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget_pt_BR.properties
deleted file mode 100644
index 57a15ed..0000000
--- a/ext/camel/client-console/src/main/resources/org/apache/syncope/client/console/widgets/CamelMetricsWidget_pt_BR.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-camelMetrics=M\u00e9tricas Camel
diff --git a/ext/camel/common-lib/pom.xml b/ext/camel/common-lib/pom.xml
deleted file mode 100644
index c5e07a4..0000000
--- a/ext/camel/common-lib/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel Common Lib</name>
- <description>Apache Syncope Ext: Camel Common Lib</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-common-lib</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope.common.idm</groupId>
- <artifactId>syncope-common-idm-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelMetrics.java b/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelMetrics.java
deleted file mode 100644
index 8f1d977..0000000
--- a/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelMetrics.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib.to;
-
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
-import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-public class CamelMetrics implements Serializable {
-
- private static final long serialVersionUID = -391404198406614231L;
-
- public static class MeanRate implements Serializable {
-
- private static final long serialVersionUID = -233921226510124154L;
-
- private String routeId;
-
- private double value;
-
- public String getRouteId() {
- return routeId;
- }
-
- public void setRouteId(final String routeId) {
- this.routeId = routeId;
- }
-
- public double getValue() {
- return value;
- }
-
- public void setValue(final double value) {
- this.value = value;
- }
-
- }
-
- private final List<MeanRate> responseMeanRates = new ArrayList<>();
-
- @JacksonXmlElementWrapper(localName = "responseMeanRates")
- @JacksonXmlProperty(localName = "meanRate")
- public List<MeanRate> getResponseMeanRates() {
- return responseMeanRates;
- }
-}
diff --git a/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java b/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java
deleted file mode 100644
index 5b007c5..0000000
--- a/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib.to;
-
-import javax.ws.rs.PathParam;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-
-public class CamelRouteTO implements EntityTO {
-
- private static final long serialVersionUID = 6431992877435181674L;
-
- private String key;
-
- private AnyTypeKind anyTypeKind;
-
- private String content;
-
- @Override
- public String getKey() {
- return key;
- }
-
- @PathParam("key")
- @Override
- public void setKey(final String key) {
- this.key = key;
- }
-
- public String getContent() {
- return content;
- }
-
- public void setContent(final String content) {
- this.content = content;
- }
-
- public AnyTypeKind getAnyTypeKind() {
- return anyTypeKind;
- }
-
- public void setAnyTypeKind(final AnyTypeKind anyTypeKind) {
- this.anyTypeKind = anyTypeKind;
- }
-
-}
diff --git a/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/types/CamelEntitlement.java b/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/types/CamelEntitlement.java
deleted file mode 100644
index f9763a7..0000000
--- a/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/types/CamelEntitlement.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib.types;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.Collections;
-import java.util.Set;
-import java.util.TreeSet;
-
-public final class CamelEntitlement {
-
- public static final String ROUTE_READ = "ROUTE_READ";
-
- public static final String ROUTE_LIST = "ROUTE_LIST";
-
- public static final String ROUTE_UPDATE = "ROUTE_UPDATE";
-
- private static final Set<String> VALUES;
-
- static {
- Set<String> values = new TreeSet<>();
- for (Field field : CamelEntitlement.class.getDeclaredFields()) {
- if (Modifier.isStatic(field.getModifiers()) && String.class.equals(field.getType())) {
- values.add(field.getName());
- }
- }
- VALUES = Collections.unmodifiableSet(values);
- }
-
- public static Set<String> values() {
- return VALUES;
- }
-
- private CamelEntitlement() {
- // private constructor for static utility class
- }
-}
diff --git a/ext/camel/logic/pom.xml b/ext/camel/logic/pom.xml
deleted file mode 100644
index 38cf26f..0000000
--- a/ext/camel/logic/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel Logic</name>
- <description>Apache Syncope Ext: Camel Logic</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-logic</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope.core.idm</groupId>
- <artifactId>syncope-core-idm-logic</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-provisioning</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelLogicContext.java b/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelLogicContext.java
deleted file mode 100644
index 8c46d0b..0000000
--- a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelLogicContext.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.logic;
-
-import org.apache.syncope.core.logic.init.CamelRouteLoader;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.provisioning.api.data.CamelRouteDataBinder;
-import org.apache.syncope.core.provisioning.camel.SyncopeCamelContext;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.io.Resource;
-
-@Configuration(proxyBeanMethods = false)
-public class CamelLogicContext {
-
- @ConditionalOnMissingBean
- @Bean
- public CamelRouteLoader camelRouteLoader(
- @Qualifier("anyObjectRoutes") final Resource anyObjectRoutes,
- @Qualifier("groupRoutes") final Resource groupRoutes,
- @Qualifier("userRoutes") final Resource userRoutes) {
- return new CamelRouteLoader(userRoutes, groupRoutes, anyObjectRoutes);
- }
-
- @ConditionalOnMissingBean
- @Bean
- public CamelRouteLogic camelRouteLogic(
- final CamelRouteDAO routeDAO,
- final CamelRouteDataBinder binder,
- final SyncopeCamelContext context) {
-
- return new CamelRouteLogic(routeDAO, binder, context);
- }
-}
diff --git a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelRouteLogic.java b/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelRouteLogic.java
deleted file mode 100644
index 764679b..0000000
--- a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelRouteLogic.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.logic;
-
-import com.codahale.metrics.MetricRegistry;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import org.apache.camel.component.metrics.routepolicy.MetricsRegistryService;
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.CamelMetrics;
-import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.CamelEntitlement;
-import org.apache.syncope.common.lib.types.ClientExceptionType;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.persistence.api.dao.NotFoundException;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-import org.apache.syncope.core.provisioning.api.data.CamelRouteDataBinder;
-import org.apache.syncope.core.provisioning.camel.CamelException;
-import org.apache.syncope.core.provisioning.camel.SyncopeCamelContext;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.transaction.annotation.Transactional;
-
-public class CamelRouteLogic extends AbstractTransactionalLogic<CamelRouteTO> {
-
- protected final CamelRouteDAO routeDAO;
-
- protected final CamelRouteDataBinder binder;
-
- protected final SyncopeCamelContext context;
-
- public CamelRouteLogic(
- final CamelRouteDAO routeDAO,
- final CamelRouteDataBinder binder,
- final SyncopeCamelContext context) {
-
- this.routeDAO = routeDAO;
- this.binder = binder;
- this.context = context;
- }
-
- @PreAuthorize("hasRole('" + CamelEntitlement.ROUTE_LIST + "')")
- @Transactional(readOnly = true)
- public List<CamelRouteTO> list(final AnyTypeKind anyTypeKind) {
- List<CamelRouteTO> routes = new ArrayList<>();
-
- routeDAO.find(anyTypeKind).forEach(route -> routes.add(binder.getRouteTO(route)));
- return routes;
- }
-
- @PreAuthorize("hasRole('" + CamelEntitlement.ROUTE_READ + "')")
- @Transactional(readOnly = true)
- public CamelRouteTO read(final AnyTypeKind anyTypeKind, final String key) {
- CamelRoute route = routeDAO.find(key);
- if (route == null) {
- throw new NotFoundException("CamelRoute with key=" + key);
- }
-
- if (route.getAnyTypeKind() != anyTypeKind) {
- SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidRequest);
- sce.getElements().add("Found " + anyTypeKind + ", expected " + route.getAnyTypeKind());
- throw sce;
- }
-
- return binder.getRouteTO(route);
- }
-
- @PreAuthorize("hasRole('" + CamelEntitlement.ROUTE_UPDATE + "')")
- public void update(final AnyTypeKind anyTypeKind, final CamelRouteTO routeTO) {
- CamelRoute route = routeDAO.find(routeTO.getKey());
- if (route == null) {
- throw new NotFoundException("CamelRoute with key=" + routeTO.getKey());
- }
-
- if (route.getAnyTypeKind() != anyTypeKind) {
- SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.InvalidRequest);
- sce.getElements().add("Found " + anyTypeKind + ", expected " + route.getAnyTypeKind());
- throw sce;
- }
-
- String originalContent = route.getContent();
-
- LOG.debug("Updating route {} with content {}", routeTO.getKey(), routeTO.getContent());
- binder.update(route, routeTO);
-
- try {
- context.updateContext(routeTO.getKey());
- } catch (CamelException e) {
- // if an exception was thrown while updating the context, restore the former route definition
- LOG.debug("Update of route {} failed, reverting", routeTO.getKey());
- context.restoreRoute(routeTO.getKey(), originalContent);
-
- throw e;
- }
- }
-
- @PreAuthorize("hasRole('" + CamelEntitlement.ROUTE_UPDATE + "')")
- public void restartContext() {
- context.restartContext();
- }
-
- @PreAuthorize("isAuthenticated()")
- public CamelMetrics metrics() {
- CamelMetrics metrics = new CamelMetrics();
-
- MetricsRegistryService registryService = context.getCamelContext().hasService(MetricsRegistryService.class);
- if (registryService == null) {
- LOG.warn("Camel metrics not available");
- } else {
- MetricRegistry registry = registryService.getMetricsRegistry();
- registry.getTimers().entrySet().stream().map(entry -> {
- CamelMetrics.MeanRate meanRate = new CamelMetrics.MeanRate();
- meanRate.setRouteId(StringUtils.substringBetween(entry.getKey(), ".", "."));
- meanRate.setValue(entry.getValue().getMeanRate());
- return meanRate;
- }).forEachOrdered(meanRate -> metrics.getResponseMeanRates().add(meanRate));
-
- metrics.getResponseMeanRates().sort((o1, o2) -> Collections.reverseOrder(Comparator.<Double>naturalOrder()).
- compare(o1.getValue(), o2.getValue()));
- }
-
- return metrics;
- }
-
- @Override
- protected CamelRouteTO resolveReference(final Method method, final Object... args)
- throws UnresolvedReferenceException {
-
- String key = null;
-
- if (ArrayUtils.isNotEmpty(args)) {
- for (int i = 0; key == null && i < args.length; i++) {
- if (args[i] instanceof String) {
- key = (String) args[i];
- } else if (args[i] instanceof CamelRouteTO) {
- key = ((CamelRouteTO) args[i]).getKey();
- }
- }
- }
-
- if (key != null) {
- try {
- return binder.getRouteTO(routeDAO.find(key));
- } catch (Throwable ignore) {
- LOG.debug("Unresolved reference", ignore);
- throw new UnresolvedReferenceException(ignore);
- }
- }
-
- throw new UnresolvedReferenceException();
- }
-
-}
diff --git a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/init/CamelRouteLoader.java b/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/init/CamelRouteLoader.java
deleted file mode 100644
index f3a4fdd..0000000
--- a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/init/CamelRouteLoader.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.logic.init;
-
-import java.io.StringWriter;
-import javax.sql.DataSource;
-import javax.xml.XMLConstants;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.cxf.staxutils.StaxUtils;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.CamelEntitlement;
-import org.apache.syncope.common.lib.types.EntitlementsHolder;
-import org.apache.syncope.core.persistence.api.SyncopeCoreLoader;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.core.io.Resource;
-import org.springframework.jdbc.core.JdbcTemplate;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.bootstrap.DOMImplementationRegistry;
-import org.w3c.dom.ls.DOMImplementationLS;
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSOutput;
-import org.w3c.dom.ls.LSParser;
-import org.w3c.dom.ls.LSSerializer;
-
-public class CamelRouteLoader implements SyncopeCoreLoader {
-
- protected static final Logger LOG = LoggerFactory.getLogger(CamelRouteLoader.class);
-
- protected static final boolean IS_JBOSS;
-
- static {
- IS_JBOSS = isJBoss();
- }
-
- protected static boolean isJBoss() {
- try {
- Class.forName("org.jboss.vfs.VirtualFile");
- LOG.debug("Running in JBoss AS / Wildfly, disabling {}", DOMImplementationRegistry.class.getName());
- return true;
- } catch (Throwable ex) {
- LOG.debug("Not running in JBoss AS / Wildfly, enabling {}", DOMImplementationRegistry.class.getName());
- return false;
- }
- }
-
- protected final Resource userRoutes;
-
- protected final Resource groupRoutes;
-
- protected final Resource anyObjectRoutes;
-
- public CamelRouteLoader(final Resource userRoutes, final Resource groupRoutes, final Resource anyObjectRoutes) {
- this.userRoutes = userRoutes;
- this.groupRoutes = groupRoutes;
- this.anyObjectRoutes = anyObjectRoutes;
- }
-
- @Override
- public int getOrder() {
- return 1000;
- }
-
- @Override
- public void load() {
- EntitlementsHolder.getInstance().addAll(CamelEntitlement.values());
- }
-
- @Override
- public void load(final String domain, final DataSource datasource) {
- loadRoutes(domain, datasource, userRoutes, AnyTypeKind.USER);
- loadRoutes(domain, datasource, groupRoutes, AnyTypeKind.GROUP);
- loadRoutes(domain, datasource, anyObjectRoutes, AnyTypeKind.ANY_OBJECT);
- }
-
- protected static String nodeToString(final Node content, final DOMImplementationLS domImpl) {
- StringWriter writer = new StringWriter();
- try {
- LSSerializer serializer = domImpl.createLSSerializer();
- serializer.getDomConfig().setParameter("xml-declaration", false);
- LSOutput lso = domImpl.createLSOutput();
- lso.setCharacterStream(writer);
- serializer.write(content, lso);
- } catch (Exception e) {
- LOG.debug("While serializing route node", e);
- }
- return writer.toString();
- }
-
- protected static String nodeToString(final Node content, final TransformerFactory tf) {
- String output = StringUtils.EMPTY;
-
- try {
- Transformer transformer = tf.newTransformer();
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
- StringWriter writer = new StringWriter();
- transformer.transform(new DOMSource(content), new StreamResult(writer));
- output = writer.getBuffer().toString();
- } catch (TransformerException e) {
- LOG.debug("While serializing route node", e);
- }
-
- return output;
- }
-
- protected static void loadRoutes(
- final String domain, final DataSource dataSource, final Resource resource, final AnyTypeKind anyTypeKind) {
-
- JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
- boolean shouldLoadRoutes = jdbcTemplate.queryForList(
- String.format("SELECT * FROM %s WHERE ANYTYPEKIND = ?", CamelRoute.class.getSimpleName()),
- new Object[] { anyTypeKind.name() }).
- isEmpty();
-
- if (shouldLoadRoutes) {
- try {
- TransformerFactory tf = null;
- DOMImplementationLS domImpl = null;
- NodeList routeNodes;
- if (IS_JBOSS) {
- tf = TransformerFactory.newInstance();
- tf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
- try {
- tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
- tf.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
- } catch (IllegalArgumentException ex) {
- LOG.debug("The JAXP parser does not support the following attribute: ", ex);
- }
- tf.setURIResolver((href, base) -> null);
-
- Document doc = StaxUtils.read(resource.getInputStream());
-
- routeNodes = doc.getDocumentElement().getElementsByTagName("route");
- } else {
- DOMImplementationRegistry reg = DOMImplementationRegistry.newInstance();
- domImpl = (DOMImplementationLS) reg.getDOMImplementation("LS");
- LSInput lsinput = domImpl.createLSInput();
- lsinput.setByteStream(resource.getInputStream());
-
- LSParser parser = domImpl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null);
-
- routeNodes = parser.parse(lsinput).getDocumentElement().getElementsByTagName("route");
- }
-
- for (int s = 0; s < routeNodes.getLength(); s++) {
- Node routeElement = routeNodes.item(s);
- String routeContent = IS_JBOSS
- ? nodeToString(routeNodes.item(s), tf)
- : nodeToString(routeNodes.item(s), domImpl);
- String routeId = ((Element) routeElement).getAttribute("id");
-
- jdbcTemplate.update(
- String.format("INSERT INTO %s(ID, ANYTYPEKIND, CONTENT) VALUES (?, ?, ?)",
- CamelRoute.class.getSimpleName()),
- new Object[] { routeId, anyTypeKind.name(), routeContent });
- LOG.info("[{}] Route successfully loaded: {}", domain, routeId);
- }
- } catch (Exception e) {
- LOG.error("[{}] Route load failed", domain, e);
- }
- }
- }
-}
diff --git a/ext/camel/logic/src/main/resources/META-INF/spring.factories b/ext/camel/logic/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 86b1362..0000000
--- a/ext/camel/logic/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- org.apache.syncope.core.logic.CamelLogicContext
diff --git a/ext/camel/persistence-api/pom.xml b/ext/camel/persistence-api/pom.xml
deleted file mode 100644
index a24df3c..0000000
--- a/ext/camel/persistence-api/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel Persistence API</name>
- <description>Apache Syncope Ext: Camel Persistence API</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-api</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/CamelRouteDAO.java b/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/CamelRouteDAO.java
deleted file mode 100644
index d843ab8..0000000
--- a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/CamelRouteDAO.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.persistence.api.dao;
-
-import java.util.List;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-
-public interface CamelRouteDAO extends DAO<CamelRoute> {
-
- CamelRoute find(String key);
-
- List<CamelRoute> find(AnyTypeKind anyTypeKind);
-
- List<CamelRoute> findAll();
-
- CamelRoute save(CamelRoute route);
-
- void delete(String key);
-}
diff --git a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelEntityFactory.java b/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelEntityFactory.java
deleted file mode 100644
index bca885c..0000000
--- a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelEntityFactory.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.persistence.api.entity;
-
-@FunctionalInterface
-public interface CamelEntityFactory {
-
- CamelRoute newCamelRoute();
-}
diff --git a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelRoute.java b/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelRoute.java
deleted file mode 100644
index 8e6676e..0000000
--- a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelRoute.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.persistence.api.entity;
-
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-
-public interface CamelRoute extends ProvidedKeyEntity {
-
- AnyTypeKind getAnyTypeKind();
-
- void setAnyTypeKind(AnyTypeKind anyTypeKind);
-
- String getContent();
-
- void setContent(String routeContent);
-
-}
diff --git a/ext/camel/persistence-jpa/pom.xml b/ext/camel/persistence-jpa/pom.xml
deleted file mode 100644
index 33a1efc..0000000
--- a/ext/camel/persistence-jpa/pom.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel Persistence JPA</name>
- <description>Apache Syncope Ext: Camel Persistence JPA</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-persistence-jpa</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-maven-plugin</artifactId>
- <inherited>true</inherited>
- <dependencies>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <version>${h2.version}</version>
- </dependency>
- </dependencies>
- <configuration>
- <persistenceXmlFile>${rootpom.basedir}/core/persistence-jpa/src/main/resources/persistence-enhance.xml</persistenceXmlFile>
- <includes>org/apache/syncope/core/persistence/jpa/entity/**/*.class</includes>
- <connectionDriverName>org.springframework.jdbc.datasource.DriverManagerDataSource</connectionDriverName>
- <connectionProperties>
- driverClassName=org.h2.Driver,
- url=jdbc:h2:mem:syncopedb
- username=sa,
- password=
- </connectionProperties>
- </configuration>
- <executions>
- <execution>
- <id>enhancer</id>
- <phase>process-classes</phase>
- <goals>
- <goal>enhance</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
-
- <testResources>
- <testResource>
- <directory>${rootpom.basedir}/core/persistence-jpa/src/main/resources</directory>
- <filtering>true</filtering>
- </testResource>
- </testResources>
- </build>
-
- <profiles>
- <profile>
- <id>sqlgen</id>
-
- <properties>
- <skipTests>true</skipTests>
- </properties>
-
- <build>
- <defaultGoal>clean verify</defaultGoal>
-
- <plugins>
- <plugin>
- <groupId>org.apache.openjpa</groupId>
- <artifactId>openjpa-maven-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>sqlgen</id>
- <phase>process-classes</phase>
- <goals>
- <goal>sql</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- </profile>
- </profiles>
-
-</project>
diff --git a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/CamelPersistenceContext.java b/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/CamelPersistenceContext.java
deleted file mode 100644
index 900f759..0000000
--- a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/CamelPersistenceContext.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.persistence.jpa;
-
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.persistence.api.entity.CamelEntityFactory;
-import org.apache.syncope.core.persistence.jpa.dao.JPACamelRouteDAO;
-import org.apache.syncope.core.persistence.jpa.entity.JPACamelEntityFactory;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration(proxyBeanMethods = false)
-public class CamelPersistenceContext {
-
- @ConditionalOnMissingBean
- @Bean
- public CamelEntityFactory camelEntityFactory() {
- return new JPACamelEntityFactory();
- }
-
- @ConditionalOnMissingBean
- @Bean
- public CamelRouteDAO camelRouteDAO() {
- return new JPACamelRouteDAO();
- }
-}
diff --git a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPACamelRouteDAO.java b/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPACamelRouteDAO.java
deleted file mode 100644
index 0196fd4..0000000
--- a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPACamelRouteDAO.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.persistence.jpa.dao;
-
-import java.util.List;
-import javax.persistence.TypedQuery;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-import org.apache.syncope.core.persistence.jpa.entity.JPACamelRoute;
-import org.springframework.transaction.annotation.Transactional;
-
-public class JPACamelRouteDAO extends AbstractDAO<CamelRoute> implements CamelRouteDAO {
-
- @Override
- public CamelRoute find(final String key) {
- return entityManager().find(JPACamelRoute.class, key);
- }
-
- @Transactional(readOnly = true)
- @Override
- public List<CamelRoute> find(final AnyTypeKind anyTypeKind) {
- TypedQuery<CamelRoute> query = entityManager().createQuery(
- "SELECT e FROM " + JPACamelRoute.class.getSimpleName()
- + " e WHERE e.anyTypeKind = :anyTypeKind", CamelRoute.class);
- query.setParameter("anyTypeKind", anyTypeKind);
-
- return query.getResultList();
- }
-
- @Transactional(readOnly = true)
- @Override
- public List<CamelRoute> findAll() {
- TypedQuery<CamelRoute> query = entityManager().createQuery(
- "SELECT e FROM " + JPACamelRoute.class.getSimpleName() + " e ", CamelRoute.class);
- return query.getResultList();
- }
-
- @Override
- public CamelRoute save(final CamelRoute route) {
- return entityManager().merge(route);
- }
-
- @Override
- public void delete(final String key) {
- CamelRoute route = find(key);
- if (route != null) {
- entityManager().remove(route);
- }
- }
-
-}
diff --git a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelEntityFactory.java b/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelEntityFactory.java
deleted file mode 100644
index f152a4d..0000000
--- a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelEntityFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.persistence.jpa.entity;
-
-import org.apache.syncope.core.persistence.api.entity.CamelEntityFactory;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-
-public class JPACamelEntityFactory implements CamelEntityFactory {
-
- @Override
- public CamelRoute newCamelRoute() {
- return new JPACamelRoute();
- }
-}
diff --git a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelRoute.java b/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelRoute.java
deleted file mode 100644
index 9dcf3f8..0000000
--- a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelRoute.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.persistence.jpa.entity;
-
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.Lob;
-import javax.persistence.Table;
-import javax.validation.constraints.NotNull;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-
-@Entity
-@Table(name = JPACamelRoute.TABLE)
-public class JPACamelRoute extends AbstractProvidedKeyEntity implements CamelRoute {
-
- private static final long serialVersionUID = -2767606675667839161L;
-
- public static final String TABLE = "CamelRoute";
-
- @NotNull
- @Enumerated(EnumType.STRING)
- private AnyTypeKind anyTypeKind;
-
- @Lob
- private String content;
-
- @Override
- public AnyTypeKind getAnyTypeKind() {
- return anyTypeKind;
- }
-
- @Override
- public void setAnyTypeKind(final AnyTypeKind anyTypeKind) {
- this.anyTypeKind = anyTypeKind;
- }
-
- @Override
- public String getContent() {
- return content;
- }
-
- @Override
- public void setContent(final String content) {
- this.content = content;
- }
-
-}
diff --git a/ext/camel/persistence-jpa/src/main/resources/META-INF/spring.factories b/ext/camel/persistence-jpa/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index f12a24b..0000000
--- a/ext/camel/persistence-jpa/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- org.apache.syncope.core.persistence.jpa.CamelPersistenceContext
diff --git a/ext/camel/pom.xml b/ext/camel/pom.xml
deleted file mode 100644
index 13f8261..0000000
--- a/ext/camel/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope</groupId>
- <artifactId>syncope-ext</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel</name>
- <description>Apache Syncope Ext: Camel</description>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <packaging>pom</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../..</rootpom.basedir>
- </properties>
-
- <modules>
- <module>persistence-api</module>
- <module>persistence-jpa</module>
- <module>common-lib</module>
- <module>provisioning-api</module>
- <module>provisioning-camel</module>
- <module>logic</module>
- <module>rest-api</module>
- <module>rest-cxf</module>
- <module>client-console</module>
- </modules>
-
-</project>
diff --git a/ext/camel/provisioning-api/pom.xml b/ext/camel/provisioning-api/pom.xml
deleted file mode 100644
index dc32b07..0000000
--- a/ext/camel/provisioning-api/pom.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel Provisioning API</name>
- <description>Apache Syncope Ext: Camel Provisioning API</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-provisioning-api</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-provisioning-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-common-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/ext/camel/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/CamelRouteDataBinder.java b/ext/camel/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/CamelRouteDataBinder.java
deleted file mode 100644
index f355b2b..0000000
--- a/ext/camel/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/CamelRouteDataBinder.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.api.data;
-
-import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-
-public interface CamelRouteDataBinder {
-
- CamelRouteTO getRouteTO(CamelRoute route);
-
- void update(CamelRoute route, CamelRouteTO routeTO);
-}
diff --git a/ext/camel/provisioning-camel/pom.xml b/ext/camel/provisioning-camel/pom.xml
deleted file mode 100644
index 600874b..0000000
--- a/ext/camel/provisioning-camel/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel Provisioning</name>
- <description>Apache Syncope Ext: Camel Provisioning</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-provisioning</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel.springboot</groupId>
- <artifactId>camel-spring-boot-starter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-groovy</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-metrics</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>spi-annotations</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-provisioning-java</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-provisioning-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AbstractCamelProvisioningManager.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AbstractCamelProvisioningManager.java
deleted file mode 100644
index 85cf0f6..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/AbstractCamelProvisioningManager.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.PollingConsumer;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.model.RoutesDefinition;
-import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.support.DefaultMessage;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-abstract class AbstractCamelProvisioningManager {
-
- private static final Logger LOG = LoggerFactory.getLogger(AbstractCamelProvisioningManager.class);
-
- protected final CamelRouteDAO routeDAO;
-
- protected final SyncopeCamelContext contextFactory;
-
- protected RoutesDefinition routes;
-
- protected final Map<String, PollingConsumer> consumerMap = new HashMap<>();
-
- protected final List<String> knownURIs = new ArrayList<>();
-
- protected AbstractCamelProvisioningManager(final CamelRouteDAO routeDAO, final SyncopeCamelContext contextFactory) {
- this.routeDAO = routeDAO;
- this.contextFactory = contextFactory;
- }
-
- protected void sendMessage(final String uri, final Object obj) {
- Exchange exchange = new DefaultExchange(contextFactory.getCamelContext());
-
- DefaultMessage message = new DefaultMessage(contextFactory.getCamelContext());
- message.setBody(obj);
- exchange.setIn(message);
-
- ProducerTemplate template = contextFactory.getCamelContext().createProducerTemplate();
- template.send(uri, exchange);
- }
-
- protected void sendMessage(final String uri, final Object body, final Map<String, Object> properties) {
- DefaultExchange exchange = new DefaultExchange(contextFactory.getCamelContext());
- // exclude properties with null value, otherwise DefaultExchange#properties, being a ConcurrentHashMap,
- // will raise NPE; no problems for later usage, as Map#get will return null for missing keys anyway
- exchange.setProperties(properties.keySet().stream().
- filter(key -> properties.get(key) != null).
- collect(Collectors.toMap(Function.identity(), properties::get)));
-
- DefaultMessage message = new DefaultMessage(contextFactory.getCamelContext());
- message.setBody(body);
- exchange.setIn(message);
- ProducerTemplate template = contextFactory.getCamelContext().createProducerTemplate();
- template.send(uri, exchange);
- }
-
- protected PollingConsumer getConsumer(final String uri) {
- if (!knownURIs.contains(uri)) {
- knownURIs.add(uri);
- Endpoint endpoint = contextFactory.getCamelContext().getEndpoint(uri);
- PollingConsumer pollingConsumer = null;
- try {
- pollingConsumer = endpoint.createPollingConsumer();
- consumerMap.put(uri, pollingConsumer);
- pollingConsumer.start();
- } catch (Exception ex) {
- LOG.error("Unexpected error in Consumer creation ", ex);
- }
- return pollingConsumer;
- } else {
- return consumerMap.get(uri);
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelAnyObjectProvisioningManager.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelAnyObjectProvisioningManager.java
deleted file mode 100644
index f72c8cc..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelAnyObjectProvisioningManager.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.camel.Exchange;
-import org.apache.camel.PollingConsumer;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.AnyObjectCR;
-import org.apache.syncope.common.lib.request.AnyObjectUR;
-import org.apache.syncope.common.lib.to.PropagationStatus;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.provisioning.api.AnyObjectProvisioningManager;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
-
-public class CamelAnyObjectProvisioningManager
- extends AbstractCamelProvisioningManager implements AnyObjectProvisioningManager {
-
- public CamelAnyObjectProvisioningManager(final CamelRouteDAO routeDAO, final SyncopeCamelContext contextFactory) {
- super(routeDAO, contextFactory);
- }
-
- @Override
- public Pair<String, List<PropagationStatus>> create(
- final AnyObjectCR req, final boolean nullPriorityAsync, final String creator, final String context) {
-
- return create(req, Set.of(), nullPriorityAsync, creator, context);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @SuppressWarnings("unchecked")
- @Override
- public Pair<String, List<PropagationStatus>> create(
- final AnyObjectCR req,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String creator,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:createAnyObjectPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("creator", creator);
- props.put("context", context);
-
- sendMessage("direct:createAnyObject", req, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- public Pair<AnyObjectUR, List<PropagationStatus>> update(
- final AnyObjectUR anyUR, final boolean nullPriorityAsync, final String updater, final String context) {
-
- return update(anyUR, Set.of(), nullPriorityAsync, updater, context);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @Override
- @SuppressWarnings("unchecked")
- public Pair<AnyObjectUR, List<PropagationStatus>> update(
- final AnyObjectUR anyUR,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:updateAnyObjectPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:updateAnyObject", anyUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- public List<PropagationStatus> delete(
- final String anyObjectObjectKey,
- final boolean nullPriorityAsync,
- final String eraser,
- final String context) {
-
- return delete(anyObjectObjectKey, Set.of(), nullPriorityAsync, eraser, context);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> delete(
- final String key,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String eraser,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:deleteAnyObjectPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("eraser", eraser);
- props.put("context", context);
-
- sendMessage("direct:deleteAnyObject", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-
- @Override
- public String unlink(final AnyObjectUR anyObjectUR, final String updater, final String context) {
- PollingConsumer pollingConsumer = getConsumer("direct:unlinkAnyObjectPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:unlinkAnyObject", anyObjectUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(AnyObjectUR.class).getKey();
- }
-
- @Override
- public String link(final AnyObjectUR anyObjectUR, final String updater, final String context) {
- PollingConsumer pollingConsumer = getConsumer("direct:linkAnyObjectPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:linkAnyObject", anyObjectUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(AnyObjectUR.class).getKey();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> provision(
- final String key,
- final Collection<String> resources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:provisionAnyObjectPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("resources", resources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:provisionAnyObject", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> deprovision(
- final String key,
- final Collection<String> resources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:deprovisionAnyObjectPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("resources", resources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:deprovisionAnyObject", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelException.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelException.java
deleted file mode 100644
index 4df3137..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel;
-
-/**
- * Wraps checked exceptions thrown by Apache Camel.
- */
-public class CamelException extends RuntimeException {
-
- private static final long serialVersionUID = 517692473216575144L;
-
- public CamelException(final Throwable cause) {
- super(cause);
- }
-
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelGroupProvisioningManager.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelGroupProvisioningManager.java
deleted file mode 100644
index 4aa4bb5..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelGroupProvisioningManager.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.camel.Exchange;
-import org.apache.camel.PollingConsumer;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.GroupCR;
-import org.apache.syncope.common.lib.request.GroupUR;
-import org.apache.syncope.common.lib.to.PropagationStatus;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.provisioning.api.GroupProvisioningManager;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
-
-public class CamelGroupProvisioningManager
- extends AbstractCamelProvisioningManager implements GroupProvisioningManager {
-
- public CamelGroupProvisioningManager(final CamelRouteDAO routeDAO, final SyncopeCamelContext contextFactory) {
- super(routeDAO, contextFactory);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Pair<String, List<PropagationStatus>> create(
- final GroupCR req, final boolean nullPriorityAsync, final String creator, final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:createGroupPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("excludedResources", Set.of());
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("creator", creator);
- props.put("context", context);
-
- sendMessage("direct:createGroup", req, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @Override
- @SuppressWarnings("unchecked")
- public Pair<String, List<PropagationStatus>> create(
- final GroupCR req,
- final Map<String, String> groupOwnerMap,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String creator,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:createGroupInPullPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("groupOwnerMap", groupOwnerMap);
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("creator", creator);
- props.put("context", context);
-
- sendMessage("direct:createGroupInPull", req, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- public Pair<GroupUR, List<PropagationStatus>> update(
- final GroupUR groupUR, final boolean nullPriorityAsync, final String updater, final String context) {
-
- return update(groupUR, Set.of(), nullPriorityAsync, updater, context);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @Override
- @SuppressWarnings("unchecked")
- public Pair<GroupUR, List<PropagationStatus>> update(
- final GroupUR groupUR,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:updateGroupPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:updateGroup", groupUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- public List<PropagationStatus> delete(
- final String key, final boolean nullPriorityAsync, final String eraser, final String context) {
-
- return delete(key, Set.of(), nullPriorityAsync, eraser, context);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> delete(
- final String key,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String eraser,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:deleteGroupPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("eraser", eraser);
- props.put("context", context);
-
- sendMessage("direct:deleteGroup", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-
- @Override
- public String unlink(final GroupUR groupUR, final String updater, final String context) {
- PollingConsumer pollingConsumer = getConsumer("direct:unlinkGroupPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:unlinkGroup", groupUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(GroupUR.class).getKey();
- }
-
- @Override
- public String link(final GroupUR groupUR, final String updater, final String context) {
- PollingConsumer pollingConsumer = getConsumer("direct:linkGroupPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:linkGroup", groupUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(GroupUR.class).getKey();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> provision(
- final String key,
- final Collection<String> resources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:provisionGroupPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("resources", resources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:provisionGroup", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> deprovision(
- final String key,
- final Collection<String> resources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:deprovisionGroupPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("resources", resources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:deprovisionGroup", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelProvisioningContext.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelProvisioningContext.java
deleted file mode 100644
index 35b3233..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelProvisioningContext.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel;
-
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.provisioning.api.AnyObjectProvisioningManager;
-import org.apache.syncope.core.provisioning.api.GroupProvisioningManager;
-import org.apache.syncope.core.provisioning.api.UserProvisioningManager;
-import org.apache.syncope.core.provisioning.api.data.CamelRouteDataBinder;
-import org.apache.syncope.core.provisioning.camel.data.CamelRouteDataBinderImpl;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.io.ClassPathResource;
-import org.springframework.core.io.Resource;
-
-@Configuration(proxyBeanMethods = false)
-public class CamelProvisioningContext {
-
- @Bean
- public Resource userRoutes() {
- return new ClassPathResource("userRoutes.xml");
- }
-
- @Bean
- public Resource groupRoutes() {
- return new ClassPathResource("groupRoutes.xml");
- }
-
- @Bean
- public Resource anyObjectRoutes() {
- return new ClassPathResource("anyObjectRoutes.xml");
- }
-
- @ConditionalOnMissingBean
- @Bean
- public SyncopeCamelContext syncopeCamelContext(final CamelRouteDAO routeDAO) {
- return new SyncopeCamelContext(routeDAO);
- }
-
- @Bean
- public UserProvisioningManager userProvisioningManager(
- final CamelRouteDAO routeDAO,
- final SyncopeCamelContext contextFactory) {
-
- return new CamelUserProvisioningManager(routeDAO, contextFactory);
- }
-
- @Bean
- public GroupProvisioningManager groupProvisioningManager(
- final CamelRouteDAO routeDAO,
- final SyncopeCamelContext contextFactory) {
-
- return new CamelGroupProvisioningManager(routeDAO, contextFactory);
- }
-
- @Bean
- public AnyObjectProvisioningManager anyObjectProvisioningManager(
- final CamelRouteDAO routeDAO,
- final SyncopeCamelContext contextFactory) {
-
- return new CamelAnyObjectProvisioningManager(routeDAO, contextFactory);
- }
-
- @ConditionalOnMissingBean
- @Bean
- public CamelRouteDataBinder camelRouteDataBinder(final CamelRouteDAO routeDAO) {
- return new CamelRouteDataBinderImpl(routeDAO);
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelUserProvisioningManager.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelUserProvisioningManager.java
deleted file mode 100644
index a1555b6..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelUserProvisioningManager.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.camel.Exchange;
-import org.apache.camel.PollingConsumer;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.StatusR;
-import org.apache.syncope.common.lib.request.UserCR;
-import org.apache.syncope.common.lib.request.UserUR;
-import org.apache.syncope.common.lib.to.PropagationStatus;
-import org.apache.syncope.common.lib.to.ProvisioningReport;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.provisioning.api.PropagationByResource;
-import org.apache.syncope.core.provisioning.api.UserProvisioningManager;
-import org.apache.syncope.core.provisioning.api.UserWorkflowResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
-
-public class CamelUserProvisioningManager extends AbstractCamelProvisioningManager implements UserProvisioningManager {
-
- private static final Logger LOG = LoggerFactory.getLogger(CamelUserProvisioningManager.class);
-
- public CamelUserProvisioningManager(final CamelRouteDAO routeDAO, final SyncopeCamelContext contextFactory) {
- super(routeDAO, contextFactory);
- }
-
- @Override
- public Pair<String, List<PropagationStatus>> create(
- final UserCR req, final boolean nullPriorityAsync, final String creator, final String context) {
-
- return create(req, false, null, Set.of(), nullPriorityAsync, creator, context);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @Override
- @SuppressWarnings("unchecked")
- public Pair<String, List<PropagationStatus>> create(
- final UserCR req,
- final boolean disablePwdPolicyCheck,
- final Boolean enabled,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String creator,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:createPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("disablePwdPolicyCheck", disablePwdPolicyCheck);
- props.put("enabled", enabled);
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("creator", creator);
- props.put("context", context);
-
- sendMessage("direct:createUser", req, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Pair<UserUR, List<PropagationStatus>> update(
- final UserUR userUR, final boolean nullPriorityAsync, final String updater, final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:updatePort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:updateUser", userUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- public Pair<UserUR, List<PropagationStatus>> update(
- final UserUR userUR,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- return update(userUR, new ProvisioningReport(), null, excludedResources, nullPriorityAsync, updater, context);
- }
-
- @Override
- public List<PropagationStatus> delete(
- final String key, final boolean nullPriorityAsync, final String eraser, final String context) {
-
- return delete(key, Set.of(), nullPriorityAsync, eraser, context);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> delete(
- final String key,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String eraser,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:deletePort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("eraser", eraser);
- props.put("context", context);
-
- sendMessage("direct:deleteUser", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-
- @Override
- public String unlink(final UserUR userUR, final String updater, final String context) {
- PollingConsumer pollingConsumer = getConsumer("direct:unlinkPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:unlinkUser", userUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(UserUR.class).getKey();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Pair<String, List<PropagationStatus>> activate(
- final StatusR statusR, final boolean nullPriorityAsync, final String updater, final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:statusPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("token", statusR.getToken());
- props.put("key", statusR.getKey());
- props.put("statusR", statusR);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- if (statusR.isOnSyncope()) {
- sendMessage("direct:activateUser", statusR.getKey(), props);
- } else {
- UserWorkflowResult<String> updated =
- new UserWorkflowResult<>(statusR.getKey(), null, null, statusR.getType().name().toLowerCase());
- sendMessage("direct:userStatusPropagation", updated, props);
- }
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Pair<String, List<PropagationStatus>> reactivate(
- final StatusR statusR, final boolean nullPriorityAsync, final String updater, final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:statusPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("key", statusR.getKey());
- props.put("statusR", statusR);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- if (statusR.isOnSyncope()) {
- sendMessage("direct:reactivateUser", statusR.getKey(), props);
- } else {
- UserWorkflowResult<String> updated =
- new UserWorkflowResult<>(statusR.getKey(), null, null, statusR.getType().name().toLowerCase());
- sendMessage("direct:userStatusPropagation", updated, props);
- }
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Pair<String, List<PropagationStatus>> suspend(
- final StatusR statusR, final boolean nullPriorityAsync, final String updater, final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:statusPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("key", statusR.getKey());
- props.put("statusR", statusR);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- if (statusR.isOnSyncope()) {
- sendMessage("direct:suspendUser", statusR.getKey(), props);
- } else {
- UserWorkflowResult<String> updated =
- new UserWorkflowResult<>(statusR.getKey(), null, null, statusR.getType().name().toLowerCase());
- sendMessage("direct:userStatusPropagation", updated, props);
- }
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- public String link(final UserUR userUR, final String updater, final String context) {
- PollingConsumer pollingConsumer = getConsumer("direct:linkPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:linkUser", userUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(UserUR.class).getKey();
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> provision(
- final String key,
- final boolean changePwd,
- final String password,
- final Collection<String> resources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:provisionPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("key", key);
- props.put("changePwd", changePwd);
- props.put("password", password);
- props.put("resources", resources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:provisionUser", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public List<PropagationStatus> deprovision(
- final String user,
- final Collection<String> resources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:deprovisionPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("resources", resources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:deprovisionUser", user, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
-
- return exchange.getIn().getBody(List.class);
- }
-
- @Transactional(propagation = Propagation.REQUIRES_NEW)
- @Override
- @SuppressWarnings("unchecked")
- public Pair<UserUR, List<PropagationStatus>> update(
- final UserUR userUR,
- final ProvisioningReport result,
- final Boolean enabled,
- final Set<String> excludedResources,
- final boolean nullPriorityAsync,
- final String updater,
- final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:updateInPullPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("key", userUR.getKey());
- props.put("result", result);
- props.put("enabled", enabled);
- props.put("excludedResources", excludedResources);
- props.put("nullPriorityAsync", nullPriorityAsync);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:updateUserInPull", userUR, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- Exception ex = (Exception) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- if (ex != null) {
- LOG.error("Update of user {} failed, trying to pull its status anyway (if configured)",
- userUR.getKey(), ex);
-
- result.setStatus(ProvisioningReport.Status.FAILURE);
- result.setMessage("Update failed, trying to pull status anyway (if configured)\n" + ex.getMessage());
-
- UserWorkflowResult<Pair<UserUR, Boolean>> updated = new UserWorkflowResult<>(
- Pair.of(userUR, false),
- new PropagationByResource<>(),
- new PropagationByResource<>(),
- new HashSet<>());
- sendMessage("direct:userInPull", updated, props);
- exchange = pollingConsumer.receive();
- }
-
- return exchange.getIn().getBody(Pair.class);
- }
-
- @Override
- public void internalSuspend(final String key, final String updater, final String context) {
- PollingConsumer pollingConsumer = getConsumer("direct:internalSuspendUserPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:internalSuspendUser", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
- }
-
- @Override
- public void requestPasswordReset(final String key, final String updater, final String context) {
- PollingConsumer pollingConsumer = getConsumer("direct:requestPwdResetPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:requestPwdReset", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
- }
-
- @Override
- public void confirmPasswordReset(
- final String key, final String token, final String password, final String updater, final String context) {
-
- PollingConsumer pollingConsumer = getConsumer("direct:confirmPwdResetPort");
-
- Map<String, Object> props = new HashMap<>();
- props.put("key", key);
- props.put("token", token);
- props.put("password", password);
- props.put("updater", updater);
- props.put("context", context);
-
- sendMessage("direct:confirmPwdReset", key, props);
-
- Exchange exchange = pollingConsumer.receive();
-
- if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) != null) {
- throw (RuntimeException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT);
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/SyncopeCamelContext.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/SyncopeCamelContext.java
deleted file mode 100644
index 02ae71c..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/SyncopeCamelContext.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel;
-
-import java.io.ByteArrayInputStream;
-import java.nio.charset.StandardCharsets;
-import java.util.List;
-import java.util.stream.Collectors;
-import org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicyFactory;
-import org.apache.camel.model.RoutesDefinition;
-import org.apache.camel.spring.SpringCamelContext;
-import org.apache.camel.xml.jaxb.JaxbHelper;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-import org.apache.syncope.core.spring.ApplicationContextProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
-
-public class SyncopeCamelContext {
-
- protected static final Logger LOG = LoggerFactory.getLogger(SyncopeCamelContext.class);
-
- protected final CamelRouteDAO routeDAO;
-
- public SyncopeCamelContext(final CamelRouteDAO routeDAO) {
- this.routeDAO = routeDAO;
- }
-
- protected SpringCamelContext camelContext;
-
- public SpringCamelContext getCamelContext() {
- synchronized (this) {
- if (camelContext == null) {
- camelContext = ApplicationContextProvider.getBeanFactory().getBean(SpringCamelContext.class);
- camelContext.addRoutePolicyFactory(new MetricsRoutePolicyFactory());
- }
-
- if (camelContext.getRoutes().isEmpty()) {
- List<CamelRoute> routes = routeDAO.findAll();
- LOG.debug("{} route(s) are going to be loaded ", routes.size());
-
- loadRouteDefinitions(routes.stream().map(CamelRoute::getContent).collect(Collectors.toList()));
- }
- }
-
- return camelContext;
- }
-
- protected void loadRouteDefinitions(final List<String> routes) {
- try {
- RoutesDefinition routeDefs = JaxbHelper.loadRoutesDefinition(
- camelContext,
- new ByteArrayInputStream(("<routes xmlns=\"http://camel.apache.org/schema/spring\">"
- + routes.stream().collect(Collectors.joining())
- + "</routes>").getBytes(StandardCharsets.UTF_8)));
- camelContext.addRouteDefinitions(routeDefs.getRoutes());
- } catch (Exception e) {
- LOG.error("While adding route definitions into Camel Context {}", camelContext, e);
- throw new CamelException(e);
- }
- }
-
- @Transactional(propagation = Propagation.SUPPORTS)
- public void updateContext(final String routeKey) {
- if (!getCamelContext().getRouteDefinitions().isEmpty()) {
- getCamelContext().getRouteDefinitions().remove(getCamelContext().getRouteDefinition(routeKey));
- loadRouteDefinitions(List.of(routeDAO.find(routeKey).getContent()));
- }
- }
-
- public void restoreRoute(final String routeKey, final String routeContent) {
- try {
- getCamelContext().getRouteDefinitions().remove(getCamelContext().getRouteDefinition(routeKey));
- loadRouteDefinitions(List.of(routeContent));
- } catch (Exception e) {
- LOG.error("While restoring Camel route {}", routeKey, e);
- throw new CamelException(e);
- }
- }
-
- public void restartContext() {
- try {
- getCamelContext().stop();
- getCamelContext().start();
- } catch (Exception e) {
- LOG.error("While restarting Camel context", e);
- throw new CamelException(e);
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java
deleted file mode 100644
index ce00b0f..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateComponent.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.component;
-
-import java.util.Map;
-import org.apache.camel.Endpoint;
-import org.apache.camel.support.DefaultComponent;
-import org.apache.syncope.core.persistence.api.dao.AnyObjectDAO;
-import org.apache.syncope.core.persistence.api.dao.GroupDAO;
-import org.apache.syncope.core.persistence.api.dao.UserDAO;
-import org.apache.syncope.core.provisioning.api.data.GroupDataBinder;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationManager;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor;
-import org.apache.syncope.core.spring.security.SecurityProperties;
-import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class PropagateComponent extends DefaultComponent {
-
- @Autowired
- protected PropagationManager propagationManager;
-
- @Autowired
- protected PropagationTaskExecutor taskExecutor;
-
- @Autowired
- protected UserDAO userDAO;
-
- @Autowired
- protected GroupDAO groupDAO;
-
- @Autowired
- protected AnyObjectDAO anyObjectDAO;
-
- @Autowired
- protected GroupDataBinder groupDataBinder;
-
- @Autowired
- protected UserWorkflowAdapter uwfAdapter;
-
- @Autowired
- protected SecurityProperties props;
-
- @Override
- protected Endpoint createEndpoint(
- final String uri,
- final String remaining,
- final Map<String, Object> parameters) throws Exception {
-
- PropagateType type = PropagateType.valueOf(remaining);
- PropagateEndpoint endpoint = new PropagateEndpoint(uri, this);
- endpoint.setPropagateType(type);
- endpoint.setPropagationManager(propagationManager);
- endpoint.setPropagationTaskExecutor(taskExecutor);
- endpoint.setUserDAO(userDAO);
- endpoint.setGroupDAO(groupDAO);
- endpoint.setAnyObjectDAO(anyObjectDAO);
- endpoint.setGroupDataBinder(groupDataBinder);
- endpoint.setUwfAdapter(uwfAdapter);
-
- String executor = (String) parameters.get("creator");
- if (executor == null) {
- executor = (String) parameters.get("updater");
- }
- if (executor == null) {
- executor = (String) parameters.get("eraser");
- }
- if (executor == null) {
- executor = props.getAdminUser();
- }
- endpoint.setExecutor(executor);
-
- setProperties(endpoint, parameters);
- return endpoint;
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java
deleted file mode 100644
index 469dd52..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateEndpoint.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.component;
-
-import org.apache.camel.Component;
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.spi.UriPath;
-import org.apache.camel.support.DefaultEndpoint;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.persistence.api.dao.AnyObjectDAO;
-import org.apache.syncope.core.persistence.api.dao.GroupDAO;
-import org.apache.syncope.core.persistence.api.dao.UserDAO;
-import org.apache.syncope.core.provisioning.api.data.GroupDataBinder;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationManager;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor;
-import org.apache.syncope.core.provisioning.camel.producer.AbstractProducer;
-import org.apache.syncope.core.provisioning.camel.producer.ConfirmPasswordResetProducer;
-import org.apache.syncope.core.provisioning.camel.producer.CreateProducer;
-import org.apache.syncope.core.provisioning.camel.producer.DeleteProducer;
-import org.apache.syncope.core.provisioning.camel.producer.DeprovisionProducer;
-import org.apache.syncope.core.provisioning.camel.producer.ProvisionProducer;
-import org.apache.syncope.core.provisioning.camel.producer.StatusProducer;
-import org.apache.syncope.core.provisioning.camel.producer.SuspendProducer;
-import org.apache.syncope.core.provisioning.camel.producer.UpdateProducer;
-import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
-
-@UriEndpoint(scheme = "propagate", title = "propagate", syntax = "propagate:propagateType", producerOnly = true)
-public class PropagateEndpoint extends DefaultEndpoint {
-
- @UriPath
- @Metadata(required = true)
- private PropagateType propagateType;
-
- @UriParam
- private AnyTypeKind anyTypeKind;
-
- @UriParam
- private boolean pull;
-
- private PropagationManager propagationManager;
-
- private PropagationTaskExecutor taskExecutor;
-
- private UserDAO userDAO;
-
- private GroupDAO groupDAO;
-
- private AnyObjectDAO anyObjectDAO;
-
- private GroupDataBinder groupDataBinder;
-
- private UserWorkflowAdapter uwfAdapter;
-
- private String executor;
-
- public PropagateEndpoint(final String endpointUri, final Component component) {
- super(endpointUri, component);
- }
-
- @Override
- public Producer createProducer() throws Exception {
- AbstractProducer producer = null;
- if (null != propagateType) {
- switch (propagateType) {
- case create:
- producer = new CreateProducer(this, anyTypeKind);
- break;
- case update:
- producer = new UpdateProducer(this, anyTypeKind);
- break;
- case delete:
- producer = new DeleteProducer(this, anyTypeKind, userDAO, groupDataBinder);
- break;
- case provision:
- producer = new ProvisionProducer(this, anyTypeKind, userDAO);
- break;
- case deprovision:
- producer = new DeprovisionProducer(this, anyTypeKind, userDAO, groupDAO, anyObjectDAO);
- break;
- case status:
- producer = new StatusProducer(this, anyTypeKind, userDAO, uwfAdapter);
- break;
- case suspend:
- producer = new SuspendProducer(this, anyTypeKind);
- break;
- case confirmPasswordReset:
- producer = new ConfirmPasswordResetProducer(this, anyTypeKind);
- break;
- default:
- break;
- }
- }
-
- if (producer != null) {
- producer.setPropagationManager(propagationManager);
- producer.setPropagationTaskExecutor(taskExecutor);
- producer.setPull(pull);
- producer.setExecutor(this.executor);
- }
- return producer;
- }
-
- @Override
- public Consumer createConsumer(final Processor processor) throws Exception {
- throw new UnsupportedOperationException("Consumer not supported");
- }
-
- @Override
- public boolean isSingleton() {
- return false;
- }
-
- public PropagateType getPropagateType() {
- return propagateType;
- }
-
- public void setPropagateType(final PropagateType propagateType) {
- this.propagateType = propagateType;
- }
-
- public void setPropagationManager(final PropagationManager propagationManager) {
- this.propagationManager = propagationManager;
- }
-
- public void setPropagationTaskExecutor(final PropagationTaskExecutor taskExecutor) {
- this.taskExecutor = taskExecutor;
- }
-
- public AnyTypeKind getAnyTypeKind() {
- return anyTypeKind;
- }
-
- public void setAnyTypeKind(final AnyTypeKind anyTypeKind) {
- this.anyTypeKind = anyTypeKind;
- }
-
- public void setUserDAO(final UserDAO userDAO) {
- this.userDAO = userDAO;
- }
-
- public void setGroupDAO(final GroupDAO groupDAO) {
- this.groupDAO = groupDAO;
- }
-
- public void setAnyObjectDAO(final AnyObjectDAO anyObjectDAO) {
- this.anyObjectDAO = anyObjectDAO;
- }
-
- public void setGroupDataBinder(final GroupDataBinder groupDataBinder) {
- this.groupDataBinder = groupDataBinder;
- }
-
- public boolean isPull() {
- return pull;
- }
-
- public void setPull(final boolean pull) {
- this.pull = pull;
- }
-
- public void setUwfAdapter(final UserWorkflowAdapter uwfAdapter) {
- this.uwfAdapter = uwfAdapter;
- }
-
- public void setExecutor(final String executor) {
- this.executor = executor;
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateType.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateType.java
deleted file mode 100644
index 5e2e8ef..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/component/PropagateType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.component;
-
-public enum PropagateType {
-
- create,
- update,
- delete,
- provision,
- deprovision,
- status,
- suspend,
- confirmPasswordReset
-
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/data/CamelRouteDataBinderImpl.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/data/CamelRouteDataBinderImpl.java
deleted file mode 100644
index b4eb84a..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/data/CamelRouteDataBinderImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.data;
-
-import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
-import org.apache.syncope.core.persistence.api.entity.CamelRoute;
-import org.apache.syncope.core.provisioning.api.data.CamelRouteDataBinder;
-
-public class CamelRouteDataBinderImpl implements CamelRouteDataBinder {
-
- protected final CamelRouteDAO routeDAO;
-
- public CamelRouteDataBinderImpl(final CamelRouteDAO routeDAO) {
- this.routeDAO = routeDAO;
- }
-
- @Override
- public CamelRouteTO getRouteTO(final CamelRoute route) {
- CamelRouteTO routeTO = new CamelRouteTO();
- routeTO.setKey(route.getKey());
- routeTO.setAnyTypeKind(route.getAnyTypeKind());
- routeTO.setContent(route.getContent());
-
- return routeTO;
- }
-
- @Override
- public void update(final CamelRoute route, final CamelRouteTO routeTO) {
- route.setContent(routeTO.getContent());
- routeDAO.save(route);
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/AbstractProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/AbstractProducer.java
deleted file mode 100644
index 5a411a9..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/AbstractProducer.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.support.DefaultProducer;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationManager;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskExecutor;
-
-public abstract class AbstractProducer extends DefaultProducer {
-
- private final AnyTypeKind anyTypeKind;
-
- private PropagationManager propagationManager;
-
- private PropagationTaskExecutor taskExecutor;
-
- private boolean pull;
-
- private String executor;
-
- public AbstractProducer(final Endpoint endpoint, final AnyTypeKind anyTypeKind) {
- super(endpoint);
- this.anyTypeKind = anyTypeKind;
- }
-
- public void setPropagationManager(final PropagationManager propagationManager) {
- this.propagationManager = propagationManager;
- }
-
- public PropagationManager getPropagationManager() {
- return propagationManager;
- }
-
- public void setPropagationTaskExecutor(final PropagationTaskExecutor taskExecutor) {
- this.taskExecutor = taskExecutor;
- }
-
- public PropagationTaskExecutor getPropagationTaskExecutor() {
- return taskExecutor;
- }
-
- public AnyTypeKind getAnyTypeKind() {
- return anyTypeKind;
- }
-
- public boolean isPull() {
- return pull;
- }
-
- public void setPull(final boolean pull) {
- this.pull = pull;
- }
-
- public String getExecutor() {
- return executor;
- }
-
- public void setExecutor(final String executor) {
- this.executor = executor;
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/ConfirmPasswordResetProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/ConfirmPasswordResetProducer.java
deleted file mode 100644
index 0d4d080..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/ConfirmPasswordResetProducer.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import java.util.List;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.UserUR;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.provisioning.api.UserWorkflowResult;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
-
-public class ConfirmPasswordResetProducer extends AbstractProducer {
-
- public ConfirmPasswordResetProducer(final Endpoint endpoint, final AnyTypeKind anyTypeKind) {
- super(endpoint, anyTypeKind);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void process(final Exchange exchange) throws Exception {
- if (getAnyTypeKind() == AnyTypeKind.USER) {
- UserWorkflowResult<Pair<UserUR, Boolean>> updated =
- (UserWorkflowResult<Pair<UserUR, Boolean>>) exchange.getIn().getBody();
-
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getUserUpdateTasks(updated);
-
- getPropagationTaskExecutor().execute(taskInfos, false, getExecutor());
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/CreateProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/CreateProducer.java
deleted file mode 100644
index c101498..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/CreateProducer.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.AnyCR;
-import org.apache.syncope.common.lib.request.AnyObjectCR;
-import org.apache.syncope.common.lib.request.GroupCR;
-import org.apache.syncope.common.lib.request.UserCR;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.provisioning.api.UserWorkflowResult;
-import org.apache.syncope.core.provisioning.api.WorkflowResult;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationReporter;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
-
-public class CreateProducer extends AbstractProducer {
-
- public CreateProducer(final Endpoint endpoint, final AnyTypeKind anyTypeKind) {
- super(endpoint, anyTypeKind);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void process(final Exchange exchange) throws Exception {
- if ((exchange.getIn().getBody() instanceof WorkflowResult)) {
- Object actual = exchange.getProperty("actual");
- Set<String> excludedResources = exchange.getProperty("excludedResources", Set.class);
- Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class);
-
- if (actual instanceof UserCR) {
- UserWorkflowResult<Pair<String, Boolean>> created =
- (UserWorkflowResult<Pair<String, Boolean>>) exchange.getIn().getBody();
-
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getUserCreateTasks(
- created.getResult().getKey(),
- ((UserCR) actual).getPassword(),
- created.getResult().getValue(),
- created.getPropByRes(),
- created.getPropByLinkedAccount(),
- ((UserCR) actual).getVirAttrs(),
- excludedResources);
- PropagationReporter reporter = getPropagationTaskExecutor().
- execute(taskInfos, nullPriorityAsync, getExecutor());
-
- exchange.getMessage().setBody(Pair.of(created.getResult().getKey(), reporter.getStatuses()));
- } else if (actual instanceof AnyCR) {
- WorkflowResult<String> created = (WorkflowResult<String>) exchange.getIn().getBody();
-
- if (actual instanceof GroupCR && isPull()) {
- Map<String, String> groupOwnerMap = exchange.getProperty("groupOwnerMap", Map.class);
- ((GroupCR) actual).getPlainAttr(StringUtils.EMPTY).
- ifPresent(groupOwner -> groupOwnerMap.put(
- created.getResult(), groupOwner.getValues().iterator().next()));
-
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getCreateTasks(
- AnyTypeKind.GROUP,
- created.getResult(),
- null,
- created.getPropByRes(),
- ((AnyCR) actual).getVirAttrs(),
- excludedResources);
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
-
- exchange.getMessage().setBody(Pair.of(created.getResult(), null));
- } else {
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getCreateTasks(
- actual instanceof AnyObjectCR ? AnyTypeKind.ANY_OBJECT : AnyTypeKind.GROUP,
- created.getResult(),
- null,
- created.getPropByRes(),
- ((AnyCR) actual).getVirAttrs(),
- excludedResources);
- PropagationReporter reporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
-
- exchange.getMessage().setBody(Pair.of(created.getResult(), reporter.getStatuses()));
- }
- }
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/DeleteProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/DeleteProducer.java
deleted file mode 100644
index 46b6165..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/DeleteProducer.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.ResourceOperation;
-import org.apache.syncope.core.persistence.api.dao.UserDAO;
-import org.apache.syncope.core.provisioning.api.PropagationByResource;
-import org.apache.syncope.core.provisioning.api.data.GroupDataBinder;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationReporter;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
-
-public class DeleteProducer extends AbstractProducer {
-
- private final UserDAO userDAO;
-
- private final GroupDataBinder groupDataBinder;
-
- public DeleteProducer(
- final Endpoint endpoint,
- final AnyTypeKind anyTypeKind,
- final UserDAO userDao,
- final GroupDataBinder groupDataBinder) {
-
- super(endpoint, anyTypeKind);
- this.userDAO = userDao;
- this.groupDataBinder = groupDataBinder;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void process(final Exchange exchange) throws Exception {
- String key = exchange.getIn().getBody(String.class);
- Set<String> excludedResources = exchange.getProperty("excludedResources", Set.class);
- Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class);
-
- if (null != getAnyTypeKind()) {
- List<PropagationTaskInfo> taskInfos;
- PropagationReporter reporter;
- switch (getAnyTypeKind()) {
- case USER:
- PropagationByResource<String> propByRes = new PropagationByResource<>();
- propByRes.set(ResourceOperation.DELETE, userDAO.findAllResourceKeys(key));
-
- PropagationByResource<Pair<String, String>> propByLinkedAccount = new PropagationByResource<>();
- userDAO.findLinkedAccounts(key).forEach(account -> propByLinkedAccount.add(
- ResourceOperation.DELETE,
- Pair.of(account.getResource().getKey(), account.getConnObjectKeyValue())));
-
- // Note here that we can only notify about "delete", not any other
- // task defined in workflow process definition: this because this
- // information could only be available after uwfAdapter.delete(), which
- // will also effectively remove user from db, thus making virtually
- // impossible by NotificationManager to fetch required user information
- taskInfos = getPropagationManager().getDeleteTasks(
- AnyTypeKind.USER,
- key,
- propByRes,
- propByLinkedAccount,
- excludedResources);
- reporter = getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
- exchange.setProperty("statuses", reporter.getStatuses());
- break;
-
- case GROUP:
- taskInfos = new ArrayList<>();
- // Generate propagation tasks for deleting users from group resources, if they are on those
- // resources only because of the reason being deleted (see SYNCOPE-357)
- groupDataBinder.findUsersWithTransitiveResources(key).
- forEach((anyKey, anyPropByRes) -> taskInfos.addAll(
- getPropagationManager().getDeleteTasks(
- AnyTypeKind.USER,
- anyKey,
- anyPropByRes,
- null,
- excludedResources)));
- groupDataBinder.findAnyObjectsWithTransitiveResources(key).
- forEach((anyKey, anyPropByRes) -> {
- taskInfos.addAll(getPropagationManager().getDeleteTasks(
- AnyTypeKind.ANY_OBJECT,
- anyKey,
- anyPropByRes,
- null,
- excludedResources));
- });
- // Generate propagation tasks for deleting this group from resources
- taskInfos.addAll(getPropagationManager().getDeleteTasks(
- AnyTypeKind.GROUP,
- key,
- null,
- null,
- null));
- reporter = getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
- exchange.setProperty("statuses", reporter.getStatuses());
- break;
-
- case ANY_OBJECT:
- taskInfos = getPropagationManager().getDeleteTasks(
- AnyTypeKind.ANY_OBJECT,
- key,
- null,
- null,
- excludedResources);
- reporter = getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
- exchange.setProperty("statuses", reporter.getStatuses());
- break;
-
- default:
- break;
- }
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/DeprovisionProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/DeprovisionProducer.java
deleted file mode 100644
index d9cc568..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/DeprovisionProducer.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import java.util.List;
-import java.util.stream.Collectors;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.ResourceOperation;
-import org.apache.syncope.core.persistence.api.dao.AnyObjectDAO;
-import org.apache.syncope.core.persistence.api.dao.GroupDAO;
-import org.apache.syncope.core.persistence.api.dao.UserDAO;
-import org.apache.syncope.core.provisioning.api.PropagationByResource;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationReporter;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
-
-public class DeprovisionProducer extends AbstractProducer {
-
- private final UserDAO userDAO;
-
- private final GroupDAO groupDAO;
-
- private final AnyObjectDAO anyObjectDAO;
-
- public DeprovisionProducer(
- final Endpoint endpoint,
- final AnyTypeKind anyTypeKind,
- final UserDAO userDAO,
- final GroupDAO groupDAO,
- final AnyObjectDAO anyObjectDAO) {
-
- super(endpoint, anyTypeKind);
- this.userDAO = userDAO;
- this.groupDAO = groupDAO;
- this.anyObjectDAO = anyObjectDAO;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void process(final Exchange exchange) throws Exception {
- String key = exchange.getIn().getBody(String.class);
- List<String> resources = exchange.getProperty("resources", List.class);
- Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class);
-
- if (null != getAnyTypeKind()) {
- PropagationByResource<String> propByRes = new PropagationByResource<>();
- List<PropagationTaskInfo> taskInfos;
- PropagationReporter propagationReporter;
- switch (getAnyTypeKind()) {
- case USER:
- propByRes.set(ResourceOperation.DELETE, resources);
-
- PropagationByResource<Pair<String, String>> propByLinkedAccount = new PropagationByResource<>();
- userDAO.findLinkedAccounts(key).stream().
- filter(account -> resources.contains(account.getResource().getKey())).
- forEach(account -> propByLinkedAccount.add(
- ResourceOperation.DELETE,
- Pair.of(account.getResource().getKey(), account.getConnObjectKeyValue())));
-
- taskInfos = getPropagationManager().getDeleteTasks(
- AnyTypeKind.USER,
- key,
- propByRes,
- propByLinkedAccount,
- userDAO.findAllResourceKeys(key).stream().
- filter(resource -> !resources.contains(resource)).collect(Collectors.toList()));
- propagationReporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
- exchange.getMessage().setBody(propagationReporter.getStatuses());
- break;
-
- case GROUP:
- propByRes.addAll(ResourceOperation.DELETE, resources);
- taskInfos = getPropagationManager().getDeleteTasks(
- AnyTypeKind.GROUP,
- key,
- propByRes,
- null,
- groupDAO.findAllResourceKeys(key).stream().
- filter(resource -> !resources.contains(resource)).collect(Collectors.toList()));
- propagationReporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
- exchange.getMessage().setBody(propagationReporter.getStatuses());
- break;
-
- case ANY_OBJECT:
- propByRes.addAll(ResourceOperation.DELETE, resources);
- taskInfos = getPropagationManager().getDeleteTasks(
- AnyTypeKind.ANY_OBJECT,
- key,
- propByRes,
- null,
- anyObjectDAO.findAllResourceKeys(key).stream().
- filter(resource -> !resources.contains(resource)).collect(Collectors.toList()));
- propagationReporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
- exchange.getMessage().setBody(propagationReporter.getStatuses());
- break;
-
- default:
- break;
- }
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/ProvisionProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/ProvisionProducer.java
deleted file mode 100644
index 48459b9..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/ProvisionProducer.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import java.util.List;
-import java.util.stream.Collectors;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.PasswordPatch;
-import org.apache.syncope.common.lib.request.StringPatchItem;
-import org.apache.syncope.common.lib.request.UserUR;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.PatchOperation;
-import org.apache.syncope.common.lib.types.ResourceOperation;
-import org.apache.syncope.core.persistence.api.dao.UserDAO;
-import org.apache.syncope.core.provisioning.api.PropagationByResource;
-import org.apache.syncope.core.provisioning.api.UserWorkflowResult;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationReporter;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
-
-public class ProvisionProducer extends AbstractProducer {
-
- private final UserDAO userDAO;
-
- public ProvisionProducer(final Endpoint endpoint, final AnyTypeKind anyType, final UserDAO userDAO) {
- super(endpoint, anyType);
- this.userDAO = userDAO;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void process(final Exchange exchange) throws Exception {
- String key = exchange.getIn().getBody(String.class);
- List<String> resources = exchange.getProperty("resources", List.class);
- Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class);
-
- if (getAnyTypeKind() == AnyTypeKind.USER) {
- Boolean changePwd = exchange.getProperty("changePwd", Boolean.class);
- String password = exchange.getProperty("password", String.class);
-
- UserUR userUR = new UserUR();
- userUR.setKey(key);
- userUR.getResources().addAll(resources.stream().map(resource
- -> new StringPatchItem.Builder().operation(PatchOperation.ADD_REPLACE).value(resource).build()).
- collect(Collectors.toList()));
-
- if (changePwd) {
- userUR.setPassword(
- new PasswordPatch.Builder().onSyncope(true).value(password).resources(resources).build());
- }
-
- PropagationByResource<String> propByRes = new PropagationByResource<>();
- propByRes.addAll(ResourceOperation.UPDATE, resources);
-
- UserWorkflowResult<Pair<UserUR, Boolean>> wfResult = new UserWorkflowResult<>(
- Pair.of(userUR, (Boolean) null), propByRes, null, "update");
-
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getUserUpdateTasks(wfResult, changePwd, null);
- PropagationReporter reporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
-
- exchange.getMessage().setBody(reporter.getStatuses());
- } else {
- PropagationByResource<String> propByRes = new PropagationByResource<>();
- propByRes.addAll(ResourceOperation.UPDATE, resources);
-
- PropagationByResource<Pair<String, String>> propByLinkedAccount = new PropagationByResource<>();
- userDAO.findLinkedAccounts(key).stream().
- filter(account -> resources.contains(account.getResource().getKey())).
- forEach(account -> propByLinkedAccount.add(
- ResourceOperation.UPDATE,
- Pair.of(account.getResource().getKey(), account.getConnObjectKeyValue())));
-
- AnyTypeKind anyTypeKind = AnyTypeKind.GROUP;
- if (getAnyTypeKind() != null) {
- anyTypeKind = getAnyTypeKind();
- }
-
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getUpdateTasks(
- anyTypeKind,
- key,
- false,
- null,
- propByRes,
- propByLinkedAccount,
- null,
- null);
- PropagationReporter reporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
-
- exchange.getMessage().setBody(reporter.getStatuses());
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/StatusProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/StatusProducer.java
deleted file mode 100644
index b81cd1e..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/StatusProducer.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.StatusR;
-import org.apache.syncope.common.lib.request.UserUR;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.ResourceOperation;
-import org.apache.syncope.common.lib.types.StatusRType;
-import org.apache.syncope.core.persistence.api.dao.UserDAO;
-import org.apache.syncope.core.persistence.api.entity.user.User;
-import org.apache.syncope.core.provisioning.api.PropagationByResource;
-import org.apache.syncope.core.provisioning.api.WorkflowResult;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationReporter;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
-import org.apache.syncope.core.workflow.api.UserWorkflowAdapter;
-
-public class StatusProducer extends AbstractProducer {
-
- private final UserDAO userDAO;
-
- private final UserWorkflowAdapter uwfAdapter;
-
- public StatusProducer(
- final Endpoint endpoint,
- final AnyTypeKind anyTypeKind,
- final UserDAO userDAO,
- final UserWorkflowAdapter uwfAdapter) {
-
- super(endpoint, anyTypeKind);
- this.userDAO = userDAO;
- this.uwfAdapter = uwfAdapter;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void process(final Exchange exchange) throws Exception {
- if (getAnyTypeKind() == AnyTypeKind.USER && isPull()) {
- WorkflowResult<Map.Entry<UserUR, Boolean>> updated =
- (WorkflowResult<Entry<UserUR, Boolean>>) exchange.getIn().getBody();
-
- Boolean enabled = exchange.getProperty("enabled", Boolean.class);
- String key = exchange.getProperty("key", String.class);
- String updater = exchange.getProperty("updater", String.class);
- String context = exchange.getProperty("context", String.class);
-
- if (enabled != null) {
- User user = userDAO.find(key);
-
- WorkflowResult<String> enableUpdate = null;
- if (user.isSuspended() == null) {
- enableUpdate = uwfAdapter.activate(key, null, updater, context);
- } else if (enabled && user.isSuspended()) {
- enableUpdate = uwfAdapter.reactivate(key, updater, context);
- } else if (!enabled && !user.isSuspended()) {
- enableUpdate = uwfAdapter.suspend(key, updater, context);
- }
-
- if (enableUpdate != null) {
- if (enableUpdate.getPropByRes() != null) {
- updated.getPropByRes().merge(enableUpdate.getPropByRes());
- updated.getPropByRes().purge();
- }
- updated.getPerformedTasks().addAll(enableUpdate.getPerformedTasks());
- }
- }
- } else if (getAnyTypeKind() == AnyTypeKind.USER) {
- WorkflowResult<String> updated = (WorkflowResult<String>) exchange.getIn().getBody();
- StatusR statusR = exchange.getProperty("statusR", StatusR.class);
- Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class);
-
- PropagationByResource<String> propByRes = new PropagationByResource<>();
- propByRes.addAll(ResourceOperation.UPDATE, statusR.getResources());
-
- PropagationByResource<Pair<String, String>> propByLinkedAccount = new PropagationByResource<>();
- userDAO.findLinkedAccounts(statusR.getKey()).stream().
- filter(account -> statusR.getResources().contains(account.getResource().getKey())).
- forEach(account -> propByLinkedAccount.add(
- ResourceOperation.UPDATE,
- Pair.of(account.getResource().getKey(), account.getConnObjectKeyValue())));
-
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getUpdateTasks(
- AnyTypeKind.USER,
- statusR.getKey(),
- false,
- statusR.getType() != StatusRType.SUSPEND,
- propByRes,
- propByLinkedAccount,
- null,
- null);
- PropagationReporter reporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
-
- exchange.getMessage().setBody(Pair.of(updated.getResult(), reporter.getStatuses()));
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/SuspendProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/SuspendProducer.java
deleted file mode 100644
index f49a5a1e..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/SuspendProducer.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import java.util.List;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.UserUR;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.provisioning.api.UserWorkflowResult;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
-
-public class SuspendProducer extends AbstractProducer {
-
- public SuspendProducer(final Endpoint endpoint, final AnyTypeKind anyTypeKind) {
- super(endpoint, anyTypeKind);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void process(final Exchange exchange) throws Exception {
- if (getAnyTypeKind() == AnyTypeKind.USER) {
- Pair<UserWorkflowResult<String>, Boolean> updated =
- (Pair<UserWorkflowResult<String>, Boolean>) exchange.getIn().getBody();
-
- // propagate suspension if and only if it is required by policy
- if (updated != null && updated.getRight()) {
- UserUR userUR = new UserUR.Builder(updated.getLeft().getResult()).build();
-
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getUserUpdateTasks(
- new UserWorkflowResult<>(
- Pair.of(userUR, Boolean.FALSE),
- updated.getLeft().getPropByRes(),
- updated.getKey().getPropByLinkedAccount(),
- updated.getLeft().getPerformedTasks()));
- getPropagationTaskExecutor().execute(taskInfos, false, getExecutor());
- }
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/UpdateProducer.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/UpdateProducer.java
deleted file mode 100644
index b3bb169..0000000
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/producer/UpdateProducer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.provisioning.camel.producer;
-
-import java.util.List;
-import java.util.Set;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.request.AnyObjectUR;
-import org.apache.syncope.common.lib.request.AnyUR;
-import org.apache.syncope.common.lib.request.UserUR;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.core.provisioning.api.UserWorkflowResult;
-import org.apache.syncope.core.provisioning.api.WorkflowResult;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationReporter;
-import org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
-
-public class UpdateProducer extends AbstractProducer {
-
- public UpdateProducer(final Endpoint endpoint, final AnyTypeKind anyTypeKind) {
- super(endpoint, anyTypeKind);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public void process(final Exchange exchange) throws Exception {
- if ((exchange.getIn().getBody() instanceof WorkflowResult)) {
- Object actual = exchange.getProperty("actual");
- Boolean nullPriorityAsync = exchange.getProperty("nullPriorityAsync", Boolean.class);
- Set<String> excludedResources = exchange.getProperty("excludedResources", Set.class);
-
- if (actual instanceof UserUR || isPull()) {
- UserWorkflowResult<Pair<UserUR, Boolean>> updated =
- (UserWorkflowResult<Pair<UserUR, Boolean>>) exchange.getIn().getBody();
-
- List<PropagationTaskInfo> taskInfos;
- if (isPull()) {
- boolean passwordNotNull = updated.getResult().getKey().getPassword() != null;
- taskInfos = getPropagationManager().getUserUpdateTasks(updated, passwordNotNull, excludedResources);
- } else {
- taskInfos = getPropagationManager().getUserUpdateTasks(updated);
- }
- PropagationReporter reporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
-
- exchange.getMessage().setBody(Pair.of(updated.getResult().getLeft(), reporter.getStatuses()));
- } else if (actual instanceof AnyUR) {
- WorkflowResult<? extends AnyUR> updated =
- (WorkflowResult<? extends AnyUR>) exchange.getIn().getBody();
-
- List<PropagationTaskInfo> taskInfos = getPropagationManager().getUpdateTasks(
- actual instanceof AnyObjectUR ? AnyTypeKind.ANY_OBJECT : AnyTypeKind.GROUP,
- updated.getResult().getKey(),
- false,
- null,
- updated.getPropByRes(),
- null,
- ((AnyUR) actual).getVirAttrs(),
- excludedResources);
- PropagationReporter reporter =
- getPropagationTaskExecutor().execute(taskInfos, nullPriorityAsync, getExecutor());
-
- exchange.getMessage().setBody(Pair.of(updated.getResult(), reporter.getStatuses()));
- }
- }
- }
-}
diff --git a/ext/camel/provisioning-camel/src/main/resources/META-INF/services/org/apache/camel/component/propagate b/ext/camel/provisioning-camel/src/main/resources/META-INF/services/org/apache/camel/component/propagate
deleted file mode 100644
index 92513e8..0000000
--- a/ext/camel/provisioning-camel/src/main/resources/META-INF/services/org/apache/camel/component/propagate
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-class=org.apache.syncope.core.provisioning.camel.component.PropagateComponent
\ No newline at end of file
diff --git a/ext/camel/provisioning-camel/src/main/resources/META-INF/spring.factories b/ext/camel/provisioning-camel/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 4c0a4ee..0000000
--- a/ext/camel/provisioning-camel/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- org.apache.syncope.core.provisioning.camel.CamelProvisioningContext
diff --git a/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml
deleted file mode 100644
index 717ed3c..0000000
--- a/ext/camel/provisioning-camel/src/main/resources/anyObjectRoutes.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<routes>
-
- <route id="createAnyObject">
- <from uri="direct:createAnyObject"/>
- <setProperty name="actual">
- <simple>${body}</simple>
- </setProperty>
- <doTry>
- <bean ref="awfAdapter" method="create(${body},${exchangeProperty.creator},${exchangeProperty.context})"/>
- <to uri="propagate:create?anyTypeKind=ANY_OBJECT"/>
- <to uri="direct:createAnyObjectPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:createAnyObjectPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="updateAnyObject">
- <from uri="direct:updateAnyObject"/>
- <setProperty name="actual">
- <simple>${body}</simple>
- </setProperty>
- <doTry>
- <bean ref="awfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <to uri="propagate:update?anyTypeKind=ANY_OBJECT"/>
- <to uri="direct:updateAnyObjectPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:updateAnyObjectPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="deleteAnyObject">
- <from uri="direct:deleteAnyObject"/>
- <doTry>
- <to uri="propagate:delete?anyTypeKind=ANY_OBJECT"/>
- <bean ref="awfAdapter" method="delete(${body})"/>
- <setBody>
- <simple>${exchangeProperty.statuses}</simple>
- </setBody>
- <to uri="direct:deleteAnyObjectPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:deleteAnyObjectPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="unlinkAnyObject">
- <from uri="direct:unlinkAnyObject"/>
- <doTry>
- <bean ref="awfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <setBody>
- <simple>${body.getResult}</simple>
- </setBody>
- <to uri="direct:unlinkAnyObjectPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:unlinkAnyObjectPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="linkAnyObject">
- <from uri="direct:linkAnyObject"/>
- <doTry>
- <bean ref="awfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <setBody>
- <simple>${body.getResult}</simple>
- </setBody>
- <to uri="direct:linkAnyObjectPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:linkAnyObjectPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="provisionAnyObject">
- <from uri="direct:provisionAnyObject"/>
- <to uri="propagate:provision?anyTypeKind=ANY_OBJECT"/>
- <to uri="direct:provisionAnyObjectPort"/>
- </route>
-
- <route id="deprovisionAnyObject">
- <from uri="direct:deprovisionAnyObject"/>
- <to uri="propagate:deprovision?anyTypeKind=ANY_OBJECT"/>
- <to uri="direct:deprovisionAnyObjectPort"/>
- </route>
-
-</routes>
diff --git a/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml
deleted file mode 100644
index 4b5d5fb..0000000
--- a/ext/camel/provisioning-camel/src/main/resources/groupRoutes.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<routes>
-
- <route id="createGroup">
- <from uri="direct:createGroup"/>
- <setProperty name="actual">
- <simple>${body}</simple>
- </setProperty>
- <doTry>
- <bean ref="gwfAdapter" method="create(${body},${exchangeProperty.creator},${exchangeProperty.context})"/>
- <to uri="propagate:create?anyTypeKind=GROUP"/>
- <to uri="direct:createGroupPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:createGroupPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="createGroupPull">
- <from uri="direct:createGroupInPull"/>
- <setProperty name="actual">
- <simple>${body}</simple>
- </setProperty>
- <doTry>
- <bean ref="gwfAdapter" method="create(${body},${exchangeProperty.creator},${exchangeProperty.context})"/>
- <to uri="propagate:create?anyTypeKind=GROUP&pull=true"/>
- <to uri="direct:createGroupInPullPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:createGroupInPullPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="updateGroup">
- <from uri="direct:updateGroup"/>
- <setProperty name="actual">
- <simple>${body}</simple>
- </setProperty>
- <doTry>
- <bean ref="gwfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <to uri="propagate:update?anyTypeKind=GROUP"/>
- <to uri="direct:updateGroupPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:updateGroupPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="deleteGroup">
- <from uri="direct:deleteGroup"/>
- <doTry>
- <to uri="propagate:delete?anyTypeKind=GROUP"/>
- <bean ref="gwfAdapter" method="delete(${body})"/>
- <setBody>
- <simple>${exchangeProperty.statuses}</simple>
- </setBody>
- <to uri="direct:deleteGroupPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:deleteGroupPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="unlinkGroup">
- <from uri="direct:unlinkGroup"/>
- <doTry>
- <bean ref="gwfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <setBody>
- <simple>${body.getResult}</simple>
- </setBody>
- <to uri="direct:unlinkGroupPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:unlinkGroupPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="linkGroup">
- <from uri="direct:linkGroup"/>
- <doTry>
- <bean ref="gwfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <setBody>
- <simple>${body.getResult}</simple>
- </setBody>
- <to uri="direct:linkGroupPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:linkGroupPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="provisionGroup">
- <from uri="direct:provisionGroup"/>
- <to uri="propagate:provision?anyTypeKind=GROUP"/>
- <to uri="direct:provisionGroupPort"/>
- </route>
-
- <route id="deprovisionGroup">
- <from uri="direct:deprovisionGroup"/>
- <to uri="propagate:deprovision?anyTypeKind=GROUP"/>
- <to uri="direct:deprovisionGroupPort"/>
- </route>
-
-</routes>
diff --git a/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml b/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml
deleted file mode 100644
index c985812..0000000
--- a/ext/camel/provisioning-camel/src/main/resources/userRoutes.xml
+++ /dev/null
@@ -1,263 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<routes>
-
- <route id="createUser">
- <from uri="direct:createUser"/>
- <setProperty name="actual">
- <simple>${body}</simple>
- </setProperty>
- <doTry>
- <bean method="create(${body},
- ${exchangeProperty.disablePwdPolicyCheck},
- ${exchangeProperty.enabled},
- ${exchangeProperty.creator},
- ${exchangeProperty.context})"
- ref="uwfAdapter" />
- <to uri="propagate:create?anyTypeKind=USER"/>
- <to uri="direct:createPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:createPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="updateUser">
- <from uri="direct:updateUser"/>
- <setProperty name="actual">
- <simple>${body}</simple>
- </setProperty>
- <doTry>
- <bean ref="uwfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <to uri="propagate:update?anyTypeKind=USER"/>
- <to uri="direct:updatePort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:updatePort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="updateUserInPull">
- <from uri="direct:updateUserInPull"/>
- <doTry>
- <bean ref="uwfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <to uri="direct:userInPull"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:updateInPullPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="userInPull">
- <from uri="direct:userInPull"/>
- <to uri="propagate:status?anyTypeKind=USER&pull=true"/>
- <to uri="propagate:update?anyTypeKind=USER&pull=true"/>
- <to uri="direct:updateInPullPort"/>
- </route>
-
- <route id="deleteUser">
- <from uri="direct:deleteUser"/>
- <doTry>
- <to uri="propagate:delete?anyTypeKind=USER"/>
- <bean ref="uwfAdapter" method="delete(${body},${exchangeProperty.eraser},${exchangeProperty.context})"/>
- <setBody>
- <simple>${exchangeProperty.statuses}</simple>
- </setBody>
- <to uri="direct:deletePort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:deletePort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="unlinkUser">
- <from uri="direct:unlinkUser"/>
- <doTry>
- <bean ref="uwfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <setBody>
- <simple>${body.getResult.getKey}</simple>
- </setBody>
- <to uri="direct:unlinkPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:unlinkPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="linkUser">
- <from uri="direct:linkUser"/>
- <doTry>
- <bean ref="uwfAdapter" method="update(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <setBody>
- <simple>${body.getResult.getKey}</simple>
- </setBody>
- <to uri="direct:linkPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:linkPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="activateUser">
- <from uri="direct:activateUser"/>
- <doTry>
- <bean ref="uwfAdapter" method="activate(${body},
- ${exchangeProperty.token},
- ${exchangeProperty.updater},
- ${exchangeProperty.context})"/>
- <to uri="direct:userStatusPropagation"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:statusPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="reactivateUser">
- <from uri="direct:reactivateUser"/>
- <doTry>
- <bean ref="uwfAdapter" method="reactivate(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <to uri="direct:userStatusPropagation"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:statusPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="suspendUser">
- <from uri="direct:suspendUser"/>
- <doTry>
- <bean ref="uwfAdapter" method="suspend(${body},${exchangeProperty.updater},${exchangeProperty.context})"/>
- <to uri="direct:userStatusPropagation"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:statusPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="userStatusPropagation">
- <from uri="direct:userStatusPropagation"/>
- <to uri="propagate:status?anyTypeKind=USER"/>
- <to uri="direct:statusPort"/>
- </route>
-
- <route id="provisionUser">
- <from uri="direct:provisionUser"/>
- <to uri="propagate:provision?anyTypeKind=USER"/>
- <to uri="direct:provisionPort"/>
- </route>
-
- <route id="deprovisionUser">
- <from uri="direct:deprovisionUser"/>
- <to uri="propagate:deprovision?anyTypeKind=USER"/>
- <to uri="direct:deprovisionPort"/>
- </route>
-
- <route id="internalSuspendUser">
- <from uri="direct:internalSuspendUser"/>
- <doTry>
- <bean ref="uwfAdapter" method="internalSuspend(${body},
- ${exchangeProperty.updater},
- ${exchangeProperty.context})"/>
- <to uri="propagate:suspend?anyTypeKind=USER"/>
- <to uri="direct:internalSuspendUserPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:internalSuspendUserPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="requestPwdReset">
- <from uri="direct:requestPwdReset"/>
- <doTry>
- <bean ref="uwfAdapter" method="requestPasswordReset(${body},
- ${exchangeProperty.updater},
- ${exchangeProperty.context})"/>
- <to uri="direct:requestPwdResetPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:requestPwdResetPort"/>
- </doCatch>
- </doTry>
- </route>
-
- <route id="confirmPwdReset">
- <from uri="direct:confirmPwdReset"/>
- <doTry>
- <bean ref="uwfAdapter" method="confirmPasswordReset(${exchangeProperty.key},
- ${exchangeProperty.token},
- ${exchangeProperty.password},
- ${exchangeProperty.updater},
- ${exchangeProperty.context})"/>
- <to uri="propagate:confirmPasswordReset?anyTypeKind=USER"/>
- <to uri="direct:confirmPwdResetPort"/>
- <doCatch>
- <exception>java.lang.RuntimeException</exception>
- <handled>
- <constant>false</constant>
- </handled>
- <to uri="direct:confirmPwdResetPort"/>
- </doCatch>
- </doTry>
- </route>
-
-</routes>
diff --git a/ext/camel/rest-api/pom.xml b/ext/camel/rest-api/pom.xml
deleted file mode 100644
index ca8ea86..0000000
--- a/ext/camel/rest-api/pom.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel REST API</name>
- <description>Apache Syncope Ext: Camel REST API</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-api</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope.common.idm</groupId>
- <artifactId>syncope-common-idm-rest-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-common-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!-- Generating javadoc JAR artifact for usage with CXF's WADL generator (for core) -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
deleted file mode 100644
index 8010544..0000000
--- a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.rest.api.service;
-
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.enums.ParameterIn;
-import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.annotations.responses.ApiResponse;
-import io.swagger.v3.oas.annotations.responses.ApiResponses;
-import io.swagger.v3.oas.annotations.security.SecurityRequirement;
-import io.swagger.v3.oas.annotations.security.SecurityRequirements;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import java.util.List;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import org.apache.syncope.common.lib.to.CamelMetrics;
-import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.rest.api.RESTHeaders;
-
-/**
- * REST operations for Camel routes.
- */
-@Tag(name = "Camel")
-@SecurityRequirements({
- @SecurityRequirement(name = "BasicAuthentication"),
- @SecurityRequirement(name = "Bearer") })
-@Path("camelRoutes")
-public interface CamelRouteService extends JAXRSService {
-
- /**
- * List all routes for the given any type kind.
- *
- * @param anyTypeKind any type kind
- * @return all routes for the given any type kind
- */
- @GET
- @Path("{anyTypeKind}")
- @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
- List<CamelRouteTO> list(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind);
-
- /**
- * Read the route with the given key.
- *
- * @param anyTypeKind any type kind
- * @param key route key
- * @return route with given key
- */
- @GET
- @Path("{anyTypeKind}/{key}")
- @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
- CamelRouteTO read(
- @NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind,
- @NotNull @PathParam("key") String key);
-
- /**
- * Update the given route.
- *
- * @param anyTypeKind any type kind
- * @param route to be updated
- */
- @Parameter(name = "key", description = "Camel route's key", in = ParameterIn.PATH, schema =
- @Schema(type = "string"))
- @ApiResponses(
- @ApiResponse(responseCode = "204", description = "Operation was successful"))
- @PUT
- @Path("{anyTypeKind}/{key}")
- @Consumes({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
- @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
- void update(@NotNull @PathParam("anyTypeKind") AnyTypeKind anyTypeKind, @NotNull CamelRouteTO route);
-
- /**
- * Restart the underlying Apache Camel context.
- */
- @ApiResponses(
- @ApiResponse(responseCode = "204", description = "Operation was successful"))
- @POST
- @Path("restartContext")
- @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
- void restartContext();
-
- /**
- * Provides Camel metrics.
- *
- * @return Camel metrics
- */
- @GET
- @Path("metrics")
- @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
- CamelMetrics metrics();
-}
diff --git a/ext/camel/rest-cxf/pom.xml b/ext/camel/rest-cxf/pom.xml
deleted file mode 100644
index 5617e75..0000000
--- a/ext/camel/rest-cxf/pom.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.syncope.ext</groupId>
- <artifactId>syncope-ext-camel</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <name>Apache Syncope Ext: Camel REST CXF</name>
- <description>Apache Syncope Ext: Camel REST CXF</description>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-cxf</artifactId>
- <packaging>jar</packaging>
-
- <properties>
- <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.syncope.core.idm</groupId>
- <artifactId>syncope-core-idm-rest-cxf</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-api</artifactId>
- <version>${project.version}</version>
- <classifier>javadoc</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-logic</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/CamelRESTCXFContext.java b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/CamelRESTCXFContext.java
deleted file mode 100644
index 1437d0d..0000000
--- a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/CamelRESTCXFContext.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.rest.cxf;
-
-import org.apache.syncope.common.rest.api.service.CamelRouteService;
-import org.apache.syncope.core.logic.CamelRouteLogic;
-import org.apache.syncope.core.rest.cxf.service.CamelRouteServiceImpl;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration(proxyBeanMethods = false)
-public class CamelRESTCXFContext {
-
- @ConditionalOnMissingBean
- @Bean
- public CamelRouteService camelRouteService(final CamelRouteLogic camelRouteLogic) {
- return new CamelRouteServiceImpl(camelRouteLogic);
- }
-}
diff --git a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
deleted file mode 100644
index cd0c294..0000000
--- a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.core.rest.cxf.service;
-
-import java.util.List;
-import org.apache.syncope.common.lib.to.CamelMetrics;
-import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.rest.api.service.CamelRouteService;
-import org.apache.syncope.core.logic.CamelRouteLogic;
-import org.springframework.stereotype.Service;
-
-@Service
-public class CamelRouteServiceImpl extends AbstractService implements CamelRouteService {
-
- protected final CamelRouteLogic logic;
-
- public CamelRouteServiceImpl(final CamelRouteLogic logic) {
- this.logic = logic;
- }
-
- @Override
- public List<CamelRouteTO> list(final AnyTypeKind anyTypeKind) {
- return logic.list(anyTypeKind);
- }
-
- @Override
- public CamelRouteTO read(final AnyTypeKind anyTypeKind, final String key) {
- return logic.read(anyTypeKind, key);
- }
-
- @Override
- public void update(final AnyTypeKind anyTypeKind, final CamelRouteTO route) {
- logic.update(anyTypeKind, route);
- }
-
- @Override
- public void restartContext() {
- logic.restartContext();
- }
-
- @Override
- public CamelMetrics metrics() {
- return logic.metrics();
- }
-}
diff --git a/ext/camel/rest-cxf/src/main/resources/META-INF/spring.factories b/ext/camel/rest-cxf/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index 7dc2a45..0000000
--- a/ext/camel/rest-cxf/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
- org.apache.syncope.core.rest.cxf.CamelRESTCXFContext
diff --git a/ext/pom.xml b/ext/pom.xml
index 1fb1222..9f86be1 100644
--- a/ext/pom.xml
+++ b/ext/pom.xml
@@ -78,7 +78,6 @@
<modules>
<module>flowable</module>
- <module>camel</module>
<module>saml2sp4ui</module>
<module>oidcc4ui</module>
<module>elasticsearch</module>
diff --git a/fit/console-reference/pom.xml b/fit/console-reference/pom.xml
index 8bc41b8..988e9e2 100644
--- a/fit/console-reference/pom.xml
+++ b/fit/console-reference/pom.xml
@@ -62,12 +62,6 @@
<artifactId>syncope-ext-flowable-client-console</artifactId>
<version>${project.version}</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-client-console</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
diff --git a/fit/console-reference/src/test/resources/hotswap-agent.properties b/fit/console-reference/src/test/resources/hotswap-agent.properties
index 4a504a6..4b64c48 100644
--- a/fit/console-reference/src/test/resources/hotswap-agent.properties
+++ b/fit/console-reference/src/test/resources/hotswap-agent.properties
@@ -24,7 +24,6 @@
${basedir}/../../client/idrepo/console/target/classes/org,\
${basedir}/../../client/idm/console/target/classes/org,\
${basedir}/../../client/am/console/target/classes/org,\
-${basedir}/../../ext/camel/client-console/target/classes/org,\
${basedir}/../../ext/flowable/client-console/target/classes/org,\
${basedir}/../../ext/saml2sp/client-console/target/classes/org,\
${basedir}/../../ext/scimv2/client-console/target/classes/org,\
diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index 065b994..5f8d426 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -137,18 +137,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-cxf</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-client-console</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
<artifactId>syncope-ext-saml2sp4ui-rest-cxf</artifactId>
<version>${project.version}</version>
@@ -1631,23 +1619,7 @@
<artifactId>syncope-ext-flowable-rest-cxf</artifactId>
<version>${project.version}</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-cxf</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-provisioning</artifactId>
- <version>${project.version}</version>
- </dependency>
-
+
<dependency>
<groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
<artifactId>syncope-ext-saml2sp4ui-rest-cxf</artifactId>
diff --git a/fit/core-reference/src/main/resources/log4j2.xml b/fit/core-reference/src/main/resources/log4j2.xml
index 77f1ab7..cdd8cc3 100644
--- a/fit/core-reference/src/main/resources/log4j2.xml
+++ b/fit/core-reference/src/main/resources/log4j2.xml
@@ -135,9 +135,6 @@
<asyncLogger name="org.apache.fop" additivity="false" level="ERROR">
<appender-ref ref="main"/>
</asyncLogger>
- <asyncLogger name="org.apache.camel" additivity="false" level="ERROR">
- <appender-ref ref="main"/>
- </asyncLogger>
<asyncLogger name="org.apache.wss4j" additivity="false" level="ERROR">
<appender-ref ref="main"/>
</asyncLogger>
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
index 7c1faf0..c4b3de7 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/AbstractITCase.java
@@ -115,7 +115,6 @@
import org.apache.syncope.common.rest.api.service.AuthModuleService;
import org.apache.syncope.common.rest.api.service.AuthProfileService;
import org.apache.syncope.common.rest.api.service.BpmnProcessService;
-import org.apache.syncope.common.rest.api.service.CamelRouteService;
import org.apache.syncope.common.rest.api.service.ClientAppService;
import org.apache.syncope.common.rest.api.service.ConnectorService;
import org.apache.syncope.common.rest.api.service.DelegationService;
@@ -351,8 +350,6 @@
protected static SRARouteService SRA_ROUTE_SERVICE;
- protected static CamelRouteService CAMEL_ROUTE_SERVICE;
-
protected static SAML2SP4UIService SAML2SP4UI_SERVICE;
protected static SAML2SP4UIIdPService SAML2SP4UI_IDP_SERVICE;
@@ -457,7 +454,6 @@
REMEDIATION_SERVICE = ADMIN_CLIENT.getService(RemediationService.class);
DELEGATION_SERVICE = ADMIN_CLIENT.getService(DelegationService.class);
SRA_ROUTE_SERVICE = ADMIN_CLIENT.getService(SRARouteService.class);
- CAMEL_ROUTE_SERVICE = ADMIN_CLIENT.getService(CamelRouteService.class);
SAML2SP4UI_SERVICE = ADMIN_CLIENT.getService(SAML2SP4UIService.class);
SAML2SP4UI_IDP_SERVICE = ADMIN_CLIENT.getService(SAML2SP4UIIdPService.class);
OIDCC4UI_SERVICE = ADMIN_CLIENT.getService(OIDCC4UIService.class);
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
deleted file mode 100644
index 33b10b6..0000000
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/CamelRouteITCase.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.fit.core;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
-
-import java.util.List;
-import org.apache.syncope.common.lib.SyncopeConstants;
-import org.apache.syncope.common.lib.request.UserCR;
-import org.apache.syncope.common.lib.to.AnyTypeClassTO;
-import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.to.PlainSchemaTO;
-import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.syncope.common.lib.types.AttrSchemaType;
-import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.syncope.fit.AbstractITCase;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-public class CamelRouteITCase extends AbstractITCase {
-
- @BeforeEach
- public void check() {
- assumeTrue(ADMIN_CLIENT.platform().getProvisioningInfo().getUserProvisioningManager().contains("Camel"));
- }
-
- @Test
- public void userRoutes() {
- List<CamelRouteTO> userRoutes = CAMEL_ROUTE_SERVICE.list(AnyTypeKind.USER);
- assertNotNull(userRoutes);
- assertEquals(16, userRoutes.size());
- userRoutes.forEach(route -> assertNotNull(route.getContent()));
- }
-
- @Test
- public void groupRoutes() {
- List<CamelRouteTO> groupRoutes = CAMEL_ROUTE_SERVICE.list(AnyTypeKind.GROUP);
- assertNotNull(groupRoutes);
- assertEquals(8, groupRoutes.size());
- groupRoutes.forEach(route -> assertNotNull(route.getContent()));
- }
-
- private static CamelRouteTO doUpdate(final AnyTypeKind anyTypeKind, final String key, final String content) {
- CamelRouteTO route = CAMEL_ROUTE_SERVICE.read(anyTypeKind, key);
- route.setContent(content);
- CAMEL_ROUTE_SERVICE.update(anyTypeKind, route);
- // getting new route definition
- return CAMEL_ROUTE_SERVICE.read(anyTypeKind, key);
- }
-
- @Test
- public void update() {
- CamelRouteTO oldRoute = CAMEL_ROUTE_SERVICE.read(AnyTypeKind.USER, "createUser");
- assertNotNull(oldRoute);
- String routeContent = "<route id=\"createUser\">\n"
- + " <from uri=\"direct:createUser\"/>\n"
- + " <setProperty name=\"actual\">\n"
- + " <simple>${body}</simple>\n"
- + " </setProperty>\n"
- + " <doTry>\n"
- + " <bean ref=\"uwfAdapter\" method=\"create(${body},${exchangeProperty.disablePwdPolicyCheck},\n"
- + " ${exchangeProperty.enabled})\"/>\n"
- + " <to uri=\"propagate:create?anyTypeKind=USER\"/>\n"
- + " <to uri=\"direct:createPort\"/>\n"
- + " <to uri=\"log:myLog\"/>\n"
- + " <doCatch> \n"
- + " <exception>java.lang.RuntimeException</exception>\n"
- + " <handled>\n"
- + " <constant>false</constant>\n"
- + " </handled>\n"
- + " <to uri=\"direct:createPort\"/>\n"
- + " </doCatch>\n"
- + " </doTry>\n"
- + "</route>";
- try {
- CamelRouteTO route = doUpdate(AnyTypeKind.USER, "createUser", routeContent);
- assertEquals(routeContent, route.getContent());
- } finally {
- doUpdate(AnyTypeKind.USER, oldRoute.getKey(), oldRoute.getContent());
- }
- }
-
- @Test
- public void scriptingUpdate() {
- CamelRouteTO oldRoute = CAMEL_ROUTE_SERVICE.read(AnyTypeKind.USER, "createUser");
- // updating route content including new attribute management
-
- String routeContent = ""
- + " <route id=\"createUser\">\n"
- + " <from uri=\"direct:createUser\"/>\n"
- + " <setProperty name=\"actual\">\n"
- + " <simple>${body}</simple>\n"
- + " </setProperty>\n"
- + " <setBody>\n"
- + " <groovy>\n"
- + "request.body.getPlainAttr(\"camelAttribute\").get().getValues().set(0,\"true\")\n"
- + " return request.body\n"
- + " </groovy>\n"
- + " </setBody>\n"
- + " <doTry>\n"
- + " <bean ref=\"uwfAdapter\" method=\"create(${body},${exchangeProperty.disablePwdPolicyCheck},\n"
- + " ${exchangeProperty.enabled})\"/>\n"
- + " <to uri=\"propagate:create?anyTypeKind=USER\"/>\n"
- + " <to uri=\"direct:createPort\"/>\n"
- + " <doCatch> \n"
- + " <exception>java.lang.RuntimeException</exception>\n"
- + " <handled>\n"
- + " <constant>false</constant>\n"
- + " </handled>\n"
- + " <to uri=\"direct:createPort\"/>\n"
- + " </doCatch>\n"
- + " </doTry>\n"
- + " </route> ";
- try {
- doUpdate(AnyTypeKind.USER, "createUser", routeContent);
-
- // creating new schema attribute for user
- PlainSchemaTO schemaTO = new PlainSchemaTO();
- schemaTO.setKey("camelAttribute");
- schemaTO.setType(AttrSchemaType.String);
- createSchema(SchemaType.PLAIN, schemaTO);
-
- AnyTypeClassTO typeClass = new AnyTypeClassTO();
- typeClass.setKey("camelAttribute");
- typeClass.getPlainSchemas().add(schemaTO.getKey());
- ANY_TYPE_CLASS_SERVICE.create(typeClass);
-
- UserCR userCR = new UserCR();
- userCR.setRealm(SyncopeConstants.ROOT_REALM);
- userCR.getAuxClasses().add(typeClass.getKey());
- String userId = getUUIDString() + "camelUser@syncope.apache.org";
- userCR.setUsername(userId);
- userCR.setPassword("password123");
- userCR.getPlainAttrs().add(attr("userId", userId));
- userCR.getPlainAttrs().add(attr("fullname", userId));
- userCR.getPlainAttrs().add(attr("surname", userId));
- userCR.getPlainAttrs().add(attr("camelAttribute", "false"));
-
- UserTO userTO = createUser(userCR).getEntity();
- assertNotNull(userTO);
- assertEquals("true", userTO.getPlainAttr("camelAttribute").get().getValues().get(0));
- } finally {
- doUpdate(AnyTypeKind.USER, oldRoute.getKey(), oldRoute.getContent());
- }
- }
-
- @Test
- public void issueSYNCOPE931() {
- CamelRouteTO oldRoute = CAMEL_ROUTE_SERVICE.read(AnyTypeKind.USER, "createUser");
- assertNotNull(oldRoute);
- String routeContent = "<route id=\"createUser\">\n"
- + " <from uri=\"direct:createUser\"/>\n"
- + " <setProperty name=\"actual\">\n"
- + " <simple>${body}</simple>\n"
- + " </setProperty>\n"
- + " <doTry>\n"
- + " <bean ref=\"uwfAdapter\" method=\"create(${body},${exchangeProperty.disablePwdPolicyCheck},\n"
- + " ${exchangeProperty.enabled})\"/>\n"
- + " <to uri=\"propagate:create123?anyTypeKind=USER\"/>\n"
- + " <to uri=\"direct:createPort\"/>\n"
- + " <to uri=\"log:myLog\"/>\n"
- + " <doCatch> \n"
- + " <exception>java.lang.RuntimeException</exception>\n"
- + " <handled>\n"
- + " <constant>false</constant>\n"
- + " </handled>\n"
- + " <to uri=\"direct:createPort\"/>\n"
- + " </doCatch>\n"
- + " </doTry>\n"
- + "</route>";
-
- // Try to update a route with an incorrect propagation type
- try {
- doUpdate(AnyTypeKind.USER, "createUser", routeContent);
- fail("Error expected on an incorrect propagation type");
- } catch (Exception ex) {
- // Expected
- }
-
- // Now update the route again with the correct propagation type
- routeContent = routeContent.replaceFirst("create123", "create");
- try {
- CamelRouteTO route = doUpdate(AnyTypeKind.USER, "createUser", routeContent);
- assertEquals(routeContent, route.getContent());
- } finally {
- doUpdate(AnyTypeKind.USER, oldRoute.getKey(), oldRoute.getContent());
- }
- }
-}
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java
index fdcb5b7..a7ef5e8 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ExceptionMapperITCase.java
@@ -68,7 +68,7 @@
createSchema(SchemaType.PLAIN, schemaTO);
AnyTypeClassTO typeClass = new AnyTypeClassTO();
- typeClass.setKey("camelAttribute" + getUUIDString());
+ typeClass.setKey("uniqueAttribute" + getUUIDString());
typeClass.getPlainSchemas().add(schemaTO.getKey());
ANY_TYPE_CLASS_SERVICE.create(typeClass);
diff --git a/fit/core-reference/src/test/resources/hotswap-agent.properties b/fit/core-reference/src/test/resources/hotswap-agent.properties
index 7cc034e..facc5bf 100644
--- a/fit/core-reference/src/test/resources/hotswap-agent.properties
+++ b/fit/core-reference/src/test/resources/hotswap-agent.properties
@@ -45,9 +45,6 @@
${basedir}/../../ext/flowable/provisioning-java/target/classes,\
${basedir}/../../ext/flowable/rest-api/target/classes,\
${basedir}/../../ext/flowable/rest-cxf/target/classes/org,\
-${basedir}/../../ext/camel/common-lib/target/classes,\
-${basedir}/../../ext/camel/logic/target/classes,\
-${basedir}/../../ext/camel/provisioning-camel/target/classes/org,\
${basedir}/../../ext/saml2sp/common-lib/target/classes,\
${basedir}/../../ext/saml2sp/logic/target/classes,\
${basedir}/../../ext/saml2sp/persistence-api/target/classes,\
diff --git a/pom.xml b/pom.xml
index 49087c2..dcaf66c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -430,8 +430,6 @@
<flowable.version>6.7.2</flowable.version>
- <camel.version>3.18.1</camel.version>
-
<slf4j.version>1.7.36</slf4j.version>
<elasticsearch.version>8.4.0</elasticsearch.version>
@@ -636,53 +634,6 @@
</dependency>
<!-- /Swagger -->
- <!-- Camel -->
- <dependency>
- <groupId>org.apache.camel.springboot</groupId>
- <artifactId>camel-spring-boot-starter</artifactId>
- <version>${camel.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-groovy</artifactId>
- <version>${camel.version}</version>
- <exclusions>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-metrics</artifactId>
- <version>${camel.version}</version>
- <exclusions>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.xml.bind</groupId>
- <artifactId>jaxb-impl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>spi-annotations</artifactId>
- <version>${camel.version}</version>
- </dependency>
- <!-- /Camel -->
-
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
@@ -2250,8 +2201,6 @@
<link>http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.13/</link>
<link>http://fasterxml.github.io/jackson-dataformats-text/javadoc/yaml/2.13/</link>
<link>http://fasterxml.github.io/jackson-dataformats-text/javadoc/csv/2.13/</link>
- <link>https://www.javadoc.io/doc/org.apache.camel/camel-core/latest/</link>
- <link>https://www.javadoc.io/doc/org.apache.camel/camel-spring/latest/</link>
<link>https://ci.apache.org/projects/wicket/apidocs/9.x/</link>
<link>https://commons.apache.org/proper/commons-lang/javadocs/api-release/</link>
<link>https://commons.apache.org/proper/commons-jexl/apidocs/</link>
diff --git a/src/main/asciidoc/getting-started/introduction.adoc b/src/main/asciidoc/getting-started/introduction.adoc
index d0c941a..0261574 100644
--- a/src/main/asciidoc/getting-started/introduction.adoc
+++ b/src/main/asciidoc/getting-started/introduction.adoc
@@ -139,8 +139,7 @@
representation of Users, Groups and Any Objects. +
This component often needs to be tailored to meet the requirements of a specific deployment, as it is the crucial decision
point for defining and enforcing the consistency and transformations between internal and external data. The default
-all-Java implementation can be extended for this purpose. In addition, an https://camel.apache.org/[Apache Camel^]-based
-implementation is also available as an extension, which brings all the power of runtime changes and adaptation.
+all-Java implementation can be extended for this purpose.
* *_Workflow_* is one of the pluggable aspects of Apache Syncope: this lets every deployment choose the preferred engine
from a provided list - including one based on https://www.flowable.org/[Flowable^], the reference open source
http://www.bpmn.org/[BPMN 2.0^] implementations - or define new, custom ones.
diff --git a/src/main/asciidoc/reference-guide/architecture/core.adoc b/src/main/asciidoc/reference-guide/architecture/core.adoc
index ca4aa5b..0eecc34 100644
--- a/src/main/asciidoc/reference-guide/architecture/core.adoc
+++ b/src/main/asciidoc/reference-guide/architecture/core.adoc
@@ -62,9 +62,6 @@
it is the crucial decision point for defining and enforcing the consistency and transformations between internal and
external data.
-In addition, an https://camel.apache.org/[Apache Camel^]-based implementation is also available as an
-<<apache-camel-provisioning-manager,extension>>, which brings all the power of runtime changes and adaptation.
-
[[workflow-layer]]
==== Workflow
diff --git a/src/main/asciidoc/reference-guide/concepts/entitlements.adoc b/src/main/asciidoc/reference-guide/concepts/entitlements.adoc
index df65dc9..f6cf1a4 100644
--- a/src/main/asciidoc/reference-guide/concepts/entitlements.adoc
+++ b/src/main/asciidoc/reference-guide/concepts/entitlements.adoc
@@ -54,10 +54,10 @@
endif::[]
- even though <<extensions,extensions>> have the ability to
ifeval::["{snapshotOrRelease}" == "release"]
-https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/types/CamelEntitlement.java[enlarge the initial list^]
+https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/types/FlowableEntitlement.java[enlarge the initial list^]
endif::[]
ifeval::["{snapshotOrRelease}" == "snapshot"]
-https://github.com/apache/syncope/blob/master/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/types/CamelEntitlement.java[enlarge the initial list^]
+https://github.com/apache/syncope/blob/master/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/types/FlowableEntitlement.java[enlarge the initial list^]
endif::[]
: this is because entitlements are the pillars of the internal security model and are not meant for external usage.
diff --git a/src/main/asciidoc/reference-guide/concepts/extensions.adoc b/src/main/asciidoc/reference-guide/concepts/extensions.adoc
index ee8c32e..e71ece9 100644
--- a/src/main/asciidoc/reference-guide/concepts/extensions.adoc
+++ b/src/main/asciidoc/reference-guide/concepts/extensions.adoc
@@ -33,32 +33,6 @@
. as Maven artifacts published by third parties;
. as part of a given deployment source code, as explained <<customization-extensions, in the following>>.
-==== Apache Camel Provisioning Manager
-
-This extension delegates the <<provisioning,provisioning>> process execution to a set of
-https://camel.apache.org[Apache Camel^] routes.
-
-The pre-loaded routes can be dynamically changed at runtime via REST or admin console, and modifications are immediately
-made available for processing.
-
-For example, on creating a new user, you may wish to send an email to an administrator; or if a user is
-reactivated, you may wish to reactivate the user's home page on a web server. +
-All these things and more are possible using the myriad of
-https://camel.apache.org/components.html[components^] that are available to be used in Apache Camel routes.
-
-[NOTE]
-.Extension Sources
-====
-The source code of this extension is available from the Apache Syncope
-ifeval::["{snapshotOrRelease}" == "release"]
-https://github.com/apache/syncope/tree/syncope-{docVersion}/ext/camel[source tree^]
-endif::[]
-ifeval::["{snapshotOrRelease}" == "snapshot"]
-https://github.com/apache/syncope/tree/master/ext/camel[source tree^]
-endif::[]
-.
-====
-
[[saml2sp4ui]]
==== SAML 2.0 Service Provider for UI
diff --git a/src/main/asciidoc/reference-guide/concepts/provisioning/provisioning.adoc b/src/main/asciidoc/reference-guide/concepts/provisioning/provisioning.adoc
index 9bfa1ea..7e71ae2 100644
--- a/src/main/asciidoc/reference-guide/concepts/provisioning/provisioning.adoc
+++ b/src/main/asciidoc/reference-guide/concepts/provisioning/provisioning.adoc
@@ -83,8 +83,6 @@
ifeval::["{snapshotOrRelease}" == "snapshot"]
* https://github.com/apache/syncope/blob/master/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/DefaultAnyObjectProvisioningManager.java[DefaultAnyObjectProvisioningManager^]
endif::[]
-
-An Apache Camel-based implementation is available as <<apache-camel-provisioning-manager,extension>>.
====
include::propagation.adoc[]
diff --git a/src/main/asciidoc/reference-guide/usage/clientlibrary.adoc b/src/main/asciidoc/reference-guide/usage/clientlibrary.adoc
index d0fb945..9137dfe 100644
--- a/src/main/asciidoc/reference-guide/usage/clientlibrary.adoc
+++ b/src/main/asciidoc/reference-guide/usage/clientlibrary.adoc
@@ -115,14 +115,6 @@
loggerService.update(LoggerType.LOG, loggerTO);
----
-[NOTE]
-More RESTful services could be available besides the
-https://syncope.apache.org/apidocs/3.0/org/apache/syncope/common/rest/api/service/package-summary.html[default set^],
-as there might be <<extensions,extensions>> installed in the given deployment; the
-<<apache-camel-provisioning-manager>> provides the
-https://syncope.apache.org/apidocs/3.0/org/apache/syncope/common/rest/api/service/CamelRouteService.html[CamelRouteService^],
-for instance.
-
[TIP]
Advanced REST features are also available from `SyncopeClient` instances: check
https://syncope.apache.org/apidocs/3.0/org/apache/syncope/client/lib/SyncopeClient.html[the javadoc^]
diff --git a/src/main/asciidoc/reference-guide/usage/customization.adoc b/src/main/asciidoc/reference-guide/usage/customization.adoc
index 6ced0aa..5446177 100644
--- a/src/main/asciidoc/reference-guide/usage/customization.adoc
+++ b/src/main/asciidoc/reference-guide/usage/customization.adoc
@@ -309,30 +309,6 @@
----
[discrete]
-===== Enable the <<apache-camel-provisioning-manager>>
-
-Add the following dependencies to `core/pom.xml`:
-
-[source,xml,subs="verbatim,attributes"]
-----
-<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-rest-cxf</artifactId>
- <version>${syncope.version}</version>
-</dependency>
-<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-persistence-jpa</artifactId>
- <version>${syncope.version}</version>
-</dependency>
-<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-provisioning</artifactId>
- <version>${syncope.version}</version>
-</dependency>
-----
-
-[discrete]
===== Enable the <<saml2sp4ui>> extension
Add the following dependencies to `core/pom.xml`:
@@ -436,28 +412,28 @@
. create - in an extension's `rest-api` module or under `common` otherwise - a Java interface with package
`org.apache.syncope.common.rest.api.service` and proper JAX-RS annotations; check
ifeval::["{snapshotOrRelease}" == "release"]
-https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java[CamelRouteService^]
+https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/BpmnProcessService.java[BpmnProcessService^]
endif::[]
ifeval::["{snapshotOrRelease}" == "snapshot"]
-https://github.com/apache/syncope/blob/master/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java[CamelRouteService^]
+https://github.com/apache/syncope/blob/master/ext/flowable/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/BpmnProcessService.java[BpmnProcessService^]
endif::[]
for reference;
. if needed, define supporting payload objects - in an extension's `common-lib` module or under `common` otherwise;
check
ifeval::["{snapshotOrRelease}" == "release"]
-https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java[CamelRouteTO^]
+https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/to/BpmnProcess.java[BpmnProcess^]
endif::[]
ifeval::["{snapshotOrRelease}" == "snapshot"]
-https://github.com/apache/syncope/blob/master/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java[CamelRouteTO^]
+https://github.com/apache/syncope/blob/master/ext/flowable/common-lib/src/main/java/org/apache/syncope/common/lib/to/BpmnProcess.java[BpmnProcess^]
endif::[]
for reference;
. implement - in an extension's `rest-cxf` module or under `core` otherwise - the interface defined above in a Java
class with package `org.apache.syncope.core.rest.cxf.service`; check
ifeval::["{snapshotOrRelease}" == "release"]
-https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java[CamelRouteServiceImpl^]
+https://github.com/apache/syncope/blob/syncope-{docVersion}/ext/flowable/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/BpmnProcessServiceImpl.java[BpmnProcessServiceImpl^]
endif::[]
ifeval::["{snapshotOrRelease}" == "snapshot"]
-https://github.com/apache/syncope/blob/master/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java[CamelRouteServiceImpl^]
+https://github.com/apache/syncope/blob/master/ext/flowable/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/BpmnProcessServiceImpl.java[BpmnProcessServiceImpl^]
endif::[]
for reference.
@@ -486,20 +462,6 @@
----
[discrete]
-===== Enable the <<apache-camel-provisioning-manager>>
-
-Add the following dependency to `console/pom.xml`:
-
-[source,xml,subs="verbatim,attributes"]
-----
-<dependency>
- <groupId>org.apache.syncope.ext.camel</groupId>
- <artifactId>syncope-ext-camel-client-console</artifactId>
- <version>${syncope.version}</version>
-</dependency>
-----
-
-[discrete]
===== Enable the <<saml2sp4ui>> extension
Add the following dependencies to `console/pom.xml`:
diff --git a/src/site/xdoc/architecture.xml b/src/site/xdoc/architecture.xml
index 4fcaff5..be8705a 100644
--- a/src/site/xdoc/architecture.xml
+++ b/src/site/xdoc/architecture.xml
@@ -95,9 +95,6 @@
This component often needs to be tailored to meet the requirements of a specific deployment, as it is the
crucial decision point for defining and enforcing the consistency and transformations between internal and
external data. The default all-Java implementation can be extended for this purpose.
- In addition, an <a target="_blank" href="https://camel.apache.org/">Apache Camel</a>-based
- implementation is also available as an extension, which brings all the power of runtime changes and
- adaptation.
</p>
</li>
<li>