Interface OriginMarker
public interface OriginMarker
Sets the origin information in prism values being merged.
In order to track the origin of individual prism item values in the merged object, the mergers are obliged to fill-in
this information on any values being processed. Specifically, when a prism value `V` is inherited from the source
(super-)object `S`, this fact is recorded in the
ValueMetadataType
of `V` by setting `provenance/acquisition/originRef`
to the reference to `S`.
Notes:
. When a composite value (PrismContainerValue
) is inherited, only the root value gets the metadata. It's not necessary
(and therefore it's avoided) to set the metadata on each of the contained ("inner") values.
. When a value is passed through multiple layers of inheritance (e.g. inherited from `O1` to `O2` and finally to `O3`),
only the "real" origin (i.e. `O1`) is recorded.
. Origin for values not passing through the inheritance relation (i.e. values at the bottom of the inheritance hierarchy)
are not marked - not even if the containing resource has an OID.
For some examples please see `TestResourceTemplateMerge`.
Important assumption:
- The current implementation assumes that there is no value metadata stored in the (original) objects being merged; i.e.
that all metadata come from this OriginMarker
.-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable OriginMarker
Marks values with oid/type pair.static @Nullable OriginMarker
forRef
(@Nullable ObjectReferenceType ref) Marks values with given reference.void
mark
(PrismValue value) Imprints the origin into the value.
-
Method Details
-
mark
Imprints the origin into the value.- Throws:
SchemaException
-
forOid
Marks values with oid/type pair. -
forRef
Marks values with given reference.
-