use of com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType in project midpoint by Evolveum.
the class OperationalDataManager method transplantRequestMetadata.
private <F extends ObjectType> void transplantRequestMetadata(LensContext<F> context, MetadataType metaData) {
MetadataType requestMetadata = context.getRequestMetadata();
if (requestMetadata == null) {
return;
}
metaData.setRequestTimestamp(requestMetadata.getRequestTimestamp());
metaData.setRequestorRef(requestMetadata.getRequestorRef());
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType in project midpoint by Evolveum.
the class OperationalDataManager method applyAssignmentValueMetadataAdd.
private <F extends FocusType> void applyAssignmentValueMetadataAdd(LensContext<F> context, PrismContainerValue<AssignmentType> assignmentContainerValue, String desc, XMLGregorianCalendar now, Task task, OperationResult result) throws SchemaException {
AssignmentType assignmentType = assignmentContainerValue.asContainerable();
MetadataType metadataType = assignmentType.getMetadata();
if (metadataType == null) {
metadataType = new MetadataType();
assignmentType.setMetadata(metadataType);
}
transplantRequestMetadata(context, metadataType);
ActivationType activationType = assignmentType.getActivation();
ActivationStatusType effectiveStatus = activationComputer.getEffectiveStatus(assignmentType.getLifecycleState(), activationType);
if (activationType == null) {
activationType = new ActivationType();
assignmentType.setActivation(activationType);
}
activationType.setEffectiveStatus(effectiveStatus);
applyCreateMetadata(context, metadataType, now, task);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Adding operational data {} to assignment cval ({}):\nMETADATA:\n{}\nACTIVATION:\n{}", metadataType, desc, assignmentContainerValue.debugDump(1), activationType.asPrismContainerValue().debugDump(1));
}
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType in project midpoint by Evolveum.
the class OperationalDataManager method createCreateMetadata.
public <F extends ObjectType> MetadataType createCreateMetadata(LensContext<F> context, XMLGregorianCalendar now, Task task) {
MetadataType metaData = new MetadataType();
applyCreateMetadata(context, metaData, now, task);
return metaData;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType in project midpoint by Evolveum.
the class ProvisioningUtil method addPasswordMetadata.
public static void addPasswordMetadata(PasswordType p, XMLGregorianCalendar now, PrismObject<UserType> owner) {
MetadataType metadata = p.getMetadata();
if (metadata != null) {
return;
}
// Supply some metadata if they are not present. However the
// normal thing is that those metadata are provided by model
metadata = new MetadataType();
metadata.setCreateTimestamp(now);
if (owner != null) {
metadata.creatorRef(owner.getOid(), null);
}
p.setMetadata(metadata);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType in project midpoint by Evolveum.
the class AbstractModelIntegrationTest method assertModifyMetadata.
protected <O extends ObjectType> void assertModifyMetadata(PrismObject<O> object, XMLGregorianCalendar start, XMLGregorianCalendar end) {
MetadataType metadataType = object.asObjectable().getMetadata();
PrismObject<UserType> defaultActor = getDefaultActor();
assertMetadata(object.toString(), metadataType, false, false, start, end, defaultActor == null ? null : defaultActor.getOid(), DEFAULT_CHANNEL);
}
Aggregations