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 ofSimulationResultTypeobjects, reporting on them, and during testing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceProcessedObject.MetricMetric information, currently for reporting purposes.static interfaceProcessedObject.ProcessedObjectItemDelta<V extends PrismValue,D extends ItemDefinition<?>>ItemDeltaaugmented with functionality needed to display it in a complex way, for example, with the information on real change(s) to the object.static classProcessedObject.ValueWithStateValue 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 voidapplyDefinitions(@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.voidfixEstimatedOldValuesInDelta()Resolves "estimated old values" for item deltas where they are not known.OgetAfter()Returns the (expected) state of the object after the operation.default OgetAfterOrBefore()OgetBefore()Returns the state of the object before the operation.default OgetBeforeOrAfterRequired()@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.Metricvalues for this object.@Nullable PolyStringTypegetName()Name of the object being processed.StringgetOid()OID of the object whole processing is described by this record.@Nullable StringgetResourceOid()For processed objects that are shadows: returns the related resource OID.@Nullable OperationResultgetResult()The result of the operation connected to this object.@Nullable OperationResultStatusgetResultStatus()The status of the operation connected to this object.@NotNull ObjectProcessingStateTypegetState()State of the object.@NotNull Class<O>getType()Type of the object being processed.booleanhasEventMark(@NotNull String eventMarkOid)booleanhasNoEventMarks()default booleanisAddition()default booleanisDeletion()booleanisFocus()default booleanisModification()default booleanisNoChange()default booleanisOfFocusType()default booleanisShadow()voidresolveEventMarks(OperationResult result)For diagnostic purposes.@NotNull SimulationResultProcessedObjectTypetoBean()Creates aSimulationResultProcessedObjectTypebean 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 aSimulationResultProcessedObjectTypebean 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 andItemDeltaFilterfor 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.Metricvalues 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, ObjectNotFoundExceptionApplies 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()
-
-