This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new 2342fba264 Upgrading OpenSearch, JDBC PostgreSQL driver and
gmavenplus-plugin
2342fba264 is described below
commit 2342fba2646e87859f2ac680eba0f2487925c43e
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Thu Feb 12 07:25:28 2026 +0100
Upgrading OpenSearch, JDBC PostgreSQL driver and gmavenplus-plugin
---
.../api/pushpull/AnyObjectPushResultHandler.java | 22 --
...esultHandler.java => AnyPullResultHandler.java} | 4 +-
...esultHandler.java => AnyPushResultHandler.java} | 2 +-
.../api/pushpull/GroupPullResultHandler.java | 22 --
.../api/pushpull/GroupPushResultHandler.java | 22 --
.../api/pushpull/RealmPushResultHandler.java | 6 +-
.../pushpull/SyncopeRealmPushResultHandler.java | 26 ---
.../api/pushpull/UserPullResultHandler.java | 22 --
.../api/pushpull/UserPushResultHandler.java | 2 +-
.../java/pushpull/AbstractPullExecutor.java | 10 +-
.../java/pushpull/AbstractPullResultHandler.java | 256 ++++++++++++---------
.../java/pushpull/AbstractPushResultHandler.java | 4 +-
.../DefaultAnyObjectPullResultHandler.java | 4 +-
.../DefaultAnyObjectPushResultHandler.java | 5 +-
.../pushpull/DefaultGroupPullResultHandler.java | 4 +-
.../pushpull/DefaultGroupPushResultHandler.java | 4 +-
.../pushpull/DefaultUserPullResultHandler.java | 16 +-
.../java/pushpull/PullJobDelegate.java | 47 ++--
.../java/pushpull/PushJobDelegate.java | 7 +-
.../java/pushpull/PushResultHandlerDispatcher.java | 12 +-
.../java/pushpull/SinglePullJobDelegate.java | 9 +
.../pushpull/SyncopeResultHandlerDispatcher.java | 2 +-
.../pushpull/stream/StreamPullJobDelegate.java | 9 +
.../pushpull/stream/StreamPushJobDelegate.java | 7 +-
pom.xml | 8 +-
25 files changed, 240 insertions(+), 292 deletions(-)
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPushResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPushResultHandler.java
deleted file mode 100644
index 3a1cba0ee8..0000000000
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPushResultHandler.java
+++ /dev/null
@@ -1,22 +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.pushpull;
-
-public interface AnyObjectPushResultHandler extends
SyncopeAnyPushResultHandler {
-}
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPullResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyPullResultHandler.java
similarity index 89%
rename from
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPullResultHandler.java
rename to
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyPullResultHandler.java
index e5019a685b..9fba0f934c 100644
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyObjectPullResultHandler.java
+++
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyPullResultHandler.java
@@ -18,5 +18,7 @@
*/
package org.apache.syncope.core.provisioning.api.pushpull;
-public interface AnyObjectPullResultHandler extends SyncopePullResultHandler {
+public interface AnyPullResultHandler extends SyncopePullResultHandler {
+
+ void setManagers();
}
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/SyncopeAnyPushResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyPushResultHandler.java
similarity index 92%
rename from
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/SyncopeAnyPushResultHandler.java
rename to
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyPushResultHandler.java
index 1b65442ef8..e4e9e8444d 100644
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/SyncopeAnyPushResultHandler.java
+++
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/AnyPushResultHandler.java
@@ -20,7 +20,7 @@ package org.apache.syncope.core.provisioning.api.pushpull;
import org.apache.syncope.core.persistence.api.entity.Any;
-public interface SyncopeAnyPushResultHandler extends SyncopePushResultHandler {
+public interface AnyPushResultHandler extends SyncopePushResultHandler {
boolean handle(Any any);
}
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPullResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPullResultHandler.java
deleted file mode 100644
index 4d61e7f346..0000000000
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPullResultHandler.java
+++ /dev/null
@@ -1,22 +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.pushpull;
-
-public interface GroupPullResultHandler extends SyncopePullResultHandler {
-}
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPushResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPushResultHandler.java
deleted file mode 100644
index df9b68a97c..0000000000
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/GroupPushResultHandler.java
+++ /dev/null
@@ -1,22 +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.pushpull;
-
-public interface GroupPushResultHandler extends SyncopeAnyPushResultHandler {
-}
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/RealmPushResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/RealmPushResultHandler.java
index 2d5adbf9f1..bcfd0618d3 100644
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/RealmPushResultHandler.java
+++
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/RealmPushResultHandler.java
@@ -18,5 +18,9 @@
*/
package org.apache.syncope.core.provisioning.api.pushpull;
-public interface RealmPushResultHandler extends SyncopeRealmPushResultHandler {
+import org.apache.syncope.core.persistence.api.entity.Realm;
+
+public interface RealmPushResultHandler extends SyncopePushResultHandler {
+
+ boolean handle(Realm realm);
}
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/SyncopeRealmPushResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/SyncopeRealmPushResultHandler.java
deleted file mode 100644
index f2705ae803..0000000000
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/SyncopeRealmPushResultHandler.java
+++ /dev/null
@@ -1,26 +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.pushpull;
-
-import org.apache.syncope.core.persistence.api.entity.Realm;
-
-public interface SyncopeRealmPushResultHandler extends
SyncopePushResultHandler {
-
- boolean handle(Realm realm);
-}
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/UserPullResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/UserPullResultHandler.java
deleted file mode 100644
index b8af3f4a34..0000000000
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/UserPullResultHandler.java
+++ /dev/null
@@ -1,22 +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.pushpull;
-
-public interface UserPullResultHandler extends SyncopePullResultHandler {
-}
diff --git
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/UserPushResultHandler.java
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/UserPushResultHandler.java
index 77b84f3ed5..2c066e0a2c 100644
---
a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/UserPushResultHandler.java
+++
b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/UserPushResultHandler.java
@@ -21,7 +21,7 @@ package org.apache.syncope.core.provisioning.api.pushpull;
import org.apache.syncope.common.lib.to.Provision;
import org.apache.syncope.core.persistence.api.entity.user.LinkedAccount;
-public interface UserPushResultHandler extends SyncopeAnyPushResultHandler {
+public interface UserPushResultHandler extends AnyPushResultHandler {
boolean handle(LinkedAccount account, Provision provision);
}
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullExecutor.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullExecutor.java
index 73542fc4f0..cae2c41632 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullExecutor.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullExecutor.java
@@ -35,13 +35,11 @@ import
org.apache.syncope.core.persistence.api.entity.task.PullTask;
import org.apache.syncope.core.provisioning.api.ProvisionSorter;
import org.apache.syncope.core.provisioning.api.job.JobExecutionContext;
import org.apache.syncope.core.provisioning.api.job.JobExecutionException;
-import
org.apache.syncope.core.provisioning.api.pushpull.AnyObjectPullResultHandler;
-import
org.apache.syncope.core.provisioning.api.pushpull.GroupPullResultHandler;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPullResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.InboundActions;
import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningProfile;
import
org.apache.syncope.core.provisioning.api.pushpull.RealmPullResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.SyncopePullExecutor;
-import org.apache.syncope.core.provisioning.api.pushpull.UserPullResultHandler;
import org.apache.syncope.core.spring.implementation.ImplementationManager;
import org.identityconnectors.framework.common.objects.Name;
import org.identityconnectors.framework.common.objects.SyncToken;
@@ -85,15 +83,15 @@ abstract class AbstractPullExecutor<T extends
ProvisioningTask<T>>
return
ctx.getBeanFactory().createBean(DefaultRealmPullResultHandler.class);
}
- protected AnyObjectPullResultHandler buildAnyObjectHandler() {
+ protected AnyPullResultHandler buildAnyObjectHandler() {
return
ctx.getBeanFactory().createBean(DefaultAnyObjectPullResultHandler.class);
}
- protected UserPullResultHandler buildUserHandler() {
+ protected AnyPullResultHandler buildUserHandler() {
return
ctx.getBeanFactory().createBean(DefaultUserPullResultHandler.class);
}
- protected GroupPullResultHandler buildGroupHandler() {
+ protected AnyPullResultHandler buildGroupHandler() {
return
ctx.getBeanFactory().createBean(DefaultGroupPullResultHandler.class);
}
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
index 4cf5364aee..8c2f38f387 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
@@ -19,7 +19,9 @@
package org.apache.syncope.core.provisioning.java.pushpull;
import java.time.OffsetDateTime;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Optional;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
@@ -47,16 +49,18 @@ import org.apache.syncope.core.persistence.api.dao.TaskDAO;
import org.apache.syncope.core.persistence.api.entity.Any;
import org.apache.syncope.core.persistence.api.entity.EntityFactory;
import org.apache.syncope.core.persistence.api.entity.Remediation;
+import org.apache.syncope.core.persistence.api.entity.group.Group;
import org.apache.syncope.core.persistence.api.entity.task.PullTask;
+import org.apache.syncope.core.persistence.api.entity.user.User;
import org.apache.syncope.core.provisioning.api.AuditManager;
import org.apache.syncope.core.provisioning.api.PropagationByResource;
import org.apache.syncope.core.provisioning.api.ProvisioningManager;
import org.apache.syncope.core.provisioning.api.job.JobExecutionException;
import
org.apache.syncope.core.provisioning.api.notification.NotificationManager;
import
org.apache.syncope.core.provisioning.api.propagation.PropagationException;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPullResultHandler;
import
org.apache.syncope.core.provisioning.api.pushpull.IgnoreProvisionException;
import org.apache.syncope.core.provisioning.api.pushpull.InboundActions;
-import
org.apache.syncope.core.provisioning.api.pushpull.SyncopePullResultHandler;
import org.apache.syncope.core.provisioning.api.rules.InboundMatch;
import org.apache.syncope.core.provisioning.java.utils.ConnObjectUtils;
import org.apache.syncope.core.spring.security.AuthContextUtils;
@@ -68,7 +72,7 @@ import
org.springframework.transaction.annotation.Transactional;
public abstract class AbstractPullResultHandler
extends AbstractSyncopeResultHandler<PullTask, InboundActions>
- implements SyncopePullResultHandler {
+ implements AnyPullResultHandler {
@Autowired
protected InboundMatcher inboundMatcher;
@@ -94,6 +98,10 @@ public abstract class AbstractPullResultHandler
@Autowired
protected EntityFactory entityFactory;
+ protected final Map<String, Optional<String>> uManagers = new HashMap<>();
+
+ protected final Map<String, Optional<String>> gManagers = new HashMap<>();
+
protected abstract String getName(AnyTO anyTO);
protected abstract String getName(AnyCR anyCR);
@@ -188,21 +196,21 @@ public abstract class AbstractPullResultHandler
return OpEvent.Outcome.SUCCESS;
}
- AnyCR anyCR = connObjectUtils.getAnyCR(
+ AnyCR req = connObjectUtils.getAnyCR(
delta.getObject(),
profile.getTask(),
anyTypeKind,
provision,
true);
if (rule == UnmatchingRule.ASSIGN) {
- anyCR.getResources().add(profile.getTask().getResource().getKey());
+ req.getResources().add(profile.getTask().getResource().getKey());
}
ProvisioningReport result = new ProvisioningReport();
result.setOperation(ResourceOperation.CREATE);
result.setAnyType(provision.getAnyType());
result.setStatus(ProvisioningReport.Status.SUCCESS);
- result.setName(getName(anyCR));
+ result.setName(getName(req));
result.setUidValue(delta.getUid().getUidValue());
if (profile.isDryRun()) {
@@ -221,30 +229,27 @@ public abstract class AbstractPullResultHandler
try {
for (InboundActions action : profile.getActions()) {
if (rule == UnmatchingRule.ASSIGN) {
- action.beforeAssign(profile, delta, anyCR);
+ action.beforeAssign(profile, delta, req);
} else if (rule == UnmatchingRule.PROVISION) {
- action.beforeProvision(profile, delta, anyCR);
+ action.beforeProvision(profile, delta, req);
}
}
- result.setName(getName(anyCR));
+ result.setName(getName(req));
- Optional.ofNullable(anyCR.getUManager()).ifPresent(uManager ->
inboundMatcher.match(
- anyTypeDAO.getUser(),
- uManager,
- profile.getTask().getResource(),
- profile.getConnector()).ifPresent(match ->
anyCR.setUManager(match.getAny().getKey())));
- Optional.ofNullable(anyCR.getGManager()).ifPresent(gManager ->
inboundMatcher.match(
- anyTypeDAO.getGroup(),
- gManager,
- profile.getTask().getResource(),
- profile.getConnector()).ifPresent(match ->
anyCR.setGManager(match.getAny().getKey())));
+ Optional<String> uManager = Optional.ofNullable(req.getUManager());
+ req.setUManager(null);
+ Optional<String> gManager = Optional.ofNullable(req.getGManager());
+ req.setGManager(null);
- AnyTO created = doCreate(anyCR, delta);
+ AnyTO created = doCreate(req, delta);
output = created;
result.setKey(created.getKey());
result.setName(getName(created));
resultStatus = OpEvent.Outcome.SUCCESS;
+ uManager.ifPresent(v -> uManagers.put(created.getKey(),
Optional.of(v)));
+ gManager.ifPresent(v -> gManagers.put(created.getKey(),
Optional.of(v)));
+
for (InboundActions action : profile.getActions()) {
action.after(profile, delta, created, result);
}
@@ -268,7 +273,7 @@ public abstract class AbstractPullResultHandler
if (profile.getTask().isRemediation()) {
// set to SUCCESS to let the incremental flow go on in case of
errors
resultStatus = OpEvent.Outcome.SUCCESS;
- createRemediation(provision.getAnyType(), null, anyCR, null,
result, delta);
+ createRemediation(null, req, null, result, delta);
} else {
resultStatus = OpEvent.Outcome.FAILURE;
}
@@ -317,89 +322,94 @@ public abstract class AbstractPullResultHandler
result.setName(getName(before));
}
- OpEvent.Outcome resultStatus = OpEvent.Outcome.SUCCESS;
- if (!profile.isDryRun()) {
- Object output;
- AnyUR req = null;
-
- if (before == null) {
- resultStatus = OpEvent.Outcome.FAILURE;
- output = null;
- } else {
- AnyUR anyUR = null;
- try {
- anyUR = connObjectUtils.getAnyUR(
- before.getKey(),
- delta.getObject(),
- before,
- profile.getTask(),
- match.getAny().getType().getKind(),
- provision);
+ if (profile.isDryRun()) {
+ end(provision.getAnyType(),
+ MatchingRule.toOp(MatchingRule.UPDATE),
+ OpEvent.Outcome.SUCCESS,
+ before,
+ null,
+ delta);
+ return OpEvent.Outcome.SUCCESS;
+ }
- for (InboundActions action : profile.getActions()) {
- action.beforeUpdate(profile, delta, before, anyUR);
- }
+ OpEvent.Outcome resultStatus;
+ Object output;
+ AnyUR req = null;
- Optional.ofNullable(anyUR.getUManager()).
- filter(patch -> patch.getOperation() ==
PatchOperation.ADD_REPLACE).
- ifPresent(patch -> inboundMatcher.match(
- anyTypeDAO.getUser(),
- patch.getValue(),
- profile.getTask().getResource(),
- profile.getConnector()).ifPresent(m ->
patch.setValue(m.getAny().getKey())));
- Optional.ofNullable(anyUR.getGManager()).
- filter(patch -> patch.getOperation() ==
PatchOperation.ADD_REPLACE).
- ifPresent(patch -> inboundMatcher.match(
- anyTypeDAO.getGroup(),
- patch.getValue(),
- profile.getTask().getResource(),
- profile.getConnector()).ifPresent(m ->
patch.setValue(m.getAny().getKey())));
+ if (before == null) {
+ resultStatus = OpEvent.Outcome.FAILURE;
+ output = null;
+ } else {
+ try {
+ req = connObjectUtils.getAnyUR(
+ before.getKey(),
+ delta.getObject(),
+ before,
+ profile.getTask(),
+ match.getAny().getType().getKind(),
+ provision);
- req = doUpdate(before, anyUR, delta, result);
- AnyTO updated = AnyOperations.patch(before, req);
+ for (InboundActions action : profile.getActions()) {
+ action.beforeUpdate(profile, delta, before, req);
+ }
- for (InboundActions action : profile.getActions()) {
- action.after(profile, delta, updated, result);
- }
+ Optional.ofNullable(req.getUManager()).ifPresent(patch ->
uManagers.put(
+ before.getKey(),
+ patch.getOperation() == PatchOperation.ADD_REPLACE
+ ? Optional.of(patch.getValue())
+ : Optional.empty()));
+ req.setUManager(null);
+ Optional.ofNullable(req.getGManager()).ifPresent(patch ->
gManagers.put(
+ before.getKey(),
+ patch.getOperation() == PatchOperation.ADD_REPLACE
+ ? Optional.of(patch.getValue())
+ : Optional.empty()));
+ req.setGManager(null);
+
+ req = doUpdate(before, req, delta, result);
+ AnyTO updated = AnyOperations.patch(before, req);
- output = updated;
- resultStatus = OpEvent.Outcome.SUCCESS;
- result.setName(getName(updated));
+ for (InboundActions action : profile.getActions()) {
+ action.after(profile, delta, updated, result);
+ }
- LOG.debug("{} {} successfully updated",
provision.getAnyType(), match);
- } catch (PropagationException e) {
- // A propagation failure doesn't imply a pull failure.
- // The propagation exception status will be reported into
the propagation task execution.
- LOG.error("Could not propagate {} {}",
- provision.getAnyType(),
delta.getUid().getUidValue(), e);
- output = e;
- resultStatus = OpEvent.Outcome.FAILURE;
- } catch (Exception e) {
- throwIgnoreProvisionException(delta, e);
+ output = updated;
+ resultStatus = OpEvent.Outcome.SUCCESS;
+ result.setName(getName(updated));
+
+ LOG.debug("{} {} successfully updated",
provision.getAnyType(), match);
+ } catch (PropagationException e) {
+ // A propagation failure doesn't imply a pull failure.
+ // The propagation exception status will be reported into the
propagation task execution.
+ LOG.error("Could not propagate {} {}",
+ provision.getAnyType(), delta.getUid().getUidValue(),
e);
+ output = e;
+ resultStatus = OpEvent.Outcome.FAILURE;
+ } catch (Exception e) {
+ throwIgnoreProvisionException(delta, e);
- result.setStatus(ProvisioningReport.Status.FAILURE);
- result.setMessage(ExceptionUtils.getRootCauseMessage(e));
- LOG.error("Could not update {} {}",
- provision.getAnyType(),
delta.getUid().getUidValue(), e);
- output = e;
+ result.setStatus(ProvisioningReport.Status.FAILURE);
+ result.setMessage(ExceptionUtils.getRootCauseMessage(e));
+ LOG.error("Could not update {} {}",
+ provision.getAnyType(), delta.getUid().getUidValue(),
e);
+ output = e;
- if (profile.getTask().isRemediation()) {
- // set to SUCCESS to let the incremental flow go on in
case of errors
- resultStatus = OpEvent.Outcome.SUCCESS;
- createRemediation(provision.getAnyType(), null, null,
anyUR, result, delta);
- } else {
- resultStatus = OpEvent.Outcome.FAILURE;
- }
+ if (profile.getTask().isRemediation()) {
+ // set to SUCCESS to let the incremental flow go on in
case of errors
+ resultStatus = OpEvent.Outcome.SUCCESS;
+ createRemediation(null, null, req, result, delta);
+ } else {
+ resultStatus = OpEvent.Outcome.FAILURE;
}
}
- end(provision.getAnyType(),
- MatchingRule.toOp(MatchingRule.UPDATE),
- resultStatus,
- before,
- output,
- delta,
- req);
}
+ end(provision.getAnyType(),
+ MatchingRule.toOp(MatchingRule.UPDATE),
+ resultStatus,
+ before,
+ output,
+ delta,
+ req);
profile.getResults().add(result);
@@ -472,17 +482,14 @@ public abstract class AbstractPullResultHandler
false,
securityProperties.getAdminUser());
- AnyUR req = null;
if (matchingRule == MatchingRule.UNASSIGN) {
- req = anyUtils().newAnyUR(match.getAny().getKey());
+ AnyUR req =
anyUtils().newAnyUR(match.getAny().getKey());
req.getResources().add(new StringPatchItem.Builder().
operation(PatchOperation.DELETE).
value(profile.getTask().getResource().getKey()).build());
- }
- if (req == null) {
- output = getAnyTO(match.getAny());
- } else {
output = doUpdate(before, req, delta, result);
+ } else {
+ output = getAnyTO(match.getAny());
}
for (InboundActions action : profile.getActions()) {
@@ -687,8 +694,7 @@ public abstract class AbstractPullResultHandler
if (profile.getTask().isRemediation()) {
// set to SUCCESS to let the incremental flow go on in
case of errors
resultStatus = OpEvent.Outcome.SUCCESS;
- createRemediation(
- provision.getAnyType(),
match.getAny().getKey(), null, null, result, delta);
+ createRemediation(match.getAny().getKey(), null, null,
result, delta);
}
}
@@ -941,12 +947,11 @@ public abstract class AbstractPullResultHandler
final ProvisioningReport result) {
if (ProvisioningReport.Status.FAILURE == result.getStatus() &&
profile.getTask().isRemediation()) {
- createRemediation(result.getAnyType(), null, null, anyUR, result,
delta);
+ createRemediation(null, null, anyUR, result, delta);
}
}
- protected void createRemediation(
- final String anyType,
+ private void createRemediation(
final String anyKey,
final AnyCR anyCR,
final AnyUR anyUR,
@@ -955,8 +960,8 @@ public abstract class AbstractPullResultHandler
Remediation remediation = entityFactory.newEntity(Remediation.class);
- remediation.setAnyType(anyTypeDAO.findById(anyType).
- orElseThrow(() -> new NotFoundException("AnyType " +
anyType)));
+ remediation.setAnyType(anyTypeDAO.findById(result.getAnyType()).
+ orElseThrow(() -> new NotFoundException("AnyType " +
result.getAnyType())));
remediation.setOperation(anyUR == null ? ResourceOperation.CREATE :
ResourceOperation.UPDATE);
if (StringUtils.isNotBlank(anyKey)) {
remediation.setPayload(anyKey);
@@ -968,14 +973,14 @@ public abstract class AbstractPullResultHandler
remediation.setError(result.getMessage());
remediation.setInstant(OffsetDateTime.now());
remediation.setRemoteName(delta.getObject().getName().getNameValue());
- remediation.setPullTask(taskDAO.findById(TaskType.PULL,
profile.getTask().getKey()).
- map(PullTask.class::cast).orElse(null));
+ taskDAO.findById(TaskType.PULL, profile.getTask().getKey()).
+ map(PullTask.class::cast).ifPresent(remediation::setPullTask);
remediation = remediationDAO.save(remediation);
ProvisioningReport remediationResult = new ProvisioningReport();
remediationResult.setOperation(remediation.getOperation());
- remediationResult.setAnyType(anyType);
+ remediationResult.setAnyType(result.getAnyType());
remediationResult.setStatus(ProvisioningReport.Status.FAILURE);
remediationResult.setMessage(remediation.getError());
if (StringUtils.isNotBlank(anyKey)) {
@@ -987,4 +992,39 @@ public abstract class AbstractPullResultHandler
remediationResult.setName(remediation.getRemoteName());
profile.getResults().add(remediationResult);
}
+
+ @Transactional(propagation = Propagation.REQUIRES_NEW)
+ @Override
+ public void setManagers() {
+ uManagers.forEach((anyKey, uManager) -> {
+ Any any = anyUtils().dao().findById(anyKey).
+ orElseThrow(() -> new
NotFoundException(anyUtils().anyTypeKind() + " " + anyKey));
+
+ uManager.ifPresentOrElse(
+ manager -> inboundMatcher.match(
+ anyTypeDAO.getUser(),
+ manager,
+ profile.getTask().getResource(),
+ profile.getConnector()).
+ ifPresent(match -> any.setUManager((User)
match.getAny())),
+ () -> any.setUManager(null));
+
+ anyUtils().dao().save(any);
+ });
+ gManagers.forEach((anyKey, gManager) -> {
+ Any any = anyUtils().dao().findById(anyKey).
+ orElseThrow(() -> new
NotFoundException(anyUtils().anyTypeKind() + " " + anyKey));
+
+ gManager.ifPresentOrElse(
+ manager -> inboundMatcher.match(
+ anyTypeDAO.getGroup(),
+ manager,
+ profile.getTask().getResource(),
+ profile.getConnector()).
+ ifPresent(match -> any.setGManager((Group)
match.getAny())),
+ () -> any.setGManager(null));
+
+ anyUtils().dao().save(any);
+ });
+ }
}
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPushResultHandler.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPushResultHandler.java
index df8649f814..418c70bd2a 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPushResultHandler.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPushResultHandler.java
@@ -50,9 +50,9 @@ import
org.apache.syncope.core.provisioning.api.job.JobExecutionException;
import
org.apache.syncope.core.provisioning.api.notification.NotificationManager;
import
org.apache.syncope.core.provisioning.api.propagation.PropagationReporter;
import
org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPushResultHandler;
import
org.apache.syncope.core.provisioning.api.pushpull.IgnoreProvisionException;
import org.apache.syncope.core.provisioning.api.pushpull.PushActions;
-import
org.apache.syncope.core.provisioning.api.pushpull.SyncopeAnyPushResultHandler;
import org.apache.syncope.core.provisioning.java.job.AfterHandlingJob;
import org.apache.syncope.core.provisioning.java.job.SyncopeTaskScheduler;
import
org.apache.syncope.core.provisioning.java.propagation.DefaultPropagationReporter;
@@ -63,7 +63,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
public abstract class AbstractPushResultHandler extends
AbstractSyncopeResultHandler<PushTask, PushActions>
- implements SyncopeAnyPushResultHandler {
+ implements AnyPushResultHandler {
protected static void reportPropagation(final ProvisioningReport result,
final PropagationReporter reporter) {
if (!reporter.getStatuses().isEmpty()) {
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultAnyObjectPullResultHandler.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultAnyObjectPullResultHandler.java
index 09dd983275..1904b985e1 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultAnyObjectPullResultHandler.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultAnyObjectPullResultHandler.java
@@ -33,13 +33,13 @@ import
org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject;
import org.apache.syncope.core.provisioning.api.AnyObjectProvisioningManager;
import org.apache.syncope.core.provisioning.api.ProvisioningManager;
import org.apache.syncope.core.provisioning.api.WorkflowResult;
-import
org.apache.syncope.core.provisioning.api.pushpull.AnyObjectPullResultHandler;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPullResultHandler;
import org.identityconnectors.framework.common.objects.SyncDelta;
import org.springframework.beans.factory.annotation.Autowired;
public class DefaultAnyObjectPullResultHandler
extends AbstractPullResultHandler
- implements AnyObjectPullResultHandler {
+ implements AnyPullResultHandler {
@Autowired
private AnyObjectProvisioningManager anyObjectProvisioningManager;
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultAnyObjectPushResultHandler.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultAnyObjectPushResultHandler.java
index 2a4f98211a..e43751a0b2 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultAnyObjectPushResultHandler.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultAnyObjectPushResultHandler.java
@@ -26,10 +26,9 @@ import org.apache.syncope.core.persistence.api.entity.Any;
import org.apache.syncope.core.persistence.api.entity.AnyUtils;
import org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject;
import org.apache.syncope.core.provisioning.api.WorkflowResult;
-import
org.apache.syncope.core.provisioning.api.pushpull.AnyObjectPushResultHandler;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPushResultHandler;
-public class DefaultAnyObjectPushResultHandler extends
AbstractPushResultHandler
- implements AnyObjectPushResultHandler {
+public class DefaultAnyObjectPushResultHandler extends
AbstractPushResultHandler implements AnyPushResultHandler {
@Override
protected AnyUtils anyUtils() {
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultGroupPullResultHandler.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultGroupPullResultHandler.java
index 9f60f71bed..c763e04c31 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultGroupPullResultHandler.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultGroupPullResultHandler.java
@@ -33,11 +33,11 @@ import
org.apache.syncope.core.persistence.api.entity.group.Group;
import org.apache.syncope.core.provisioning.api.GroupProvisioningManager;
import org.apache.syncope.core.provisioning.api.ProvisioningManager;
import org.apache.syncope.core.provisioning.api.WorkflowResult;
-import
org.apache.syncope.core.provisioning.api.pushpull.GroupPullResultHandler;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPullResultHandler;
import org.identityconnectors.framework.common.objects.SyncDelta;
import org.springframework.beans.factory.annotation.Autowired;
-public class DefaultGroupPullResultHandler extends AbstractPullResultHandler
implements GroupPullResultHandler {
+public class DefaultGroupPullResultHandler extends AbstractPullResultHandler
implements AnyPullResultHandler {
@Autowired
private GroupProvisioningManager groupProvisioningManager;
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultGroupPushResultHandler.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultGroupPushResultHandler.java
index 50affcb3e1..4adcc73a0f 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultGroupPushResultHandler.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultGroupPushResultHandler.java
@@ -26,9 +26,9 @@ import org.apache.syncope.core.persistence.api.entity.Any;
import org.apache.syncope.core.persistence.api.entity.AnyUtils;
import org.apache.syncope.core.persistence.api.entity.group.Group;
import org.apache.syncope.core.provisioning.api.WorkflowResult;
-import
org.apache.syncope.core.provisioning.api.pushpull.GroupPushResultHandler;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPushResultHandler;
-public class DefaultGroupPushResultHandler extends AbstractPushResultHandler
implements GroupPushResultHandler {
+public class DefaultGroupPushResultHandler extends AbstractPushResultHandler
implements AnyPushResultHandler {
@Override
protected AnyUtils anyUtils() {
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultUserPullResultHandler.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultUserPullResultHandler.java
index fe934d5b0f..a2f35ce387 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultUserPullResultHandler.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/DefaultUserPullResultHandler.java
@@ -53,14 +53,14 @@ import
org.apache.syncope.core.provisioning.api.UserProvisioningManager;
import org.apache.syncope.core.provisioning.api.WorkflowResult;
import org.apache.syncope.core.provisioning.api.job.JobExecutionException;
import
org.apache.syncope.core.provisioning.api.propagation.PropagationException;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPullResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.InboundActions;
-import org.apache.syncope.core.provisioning.api.pushpull.UserPullResultHandler;
import org.apache.syncope.core.provisioning.api.rules.InboundMatch;
import org.identityconnectors.framework.common.objects.AttributeUtil;
import org.identityconnectors.framework.common.objects.SyncDelta;
import org.springframework.beans.factory.annotation.Autowired;
-public class DefaultUserPullResultHandler extends AbstractPullResultHandler
implements UserPullResultHandler {
+public class DefaultUserPullResultHandler extends AbstractPullResultHandler
implements AnyPullResultHandler {
@Autowired
protected UserProvisioningManager userProvisioningManager;
@@ -446,9 +446,7 @@ public class DefaultUserPullResultHandler extends
AbstractPullResultHandler impl
output = e;
resultStatus = OpEvent.Outcome.FAILURE;
- if (profile.getTask().isRemediation()) {
- createRemediation(provision.getAnyType(), null, null, req,
result, delta);
- }
+ createRemediationIfNeeded(req, delta, result);
}
end(AnyTypeKind.USER.name(),
@@ -574,9 +572,7 @@ public class DefaultUserPullResultHandler extends
AbstractPullResultHandler impl
output = e;
resultStatus = OpEvent.Outcome.FAILURE;
- if (profile.getTask().isRemediation()) {
- createRemediation(provision.getAnyType(), null, null, req,
result, delta);
- }
+ createRemediationIfNeeded(req, delta, result);
}
end(AnyTypeKind.USER.name(),
@@ -658,9 +654,7 @@ public class DefaultUserPullResultHandler extends
AbstractPullResultHandler impl
LOG.error("Could not delete linked account {}", account,
e);
output = e;
- if (profile.getTask().isRemediation()) {
- createRemediation(provision.getAnyType(), null, null,
req, result, delta);
- }
+ createRemediationIfNeeded(req, delta, result);
}
end(AnyTypeKind.USER.name(),
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java
index 2f02782c87..caa1547494 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PullJobDelegate.java
@@ -34,6 +34,7 @@ import
org.apache.syncope.core.persistence.api.entity.task.PullTask;
import org.apache.syncope.core.provisioning.api.job.JobExecutionContext;
import org.apache.syncope.core.provisioning.api.job.JobExecutionException;
import
org.apache.syncope.core.provisioning.api.job.StoppableSchedTaskJobDelegate;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPullResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.InboundActions;
import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningProfile;
import
org.apache.syncope.core.provisioning.api.pushpull.RealmPullResultHandler;
@@ -158,8 +159,7 @@ public class PullJobDelegate
// ...then provisions for any types
for (Provision provision : task.getResource().getProvisions().stream().
- filter(provision -> provision.getMapping() !=
null).sorted(provisionSorter).
- toList()) {
+ filter(provision -> provision.getMapping() !=
null).sorted(provisionSorter).toList()) {
setStatus("Pulling " + provision.getObjectClass());
@@ -245,25 +245,34 @@ public class PullJobDelegate
dispatcher.shutdown();
for (Provision provision : task.getResource().getProvisions().stream().
- filter(provision -> provision.getMapping() != null &&
provision.getUidOnCreate() != null).
- sorted(provisionSorter).toList()) {
+ filter(provision -> provision.getMapping() !=
null).sorted(provisionSorter).toList()) {
+
+ if (provision.getUidOnCreate() != null) {
+ try {
+ AnyType anyType =
anyTypeDAO.findById(provision.getAnyType()).
+ orElseThrow(() -> new NotFoundException("AnyType"
+ provision.getAnyType()));
+ AnyUtils anyUtils =
anyUtilsFactory.getInstance(anyType.getKind());
+ profile.getResults().stream().
+ filter(result -> result.getUidValue() != null &&
result.getKey() != null
+ && result.getOperation() ==
ResourceOperation.CREATE
+ &&
result.getAnyType().equals(provision.getAnyType())).
+ forEach(result -> anyUtils.addAttr(
+ validator,
+ result.getKey(),
+
plainSchemaDAO.findById(provision.getUidOnCreate()).orElseThrow(
+ () -> new NotFoundException("PlainSchema "
+ provision.getUidOnCreate())),
+ result.getUidValue()));
+ } catch (Throwable t) {
+ LOG.error("While setting UID on create", t);
+ }
+ }
+ AnyPullResultHandler handler =
+ (AnyPullResultHandler)
dispatcher.nonConcurrentHandler(provision.getObjectClass());
try {
- AnyType anyType = anyTypeDAO.findById(provision.getAnyType()).
- orElseThrow(() -> new NotFoundException("AnyType" +
provision.getAnyType()));
- AnyUtils anyUtils =
anyUtilsFactory.getInstance(anyType.getKind());
- profile.getResults().stream().
- filter(result -> result.getUidValue() != null &&
result.getKey() != null
- && result.getOperation() == ResourceOperation.CREATE
- && result.getAnyType().equals(provision.getAnyType())).
- forEach(result -> anyUtils.addAttr(
- validator,
- result.getKey(),
- plainSchemaDAO.findById(provision.getUidOnCreate()).
- orElseThrow(() -> new
NotFoundException("PlainSchema " + provision.getUidOnCreate())),
- result.getUidValue()));
- } catch (Throwable t) {
- LOG.error("While setting UID on create", t);
+ handler.setManagers();
+ } catch (Exception e) {
+ LOG.error("While setting managers", e);
}
}
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushJobDelegate.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushJobDelegate.java
index 877360070a..a5548eadb4 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushJobDelegate.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushJobDelegate.java
@@ -48,8 +48,7 @@ import
org.apache.syncope.core.provisioning.api.ProvisionSorter;
import org.apache.syncope.core.provisioning.api.job.JobExecutionContext;
import org.apache.syncope.core.provisioning.api.job.JobExecutionException;
import
org.apache.syncope.core.provisioning.api.job.StoppableSchedTaskJobDelegate;
-import
org.apache.syncope.core.provisioning.api.pushpull.AnyObjectPushResultHandler;
-import
org.apache.syncope.core.provisioning.api.pushpull.GroupPushResultHandler;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPushResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningProfile;
import org.apache.syncope.core.provisioning.api.pushpull.PushActions;
import
org.apache.syncope.core.provisioning.api.pushpull.RealmPushResultHandler;
@@ -128,7 +127,7 @@ public class PushJobDelegate
return
ctx.getBeanFactory().createBean(DefaultRealmPushResultHandler.class);
}
- protected AnyObjectPushResultHandler buildAnyObjectHandler() {
+ protected AnyPushResultHandler buildAnyObjectHandler() {
return
ctx.getBeanFactory().createBean(DefaultAnyObjectPushResultHandler.class);
}
@@ -136,7 +135,7 @@ public class PushJobDelegate
return
ctx.getBeanFactory().createBean(DefaultUserPushResultHandler.class);
}
- protected GroupPushResultHandler buildGroupHandler() {
+ protected AnyPushResultHandler buildGroupHandler() {
return
ctx.getBeanFactory().createBean(DefaultGroupPushResultHandler.class);
}
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushResultHandlerDispatcher.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushResultHandlerDispatcher.java
index 1939d4e708..26398c5afa 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushResultHandlerDispatcher.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/PushResultHandlerDispatcher.java
@@ -23,12 +23,12 @@ import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.core.persistence.api.entity.Any;
import org.apache.syncope.core.persistence.api.entity.Realm;
import org.apache.syncope.core.persistence.api.entity.task.PushTask;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPushResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningProfile;
import org.apache.syncope.core.provisioning.api.pushpull.PushActions;
-import
org.apache.syncope.core.provisioning.api.pushpull.SyncopeAnyPushResultHandler;
+import
org.apache.syncope.core.provisioning.api.pushpull.RealmPushResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.SyncopePushExecutor;
import
org.apache.syncope.core.provisioning.api.pushpull.SyncopePushResultHandler;
-import
org.apache.syncope.core.provisioning.api.pushpull.SyncopeRealmPushResultHandler;
import org.springframework.transaction.annotation.Transactional;
public class PushResultHandlerDispatcher
@@ -49,7 +49,7 @@ public class PushResultHandlerDispatcher
@Transactional(readOnly = true)
public boolean handle(final Any any) {
if (tpte.isEmpty()) {
- boolean result = ((SyncopeAnyPushResultHandler)
nonConcurrentHandler(any.getType().getKey())).handle(any);
+ boolean result = ((AnyPushResultHandler)
nonConcurrentHandler(any.getType().getKey())).handle(any);
executor.reportHandled(any.getType().getKey(), any.getKey());
@@ -58,7 +58,7 @@ public class PushResultHandlerDispatcher
try {
submit(() -> {
- ((SyncopeAnyPushResultHandler)
suppliers.get(any.getType().getKey()).get()).handle(any);
+ ((AnyPushResultHandler)
suppliers.get(any.getType().getKey()).get()).handle(any);
executor.reportHandled(any.getType().getKey(), any.getKey());
});
@@ -72,7 +72,7 @@ public class PushResultHandlerDispatcher
@Transactional(readOnly = true)
public boolean handle(final Realm realm) {
if (tpte.isEmpty()) {
- boolean result = ((SyncopeRealmPushResultHandler)
nonConcurrentHandler(SyncopeConstants.REALM_ANYTYPE)).
+ boolean result = ((RealmPushResultHandler)
nonConcurrentHandler(SyncopeConstants.REALM_ANYTYPE)).
handle(realm);
executor.reportHandled(SyncopeConstants.REALM_ANYTYPE,
realm.getKey());
@@ -82,7 +82,7 @@ public class PushResultHandlerDispatcher
try {
submit(() -> {
- ((SyncopeRealmPushResultHandler)
suppliers.get(SyncopeConstants.REALM_ANYTYPE).get()).handle(realm);
+ ((RealmPushResultHandler)
suppliers.get(SyncopeConstants.REALM_ANYTYPE).get()).handle(realm);
executor.reportHandled(SyncopeConstants.REALM_ANYTYPE,
realm.getKey());
});
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePullJobDelegate.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePullJobDelegate.java
index 3d00ce88f0..ac89668562 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePullJobDelegate.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SinglePullJobDelegate.java
@@ -41,6 +41,7 @@ import
org.apache.syncope.core.persistence.api.entity.task.PullTask;
import org.apache.syncope.core.provisioning.api.Connector;
import org.apache.syncope.core.provisioning.api.jexl.TemplateUtils;
import org.apache.syncope.core.provisioning.api.job.JobExecutionException;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPullResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.InboundActions;
import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningProfile;
import org.apache.syncope.core.provisioning.api.pushpull.ReconFilterBuilder;
@@ -158,6 +159,14 @@ public class SinglePullJobDelegate extends PullJobDelegate
implements SyncopeSin
MappingUtils.getInboundItems(provision.getMapping().getItems().stream()),
matg.toArray(String[]::new)));
+ AnyPullResultHandler handler =
+ (AnyPullResultHandler)
dispatcher.nonConcurrentHandler(provision.getObjectClass());
+ try {
+ handler.setManagers();
+ } catch (Exception e) {
+ LOG.error("While setting managers", e);
+ }
+
for (InboundActions action : profile.getActions()) {
action.afterAll(profile);
}
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SyncopeResultHandlerDispatcher.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SyncopeResultHandlerDispatcher.java
index 0b0a333f7b..87b57b93b6 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SyncopeResultHandlerDispatcher.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/SyncopeResultHandlerDispatcher.java
@@ -90,7 +90,7 @@ public abstract class SyncopeResultHandlerDispatcher<
suppliers.put(key, supplier);
}
- protected RA nonConcurrentHandler(final String key) {
+ public RA nonConcurrentHandler(final String key) {
return handlers.computeIfAbsent(key, k -> suppliers.get(k).get());
}
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java
index dbdbffa0ce..de35611c03 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPullJobDelegate.java
@@ -44,6 +44,7 @@ import
org.apache.syncope.core.persistence.api.entity.policy.InboundPolicy;
import org.apache.syncope.core.persistence.api.entity.task.PullTask;
import org.apache.syncope.core.provisioning.api.Connector;
import org.apache.syncope.core.provisioning.api.job.JobExecutionException;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPullResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.InboundActions;
import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningProfile;
import
org.apache.syncope.core.provisioning.api.pushpull.SyncopePullResultHandler;
@@ -226,6 +227,14 @@ public class StreamPullJobDelegate extends PullJobDelegate
implements SyncopeStr
MappingUtils.getInboundItems(provision.getMapping().getItems().stream()),
moreAttrsToGet.toArray(String[]::new)));
+ AnyPullResultHandler handler =
+ (AnyPullResultHandler)
dispatcher.nonConcurrentHandler(provision.getObjectClass());
+ try {
+ handler.setManagers();
+ } catch (Exception e) {
+ LOG.error("While setting managers", e);
+ }
+
for (InboundActions action : profile.getActions()) {
action.afterAll(profile);
}
diff --git
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java
index 83d3a99a2b..39accfb1da 100644
---
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java
+++
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/stream/StreamPushJobDelegate.java
@@ -37,8 +37,7 @@ import
org.apache.syncope.core.persistence.api.entity.Implementation;
import org.apache.syncope.core.persistence.api.entity.task.PushTask;
import org.apache.syncope.core.provisioning.api.Connector;
import org.apache.syncope.core.provisioning.api.job.JobExecutionException;
-import
org.apache.syncope.core.provisioning.api.pushpull.AnyObjectPushResultHandler;
-import
org.apache.syncope.core.provisioning.api.pushpull.GroupPushResultHandler;
+import org.apache.syncope.core.provisioning.api.pushpull.AnyPushResultHandler;
import org.apache.syncope.core.provisioning.api.pushpull.ProvisioningProfile;
import org.apache.syncope.core.provisioning.api.pushpull.PushActions;
import
org.apache.syncope.core.provisioning.api.pushpull.SyncopePushResultHandler;
@@ -54,7 +53,7 @@ public class StreamPushJobDelegate extends PushJobDelegate
implements SyncopeStr
private ImplementationDAO implementationDAO;
@Override
- protected AnyObjectPushResultHandler buildAnyObjectHandler() {
+ protected AnyPushResultHandler buildAnyObjectHandler() {
return
ctx.getBeanFactory().createBean(StreamAnyObjectPushResultHandler.class);
}
@@ -64,7 +63,7 @@ public class StreamPushJobDelegate extends PushJobDelegate
implements SyncopeStr
}
@Override
- protected GroupPushResultHandler buildGroupHandler() {
+ protected AnyPushResultHandler buildGroupHandler() {
return
ctx.getBeanFactory().createBean(StreamGroupPushResultHandler.class);
}
diff --git a/pom.xml b/pom.xml
index c02ef09e7c..6a76709fbc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -450,8 +450,8 @@ under the License.
<disruptor.version>4.0.0</disruptor.version>
<elasticsearch.version>9.3.0</elasticsearch.version>
- <opensearch.version>3.4.0</opensearch.version>
- <opensearch-java.version>3.5.0</opensearch-java.version>
+ <opensearch.version>3.5.0</opensearch.version>
+ <opensearch-java.version>3.6.0</opensearch-java.version>
<openfga.version>v1</openfga.version>
@@ -534,7 +534,7 @@ under the License.
<docker.oracle.version>23-slim-faststart</docker.oracle.version>
<docker.neo4j.version>5.26</docker.neo4j.version>
- <jdbc.postgresql.version>42.7.9</jdbc.postgresql.version>
+ <jdbc.postgresql.version>42.7.10</jdbc.postgresql.version>
<jdbc.mysql.version>9.6.0</jdbc.mysql.version>
<jdbc.mariadb.version>3.5.7</jdbc.mariadb.version>
<jdbc.oracle.version>23.26.1.0.0</jdbc.oracle.version>
@@ -1990,7 +1990,7 @@ under the License.
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
- <version>4.3.0</version>
+ <version>4.3.1</version>
<dependencies>
<dependency>
<groupId>org.apache.groovy</groupId>