Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,623 additions
and
238 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
40 changes: 40 additions & 0 deletions
40
infra/prism/src/main/java/com/evolveum/midpoint/prism/ConsistencyCheckScope.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,40 @@ | ||
package com.evolveum.midpoint.prism; | ||
|
||
import com.evolveum.midpoint.prism.delta.ObjectDelta; | ||
|
||
import java.util.Collection; | ||
|
||
/** | ||
* Determines the scope of consistency checks. | ||
* | ||
* (Originally this was a boolean, but there are many 'checkConsistence'-style methods with a set of boolean arguments, | ||
* so it was too easy to mix them up with this new one.) | ||
* | ||
* @author mederly | ||
*/ | ||
public enum ConsistencyCheckScope { | ||
/** | ||
* Full-scale checks. | ||
*/ | ||
THOROUGH, | ||
/** | ||
* Mandatory checks, e.g. checks for duplicate container IDs (see MID-1951). | ||
* Should be rather quick. | ||
* | ||
* TODO Current solution is not that optimal. We should distinguish between checks that deal with midPoint internal workings | ||
* (throwing IllegalArgumentException/IllegalStateException on failure), which can be turned off, as it is today. Another set | ||
* of checks should be applied only on users' inputs (when importing data, when accepting inputs via SOAP/REST/whathever interfaces, ...) | ||
* - and these should throw perhaps SchemaException that can be caught and handled appropriately. | ||
* | ||
* However, for the time being we consider this approach (i.e. that both kinds of checks are implemented the same way) to be an acceptable one. | ||
*/ | ||
MANDATORY_CHECKS_ONLY; | ||
|
||
public boolean isThorough() { | ||
return this == THOROUGH; | ||
} | ||
|
||
public static ConsistencyCheckScope fromBoolean(boolean consistencyChecksSwitchValue) { | ||
return consistencyChecksSwitchValue ? THOROUGH : MANDATORY_CHECKS_ONLY; | ||
} | ||
} |
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
Oops, something went wrong.