@Override public void store(final BundleInfo info) { tx(persist(BundleInfoJpa.create(info))); }
@Override public Incident storeIncident(Job job, Date timestamp, String code, Incident.Severity severity, Map<String, String> descriptionParameters, List<Tuple<String, String>> details) throws IncidentServiceException, IllegalStateException { try { job = getServiceRegistry().getJob(job.getId()); final IncidentDto dto = getPenv().tx( Queries.persist(IncidentDto.mk(job.getId(), timestamp, code, severity, descriptionParameters, details))); return toIncident(job, dto); } catch (NotFoundException e) { throw new IllegalStateException("Can't create incident for not-existing job"); } catch (Exception e) { logger.error("Could not store job incident: {}", e.getMessage()); throw new IncidentServiceException(e); } }