Class ProcessedObjectImpl<O extends ObjectType>
java.lang.Object
com.evolveum.midpoint.model.impl.simulation.ProcessedObjectImpl<O>
- All Implemented Interfaces:
- ProcessedObject<O>,- DebugDumpable,- Serializable
Default (and the only) implementation of 
ProcessedObject.- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface com.evolveum.midpoint.model.api.simulation.ProcessedObjectProcessedObject.Metric, ProcessedObject.ProcessedObjectItemDelta<V extends PrismValue,D extends ItemDefinition<?>>, ProcessedObject.ValueWithState 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringTo store parsed version along withSimulationResultProcessedObjectTypebean.Fields inherited from interface com.evolveum.midpoint.util.DebugDumpableINDENT_STRINGFields inherited from interface com.evolveum.midpoint.model.api.simulation.ProcessedObjectDELTA_TO_PROCESSING_STATE
- 
Method SummaryModifier and TypeMethodDescriptionvoidapplyDefinitions(@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.static <O extends ObjectType>
 @Nullable ProcessedObjectImpl<O>create(@NotNull LensElementContext<O> elementContext, @NotNull SimulationTransactionImpl simulationTransaction, @NotNull Task task, @NotNull OperationResult result) CreatesProcessedObjectImplfor theLensElementContext.debugDump(int indent) voidResolves "estimated old values" for item deltas where they are not known.getAfter()Returns the (expected) state of the object after the operation.intReturns the number of VALUES of associations added or deleted.intReturns the number of attribute modifications.Returns the state of the object before the operation.@Nullable ObjectDelta<O>getDelta()Returns the operation that is to be executed.@NotNull Collection<ObjectReferenceType>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".intgetItemModificationsCount(@NotNull ItemPath itemPath) Counts modifications based on the specified path, excluding changes in ADD/DELETE deltas.intgetItemModificationsCount(@NotNull ItemPath itemPath, boolean allowSubPaths) Counts modifications based on the specified path, excluding changes in ADD/DELETE deltas.getKind()@NotNull Collection<String>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.intReturns the number of modifications of non-operational items.getOid()OID of the object whole processing is described by this record.@Nullable StringFor processed objects that are shadows: returns the related resource OID.@Nullable OperationResultThe result of the operation connected to this object.@Nullable OperationResultStatusThe status of the operation connected to this object.@NotNull ObjectProcessingStateTypegetState()State of the object.getType()Type of the object being processed.@NotNull QNamebooleanhasEventMark(@NotNull String eventMarkOid) booleanbooleanisFocus()booleanmatches(@NotNull SimulationObjectPredicateType predicate, @NotNull Task task, @NotNull OperationResult result) static <O extends ObjectType>
 @NotNull ProcessedObjectImpl<O>parse(@NotNull SimulationResultProcessedObjectType bean) CreatesProcessedObjectImplfrom pre-existingSimulationResultProcessedObjectTypebean.voidresolveEventMarks(OperationResult result) For diagnostic purposes.@NotNull SimulationResultProcessedObjectTypetoBean()Creates aSimulationResultProcessedObjectTypebean corresponding to this object.toString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.util.DebugDumpabledebugDump, debugDumpLazily, debugDumpLazilyMethods inherited from interface com.evolveum.midpoint.model.api.simulation.ProcessedObjectgetAfterOrBefore, getBeforeOrAfterRequired, isAddition, isDeletion, isModification, isNoChange, isOfFocusType, isShadow
- 
Field Details- 
KEY_PARSEDTo store parsed version along withSimulationResultProcessedObjectTypebean.
 
- 
- 
Method Details- 
parse@NotNull public static <O extends ObjectType> @NotNull ProcessedObjectImpl<O> parse(@NotNull @NotNull SimulationResultProcessedObjectType bean) throws SchemaException CreatesProcessedObjectImplfrom pre-existingSimulationResultProcessedObjectTypebean. For example, during testing or report creation.- Throws:
- SchemaException
- See Also:
- 
- ProcessedObjectImpl.InternalState.PARSED
 
 
- 
create@Nullable public static <O extends ObjectType> @Nullable ProcessedObjectImpl<O> create(@NotNull @NotNull LensElementContext<O> elementContext, @NotNull @NotNull SimulationTransactionImpl simulationTransaction, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws CommonException CreatesProcessedObjectImplfor theLensElementContext. This is the classic (audit-like) simulation. Limitations: - We ignore the fact that sometimes we don't have full shadow loaded. (Although we do our best to load such full shadows during clockwork processing.) The deltas applied to "shadow-only" state may be misleading.- Throws:
- CommonException
 
- 
getOidDescription copied from interface:ProcessedObjectOID of the object whole processing is described by this record. Usually not null but we shouldn't rely on it.- Specified by:
- getOidin interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
getTypeDescription copied from interface:ProcessedObjectType of the object being processed.- Specified by:
- getTypein interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
getTypeName
- 
getResourceOidDescription copied from interface:ProcessedObjectFor processed objects that are shadows: returns the related resource OID.- Specified by:
- getResourceOidin interface- ProcessedObject<O extends ObjectType>
 
- 
getKind
- 
getIntent
- 
getNameDescription copied from interface:ProcessedObjectName of the object being processed. May not be known; typically for shadows to-be-created.- Specified by:
- getNamein interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
getStateDescription copied from interface:ProcessedObjectState of the object.- Specified by:
- getStatein interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
getMatchingEventMarksOidsDescription copied from interface:ProcessedObjectReturns OIDs of matching event marks for this object.- Specified by:
- getMatchingEventMarksOidsin interface- ProcessedObject<O extends ObjectType>
 
- 
getEffectiveObjectMarksRefsDescription copied from interface:ProcessedObjectReturns references of object marks. Primarily on "object before" state (if exists). To be reconsidered.- Specified by:
- getEffectiveObjectMarksRefsin interface- ProcessedObject<O extends ObjectType>
 
- 
isFocuspublic boolean isFocus()- Specified by:
- isFocusin interface- ProcessedObject<O extends ObjectType>
 
- 
getResultStatusDescription copied from interface:ProcessedObjectThe status of the operation connected to this object. Only "primary" objects have this information.- Specified by:
- getResultStatusin interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
getResultDescription copied from interface:ProcessedObjectThe result of the operation connected to this object. Only "primary" objects have this information.- Specified by:
- getResultin interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
getBeforeDescription copied from interface:ProcessedObjectReturns the state of the object before the operation.- Specified by:
- getBeforein interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
getAfterDescription copied from interface:ProcessedObjectReturns the (expected) state of the object after the operation.- Specified by:
- getAfterin interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
getDeltaDescription copied from interface:ProcessedObjectReturns the operation that is to be executed.- Specified by:
- getDeltain interface- ProcessedObject<O extends ObjectType>
- See Also:
 
- 
toBeanDescription copied from interface:ProcessedObjectCreates aSimulationResultProcessedObjectTypebean corresponding to this object.- Specified by:
- toBeanin interface- ProcessedObject<O extends ObjectType>
 
- 
debugDump- Specified by:
- debugDumpin interface- DebugDumpable
 
- 
toString
- 
getNonOperationalItemModificationsCount@VisibleForTesting public int getNonOperationalItemModificationsCount()Returns the number of modifications of non-operational items. Currently the implementation is primitive: we simply count the modifications (item deltas) in the object MODIFY delta. Other kinds of deltas (add, delete) are ignored. We also count a container modification as one item modification, even if there are multiple properties changed in the container.
- 
getAttributeModificationsCount@VisibleForTesting public int getAttributeModificationsCount()Returns the number of attribute modifications. Not counting changes in ADD/DELETE deltas.
- 
getItemModificationsCountCounts modifications based on the specified path, excluding changes in ADD/DELETE deltas.The item path must exactly match the configuration. Sub-item modifications are not counted.- Parameters:
- itemPath- the path to count modifications for
- Returns:
- the number of attribute modifications.
 
- 
getItemModificationsCountCounts modifications based on the specified path, excluding changes in ADD/DELETE deltas.The item path must exactly match the configuration. IfallowSubPathsis true, sub-item modifications are also counted.- Parameters:
- itemPath- the path to count modifications for
- allowSubPaths- if true, sub-item modifications are allowed
- Returns:
- the number of attribute modifications
 
- 
getAssociationValuesChangedReturns the number of VALUES of associations added or deleted. Not counting changes in ADD/DELETE deltas. Assuming that there are no REPLACE modifications of associations. Assuming that there are no ADD/DELETE modifications of the whole associations container.- Throws:
- SchemaException
 
- 
matchespublic boolean matches(@NotNull @NotNull SimulationObjectPredicateType predicate, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws CommonException - Throws:
- CommonException
 
- 
resolveEventMarksDescription copied from interface:ProcessedObjectFor diagnostic purposes.- Specified by:
- resolveEventMarksin interface- ProcessedObject<O extends ObjectType>
 
- 
hasEventMark- Specified by:
- hasEventMarkin interface- ProcessedObject<O extends ObjectType>
 
- 
hasNoEventMarkspublic boolean hasNoEventMarks()- Specified by:
- hasNoEventMarksin interface- ProcessedObject<O extends ObjectType>
 
- 
getItemDeltas@NotNull public @NotNull Collection<ProcessedObject.ProcessedObjectItemDelta<?,?>> getItemDeltas(@Nullable @Nullable Object pathsToInclude, @Nullable @Nullable Object pathsToExclude, @Nullable @Nullable Boolean includeOperationalItems) Description copied from interface:ProcessedObjectReturns 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.- Specified by:
- getItemDeltasin interface- ProcessedObject<O extends ObjectType>
- Parameters:
- pathsToInclude- paths of items that we want to see in the list of deltas
- pathsToExclude- paths of items that we do not want to see in the list of deltas
- includeOperationalItems- should the operational items be included in the list of deltas?
 
- 
getMetrics@NotNull public @NotNull Collection<ProcessedObject.Metric> getMetrics(@Nullable @Nullable Boolean showEventMarks, @Nullable @Nullable Boolean showExplicitMetrics) Description copied from interface:ProcessedObjectReturns the collection ofProcessedObject.Metricvalues for this object.- Specified by:
- getMetricsin interface- ProcessedObject<O extends ObjectType>
- Parameters:
- showEventMarks- Should we include mark-based metrics?
- showExplicitMetrics- Should we include explicitly defined metrics?
 
- 
applyDefinitionspublic void applyDefinitions(@NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectNotFoundException Description copied from interface:ProcessedObjectApplies the definitions (currently, resource schema related to specific shadow) to the object(s) before/after, and the delta.- Specified by:
- applyDefinitionsin interface- ProcessedObject<O extends ObjectType>
- Throws:
- SchemaException
- ExpressionEvaluationException
- CommunicationException
- ConfigurationException
- ObjectNotFoundException
 
- 
fixEstimatedOldValuesInDeltapublic void fixEstimatedOldValuesInDelta()Description copied from interface:ProcessedObjectResolves "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.- Specified by:
- fixEstimatedOldValuesInDeltain interface- ProcessedObject<O extends ObjectType>
 
 
-