use of net.opengis.ows.x11.MetadataType in project midpoint by Evolveum.
the class TestUtil method assertCreateTimestamp.
public static void assertCreateTimestamp(PrismObject<? extends ObjectType> object, XMLGregorianCalendar start, XMLGregorianCalendar end) {
MetadataType metadata = object.asObjectable().getMetadata();
assertNotNull("No metadata in " + object, metadata);
assertBetween("createTimestamp in " + object, start, end, metadata.getCreateTimestamp());
}
use of net.opengis.ows.x11.MetadataType in project midpoint by Evolveum.
the class OperationalDataManager method applyMetadataAdd.
public <T extends ObjectType, F extends ObjectType> void applyMetadataAdd(LensContext<F> context, PrismObject<T> objectToAdd, XMLGregorianCalendar now, Task task, OperationResult result) throws SchemaException {
T objectType = objectToAdd.asObjectable();
MetadataType metadataType = objectType.getMetadata();
if (metadataType == null) {
metadataType = new MetadataType();
objectType.setMetadata(metadataType);
}
transplantRequestMetadata(context, metadataType);
applyCreateMetadata(context, metadataType, now, task);
if (workflowManager != null) {
metadataType.getCreateApproverRef().addAll(workflowManager.getApprovedBy(task, result));
}
if (objectToAdd.canRepresent(FocusType.class)) {
applyAssignmentMetadataObject((LensContext<? extends FocusType>) context, objectToAdd, now, task, result);
}
}
use of net.opengis.ows.x11.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 net.opengis.ows.x11.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 net.opengis.ows.x11.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;
}
Aggregations