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 TypeMethodDescriptionvoid
applyToAssociationValues
(ShadowType shadow) Applies the correct definitions to objects embedded in association values.void
applyToDelta
(@NotNull ObjectDelta<ShadowType> delta) void
applyToItemDeltas
(@NotNull Collection<? extends ItemDelta<?, ?>> itemDeltas) void
applyToShadow
(@NotNull ShadowType bean) Applies the definition to the model-level or resource-level shadow.static ShadowDefinitionApplicator
create
(@NotNull ResourceObjectDefinition definition, boolean lax) static ShadowDefinitionApplicator
lax
(@NotNull ResourceObjectDefinition definition) static ShadowDefinitionApplicator
strict
(@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
-