warningEvent = new Event(eventSource.getEventDefinition().getName(), eventSource.getLocation(), now, EventSeverity.WARN, warningMessage, eventSource); eventSet.add(warningEvent);
private EventSourceRest convertEventSource(EventSource source) { EventSourceRest esr = new EventSourceRest(); esr.setId(source.getId()); esr.setDescription(source.getEventDefinition().getDescription()); esr.setDisplayName(source.getEventDefinition().getDisplayName()); esr.setName(source.getEventDefinition().getName()); esr.setLocation(source.getLocation()); esr.setResourceId(source.getResourceId()); return esr; }
for (EventSource eventSource : events.keySet()) { int paramIndex = 1; ps.setString(paramIndex++, eventSource.getEventDefinition().getName()); ps.setString(paramIndex++, eventSource.getEventDefinition().getResourceType().getName()); ps.setString(paramIndex++, eventSource.getEventDefinition().getResourceType().getPlugin()); ps.setInt(paramIndex++, eventSource.getResource().getId()); ps.setString(paramIndex++, eventSource.getLocation()); ps.setString(paramIndex++, eventSource.getEventDefinition().getName()); ps.setString(paramIndex++, eventSource.getEventDefinition().getResourceType().getName()); ps.setString(paramIndex++, eventSource.getEventDefinition().getResourceType().getPlugin()); ps.setInt(paramIndex++, eventSource.getResource().getId()); ps.setString(paramIndex++, eventSource.getLocation()); for (Event event : eventData) { int paramIndex = 1; ps.setString(paramIndex++, eventSource.getEventDefinition().getName()); ps.setString(paramIndex++, eventSource.getEventDefinition().getResourceType().getName()); ps.setString(paramIndex++, eventSource.getEventDefinition().getResourceType().getPlugin()); ps.setInt(paramIndex++, eventSource.getResource().getId()); ps.setString(paramIndex++, eventSource.getLocation());