@Test public void testGetSystemValue2() throws Exception { ConfVariable confVariable = new ConfVariable("${System:java.runtime.name}_abc"); String value = ConfVariable.getValue(confVariable, config, null); assertEquals(value, "Java(TM) SE Runtime Environment_abc"); }
public static String getValue(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf) throws StreamingException { String value = null; switch (confVariable.type) { case SYSTEM: value = System.getProperty(confVariable.getName()); break; case CONF: value = getConfValue(confVariable.getName(), conf, userConf); break; default: return confVariable.getName(); } return confVariable.getPreStr() + value + confVariable.getPostStr(); }
ConfVariable { public static String getValue(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf) throws StreamingException { String value = null; switch (confVariable.type) { case SYSTEM: value = System.getProperty(confVariable.getName()); break; case CONF: value = getConfValue(confVariable.getName(), conf, userConf); break; default: return confVariable.getName(); } return confVariable.getPreStr() + value + confVariable.getPostStr(); } }
ConfVariable { public static String getValue(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf) throws StreamingException { String value = null; switch (confVariable.type) { case SYSTEM: value = System.getProperty(confVariable.getName()); break; case CONF: value = getConfValue(confVariable.getName(), conf, userConf); break; default: return confVariable.getName(); } return confVariable.getPreStr() + value + confVariable.getPostStr(); } ConfVariable(final String value); }
ConfVariable { public static String getValue(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf) throws StreamingException { String value = null; switch (confVariable.type) { case SYSTEM: value = System.getProperty(confVariable.getName()); break; case CONF: value = getConfValue(confVariable.getName(), conf, userConf); break; default: return confVariable.getName(); } return confVariable.getPreStr() + value + confVariable.getPostStr(); } ConfVariable(final String value); static String getValue(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf); static String getKey(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf); String getName(); void setName(String name); ConfValueType getType(); void setType(ConfValueType type); String getPreStr(); String getPostStr(); }
ConfVariable { public static String getValue(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf) throws StreamingException { String value = null; switch (confVariable.type) { case SYSTEM: value = System.getProperty(confVariable.getName()); break; case CONF: value = getConfValue(confVariable.getName(), conf, userConf); break; default: return confVariable.getName(); } return confVariable.getPreStr() + value + confVariable.getPostStr(); } ConfVariable(final String value); static String getValue(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf); static String getKey(ConfVariable confVariable, Map<String, Object> conf, Map<String, String> userConf); String getName(); void setName(String name); ConfValueType getType(); void setType(ConfValueType type); String getPreStr(); String getPostStr(); static final String CONF_VARIABLE_PREFIX; static final String CONF_VARIABLE_POSTFIX; static final String SYSTEM_PREFIX; static final String CQLCONF_PREFIX; }