private ConfigurationItem prepareConfigurationItemForDialogList( ConfigurationItem configurationItem) { if (configurationItem != null && configurationItem.getValue() == null) { if (configurationVariablePattern != null) { String newConfigurationItemValue = replaceVariableKeysWithValues(configurationItem.getRawValue()); configurationItem.setValue(newConfigurationItemValue); } else { configurationItem.setValue(configurationItem.getRawValue()); } } return configurationItem; }
private ConfigurationItem prepareSelectedConfigurationItemForInput() { if (selectedConfigItem != null) { // Check if the selected config item raw value is configuration variable key if (helper.isConfigurationVariableKey(selectedConfigItem.getRawValue())) { String configurationVariableValue = helper.getConfigurationVariableValue(selectedConfigItem.getRawValue()); if (configurationVariableValue != null) { ConfigurationItem preparedConfigurationItem = new ConfigurationItem(selectedConfigItem); preparedConfigurationItem.setValue(configurationVariableValue); return preparedConfigurationItem; } } else if (selectedConfigItem.getValue() == null) { ConfigurationItem preparedConfigurationItem = new ConfigurationItem(prepareConfigurationItemForDialogList(selectedConfigItem)); selectedConfigItem.setValue(null); return preparedConfigurationItem; } else { ConfigurationItem preparedConfigurationItem = new ConfigurationItem(selectedConfigItem); selectedConfigItem.setValue(null); return preparedConfigurationItem; } } return null; }