Class OperationalDataManager
java.lang.Object
com.evolveum.midpoint.model.impl.lens.OperationalDataManager
- All Implemented Interfaces:
DeltaExecutionPreprocessor
Manages metadata (mostly before delta execution), but also some other operational data, namely assignment effective status.
(I am not sure why do we that here. See
setAssignmentEffectiveStatus(AssignmentType)
.)- Author:
- semancik
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
All values are parent-less here, to be directly insertable into beans and deltas. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAssignmentCreationApprovalMetadata
(AssignmentType assignment, Collection<ObjectReferenceType> approvedBy, Collection<String> comments) void
addExternalAssignmentProvenance
(LensContext<?> context, Task task) Adds provenance metadata to assignments being explicitly added (via primary delta).<T extends ObjectType>
voidapplyMetadataOnObjectAddOp
(LensContext<?> context, PrismObject<T> objectToAdd, XMLGregorianCalendar now, Task task) Sets object and assignment metadata on object ADD operation.<T extends ObjectType>
voidapplyMetadataOnObjectModifyOp
(@NotNull ObjectDelta<T> objectDelta, @NotNull LensElementContext<T> elementContext, @NotNull XMLGregorianCalendar now, @NotNull Task task, @NotNull LensContext<?> context) Creates deltas for object and assignment metadata on object MODIFY operation.Collection<? extends ItemDelta<?,
?>> createAssignmentCertificationMetadataDeltas
(Class<? extends ObjectType> objectClass, ItemPath assignmentPcvPath, PrismContainerValue<?> assignmentPcv, OperationalDataManager.CertificationProcessMetadata certificationProcessMetadata) Collection<ItemDelta<?,
?>> createAssignmentModificationApprovalMetadata
(AssignmentHolderType focus, long assignmentId, Collection<ObjectReferenceType> approvedBy, Collection<String> comments) <F extends ObjectType>
ValueMetadataTypecreateCreateMetadata
(LensContext<F> context, XMLGregorianCalendar now, Task task) Currently used for the credentials.<T extends ObjectType>
Collection<ItemDelta<?,?>> createCredentialsModificationRelatedStorageMetadataDeltas
(@NotNull LensContext<?> context, @NotNull ItemPath credentialContainerPath, @Nullable AbstractCredentialType currentObject, @NotNull Class<T> objectType, @NotNull XMLGregorianCalendar now, @NotNull Task task) Collection<? extends ItemDelta<?,
?>> createObjectCertificationMetadataDeltas
(@NotNull ObjectType object, OperationalDataManager.CertificationProcessMetadata certificationProcessMetadata) Collection<ItemDelta<?,
?>> createObjectModificationRelatedStorageMetadataDeltas
(LensContext<?> context, @NotNull ObjectType currentObject, XMLGregorianCalendar now, Task task) Creates deltas for object-modification-related STORAGE metadata.
-
Constructor Details
-
OperationalDataManager
public OperationalDataManager()
-
-
Method Details
-
applyMetadataOnObjectAddOp
public <T extends ObjectType> void applyMetadataOnObjectAddOp(LensContext<?> context, PrismObject<T> objectToAdd, XMLGregorianCalendar now, Task task) throws SchemaException, ConfigurationException Sets object and assignment metadata on object ADD operation. We assume that assignments already have the respective metadata values, seeapplyMetadataOnAssignmentAddOp(LensContext, AssignmentType, String, XMLGregorianCalendar, Task)
. -
applyMetadataOnObjectModifyOp
public <T extends ObjectType> void applyMetadataOnObjectModifyOp(@NotNull @NotNull ObjectDelta<T> objectDelta, @NotNull @NotNull LensElementContext<T> elementContext, @NotNull @NotNull XMLGregorianCalendar now, @NotNull @NotNull Task task, @NotNull @NotNull LensContext<?> context) throws SchemaException, ConfigurationException Creates deltas for object and assignment metadata on object MODIFY operation. We assume that assignments already have the respective metadata values, seeapplyMetadataOnAssignmentAddOp(LensContext, AssignmentType, String, XMLGregorianCalendar, Task)
. -
createObjectModificationRelatedStorageMetadataDeltas
public Collection<ItemDelta<?,?>> createObjectModificationRelatedStorageMetadataDeltas(LensContext<?> context, @NotNull @NotNull ObjectType currentObject, XMLGregorianCalendar now, Task task) throws SchemaException Creates deltas for object-modification-related STORAGE metadata.- Throws:
SchemaException
-
createObjectCertificationMetadataDeltas
public Collection<? extends ItemDelta<?,?>> createObjectCertificationMetadataDeltas(@NotNull @NotNull ObjectType object, OperationalDataManager.CertificationProcessMetadata certificationProcessMetadata) throws SchemaException - Throws:
SchemaException
-
addExternalAssignmentProvenance
public void addExternalAssignmentProvenance(LensContext<?> context, Task task) throws SchemaException Adds provenance metadata to assignments being explicitly added (via primary delta). This is necessary so that they can be distinguished from assignments provided by mappings. Typically used on operation start.- Throws:
SchemaException
-
addAssignmentCreationApprovalMetadata
public void addAssignmentCreationApprovalMetadata(AssignmentType assignment, Collection<ObjectReferenceType> approvedBy, Collection<String> comments) throws SchemaException - Throws:
SchemaException
-
createAssignmentModificationApprovalMetadata
public Collection<ItemDelta<?,?>> createAssignmentModificationApprovalMetadata(AssignmentHolderType focus, long assignmentId, Collection<ObjectReferenceType> approvedBy, Collection<String> comments) throws SchemaException - Throws:
SchemaException
-
createAssignmentCertificationMetadataDeltas
public Collection<? extends ItemDelta<?,?>> createAssignmentCertificationMetadataDeltas(Class<? extends ObjectType> objectClass, ItemPath assignmentPcvPath, PrismContainerValue<?> assignmentPcv, OperationalDataManager.CertificationProcessMetadata certificationProcessMetadata) throws SchemaException - Throws:
SchemaException
-
createCreateMetadata
public <F extends ObjectType> ValueMetadataType createCreateMetadata(LensContext<F> context, XMLGregorianCalendar now, Task task) Currently used for the credentials. -
createCredentialsModificationRelatedStorageMetadataDeltas
public <T extends ObjectType> Collection<ItemDelta<?,?>> createCredentialsModificationRelatedStorageMetadataDeltas(@NotNull @NotNull LensContext<?> context, @NotNull @NotNull ItemPath credentialContainerPath, @Nullable @Nullable AbstractCredentialType currentObject, @NotNull @NotNull Class<T> objectType, @NotNull @NotNull XMLGregorianCalendar now, @NotNull @NotNull Task task) throws SchemaException - Throws:
SchemaException
-