Interface ProcessedObject<O extends ObjectType>
-
- All Superinterfaces:
DebugDumpable
,Serializable
- All Known Implementing Classes:
ProcessedObjectImpl
public interface ProcessedObject<O extends ObjectType> extends DebugDumpable, Serializable
Parsed analogy ofSimulationResultProcessedObjectType
. Used during creation ofSimulationResultType
objects, reporting on them, and during testing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ProcessedObject.Metric
Metric information, currently for reporting purposes.static interface
ProcessedObject.ProcessedObjectItemDelta<V extends PrismValue,D extends ItemDefinition<?>>
ItemDelta
augmented with functionality needed to display it in a complex way, for example, with the information on real change(s) to the object.static class
ProcessedObject.ValueWithState
Value touched by a delta, along with their processingProcessedObject.ValueWithState.State
.
-
Field Summary
Fields Modifier and Type Field Description static Map<ChangeType,ObjectProcessingStateType>
DELTA_TO_PROCESSING_STATE
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
applyDefinitions(@NotNull Task task, @NotNull OperationResult result)
Applies the definitions (currently, resource schema related to specific shadow) to the object(s) before/after, and the delta.void
fixEstimatedOldValuesInDelta()
Resolves "estimated old values" for item deltas where they are not known.O
getAfter()
Returns the (expected) state of the object after the operation.default O
getAfterOrBefore()
O
getBefore()
Returns the state of the object before the operation.default O
getBeforeOrAfterRequired()
@Nullable ObjectDelta<O>
getDelta()
Returns the operation that is to be executed.@NotNull Collection<ObjectReferenceType>
getEffectiveObjectMarksRefs()
Returns references of object marks.@NotNull Collection<ProcessedObject.ProcessedObjectItemDelta<?,?>>
getItemDeltas(@Nullable Object pathsToInclude, @Nullable Object pathsToExclude, @Nullable Boolean includeOperationalItems)
Returns the collection of (augmented) item deltas related to this "processed object".@NotNull Collection<String>
getMatchingEventMarksOids()
Returns OIDs of matching event marks for this object.@NotNull Collection<ProcessedObject.Metric>
getMetrics(@Nullable Boolean showEventMarks, @Nullable Boolean showExplicitMetrics)
Returns the collection ofProcessedObject.Metric
values for this object.@Nullable PolyStringType
getName()
Name of the object being processed.String
getOid()
OID of the object whole processing is described by this record.@Nullable String
getResourceOid()
For processed objects that are shadows: returns the related resource OID.@Nullable OperationResult
getResult()
The result of the operation connected to this object.@Nullable OperationResultStatus
getResultStatus()
The status of the operation connected to this object.@NotNull ObjectProcessingStateType
getState()
State of the object.@NotNull Class<O>
getType()
Type of the object being processed.boolean
hasEventMark(@NotNull String eventMarkOid)
boolean
hasNoEventMarks()
default boolean
isAddition()
default boolean
isDeletion()
boolean
isFocus()
default boolean
isModification()
default boolean
isNoChange()
default boolean
isOfFocusType()
default boolean
isShadow()
void
resolveEventMarks(OperationResult result)
For diagnostic purposes.@NotNull SimulationResultProcessedObjectType
toBean()
Creates aSimulationResultProcessedObjectType
bean corresponding to this object.-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
-
-
-
-
Field Detail
-
DELTA_TO_PROCESSING_STATE
static final Map<ChangeType,ObjectProcessingStateType> DELTA_TO_PROCESSING_STATE
-
-
Method Detail
-
getOid
String getOid()
OID of the object whole processing is described by this record. Usually not null but we shouldn't rely on it.
-
getName
@Nullable @Nullable PolyStringType getName()
Name of the object being processed. May not be known; typically for shadows to-be-created.
-
getState
@NotNull @NotNull ObjectProcessingStateType getState()
State of the object.
-
getResultStatus
@Nullable @Nullable OperationResultStatus getResultStatus()
The status of the operation connected to this object. Only "primary" objects have this information.
-
getResult
@Nullable @Nullable OperationResult getResult()
The result of the operation connected to this object. Only "primary" objects have this information.
-
getMatchingEventMarksOids
@NotNull @NotNull Collection<String> getMatchingEventMarksOids()
Returns OIDs of matching event marks for this object.
-
getEffectiveObjectMarksRefs
@NotNull @NotNull Collection<ObjectReferenceType> getEffectiveObjectMarksRefs()
Returns references of object marks. Primarily on "object before" state (if exists). To be reconsidered.
-
getBefore
O getBefore()
Returns the state of the object before the operation.
-
getAfter
O getAfter()
Returns the (expected) state of the object after the operation.
-
getDelta
@Nullable @Nullable ObjectDelta<O> getDelta()
Returns the operation that is to be executed.
-
fixEstimatedOldValuesInDelta
void fixEstimatedOldValuesInDelta()
Resolves "estimated old values" for item deltas where they are not known. TEMPORARY; see MID-8536. This will be part of standard processing but because of code freeze doing it as separate code.
-
getAfterOrBefore
default O getAfterOrBefore()
-
getBeforeOrAfterRequired
@NotNull default O getBeforeOrAfterRequired()
-
toBean
@NotNull @NotNull SimulationResultProcessedObjectType toBean()
Creates aSimulationResultProcessedObjectType
bean corresponding to this object.
-
resolveEventMarks
@VisibleForTesting void resolveEventMarks(OperationResult result)
For diagnostic purposes.
-
hasEventMark
@VisibleForTesting boolean hasEventMark(@NotNull @NotNull String eventMarkOid)
-
hasNoEventMarks
@VisibleForTesting boolean hasNoEventMarks()
-
getResourceOid
@VisibleForTesting @Nullable @Nullable String getResourceOid()
For processed objects that are shadows: returns the related resource OID.
-
getItemDeltas
@NotNull @NotNull Collection<ProcessedObject.ProcessedObjectItemDelta<?,?>> getItemDeltas(@Nullable @Nullable Object pathsToInclude, @Nullable @Nullable Object pathsToExclude, @Nullable @Nullable Boolean includeOperationalItems)
Returns the collection of (augmented) item deltas related to this "processed object". Limited! We are not able to see inside deltas. So, for example, when looking for `activation/administrativeStatus` property, and the whole `activation` container is added, the delta is not shown. See the implementation andItemDeltaFilter
for details. Experimental.- Parameters:
pathsToInclude
- paths of items that we want to see in the list of deltaspathsToExclude
- paths of items that we do not want to see in the list of deltasincludeOperationalItems
- should the operational items be included in the list of deltas?
-
getMetrics
@NotNull @NotNull Collection<ProcessedObject.Metric> getMetrics(@Nullable @Nullable Boolean showEventMarks, @Nullable @Nullable Boolean showExplicitMetrics)
Returns the collection ofProcessedObject.Metric
values for this object.- Parameters:
showEventMarks
- Should we include mark-based metrics?showExplicitMetrics
- Should we include explicitly defined metrics?
-
applyDefinitions
void applyDefinitions(@NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectNotFoundException
Applies the definitions (currently, resource schema related to specific shadow) to the object(s) before/after, and the delta.
-
isAddition
default boolean isAddition()
-
isModification
default boolean isModification()
-
isDeletion
default boolean isDeletion()
-
isNoChange
default boolean isNoChange()
-
isFocus
boolean isFocus()
-
isOfFocusType
default boolean isOfFocusType()
-
isShadow
default boolean isShadow()
-
-