Package com.evolveum.midpoint.prism
Enum ConsistencyCheckScope
- java.lang.Object
-
- java.lang.Enum<ConsistencyCheckScope>
-
- com.evolveum.midpoint.prism.ConsistencyCheckScope
-
- All Implemented Interfaces:
Serializable
,Comparable<ConsistencyCheckScope>
public enum ConsistencyCheckScope extends Enum<ConsistencyCheckScope>
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.)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description MANDATORY_CHECKS_ONLY
Mandatory checks, e.g.THOROUGH
Full-scale checks.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConsistencyCheckScope
fromBoolean(boolean consistencyChecksSwitchValue)
boolean
isThorough()
static ConsistencyCheckScope
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConsistencyCheckScope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
THOROUGH
public static final ConsistencyCheckScope THOROUGH
Full-scale checks.
-
MANDATORY_CHECKS_ONLY
public static final ConsistencyCheckScope MANDATORY_CHECKS_ONLY
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.
-
-
Method Detail
-
values
public static ConsistencyCheckScope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConsistencyCheckScope c : ConsistencyCheckScope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConsistencyCheckScope valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isThorough
public boolean isThorough()
-
fromBoolean
public static ConsistencyCheckScope fromBoolean(boolean consistencyChecksSwitchValue)
-
-