return createTemplateResponses(templateId, host.getDataCenterId(), true);
}
@Override
public EventResponse createEventResponse(Event event) {
EventResponse responseEvent = new EventResponse();
responseEvent.setCreated(event.getCreateDate());
responseEvent.setDescription(event.getDescription());
responseEvent.setEventType(event.getType());
responseEvent.setId(event.getId());
responseEvent.setLevel(event.getLevel());
responseEvent.setParentId(event.getStartId());
responseEvent.setState(event.getState());
populateOwner(responseEvent, event);
User user = ApiDBUtils.findUserById(event.getUserId());
if (user != null) {
responseEvent.setUsername(user.getUsername());
}
responseEvent.setObjectName("event");
return responseEvent;
}