@Override public void clear() { try { for (Trigger t : list()) { delete(t); } } catch (Exception e) { } finally { list.clear(); } }
@Override public Trigger modify(String uuid, Trigger data) { try { if (uuid == null || uuid.isEmpty() || data == null) { LOG.warning("Cannot even start modifying trigger, basic data missing"); return null; } else { delete(uuid); data.setUUID(uuid); create(data); try { data.register(); } catch (Exception f) { LOG.warning("Cannot register trigger " + data.getName()); } return data; } } catch (Exception e) { LOG.log(Level.SEVERE, "Error while modifying trigger" + data.getName(), e); return null; } }