<!--
  ~ Copyright (c) 2010-2025 Evolveum and contributors
  ~
  ~ Licensed under the EUPL-1.2 or later.
  -->

<objectCollection xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
                  xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
                  oid="00000000-0000-0000-0001-000000000284">
    <name>All audit records</name>
    <type>AuditEventRecordType</type>
    <defaultView>
        <column id="1">
            <name>timestampColumn</name>
            <path>timestamp</path>
        </column>
        <column id="2">
            <name>initiatorColumn</name>
            <path>initiatorRef</path>
            <previousColumn>timestampColumn</previousColumn>
        </column>
        <column id="3">
            <name>eventTypeColumn</name>
            <path>eventType</path>
            <previousColumn>initiatorColumn</previousColumn>
        </column>
        <column id="4">
            <name>eventStageColumn</name>
            <path>eventStage</path>
            <previousColumn>eventTypeColumn</previousColumn>
        </column>
        <column id="5">
            <name>targetColumn</name>
            <path>targetRef</path>
            <previousColumn>eventStageColumn</previousColumn>
        </column>
        <column id="6">
            <name>outcomeColumn</name>
            <path>outcome</path>
            <previousColumn>targetColumn</previousColumn>
        </column>
        <column id="7">
            <name>messageColumn</name>
            <path>message</path>
            <previousColumn>outcomeColumn</previousColumn>
        </column>
        <column id="8">
            <name>deltaColumn</name>
            <path>delta</path>
            <previousColumn>messageColumn</previousColumn>
            <export>
                <expression>
                    <script>
                        <code>
                            import com.evolveum.midpoint.schema.DeltaConvertor;
                            import com.evolveum.midpoint.report.impl.ReportUtils;
                            import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectDeltaOperationType;

                            ret = new ArrayList();
                            for (ObjectDeltaOperationType deltaType : input) {
                                delta = DeltaConvertor.createObjectDeltaOperation(deltaType, true);
                                ret.add(ReportUtils.printDelta(delta));
                            }
                            return ret
                        </code>
                    </script>
                </expression>
            </export>
        </column>
    </defaultView>
</objectCollection>
