Exemplo n.º 1
0
 protected Object createCheck(ActiveRule activeRule) {
   Class clazz = checkClassesByKey.get(activeRule.getConfigKey());
   if (clazz != null) {
     return instantiate(activeRule, clazz);
   }
   return null;
 }
Exemplo n.º 2
0
 /** Note: disabled rules are excluded. */
 @CheckForNull
 public ActiveRule getActiveRuleByConfigKey(String repositoryKey, String configKey) {
   for (ActiveRule activeRule : activeRules) {
     if (StringUtils.equals(activeRule.getRepositoryKey(), repositoryKey)
         && StringUtils.equals(activeRule.getConfigKey(), configKey)
         && activeRule.isEnabled()) {
       return activeRule;
     }
   }
   return null;
 }