Package com.evolveum.midpoint.schema.merger
package com.evolveum.midpoint.schema.merger
Supports merging of (usually) configuration beans.
For example, resource inheritance and object type inheritance is implemented here.
Other uses will be considered in the future.
== How to Use
=== Implementors
When you want to create a new merger, you need to just extend
BaseMergeOperation
and implement the merging logic. In most cases, it involves providing the appropriate root-level
ItemMerger
to the constructor:
BaseMergeOperation(com.evolveum.midpoint.prism.Containerable, com.evolveum.midpoint.prism.Containerable, com.evolveum.midpoint.schema.merger.GenericItemMerger)
Only in rare cases you will need to implement the merging logic yourself, like in
LimitationsMerger
or
ObjectTypeDefinitionMerger
.
Some of the mergers operate at the level of objects, for example:
- ResourceMergeOperation
(for resources)
- ObjectTemplateMergeOperation
(for object templates)
Others are at the level of containerables, like:
- CorrelatorMergeOperation
(for correlator definitions)
- SimulationDefinitionMergeOperation
(for simulation definitions)
=== Users
After instantiating appropriate BaseMergeOperation
, you just call its
BaseMergeOperation.execute()
method. Just look for the usages in midPoint code
for inspiration.
== Limitations
The architecture of this package is not finished yet. It is more-or-less an experiment for now.-
ClassDescriptionProvides common functionality for the majority for (non-trivial) item mergers.BaseMergeOperation<C extends Containerable>Implements the actual merging of two objects (
Containerable
) of the same type.The generic item merger that follows these rules: 1.Ignores the value in the source object.Sets the origin information in prism values being merged.Does no actual data movement; just requires that the value does exist in the target object.