public static EventIdentification toEventIdentification(EventIdentificationBuilder eventIdentificationBuilder) { EventIdentification ei = new EventIdentification(); ei.setEventID(eventIdentificationBuilder.eventID); ei.setEventActionCode(eventIdentificationBuilder.eventActionCode); ei.setEventDateTime(eventIdentificationBuilder.eventDateTime); ei.setEventOutcomeIndicator(eventIdentificationBuilder.outcome); ei.setEventOutcomeDescription(eventIdentificationBuilder.outcomeDesc); for (org.dcm4che3.audit.EventTypeCode type : eventIdentificationBuilder.eventTypeCode) ei.getEventTypeCode().add(type); return ei; }
private boolean match(EventIdentification eventIdentification) { if (!matchEventID(eventIdentification.getEventID())) return false; if (!matchEventTypeCodes(eventIdentification.getEventTypeCode())) return false; if (!isEmptyOrContains(eventActionCodes, eventIdentification.getEventActionCode())) return false; if (!isEmptyOrContains(eventOutcomeIndicators, eventIdentification.getEventOutcomeIndicator())) return false; return true; }
/** * Create an instance of {@link EventIdentification } * */ public EventIdentification createEventIdentification() { return new EventIdentification(); }
private Severity severityOf(AuditMessage msg) { String eventOutcomeIndicator = msg.getEventIdentification() .getEventOutcomeIndicator(); if (eventOutcomeIndicator.length() == 1) switch(eventOutcomeIndicator.charAt(0)) { case '0': return successSeverity; case '4': return minorFailureSeverity; case '8': return seriousFailureSeverity; } else if (eventOutcomeIndicator.equals("12")) return majorFailureSeverity; throw new IllegalArgumentException( "Illegal eventOutcomeIndicator: " + eventOutcomeIndicator); }
private boolean match(EventIdentification eventIdentification) { if (!matchEventID(eventIdentification.getEventID())) return false; if (!matchEventTypeCodes(eventIdentification.getEventTypeCode())) return false; if (!isEmptyOrContains(eventActionCodes, eventIdentification.getEventActionCode())) return false; if (!isEmptyOrContains(eventOutcomeIndicators, eventIdentification.getEventOutcomeIndicator())) return false; return true; }
/** * Create an instance of {@link EventIdentification } * */ public EventIdentification createEventIdentification() { return new EventIdentification(); }
private Severity severityOf(AuditMessage msg) { String eventOutcomeIndicator = msg.getEventIdentification() .getEventOutcomeIndicator(); if (eventOutcomeIndicator.length() == 1) switch(eventOutcomeIndicator.charAt(0)) { case '0': return successSeverity; case '4': return minorFailureSeverity; case '8': return seriousFailureSeverity; } else if (eventOutcomeIndicator.equals("12")) return majorFailureSeverity; throw new IllegalArgumentException( "Illegal eventOutcomeIndicator: " + eventOutcomeIndicator); }
public static EventIdentification toEventIdentification(EventIdentificationBuilder eventIdentificationBuilder) { EventIdentification ei = new EventIdentification(); ei.setEventID(eventIdentificationBuilder.eventID); ei.setEventActionCode(eventIdentificationBuilder.eventActionCode); ei.setEventDateTime(eventIdentificationBuilder.eventDateTime); ei.setEventOutcomeIndicator(eventIdentificationBuilder.outcome); ei.setEventOutcomeDescription(eventIdentificationBuilder.outcomeDesc); for (org.dcm4che3.audit.EventTypeCode type : eventIdentificationBuilder.eventTypeCode) ei.getEventTypeCode().add(type); return ei; }