use of com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectActionsExecutedEntryType in project midpoint by Evolveum.
the class ActionsExecutedSummarizer method addAction.
private void addAction(Map<ActionsExecutedObjectsKey, ObjectActionsExecutedEntryType> target, ActionExecuted a) {
ActionsExecutedObjectsKey key = new ActionsExecutedObjectsKey(a.objectType, a.changeType, a.channel);
ObjectActionsExecutedEntryType entry = target.get(key);
if (entry == null) {
entry = new ObjectActionsExecutedEntryType();
target.put(key, entry);
}
if (a.exception == null) {
entry.setTotalSuccessCount(entry.getTotalSuccessCount() + 1);
entry.setLastSuccessObjectName(a.objectName);
entry.setLastSuccessObjectDisplayName(a.objectDisplayName);
entry.setLastSuccessObjectOid(a.objectOid);
entry.setLastSuccessTimestamp(a.timestamp);
} else {
entry.setTotalFailureCount(entry.getTotalFailureCount() + 1);
entry.setLastFailureObjectName(a.objectName);
entry.setLastFailureObjectDisplayName(a.objectDisplayName);
entry.setLastFailureObjectOid(a.objectOid);
entry.setLastFailureTimestamp(a.timestamp);
entry.setLastFailureExceptionMessage(a.exception.getMessage());
}
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectActionsExecutedEntryType in project midpoint by Evolveum.
the class ActionsExecutedSummarizer method mapToBean.
private void mapToBean(Map<ActionsExecutedObjectsKey, ObjectActionsExecutedEntryType> map, List<ObjectActionsExecutedEntryType> list) {
for (Map.Entry<ActionsExecutedObjectsKey, ObjectActionsExecutedEntryType> entry : map.entrySet()) {
ObjectActionsExecutedEntryType e = entry.getValue().clone();
e.setObjectType(entry.getKey().getObjectType());
e.setOperation(ChangeType.toChangeTypeType(entry.getKey().getOperation()));
e.setChannel(entry.getKey().getChannel());
list.add(e);
}
}
Aggregations