/** @return boolean, true if Macros For Condition Evaluation Expandable. */ private boolean areMacrosForConditionEvaluationExpandable() { if (macros != null) { Map<String, String> valueStore = template.getValueStore(); for (String value : macros) { if (valueStore.get(value) == null) { return false; } } } return true; }
/** * Return the Unexpandable Macro Message * * @return */ private String getUnexpandableMacroMessage() { if (macros != null) { Map<String, String> valueStore = template.getValueStore(); for (String value : macros) { if (valueStore.get(value) == null) { return Messages.getString("ConditionalProcessGroup.unexpandableMacro") + value; //$NON-NLS-1$ } } } return null; }
/** @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; } }