private boolean match(Properties properties, Meta meta) {
   for (Object key : properties.keySet()) {
     String property = (String) properties.get(key);
     for (String metaName : meta.getPropertyNames()) {
       if (key.equals(metaName)) {
         String value = meta.getProperty(metaName);
         if (StringUtils.isBlank(value)) {
           return true;
         } else if (property.contains("*")) {
           return value.matches(property.replace("*", ".*"));
         }
         return properties.get(key).equals(value);
       }
     }
   }
   return false;
 }
Esempio n. 2
0
 private void addMetaParameters(Map<String, String> storyParameters, Meta meta) {
   for (String name : meta.getPropertyNames()) {
     storyParameters.put(name, meta.getProperty(name));
   }
 }