@Test public void jsonShouldAllowNonExistingResources() { ConstrettoConfiguration conf = new ConstrettoBuilder() .createJsonConfigurationStore() .addResource(Resource.create("classpath:nonExisiting.json"), "person") .addResource(Resource.create("file:/nonExisiting.json"), "person") .addResource(Resource.create("http:/nonExisiting.com"), "person") .done() .getConfiguration(); assertFalse(conf.hasValue("person")); }
public JsonStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new JsonStore(this, key, new TaggedResource(resource, tagList)); }
JsonStore implements ConfigurationStore { public JsonStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new JsonStore(this, key, new TaggedResource(resource, tagList)); } }
JsonStore implements ConfigurationStore { public JsonStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new JsonStore(this, key, new TaggedResource(resource, tagList)); } JsonStore(); private  JsonStore(JsonStore old, String key, TaggedResource resource); }
JsonStore implements ConfigurationStore { public JsonStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new JsonStore(this, key, new TaggedResource(resource, tagList)); } JsonStore(); private  JsonStore(JsonStore old, String key, TaggedResource resource); JsonStore addResource(Resource resource, String key, String... tags); Collection<TaggedPropertySet> parseConfiguration(); }
JsonStore implements ConfigurationStore { public JsonStore addResource(Resource resource, String key, String... tags) { List<String> tagList = new ArrayList<String>(); addAll(tagList, tags); return new JsonStore(this, key, new TaggedResource(resource, tagList)); } JsonStore(); private  JsonStore(JsonStore old, String key, TaggedResource resource); JsonStore addResource(Resource resource, String key, String... tags); Collection<TaggedPropertySet> parseConfiguration(); static final Charset DEFAULT_CHARSET; }