Search in sources :

Example 1 with ChangeType

use of com.evolveum.midpoint.prism.delta.ChangeType in project midpoint by Evolveum.

the class ActionsExecutedCollectorImpl method recordInternal.

private void recordInternal(String objectName, String objectDisplayName, QName objectType, String objectOid, ChangeType changeType, String channel, Throwable exception) {
    XMLGregorianCalendar now = XmlTypeConverter.createXMLGregorianCalendar(new Date());
    ActionExecuted action = new ActionExecuted(objectName, objectDisplayName, objectType, objectOid, changeType, channel, exception, now);
    if (action.objectOid == null) {
        // hack for unsuccessful ADDs
        action.objectOid = "dummy-" + ((int) (Math.random() * 10000000));
    }
    actionsByOid.computeIfAbsent(action.objectOid, k -> new ArrayList<>()).add(action);
    allActions.add(action);
}
Also used : java.util(java.util) ObjectType(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType) ChangeType(com.evolveum.midpoint.prism.delta.ChangeType) PrismObject(com.evolveum.midpoint.prism.PrismObject) XMLGregorianCalendar(javax.xml.datatype.XMLGregorianCalendar) PrismObjectDefinition(com.evolveum.midpoint.prism.PrismObjectDefinition) ObjectTypeUtil(com.evolveum.midpoint.schema.util.ObjectTypeUtil) PrismContext(com.evolveum.midpoint.prism.PrismContext) ActionsExecutedCollector(com.evolveum.midpoint.schema.statistics.ActionsExecutedCollector) QName(javax.xml.namespace.QName) NotNull(org.jetbrains.annotations.NotNull) PolyString(com.evolveum.midpoint.prism.polystring.PolyString) XmlTypeConverter(com.evolveum.midpoint.prism.xml.XmlTypeConverter) XMLGregorianCalendar(javax.xml.datatype.XMLGregorianCalendar)

Aggregations

PrismContext (com.evolveum.midpoint.prism.PrismContext)1 PrismObject (com.evolveum.midpoint.prism.PrismObject)1 PrismObjectDefinition (com.evolveum.midpoint.prism.PrismObjectDefinition)1 ChangeType (com.evolveum.midpoint.prism.delta.ChangeType)1 PolyString (com.evolveum.midpoint.prism.polystring.PolyString)1 XmlTypeConverter (com.evolveum.midpoint.prism.xml.XmlTypeConverter)1 ActionsExecutedCollector (com.evolveum.midpoint.schema.statistics.ActionsExecutedCollector)1 ObjectTypeUtil (com.evolveum.midpoint.schema.util.ObjectTypeUtil)1 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)1 java.util (java.util)1 XMLGregorianCalendar (javax.xml.datatype.XMLGregorianCalendar)1 QName (javax.xml.namespace.QName)1 NotNull (org.jetbrains.annotations.NotNull)1