Exemplo n.º 1
0
 public void afterRuleAdded(RuleDescr rule) {
   for (final AttributeDescr at : attributes) {
     // check if rule overrides the attribute
     if (!rule.getAttributes().containsKey(at.getName())) {
       // if not, use default value
       rule.addAttribute(at);
     }
   }
 }
Exemplo n.º 2
0
 public AttributeDescr getAttribute(String name) {
   if (name != null) {
     for (AttributeDescr attr : this.attributes) {
       if (name.equals(attr.getName())) {
         return attr;
       }
     }
   }
   return null;
 }