-
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.
Stop using shadow lifecycle for proposed shadows
The "technical" shadow lifecycle state is now determined purely from the "dead" and "exists" properties, and the pending operations, according to https://docs.evolveum.com/midpoint/reference/resources/shadow/dead/. This resolves MID-4833.
- Loading branch information
Showing
10 changed files
with
74 additions
and
39 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
infra/schema/src/main/java/com/evolveum/midpoint/schema/util/PendingOperationTypeUtil.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,32 @@ | ||
/* | ||
* Copyright (C) 2010-2022 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.schema.util; | ||
|
||
import com.evolveum.midpoint.xml.ns._public.common.common_3.PendingOperationExecutionStatusType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.PendingOperationType; | ||
|
||
import com.evolveum.prism.xml.ns._public.types_3.ChangeTypeType; | ||
import com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import static com.evolveum.midpoint.xml.ns._public.common.common_3.PendingOperationExecutionStatusType.EXECUTING; | ||
import static com.evolveum.midpoint.xml.ns._public.common.common_3.PendingOperationExecutionStatusType.EXECUTION_PENDING; | ||
|
||
public class PendingOperationTypeUtil { | ||
|
||
public static boolean isAdd(@NotNull PendingOperationType operation) { | ||
ObjectDeltaType delta = operation.getDelta(); | ||
return delta != null && delta.getChangeType() == ChangeTypeType.ADD; | ||
} | ||
|
||
public static boolean isPendingOrExecuting(PendingOperationType operation) { | ||
PendingOperationExecutionStatusType status = operation.getExecutionStatus(); | ||
return status == EXECUTION_PENDING || status == EXECUTING; | ||
} | ||
} |
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
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