示例#1
0
 /**
  * Adds values passed as parameter to the macros object
  *
  * @param value
  */
 private void collectMacros(String value) {
   if (value != null) {
     if (macros == null) {
       macros = new HashSet<String>();
     }
     macros.addAll(ProcessHelper.getReplaceKeys(value));
   }
 }
示例#2
0
 /** @return boolean, true if Condition Value is True. */
 public boolean isConditionValueTrue() {
   if (conditionString == null) {
     return true;
   }
   if (!areMacrosForConditionEvaluationExpandable()) {
     return false;
   }
   Map<String, String> valueStore = template.getValueStore();
   String processedLValue = ProcessHelper.getValueAfterExpandingMacros(lValue, macros, valueStore);
   String processedRValue = ProcessHelper.getValueAfterExpandingMacros(rValue, macros, valueStore);
   if (operator.equals(Operator.EQUALS)) {
     return processedLValue.equals(processedRValue);
   } else if (operator.equals(Operator.NOT_EQUALS)) {
     return !processedLValue.equals(processedRValue);
   } else {
     return false;
   }
 }