public static void validateAdd(Event event) { if (event == null) { throw new ValidationException("Parameter 'event' is mandatory but was not provided."); } if (event.getCustomId()==null) { throw new ValidationException("Parameter 'event.custom_id' is mandatory but was not provided."); } if (event.getDescription()==null) { throw new ValidationException("Parameter 'event.description' is mandatory but was not provided."); } if (event.getOrigin()==null) { throw new ValidationException("Parameter 'event.origin' is mandatory but was not provided."); } if (event.getSeverity()==null) { throw new ValidationException("Parameter 'event.severity' is mandatory but was not provided."); } }
protected void verifyModel(Event model, int index) { assertNotNull(model); assertEquals(model.getId(), String.valueOf(LOG_IDS[index])); assertEquals(LogSeverity.ALERT, model.getSeverity()); assertEquals(model.getDescription(), MESSAGES[index]); assertEquals(model.getOrigin(), ORIGIN_NAMES[index]); assertEquals(model.getCustomId(), CUSTOMER_EVENT_IDS[index]); }
auditLog.setOrigin(event.getOrigin());
to.setOrigin(from.getOrigin());