@Test public void testGetServiceHeaders() { final String url = "http: VulasConfiguration c1 = new VulasConfiguration(); c1.setProperty("vulas.shared.backend.header.foo", "bar"); c1.setProperty("vulas.shared.backend.header.baz", 1); c1.setProperty("vulas.shared.backend.header.X-Vulas-Client-Token", "AJDEY@HEX@EWX@XEH@I*QA"); final Map<String, String> headers = c1.getServiceHeaders(Service.BACKEND); assertEquals("bar", headers.get("foo")); assertEquals("1", headers.get("baz")); assertEquals("AJDEY@HEX@EWX@XEH@I*QA", headers.get("X-Vulas-Client-Token")); }
public Map<String, String> getServiceHeaders(Service _service) { final String key_prefix = "vulas.shared." + _service.toString().toLowerCase() + ".header"; final Configuration subset = getConfiguration().subset(key_prefix); final Iterator<String> iter = subset.getKeys(); final Map<String, String> headers = new HashMap<String, String>(); while (iter.hasNext()) { final String key = iter.next(); final String val = subset.getProperty(key).toString(); headers.put(key, val); } return headers; }
VulasConfiguration { public Map<String, String> getServiceHeaders(Service _service) { final String key_prefix = "vulas.shared." + _service.toString().toLowerCase() + ".header"; final Configuration subset = getConfiguration().subset(key_prefix); final Iterator<String> iter = subset.getKeys(); final Map<String, String> headers = new HashMap<String, String>(); while (iter.hasNext()) { final String key = iter.next(); final String val = subset.getProperty(key).toString(); headers.put(key, val); } return headers; } }
VulasConfiguration { public Map<String, String> getServiceHeaders(Service _service) { final String key_prefix = "vulas.shared." + _service.toString().toLowerCase() + ".header"; final Configuration subset = getConfiguration().subset(key_prefix); final Iterator<String> iter = subset.getKeys(); final Map<String, String> headers = new HashMap<String, String>(); while (iter.hasNext()) { final String key = iter.next(); final String val = subset.getProperty(key).toString(); headers.put(key, val); } return headers; } VulasConfiguration(); }
VulasConfiguration { public Map<String, String> getServiceHeaders(Service _service) { final String key_prefix = "vulas.shared." + _service.toString().toLowerCase() + ".header"; final Configuration subset = getConfiguration().subset(key_prefix); final Iterator<String> iter = subset.getKeys(); final Map<String, String> headers = new HashMap<String, String>(); while (iter.hasNext()) { final String key = iter.next(); final String val = subset.getProperty(key).toString(); headers.put(key, val); } return headers; } VulasConfiguration(); static final synchronized VulasConfiguration getGlobal(); org.apache.commons.configuration.Configuration getConfiguration(); void addLayerAfterSysProps(
      @NotNull String _layer_name,
      @NotNull Map<?, ?> _map,
      String _ignore_value,
      boolean _ignore_null); Configuration getConfigurationLayer(String _layer_name); void checkSettings(); boolean clearTransientProperties(); boolean isEmpty(String _key); Object getProperty(@NotNull String _key, Object _default); void setPropertyIfEmpty(@NotNull String _key, Object _value); void setProperty(@NotNull String _key, Object _value); void setProperty(
      @NotNull String _key, Object _value, String _ignore_value, boolean _ignore_null); String[] getStringArray(@NotNull String _key, String[] _default); Path getDir(String _key); Path getTmpDir(); String getServiceUrl(Service _service); String getServiceUrl(Service _service, boolean _throw_exception); Map<String, String> getServiceHeaders(Service _service); boolean hasServiceUrl(Service _service); void setServiceUrl(Service _service, String _value); static String getServiceUrlKey(Service _service); Path getLocalM2Repository(); void log(String[] _prefix, String _indent); final StringList getStringList(String... _config_names); }
VulasConfiguration { public Map<String, String> getServiceHeaders(Service _service) { final String key_prefix = "vulas.shared." + _service.toString().toLowerCase() + ".header"; final Configuration subset = getConfiguration().subset(key_prefix); final Iterator<String> iter = subset.getKeys(); final Map<String, String> headers = new HashMap<String, String>(); while (iter.hasNext()) { final String key = iter.next(); final String val = subset.getProperty(key).toString(); headers.put(key, val); } return headers; } VulasConfiguration(); static final synchronized VulasConfiguration getGlobal(); org.apache.commons.configuration.Configuration getConfiguration(); void addLayerAfterSysProps(
      @NotNull String _layer_name,
      @NotNull Map<?, ?> _map,
      String _ignore_value,
      boolean _ignore_null); Configuration getConfigurationLayer(String _layer_name); void checkSettings(); boolean clearTransientProperties(); boolean isEmpty(String _key); Object getProperty(@NotNull String _key, Object _default); void setPropertyIfEmpty(@NotNull String _key, Object _value); void setProperty(@NotNull String _key, Object _value); void setProperty(
      @NotNull String _key, Object _value, String _ignore_value, boolean _ignore_null); String[] getStringArray(@NotNull String _key, String[] _default); Path getDir(String _key); Path getTmpDir(); String getServiceUrl(Service _service); String getServiceUrl(Service _service, boolean _throw_exception); Map<String, String> getServiceHeaders(Service _service); boolean hasServiceUrl(Service _service); void setServiceUrl(Service _service, String _value); static String getServiceUrlKey(Service _service); Path getLocalM2Repository(); void log(String[] _prefix, String _indent); final StringList getStringList(String... _config_names); static final String SYS_PROP_CFG_LAYER; static final String TRANSIENT_CFG_LAYER; static final String ENV_CFG_LAYER; static final String MAND_SETTINGS; static final String OPTI_SETTINGS; static final String VERSION; static final String BUILD_TIMESTAMP; static final String BUILD_NUMBER; static final String BUILD_BRANCH; static final String HOMEPAGE; static final String CHARSET; static final String TMP_DIR; static final String VULAS_JIRA_USER; static final String VULAS_JIRA_PWD; static final String M2_DIR; static final String SYS_PROPS; static final String SYS_PROPS_CUSTOM; static final String ENV_VARS; static final String ENV_VARS_CUSTOM; }