-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new "createCorrelationCases" sync action
Instead of (experimental and now legacy) correlationDefinition/cases setting, correlation cases are from this moment on created by a new <createCorrelationCases/> action in the (new) synchronization reactions setting. The old style remains valid for legacy synchronization setting (that is separate from its object type definition).
- Loading branch information
Showing
24 changed files
with
568 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...c/main/java/com/evolveum/midpoint/model/impl/sync/action/CreateCorrelationCaseAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2013 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.model.impl.sync.action; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import com.evolveum.midpoint.model.impl.sync.reactions.ActionDefinitionClass; | ||
import com.evolveum.midpoint.model.impl.sync.reactions.ActionInstantiationContext; | ||
import com.evolveum.midpoint.schema.result.OperationResult; | ||
import com.evolveum.midpoint.util.exception.CommonException; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.CreateCorrelationCaseSynchronizationActionType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType; | ||
|
||
@ActionDefinitionClass(CreateCorrelationCaseSynchronizationActionType.class) | ||
public class CreateCorrelationCaseAction<F extends FocusType> extends BaseAction<F> { | ||
|
||
private static final String OP_HANDLE = CreateCorrelationCaseAction.class.getName() + ".handle"; | ||
|
||
public CreateCorrelationCaseAction(@NotNull ActionInstantiationContext<F> ctx) { | ||
super(ctx); | ||
} | ||
|
||
@Override | ||
public void handle(@NotNull OperationResult parentResult) throws CommonException { | ||
OperationResult result = parentResult.subresult(OP_HANDLE).build(); | ||
try { | ||
beans.correlationCaseManager.createOrUpdateCase( | ||
syncCtx.getShadowedResourceObject(), | ||
syncCtx.getResource(), | ||
syncCtx.getPreFocus(), | ||
syncCtx.getTask(), | ||
result); | ||
} catch (Throwable t) { | ||
result.recordFatalError(t); | ||
throw t; | ||
} finally { | ||
result.close(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.