コード例 #1
0
 @Override
 public void clear() {
   try {
     for (Trigger t : list()) {
       delete(t);
     }
   } catch (Exception e) {
   } finally {
     list.clear();
   }
 }
コード例 #2
0
 @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;
   }
 }