Search in sources :

Example 1 with MetadataType

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());
}
Also used : MetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType)

Example 2 with MetadataType

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);
    }
}
Also used : MetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType)

Example 3 with MetadataType

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());
}
Also used : MetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType)

Example 4 with MetadataType

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));
    }
}
Also used : ActivationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType) ActivationStatusType(com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType) AssignmentType(com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType) MetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType)

Example 5 with MetadataType

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;
}
Also used : MetadataType(com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType)

Aggregations

MetadataType (com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType)23 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)4 ActivationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType)4 AssignmentType (com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType)4 UserType (com.evolveum.midpoint.xml.ns._public.common.common_3.UserType)3 PrismContext (com.evolveum.midpoint.prism.PrismContext)2 ProtectedStringType (com.evolveum.prism.xml.ns._public.types_3.ProtectedStringType)2 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)2 Test (org.testng.annotations.Test)2 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1 PrismContainerDefinition (com.evolveum.midpoint.prism.PrismContainerDefinition)1 PrismContainerValue (com.evolveum.midpoint.prism.PrismContainerValue)1 PrismReferenceDefinition (com.evolveum.midpoint.prism.PrismReferenceDefinition)1 ContainerDelta (com.evolveum.midpoint.prism.delta.ContainerDelta)1 ItemDelta (com.evolveum.midpoint.prism.delta.ItemDelta)1 RObject (com.evolveum.midpoint.repo.sql.data.common.RObject)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 DateLabelComponent (com.evolveum.midpoint.web.component.DateLabelComponent)1 MetadataPanel (com.evolveum.midpoint.web.component.assignment.MetadataPanel)1 CheckBoxHeaderColumn (com.evolveum.midpoint.web.component.data.column.CheckBoxHeaderColumn)1