Class ConfigurationItem<T extends Serializable & Cloneable>
java.lang.Object
com.evolveum.midpoint.schema.config.ConfigurationItem<T>
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
AbstractAssignmentConfigItem
,AbstractPolicyRuleConfigItem
,AutoAssignMappingConfigItem
,AutoassignSpecificationConfigItem
,ConstructionConfigItem
,EventHandlerConfigItem
,ExecuteScriptConfigItem
,ExpressionConfigItem
,ExpressionParameterConfigItem
,FocalAutoassignSpecificationConfigItem
,FunctionExpressionEvaluatorConfigItem
,MappingConfigItem
,MetadataMappingConfigItem
,MultiSourceDataHandlingConfigItem
,MultiSourceItemDefinitionConfigItem
,ObjectSelectorConfigItem
,ObjectTemplateItemDefinitionConfigItem
,ObjectTemplateMappingConfigItem
,PolicyActionConfigItem
,ResourceAttributeDefinitionConfigItem
,ResourceObjectAssociationConfigItem
@Experimental
public class ConfigurationItem<T extends Serializable & Cloneable>
extends Object
implements Serializable, Cloneable
Helper class that provides complex information about a configuration item (e.g., a mapping).
Currently, the most prominent information is the origin of the item value.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Object
Used as a convenience marker forfullDescription()
in error messages. -
Constructor Summary
ModifierConstructorDescriptionprotected
ConfigurationItem
(@NotNull ConfigurationItem<? extends T> original) For internal use.ConfigurationItem
(T value, @NotNull ConfigurationItemOrigin origin) -
Method Summary
Modifier and TypeMethodDescription<X extends ConfigurationItem<T>>
Xprotected static <V extends Serializable & Cloneable,
CI extends RAW_CI, RAW_CI extends ConfigurationItem<V>>
CINull-safe variant ofas(Class)
.static <T extends Serializable & Cloneable,
X extends ConfigurationItem<T>>
@NotNull List<X>asList
(@NotNull List<ConfigurationItem<T>> list, @NotNull Class<X> clazz) protected <X extends Serializable & Cloneable,
CI extends ConfigurationItem<X>>
CIprotected <X extends Serializable & Cloneable>
ConfigurationItem<X>clone()
Intentionally not calling super.clone, as the value is final (and we have to clone it); so we would have to hack this using reflection turning off the `final` flag.void
configCheck
(boolean value, String template, Object... arguments) Checks the value, and if it's `false`, emits aConfigurationException
.<V> V
configNonNull
(V value, String template, Object... arguments) AsconfigCheck(boolean, String, Object...)
, but checks that the value is not null.static <T extends Serializable & Cloneable>
@NotNull ConfigurationItem<T>embedded
(T value) boolean
@NotNull String
int
hashCode()
@NotNull String
To be overridden in specific subclasses.static <T extends Serializable & Cloneable>
@NotNull ConfigurationItem<T>of
(T value, @NotNull ConfigurationItemOrigin origin) static <T extends Serializable & Cloneable>
@NotNull List<ConfigurationItem<T>>ofList
(@NotNull List<T> items, @NotNull OriginProvider<? super T> originProvider) static <T extends Serializable & Cloneable,
X extends ConfigurationItem<T>>
@NotNull List<X>ofList
(@NotNull List<T> items, @NotNull OriginProvider<? super T> originProvider, @NotNull Class<X> clazz) static <T extends Serializable & Cloneable>
@NotNull List<ConfigurationItem<T>>ofListEmbedded
(@NotNull List<T> items) @NotNull ConfigurationItemOrigin
origin()
@NotNull ConfigurationItemOrigin
<C extends Containerable>
@NotNull OriginProvider<C>originProviderFor
(@NotNull ItemPath path) toString()
value()
-
Field Details
-
DESC
Used as a convenience marker forfullDescription()
in error messages.
-
-
Constructor Details
-
ConfigurationItem
For internal use. -
ConfigurationItem
-
-
Method Details
-
of
@NotNull public static <T extends Serializable & Cloneable> @NotNull ConfigurationItem<T> of(@NotNull T value, @NotNull @NotNull ConfigurationItemOrigin origin) -
embedded
@NotNull public static <T extends Serializable & Cloneable> @NotNull ConfigurationItem<T> embedded(@NotNull T value) -
ofListEmbedded
@NotNull public static <T extends Serializable & Cloneable> @NotNull List<ConfigurationItem<T>> ofListEmbedded(@NotNull @NotNull List<T> items) -
ofList
@NotNull public static <T extends Serializable & Cloneable> @NotNull List<ConfigurationItem<T>> ofList(@NotNull @NotNull List<T> items, @NotNull @NotNull OriginProvider<? super T> originProvider) -
ofList
@NotNull public static <T extends Serializable & Cloneable,X extends ConfigurationItem<T>> @NotNull List<X> ofList(@NotNull @NotNull List<T> items, @NotNull @NotNull OriginProvider<? super T> originProvider, @NotNull @NotNull Class<X> clazz) -
value
-
origin
-
originFor
-
originProviderFor
@NotNull public <C extends Containerable> @NotNull OriginProvider<C> originProviderFor(@NotNull @NotNull ItemPath path) -
as
@Contract("null, _ -> null; !null, _ -> !null") protected static <V extends Serializable & Cloneable,CI extends RAW_CI, CI asRAW_CI extends ConfigurationItem<V>> (@Nullable RAW_CI value, @NotNull @NotNull Class<CI> clazz) Null-safe variant ofas(Class)
. -
asList
@NotNull public static <T extends Serializable & Cloneable,X extends ConfigurationItem<T>> @NotNull List<X> asList(@NotNull @NotNull List<ConfigurationItem<T>> list, @NotNull @NotNull Class<X> clazz) -
as
-
child
@Contract("null, _, _ -> null; !null, _, _ -> !null") protected <X extends Serializable & Cloneable,CI extends ConfigurationItem<X>> CI child(@Nullable X value, @NotNull @NotNull Class<CI> clazz, Object... pathSegments) -
child
@Contract("null, _ -> null; !null, _ -> !null") protected <X extends Serializable & Cloneable> ConfigurationItem<X> child(@Nullable X value, Object... pathSegments) -
equals
-
hashCode
public int hashCode() -
clone
Intentionally not calling super.clone, as the value is final (and we have to clone it); so we would have to hack this using reflection turning off the `final` flag. -
toString
-
localDescription
To be overridden in specific subclasses. -
fullDescription
-
configCheck
public void configCheck(boolean value, String template, Object... arguments) throws ConfigurationException Checks the value, and if it's `false`, emits aConfigurationException
. Note thatDESC
can be used as a placeholder forfullDescription()
in the `arguments`.- Throws:
ConfigurationException
-
configNonNull
@Contract("null, _, _ -> fail") @NotNull public <V> V configNonNull(V value, String template, Object... arguments) throws ConfigurationException AsconfigCheck(boolean, String, Object...)
, but checks that the value is not null.- Throws:
ConfigurationException
-