Class ShadowDefinitionApplicator
java.lang.Object
com.evolveum.midpoint.schema.processor.ShadowDefinitionApplicator
Applies attributes and/or associations definitions to a shadow, delta, or query.
It is instantiated for a specific
ResourceObjectDefinition (see definition).
Can be used for model-level and resource-level shadows, but *not for repository-level ones*.
Generally, we don't replace definitions if they are of ShadowItemDefinition type;
see requiresAttributeDefinitionApplication(ItemDefinition) and
requiresAssociationDefinitionApplication(ItemDefinition).
NOTE: Originally, this functionality was in `ShadowCaretaker` in the `provisioning-impl` module.
In the future, maybe it should be part of standard `applyDefinition` mechanism. (But, we need some flexibility
about lax mode and error handling.)- Author:
- Radovan Semancik
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToAssociationValues(ShadowType shadow) Applies the correct definitions to objects embedded in association values.voidapplyToDelta(@NotNull ObjectDelta<ShadowType> delta) voidapplyToItemDeltas(@NotNull Collection<? extends ItemDelta<?, ?>> itemDeltas) voidapplyToShadow(@NotNull ShadowType bean) Applies the definition to the model-level or resource-level shadow.static ShadowDefinitionApplicatorcreate(@NotNull ResourceObjectDefinition definition, boolean lax) static ShadowDefinitionApplicatorlax(@NotNull ResourceObjectDefinition definition) static ShadowDefinitionApplicatorstrict(@NotNull ResourceObjectDefinition definition)
-
Method Details
-
create
public static ShadowDefinitionApplicator create(@NotNull @NotNull ResourceObjectDefinition definition, boolean lax) -
strict
public static ShadowDefinitionApplicator strict(@NotNull @NotNull ResourceObjectDefinition definition) -
lax
-
applyToDelta
- Throws:
SchemaException
-
applyToItemDeltas
public void applyToItemDeltas(@NotNull @NotNull Collection<? extends ItemDelta<?, ?>> itemDeltas) throws SchemaException- Throws:
SchemaException
-
applyToShadow
Applies the definition to the model-level or resource-level shadow.- Throws:
SchemaException
-
applyToAssociationValues
Applies the correct definitions to objects embedded in association values. Assumes known shadow type. TEMPORARY. Reconsider this method.- Throws:
SchemaException
-