Esempio n. 1
0
 /**
  * TODO: remove
  *
  * @deprecated not needed anymore
  */
 @GET
 @Path("/resetQueries")
 public void resetQueries() {
   for (Metadata metadata : rulesService.getRuleMetadatas()) {
     Rule r = rulesService.getRule(metadata.getId());
     rulesService.setRule(r);
   }
 }
Esempio n. 2
0
 public void updateAutoGeneratedRules(Metadata metadata, Condition condition) {
   List<Rule> previousRules =
       persistenceService.query("linkedItems", metadata.getId(), null, Rule.class);
   List<Rule> rules = new ArrayList<Rule>();
   if (condition != null) {
     getAutoGeneratedRules(metadata, condition, null, rules);
   }
   for (Rule rule : rules) {
     rulesService.setRule(rule);
   }
   previousRules.removeAll(rules);
   clearAutoGeneratedRules(previousRules, metadata.getId());
 }
Esempio n. 3
0
 /**
  * Persists the specified rule to the context server.
  *
  * @param rule the rule to be persisted
  */
 @POST
 @Path("/")
 public void setRule(Rule rule) {
   rulesService.setRule(rule);
 }