tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject [05/11] incubator-tamaya git commit: Initial import from GitHub. Added PGP public key.
Date Wed, 26 Nov 2014 18:07:10 GMT
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/internal/resources/AntPathFileResolver.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/AntPathFileResolver.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/AntPathFileResolver.java
new file mode 100644
index 0000000..7b0a2fe
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/AntPathFileResolver.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.internal.resources;
+
+import java.io.File;
+import java.net.URI;
+import java.util.*;
+import java.util.stream.Stream;
+
+
+public class AntPathFileResolver implements PathResolver{
+
+    @Override
+    public String getResolverId(){
+        return "file";
+    }
+
+    @Override
+    public Collection<URI> resolve(ClassLoader classLoader, Stream<String> expressions){
+        List<URI> result = new ArrayList<>();
+        expressions.forEach((expression) -> {
+            if(expression.startsWith("file:")){
+                String exp = expression.substring("file:".length());
+                File f = new File(exp);
+                if(f.exists() && f.isFile()){
+                    result.add(f.toURI());
+                }
+            }
+        });
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/internal/resources/AntPathFilesResolver.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/AntPathFilesResolver.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/AntPathFilesResolver.java
new file mode 100644
index 0000000..852bdfc
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/AntPathFilesResolver.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.internal.resources;
+
+import java.io.File;
+import java.net.URI;
+import java.util.*;
+import java.util.stream.Stream;
+
+public class AntPathFilesResolver implements PathResolver{
+
+    @Override
+    public String getResolverId(){
+        return "file*";
+    }
+
+    @Override
+    public Collection<URI> resolve(ClassLoader classLoader, Stream<String> expressions){
+        List<URI> result = new ArrayList<>();
+        expressions.forEach((expression) -> {
+            if(expression.startsWith("file*:")){
+                String exp = expression.substring("file:".length());
+                File f = new File(exp);
+                if(f.exists() && f.isFile()){
+                    result.add(f.toURI());
+                }
+            }
+        });
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java
new file mode 100644
index 0000000..0f081b2
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/DefaultPathResourceLoader.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.internal.resources;
+
+import org.apache.tamaya.core.spi.ResourceLoader;
+
+import org.apache.tamaya.spi.Bootstrap;
+
+import java.net.URI;
+import java.util.*;
+import java.util.stream.Stream;
+
+/**
+ * Singleton accessor to access registered reader mechanism.
+ */
+public class DefaultPathResourceLoader implements ResourceLoader{
+
+    @Override
+    public Collection<String> getResolverIds(){
+        Set<String> ids = new HashSet<>();
+        for(PathResolver resolver : Bootstrap.getServices(PathResolver.class)){
+            ids.add(resolver.getResolverId());
+        }
+        return ids;
+    }
+
+    @Override
+    public List<URI> getResources(String... expressions){
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        if(cl==null){
+            cl = getClass().getClassLoader();
+        }
+        return getResources(cl, expressions);
+    }
+
+    @Override
+    public List<URI> getResources(Stream<String> expressions){
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        if(cl==null){
+            cl = getClass().getClassLoader();
+        }
+        return getResources(cl, expressions);
+    }
+
+    @Override
+    public List<URI> getResources(ClassLoader classLoader, String... expressions){
+        List<URI> uris = new ArrayList<>();
+        for(PathResolver resolver : Bootstrap.getServices(PathResolver.class)){
+            uris.addAll(resolver.resolve(classLoader, Arrays.asList(expressions).stream()));
+        }
+        return uris;
+    }
+
+    @Override
+    public List<URI> getResources(ClassLoader classLoader, Stream<String> expressions){
+        List<URI> uris = new ArrayList<>();
+        for(PathResolver resolver : Bootstrap.getServices(PathResolver.class)){
+            uris.addAll(resolver.resolve(classLoader, expressions));
+        }
+        return uris;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/internal/resources/PathResolver.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/internal/resources/PathResolver.java b/core/src/main/java/org/apache/tamaya/core/internal/resources/PathResolver.java
new file mode 100644
index 0000000..10cbcb8
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/internal/resources/PathResolver.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.internal.resources;
+
+import java.net.URI;
+import java.util.Collection;
+import java.util.stream.Stream;
+
+/**
+ * Created by Anatole on 16.06.2014.
+ */
+public interface PathResolver{
+
+    /**
+     * Get the (unique) resolver prefix.
+     *
+     * @return the resolver prefix, never null.
+     */
+    public String getResolverId();
+
+    /**
+     * Resolve the given expression.
+     *
+     * @param expressions expressions, never null.
+     * @return the resolved URIs, never null.
+     */
+    public Collection<URI> resolve(ClassLoader classLoader, Stream<String> expressions);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/AbstractPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/AbstractPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/AbstractPropertyProvider.java
new file mode 100644
index 0000000..59672df
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/AbstractPropertyProvider.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.MetaInfo;
+import org.apache.tamaya.PropertyProvider;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * Abstract base class for implementing a {@link org.apache.tamaya.PropertyProvider}. Also
+ * consider using {@link MapBasedPropertyProvider} instead of.
+ */
+@SuppressWarnings("NullableProblems")
+public abstract class AbstractPropertyProvider implements PropertyProvider, Serializable{
+    /**
+     * serialVersionUID.
+     */
+    private static final long serialVersionUID = -6553955893879292837L;
+
+    protected MetaInfo metaInfo;
+
+    /**
+     * The underlying sources.
+     */
+    private volatile Set<String> sources = new HashSet<>();
+
+    /**
+     * Constructor.
+     */
+    protected AbstractPropertyProvider(MetaInfo metaInfo){
+        Objects.requireNonNull(metaInfo);
+        this.metaInfo = metaInfo;
+    }
+
+    @Override
+    public MetaInfo getMetaInfo(){
+        return metaInfo;
+    }
+
+
+    /**
+     * Method that allows an additional source to be added, to be used by
+     * subclasses.
+     *
+     * @param source the source, not {@code null}.
+     */
+    protected void addSource(String source){
+        Objects.requireNonNull(source);
+        this.sources.add(source);
+    }
+
+
+    protected void addSources(Collection<String> sources){
+        Objects.requireNonNull(sources);
+        this.sources.addAll(sources);
+    }
+
+    @Override
+    public boolean containsKey(String key){
+        return toMap().containsKey(key);
+    }
+
+    @Override
+    public Optional<String> get(String key){
+        return Optional.ofNullable(toMap().get(key));
+    }
+
+    @SuppressWarnings("NullableProblems")
+    @Override
+    public Set<String> keySet(){
+        return toMap().keySet();
+    }
+
+    @Override
+    public String toString(){
+        StringBuilder b = new StringBuilder(getClass().getSimpleName()).append("{\n");
+        printContents(b);
+        return b.append('}').toString();
+    }
+
+    protected String printContents(StringBuilder b){
+        Map<String,String> sortMap = toMap();
+        if(!(sortMap instanceof SortedMap)){
+            sortMap = new TreeMap<>(sortMap);
+        }
+        for(Map.Entry<String,String> en : sortMap.entrySet()){
+            b.append("  ").append(en.getKey()).append(" = \"").append(en.getValue().replaceAll("\\\"", "\\\\\"").replaceAll("=", "\\=")).append("\"\n");
+        }
+        return b.toString();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/AbstractResourceConfigMap.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/AbstractResourceConfigMap.java b/core/src/main/java/org/apache/tamaya/core/properties/AbstractResourceConfigMap.java
new file mode 100644
index 0000000..f12c15b
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/AbstractResourceConfigMap.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.core.spi.ResourceLoader;
+
+import org.apache.tamaya.MetaInfo;
+import org.apache.tamaya.MetaInfoBuilder;
+
+import java.net.URI;
+import java.util.*;
+
+public abstract class AbstractResourceConfigMap extends AbstractPropertyProvider{
+
+    private static final long serialVersionUID = 5484306410557548246L;
+    private ClassLoader classLoader;
+    private AbstractResourceConfigMap parentConfig;
+    private Set<String> sources;
+
+
+    public AbstractResourceConfigMap(ClassLoader classLoader, AbstractResourceConfigMap parentConfig,
+                                     Set<String> sourceExpressions, long configReadDT, Map<String,String> entries,
+                                     MetaInfo metaInfo, Set<String> sources, List<Throwable> errors){
+        super(metaInfo);
+        Objects.requireNonNull(sources, "sources required.");
+        Objects.requireNonNull(classLoader, "classLoader required.");
+        this.sources = sources;
+        this.classLoader = classLoader;
+        this.parentConfig = parentConfig;
+    }
+
+    public AbstractResourceConfigMap(ClassLoader classLoader, AbstractResourceConfigMap parentConfig,
+                                     String sourceExpression){
+        super(MetaInfoBuilder.of().setSourceExpressions(sourceExpression).set("parentConfig", parentConfig.toString())
+                      .build());
+        Objects.requireNonNull(sources, "sources required.");
+        Objects.requireNonNull(sourceExpression, "sourceExpression required.");
+        List<URI> urls = Bootstrap.getService(ResourceLoader.class).getResources(classLoader, sourceExpression);
+        for(URI url : urls){
+            addSource(url.toString());
+        }
+        this.classLoader = classLoader;
+        this.parentConfig = parentConfig;
+    }
+
+    protected abstract void readSource(Map<String,String> targetMap, String source);
+
+    @Override
+    public Map<String,String> toMap(){
+        Map<String,String> result = new HashMap<>();
+        for(String source : sources){
+            //            if(!isSourceRead(source)){
+            readSource(result, source);
+            //            }
+        }
+        return result;
+    }
+
+
+    public ClassLoader getClassLoader(){
+        return classLoader;
+    }
+
+    public AbstractResourceConfigMap getParentConfig(){
+        return this.parentConfig;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertyProvider.java
new file mode 100644
index 0000000..93e424c
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/AggregatedPropertyProvider.java
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.ConfigChangeSet;
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.PropertyProvider;
+import java.util.*;
+
+/**
+ * Implementation for a {@link org.apache.tamaya.PropertyProvider} that is an aggregate of
+ * multiple child instances. Controlled by an {@link AggregationPolicy} the
+ * following aggregations are supported:
+ * <ul>
+ * <li><b>IGNORE: </b>Ignore all overrides.</li>
+ * <li><b>: </b></li>
+ * <li><b>: </b></li>
+ * <li><b>: </b></li>
+ * </ul>
+ */
+class AggregatedPropertyProvider extends AbstractPropertyProvider{
+
+    private static final long serialVersionUID = -1419376385695224799L;
+	private AggregationPolicy policy = AggregationPolicy.IGNORE;
+	private List<PropertyProvider> units = new ArrayList<PropertyProvider>();
+    private PropertyProvider mutableProvider;
+
+    /**
+     * Creates a new instance.
+     * @param mutableProvider the provider instance that would be used for delegating
+     *                        change requests.
+     * @param policy
+     *            The aggregation policy to be used.
+     * @param propertyMaps
+     *            The property sets to be included.
+     */
+	public AggregatedPropertyProvider(PropertyProvider mutableProvider, AggregationPolicy policy, PropertyProvider... propertyMaps) {
+        super(MetaInfoBuilder.of().setType("aggregated").set("policy", policy.toString()).build());
+        Objects.requireNonNull(policy);
+        this.policy = policy;
+		units.addAll(Arrays.asList(propertyMaps));
+        this.mutableProvider = mutableProvider;
+	}
+
+	/**
+	 * Get the {@link AggregationPolicy} for this instance.
+	 * 
+	 * @return the {@link AggregationPolicy}, never {@code null}.
+	 */
+	public AggregationPolicy getAggregationPolicy() {
+		return policy;
+	}
+
+	/**
+	 * Return the names of the {@link org.apache.tamaya.PropertyProvider} instances to be
+	 * aggregated in this instance, in the order of precedence (the first are
+	 * the weakest).
+	 * 
+	 * @return the ordered list of aggregated scope identifiers, never
+	 *         {@code null}.
+	 */
+	public List<PropertyProvider> getConfigurationUnits() {
+		return Collections.unmodifiableList(units);
+	}
+
+    /**
+     * Apply a config change to this item. Hereby the change must be related to the same instance.
+     * @param change the config change
+     * @throws org.apache.tamaya.ConfigException if an unrelated change was passed.
+     * @throws UnsupportedOperationException when the configuration is not writable.
+     */
+    @Override
+    public void apply(ConfigChangeSet change){
+        if(mutableProvider!=null)
+            mutableProvider.apply(change);
+        else
+            super.apply(change);
+    }
+
+    @Override
+    public Map<String,String> toMap() {
+		Map<String, String> value = new HashMap<>();
+        for (PropertyProvider unit : units) {
+            for (Map.Entry<String, String> entry : unit.toMap()
+                    .entrySet()) {
+                switch (policy) {
+                    case IGNORE:
+                        if (!value.containsKey(entry.getKey())) {
+                            value.put(entry.getKey(), entry.getValue());
+                        }
+                        break;
+                    case EXCEPTION:
+                        if (value.containsKey(entry.getKey())) {
+                            throw new IllegalStateException("Duplicate key: "
+                                                                    + entry.getKey()
+                                                                    + " in " + this);
+                        }
+                        else {
+                            value.put(entry.getKey(), entry.getValue());
+                        }
+                        break;
+                    case OVERRIDE:
+                        value.put(entry.getKey(), entry.getValue());
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+        return value;
+	}
+
+    @Override
+	public void load() {
+		for (PropertyProvider unit : units) {
+			unit.load();
+		}
+        super.load();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/AggregationPolicy.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/AggregationPolicy.java b/core/src/main/java/org/apache/tamaya/core/properties/AggregationPolicy.java
new file mode 100644
index 0000000..576652f
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/AggregationPolicy.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+/**
+ * Policy that defines how the different aggregates should be combined.
+ */
+public enum AggregationPolicy{
+    /** Ignore overrides, only extend (additive). */
+    IGNORE,
+    /**
+     * Interpret later keys as override (additive and override), replacing
+     * the key loaded earlier/from previous contained
+     * {@link javax.config.PropertyMap}.
+     */
+    OVERRIDE,
+    /**
+     * Throw an exception, when keys are not disjunctive (strictly
+     * additive).
+     */
+    EXCEPTION
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/ClasspathModulePropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/ClasspathModulePropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/ClasspathModulePropertyProvider.java
new file mode 100644
index 0000000..1d737ea
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/ClasspathModulePropertyProvider.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.core.spi.ResourceLoader;
+
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.spi.Bootstrap;
+
+import java.io.InputStream;
+import java.net.URI;
+import java.util.*;
+
+public class ClasspathModulePropertyProvider extends AbstractPropertyProvider{
+
+    private static final long serialVersionUID = 8488347395634476626L;
+	private ClassLoader classLoader;
+	private String[] sources;
+
+	public ClasspathModulePropertyProvider(ClassLoader classLoader, String... sources) {
+        super(MetaInfoBuilder.of().set("classloader", classLoader.toString()).setSourceExpressions(sources).build());
+		Objects.requireNonNull(classLoader);
+		this.classLoader = classLoader;
+		this.sources = sources.clone();
+		load(); // trigger initialization
+	}
+
+	public ClassLoader getClassLoader() {
+		return this.classLoader;
+	}
+
+
+	@Override
+	public Map<String,String> toMap() {
+        Map<String,String> content = new HashMap<>();
+		for (String srcPattern : sources) {
+			List<URI> urls = null;
+			try {
+				Bootstrap.getService(ResourceLoader.class).getResources(classLoader, srcPattern);
+			} catch (Exception e1) {
+				e1.printStackTrace();
+			}
+			if (urls == null) {
+				return content;
+			}
+            MetaInfoBuilder mb = MetaInfoBuilder.of(getMetaInfo());
+			for (URI url : urls) {
+				InputStream is = null;
+				try {
+					Properties props = new Properties();
+					is = url.toURL().openStream();
+					props.loadFromXML(is);
+					addSource(url.toString());
+					for (Map.Entry<Object, Object> en : props.entrySet()) {
+                        content.put(en.getKey().toString(), en.getValue().toString());
+					}
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}
+        return content;
+	}
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/ClasspathPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/ClasspathPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/ClasspathPropertyProvider.java
new file mode 100644
index 0000000..d464007
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/ClasspathPropertyProvider.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.MetaInfo;
+import java.util.*;
+
+public class ClasspathPropertyProvider extends AbstractPropertyProvider{
+
+    private static final long serialVersionUID = -2193109047946712701L;
+    private Map<ClassLoader,ClasspathModulePropertyProvider> configs = new HashMap<>();
+	private String[] resources;
+
+	public ClasspathPropertyProvider(MetaInfo metaInfo, String... resources) {
+        super(metaInfo);
+        Objects.requireNonNull(resources);
+        this.resources = resources;
+	}
+
+
+    @Override
+    public Map<String,String> toMap(){
+        return new Map<String,String>(){
+
+            @Override
+            public int size(){
+                return getLoaderDependentDelegate().size();
+            }
+
+            @Override
+            public boolean isEmpty(){
+                return getLoaderDependentDelegate().isEmpty();
+            }
+
+            @Override
+            public boolean containsKey(Object key){
+                return getLoaderDependentDelegate().containsKey(key);
+            }
+
+            @Override
+            public boolean containsValue(Object value){
+                return getLoaderDependentDelegate().containsValue(value);
+            }
+
+            @Override
+            public String get(Object key){
+                return getLoaderDependentDelegate().get(key);
+            }
+
+            @Override
+            public String put(String key, String value){
+                return getLoaderDependentDelegate().put(key,value);
+            }
+
+            @Override
+            public String remove(Object key){
+                return getLoaderDependentDelegate().remove(key);
+            }
+
+            @Override
+            public void putAll(Map<? extends String,? extends String> m){
+                getLoaderDependentDelegate().putAll(m);
+            }
+
+            @Override
+            public void clear(){
+                getLoaderDependentDelegate().clear();
+            }
+
+            @Override
+            public Set<String> keySet(){
+                return getLoaderDependentDelegate().keySet();
+            }
+
+            @Override
+            public Collection<String> values(){
+                return getLoaderDependentDelegate().values();
+            }
+
+            @Override
+            public Set<Entry<String,String>> entrySet(){
+                return getLoaderDependentDelegate().entrySet();
+            }
+
+        };
+    }
+
+	private Map<String, String> getLoaderDependentDelegate() {
+		Map<String, String> props = new HashMap<>();
+		ClassLoader cl = Thread.currentThread().getContextClassLoader();
+		if (cl == null) {
+			cl = getClass().getClassLoader();
+		}
+		while (cl != null) {
+			ClasspathModulePropertyProvider cfg = this.configs.get(cl);
+			if (cfg == null) {
+				cfg = new ClasspathModulePropertyProvider(cl, this.resources);
+				this.configs.put(cl, cfg);
+			}
+			props.putAll(cfg.toMap());
+			cl = cl.getParent();
+		}
+		return props;
+	}
+
+	@Override
+	public void load() {
+		Map<String, String> props = new HashMap<>();
+		ClassLoader cl = Thread.currentThread().getContextClassLoader();
+		if (cl == null) {
+			cl = getClass().getClassLoader();
+		}
+		while (cl != null) {
+			ClasspathModulePropertyProvider cfg = this.configs.get(cl);
+			if (cfg != null) {
+				cfg.load();
+			}
+			cl = cl.getParent();
+		}
+        super.load();
+	}
+
+    @Override
+    public String toString(){
+        return "ClasspathPropertyProvider{" +
+                "configs=" + configs +
+                ", resources=" + Arrays.toString(resources) +
+                '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/ContextualPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/ContextualPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/ContextualPropertyProvider.java
new file mode 100644
index 0000000..bdc440a
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/ContextualPropertyProvider.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.ConfigChangeSet;
+import org.apache.tamaya.MetaInfo;
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.PropertyProvider;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Supplier;
+
+/**
+ * Created by Anatole on 12.04.2014.
+ */
+class ContextualPropertyProvider implements PropertyProvider{
+
+    private volatile Map<String,PropertyProvider> cachedMaps = new ConcurrentHashMap<>();
+
+    private Supplier<PropertyProvider> mapSupplier;
+    private Supplier<String> isolationKeySupplier;
+    private MetaInfo metaInfo;
+
+    /**
+     * Creates a new contextual PropertyMap. Contextual maps delegate to different instances of PropertyMap depending
+     * on the keys returned from the isolationP
+     *
+     * @param mapSupplier
+     * @param isolationKeySupplier
+     */
+    public ContextualPropertyProvider(Supplier<PropertyProvider> mapSupplier, Supplier<String> isolationKeySupplier){
+        this.metaInfo = MetaInfoBuilder.of().setType("contextual").set("mapSupplier", mapSupplier.toString())
+                      .set("isolationKeySupplier", isolationKeySupplier.toString()).build();
+        Objects.requireNonNull(mapSupplier);
+        Objects.requireNonNull(isolationKeySupplier);
+        this.mapSupplier = mapSupplier;
+        this.isolationKeySupplier = isolationKeySupplier;
+    }
+
+    /**
+     * This method provides the contextual Map for the current environment. Hereby, ba default, for each different
+     * key returned by the #isolationKeySupplier a separate PropertyMap instance is acquired from the #mapSupplier.
+     * If the map supplier returns an instance it is cached in the local #cachedMaps.
+     *
+     * @return the current contextual PropertyMap.
+     */
+    protected PropertyProvider getContextualMap(){
+        String environmentKey = this.isolationKeySupplier.get();
+        if(environmentKey == null){
+            return PropertyProviders.empty();
+        }
+        PropertyProvider map = this.cachedMaps.get(environmentKey);
+        if(map == null){
+            synchronized(cachedMaps){
+                map = this.cachedMaps.get(environmentKey);
+                if(map == null){
+                    map = this.mapSupplier.get();
+                    if(map == null){
+                        return PropertyProviders
+                                .empty(MetaInfoBuilder.of().setInfo(
+                                        "No map provided by supplier " + mapSupplier + " for key " + environmentKey)
+                                                  .build());
+                    }
+                    this.cachedMaps.put(environmentKey, map);
+                }
+            }
+        }
+        return map;
+    }
+
+    @Override
+    public void load(){
+        getContextualMap().load();
+    }
+
+    @Override
+    public boolean containsKey(String key){
+        return getContextualMap().containsKey(key);
+    }
+
+    @Override
+    public Map<String,String> toMap(){
+        return getContextualMap().toMap();
+    }
+
+    @Override
+    public MetaInfo getMetaInfo(){
+        return this.metaInfo;
+    }
+
+    @Override
+    public Optional<String> get(String key){
+        return getContextualMap().get(key);
+    }
+
+    @Override
+    public Set<String> keySet(){
+        return getContextualMap().keySet();
+    }
+
+    /**
+     * Apply a config change to this item. Hereby the change must be related to the same instance.
+     * @param change the config change
+     * @throws org.apache.tamaya.ConfigException if an unrelated change was passed.
+     * @throws UnsupportedOperationException when the configuration is not writable.
+     */
+    @Override
+    public void apply(ConfigChangeSet change){
+        getContextualMap().apply(change);
+    }
+
+    /**
+     * Access a cached PropertyMap.
+     *
+     * @param key the target environment key as returned by the environment key supplier, not null.
+     * @return the corresponding PropertyMap, or null.
+     */
+    public PropertyProvider getCachedMap(String key){
+        return this.cachedMaps.get(key);
+    }
+
+    /**
+     * Access the set of currently loaded/cached maps.
+     *
+     * @return the set of cached map keys, never null.
+     */
+    public Set<String> getCachedMapKeys(){
+        return this.cachedMaps.keySet();
+    }
+
+    /**
+     * Access the supplier for environment key, determining map isolation.
+     *
+     * @return the environment key supplier instance, not null.
+     */
+    public Supplier<String> getIsolationKeySupplier(){
+        return this.isolationKeySupplier;
+    }
+
+    /**
+     * Access the supplier for new PropertyMap instances.
+     *
+     * @return the PropertyMap supplier instance, not null.
+     */
+    public Supplier<PropertyProvider> getMapSupplier(){
+        return this.mapSupplier;
+    }
+
+    @Override
+    public String toString(){
+        return "ContextualMap{" +
+                "cachedMaps(key)=" + cachedMaps.keySet() +
+                ", mapSupplier=" + mapSupplier +
+                ", isolationKeySupplier=" + isolationKeySupplier +
+                '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/DefaultPropertyProviderManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/DefaultPropertyProviderManager.java b/core/src/main/java/org/apache/tamaya/core/properties/DefaultPropertyProviderManager.java
new file mode 100644
index 0000000..d9ce5c8
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/DefaultPropertyProviderManager.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.PropertyProvider;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class DefaultPropertyProviderManager implements PropertyProviderManager{
+
+    private Map<String,PropertyProvider> propertyProviders = new ConcurrentHashMap<>();
+
+//    @Inject
+//    private MetaModelItemFactoryManagerSpi metaModelFactory;
+
+    @Override
+    public PropertyProvider getConfigMap(String setId){
+        PropertyProvider propertyMap = propertyProviders.get(setId);
+//        if(propertyMap == null){
+//            MetaModel.Specification<PropertyMap> desc =
+//                    metaModel.getSpecification(PropertyMap.class, setId);
+//            if(desc == null){
+//                throw new IllegalArgumentException("No such property set: " + setId);
+//            }
+//            try{
+//                propertyMap = createSet(desc);
+//                this.propertyProviders.put(setId, propertyMap);
+//            }
+//            catch(Exception e){
+//                throw new IllegalStateException("Error creating property set: " + setId, e);
+//            }
+//        }
+        return propertyMap;
+    }
+
+//    private ConfigyMap createSet(MetaModel.Specification<PropertyMap> config)
+//            throws ClassNotFoundException, IllegalAccessException, InstantiationException{
+//        return metaModelFactory.create(config);
+//    }
+
+    @Override
+    public void reloadConfigMap(String setId){
+        PropertyProvider unit = propertyProviders.get(setId);
+        if(unit != null){
+            unit.load();
+        }
+    }
+
+
+    @Override
+    public Collection<String> getConfigMapKeys(){
+        return this.propertyProviders.keySet();
+    }
+
+
+    @Override
+    public boolean isConfigMapDefined(String key){
+        // TODO check meta model, load if necessary
+        return this.propertyProviders.containsKey(key);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/DelegatingPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/DelegatingPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/DelegatingPropertyProvider.java
new file mode 100644
index 0000000..36c2aef
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/DelegatingPropertyProvider.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.MetaInfo;
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.PropertyProvider;
+
+import java.util.*;
+
+/**
+ * Implementation for a {@link org.apache.tamaya.PropertyProvider} that is an aggregate of
+ * multiple child instances. Controlled by an {@link org.apache.tamaya.core.properties.AggregationPolicy} the
+ * following aggregations are supported:
+ * <ul>
+ * <li><b>IGNORE: </b>Ignore all overrides.</li>
+ * <li><b>: </b></li>
+ * <li><b>: </b></li>
+ * <li><b>: </b></li>
+ * </ul>
+ */
+class DelegatingPropertyProvider implements PropertyProvider{
+
+    private static final long serialVersionUID = -1419376385695224799L;
+    private PropertyProvider mainMap;
+    private Map<String,String> parentMap;
+    private MetaInfo metaInfo;
+
+    /**
+     * Creates a mew instance, with aggregation polilcy
+     * {@code AggregationPolicy.OVERRIDE}.
+     *
+     * @param mainMap   The main ConfigMap.
+     * @param parentMap The delegated parent ConfigMap.
+     */
+    public DelegatingPropertyProvider(PropertyProvider mainMap, Map<String,String> parentMap){
+        this.metaInfo =
+                MetaInfoBuilder.of().setType("delegate").set("provider", mainMap.toString()).set("delegate", parentMap.toString())
+                        .build();
+        Objects.requireNonNull(parentMap);
+        this.parentMap = parentMap;
+        Objects.requireNonNull(parentMap);
+        this.parentMap = parentMap;
+    }
+
+    @Override
+    public void load(){
+        mainMap.load();
+    }
+
+    @Override
+    public boolean containsKey(String key){
+        return keySet().contains(key);
+    }
+
+    @Override
+    public Map<String,String> toMap(){
+        return null;
+    }
+
+    @Override
+    public MetaInfo getMetaInfo(){
+        return this.metaInfo;
+    }
+
+    @Override
+    public Optional<String> get(String key){
+        Optional<String> val = mainMap.get(key);
+        if(!val.isPresent()){
+            return Optional.ofNullable(parentMap.get(key));
+        }
+        return val;
+    }
+
+    @Override
+    public Set<String> keySet(){
+        Set<String> keys = new HashSet<>(mainMap.keySet());
+        keys.addAll(parentMap.keySet());
+        return keys;
+    }
+
+    @Override
+    public String toString(){
+        return super.toString() + "(mainMap=" + mainMap + ", delegate=" + parentMap + ")";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/EnvironmentPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/EnvironmentPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/EnvironmentPropertyProvider.java
new file mode 100644
index 0000000..10927c6
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/EnvironmentPropertyProvider.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.MetaInfoBuilder;
+import java.util.Map;
+
+class EnvironmentPropertyProvider extends AbstractPropertyProvider{
+
+    private static final long serialVersionUID = 4753258482658331010L;
+
+    public Map<String,String> toMap(){
+        return System.getenv();
+    }
+
+    public EnvironmentPropertyProvider(){
+        super(MetaInfoBuilder.of().setType("env-properties").build());
+    }
+
+    @Override
+    public String toString(){
+        return "EnvironmentPropertyMap{" +
+                "props=" + super.toString() +
+                '}';
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/FileSystemPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/FileSystemPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/FileSystemPropertyProvider.java
new file mode 100644
index 0000000..3f5adf9
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/FileSystemPropertyProvider.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class FileSystemPropertyProvider extends AbstractResourceConfigMap{
+
+	private static final Logger LOG = Logger.getLogger(FileSystemPropertyProvider.class.getName());
+    private static final long serialVersionUID = -2016119697552480056L;
+	private Map<String, Map<String, String>> propMetaInfo = new HashMap<>();
+
+	public FileSystemPropertyProvider(String resourcePath, ClassLoader classLoader,
+                                      AbstractResourceConfigMap parentConfig) {
+		super(classLoader, parentConfig, resourcePath);
+	}
+
+	public FileSystemPropertyProvider(String resourcePath, AbstractResourceConfigMap parentConfig) {
+		super(getCurrentClassLoader(), parentConfig, resourcePath);
+	}
+
+	public FileSystemPropertyProvider(String resourcePath) {
+		super(getCurrentClassLoader(), null, resourcePath);
+	}
+
+
+	@Override
+	protected void readSource(Map<String, String> targetMap, String src) {
+		try (InputStream is = getClassLoader().getResource(
+				src).openStream()) {
+			Properties props = new Properties();
+			URL resource = getClassLoader().getResource(
+					src);
+//			if (isSourceRead(resource.toString())) {
+//				// continue;
+//				return;
+//			}
+			addSource(resource.toString());
+			Map<String, String> mi = new HashMap<>();
+			mi.put("source", resource.toString());
+			if (Thread.currentThread().getContextClassLoader() != null) {
+				mi.put("classloader", Thread.currentThread()
+						.getContextClassLoader().toString());
+			}
+			props.load(is);
+			for (Map.Entry<Object, Object> en : props.entrySet()) {
+                targetMap.put(en.getKey().toString(),
+						en.getValue().toString());
+				propMetaInfo.put(en.getKey().toString(),
+						mi);
+			}
+		} catch (IOException e) {
+			LOG.log(Level.SEVERE, "Error loading config unit.", e);
+		}
+	}
+
+	protected Map<String, String> getMetaInfo(String key, String value) {
+		Map<String, String> mi = propMetaInfo.get(key);
+		if (mi != null) {
+			return mi;
+		}
+		return Collections.emptyMap();
+	}
+
+	private static ClassLoader getCurrentClassLoader() {
+		ClassLoader cl = Thread.currentThread().getContextClassLoader();
+		if (cl == null) {
+			return FileSystemPropertyProvider.class.getClassLoader();
+		}
+		return cl;
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/FilteredPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/FilteredPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/FilteredPropertyProvider.java
new file mode 100644
index 0000000..d0d6b0f
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/FilteredPropertyProvider.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.ConfigChangeSet;
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.PropertyProvider;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.function.Predicate;
+
+class FilteredPropertyProvider extends AbstractPropertyProvider{
+
+    private static final long serialVersionUID = 4301042530074932562L;
+    private PropertyProvider unit;
+    private Predicate<String> filter;
+
+    public FilteredPropertyProvider(PropertyProvider configuration, Predicate<String> filter){
+        super(MetaInfoBuilder.of(configuration.getMetaInfo()).setType("filtered").set("filter", filter.toString()).build());
+        Objects.requireNonNull(configuration);
+        this.unit = configuration;
+        this.filter = filter;
+    }
+
+    @Override
+    public Map<String,String> toMap(){
+        final Map<String,String> result = new HashMap<>();
+        this.unit.toMap().entrySet().forEach(e -> {
+            if(filter.test(e.getKey())){
+                result.put(e.getKey(), e.getValue());
+            }
+        });
+        return result;
+    }
+
+    @Override
+    public void load(){
+        unit.load();
+        super.load();
+    }
+
+    /**
+     * Apply a config change to this item. Hereby the change must be related to the same instance.
+     * @param change the config change
+     * @throws org.apache.tamaya.ConfigException if an unrelated change was passed.
+     * @throws UnsupportedOperationException when the configuration is not writable.
+     */
+    @Override
+    public void apply(ConfigChangeSet change){
+        this.unit.apply(change);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/FreezedPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/FreezedPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/FreezedPropertyProvider.java
new file mode 100644
index 0000000..4964ef6
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/FreezedPropertyProvider.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.MetaInfo;
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.PropertyProvider;
+
+import java.io.Serializable;
+import java.time.Instant;
+import java.util.*;
+
+/**
+ * This class models a freezed instance of an {@link org.apache.tamaya.PropertyProvider}.
+ * Created by Anatole on 28.03.14.
+ */
+final class FreezedPropertyProvider implements PropertyProvider, Serializable{
+
+    private static final long serialVersionUID = 3365413090311267088L;
+    private Map<String,Map<String,String>> fieldMMetaInfo = new HashMap<>();
+    private MetaInfo metaInfo;
+    private Map<String,String> properties = new HashMap<>();
+
+    private FreezedPropertyProvider(PropertyProvider propertyMap){
+        Map<String,String> map = propertyMap.toMap();
+        this.properties.putAll(map);
+        this.properties = Collections.unmodifiableMap(this.properties);
+        this.metaInfo =
+                MetaInfoBuilder.of(propertyMap.getMetaInfo()).set("freezedAt", Instant.now().toString()).build();
+    }
+
+    public static PropertyProvider of(PropertyProvider propertyProvider){
+        if(propertyProvider instanceof FreezedPropertyProvider){
+            return propertyProvider;
+        }
+        return new FreezedPropertyProvider(propertyProvider);
+    }
+
+    @Override
+    public void load(){
+    }
+
+    public int size(){
+        return properties.size();
+    }
+
+    public boolean isEmpty(){
+        return properties.isEmpty();
+    }
+
+    @Override
+    public boolean containsKey(String key){
+        return properties.containsKey(key);
+    }
+
+    @Override
+    public Map<String,String> toMap(){
+        return Collections.unmodifiableMap(this.properties);
+    }
+
+    @Override
+    public MetaInfo getMetaInfo(){
+        return this.metaInfo;
+    }
+
+    @Override
+    public Optional<String> get(String key){
+        return Optional.ofNullable(properties.get(key));
+    }
+
+    @Override
+    public Set<String> keySet(){
+        return properties.keySet();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertyProvider.java
new file mode 100644
index 0000000..6f98a4b
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/IntersectingPropertyProvider.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.MetaInfo;
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.PropertyProvider;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * Created by Anatole on 22.10.2014.
+ */
+class IntersectingPropertyProvider extends AbstractPropertyProvider {
+
+    private Collection<PropertyProvider> providers;
+    private PropertyProvider union;
+
+    public IntersectingPropertyProvider(AggregationPolicy policy, PropertyProvider... providers) {
+        super(MetaInfoBuilder.of().setType("intersection").set("providers", Arrays.toString(providers)).build());
+        this.providers = Arrays.asList(Objects.requireNonNull(providers));
+        union = PropertyProviders.union(policy, providers);
+    }
+
+    public IntersectingPropertyProvider(MetaInfo metaInfo, AggregationPolicy policy, PropertyProvider... providers) {
+        super(metaInfo);
+        this.providers = Arrays.asList(Objects.requireNonNull(providers));
+        union = PropertyProviders.union(policy, providers);
+    }
+
+
+    @Override
+    public Optional<String> get(String key) {
+        if (containsKey(key))
+            return union.get(key);
+        return Optional.empty();
+    }
+
+    private boolean filter(Map.Entry<String, String> entry) {
+        return containsKey(entry.getKey());
+    }
+
+    @Override
+    public boolean containsKey(String key) {
+        for (PropertyProvider prov : this.providers) {
+            if (!prov.containsKey(key)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    @Override
+    public Map<String, String> toMap() {
+        return union.toMap().entrySet().stream().filter(en -> containsKey(en.getKey())).collect(
+                Collectors.toConcurrentMap(en -> en.getKey(), en -> en.getValue()));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/MapBasedPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/MapBasedPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/MapBasedPropertyProvider.java
new file mode 100644
index 0000000..7c6a23c
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/MapBasedPropertyProvider.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.tamaya.ConfigChangeSet;
+import org.apache.tamaya.MetaInfo;
+
+import java.beans.PropertyChangeEvent;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Models a {@link org.apache.tamaya.PropertyProvider} that can be build using a builder pattern.
+ */
+class MapBasedPropertyProvider extends AbstractPropertyProvider{
+
+    private static final long serialVersionUID = 7601389831472839249L;
+
+    private static final Logger LOG = LogManager.getLogger(MapBasedPropertyProvider.class);
+    /**
+     * The unit's entries.
+     */
+    private Map<String,String> entries = new ConcurrentHashMap<>();
+
+    /**
+     * Constructor used by {@link MapBasedPropertyProviderBuilder}, or subclasses.
+     *
+     * @param entries
+     */
+    MapBasedPropertyProvider(MetaInfo metaInfo, Map<String,String> entries){
+        super(metaInfo);
+        Objects.requireNonNull(entries, "entries required.");
+        this.entries.putAll(entries);
+    }
+
+
+    /**
+     * Constructor used by {@link MapBasedPropertyProviderBuilder}, or subclasses.
+     *
+     * @param entries the entries
+     * @param sources the sources
+     * @param errors  the errors
+     */
+    MapBasedPropertyProvider(MetaInfo metaInfo, Map<String,String> entries, Set<String> sources,
+                             Collection<Throwable> errors){
+        super(metaInfo);
+        Objects.requireNonNull(entries, "entries required.");
+        this.entries.putAll(entries);
+        addSources(sources);
+    }
+
+    MapBasedPropertyProvider(MetaInfo metaInfo, Set<String> sources){
+        super(metaInfo);
+        addSources(sources);
+    }
+
+    @Override
+    public Map<String, String> toMap() {
+        return new HashMap(this.entries);
+    }
+
+    @Override
+    public void load(){
+        // Can not reload...
+    }
+
+    /**
+     * Apply a config change to this item. Hereby the change must be related to the same instance.
+     * @param change the config change
+     * @throws org.apache.tamaya.ConfigException if an unrelated change was passed.
+     * @throws UnsupportedOperationException when the configuration is not writable.
+     */
+    @Override
+    public void apply(ConfigChangeSet change){
+        change.getEvents().forEach(this::applyChange);
+    }
+
+    private void applyChange(PropertyChangeEvent propertyChangeEvent) {
+        LOG.debug("Applying change to map provider: " + propertyChangeEvent);
+        if(propertyChangeEvent.getNewValue()==null){
+            this.entries.remove(propertyChangeEvent.getPropertyName());
+        }
+        else{
+            this.entries.put(propertyChangeEvent.getPropertyName(), propertyChangeEvent.getNewValue().toString());
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/MapBasedPropertyProviderBuilder.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/MapBasedPropertyProviderBuilder.java b/core/src/main/java/org/apache/tamaya/core/properties/MapBasedPropertyProviderBuilder.java
new file mode 100644
index 0000000..38c41bd
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/MapBasedPropertyProviderBuilder.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.MetaInfo;
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.PropertyProvider;
+import java.util.*;
+
+/**
+ * Builder class for creating a new instance of
+ * {@link MapBasedPropertyProvider}-
+ */
+public final class MapBasedPropertyProviderBuilder {
+    protected MetaInfoBuilder metaInfoBuilder = MetaInfoBuilder.of();
+    protected Map<String,String> entries = new HashMap<>();
+    protected long configReadDT = System.currentTimeMillis();
+
+    private MapBasedPropertyProviderBuilder(){
+    }
+
+    private MapBasedPropertyProviderBuilder(String name){
+        Objects.requireNonNull(name);
+        this.metaInfoBuilder.setName(name);
+    }
+
+    public static final MapBasedPropertyProviderBuilder of(){
+        return new MapBasedPropertyProviderBuilder();
+    }
+
+    public static final MapBasedPropertyProviderBuilder of(String name){
+        return new MapBasedPropertyProviderBuilder(name);
+    }
+
+    public MapBasedPropertyProviderBuilder setMetaInfo(String metaInfo){
+        Objects.requireNonNull(metaInfo);
+        this.metaInfoBuilder.setMetaInfo(metaInfo);
+        return this;
+    }
+
+    public MapBasedPropertyProviderBuilder setMetaInfo(MetaInfo metaInfo){
+        Objects.requireNonNull(metaInfo, "metaInfo required.");
+        this.metaInfoBuilder.setMetaInfo(metaInfo);
+        return this;
+    }
+
+    public MapBasedPropertyProviderBuilder addEntry(String key, String value){
+        return addEntry(key, value, null);
+    }
+
+    public MapBasedPropertyProviderBuilder addEntry(String key, String value, String metaInfo){
+        Objects.requireNonNull(key, "key required.");
+        Objects.requireNonNull(value, "value required.");
+        this.entries.put(key, value);
+        if(metaInfo != null){
+            this.metaInfoBuilder.setMetaInfo(key, metaInfo);
+        }
+        return this;
+    }
+
+    public MapBasedPropertyProviderBuilder addEntries(Map<String,String> data, String metaInfo){
+        for(Map.Entry<String,String> en : data.entrySet()){
+            this.entries.put(en.getKey(), en.getValue());
+            if(metaInfo != null){
+                this.metaInfoBuilder.setMetaInfo(en.getKey(), metaInfo);
+            }
+        }
+        return this;
+    }
+
+    public MapBasedPropertyProviderBuilder addEntries(Map<String,String> data){
+        Objects.requireNonNull(data, "data required.");
+        addEntries(data, null);
+        return this;
+    }
+
+    public MapBasedPropertyProviderBuilder addEntries(Properties data){
+        return addEntries(data, null);
+    }
+
+    public MapBasedPropertyProviderBuilder addEntries(Properties data, String metaInfo){
+        Objects.requireNonNull(data, "data required.");
+        for(Map.Entry<Object,Object> en : data.entrySet()){
+            this.entries.put(en.getKey().toString(), en.getValue().toString());
+            if(metaInfo != null){
+                this.metaInfoBuilder.setMetaInfo(en.getKey().toString(), metaInfo);
+            }
+        }
+        return this;
+    }
+
+    public PropertyProvider build(){
+        MetaInfo finalMetaInfo = metaInfoBuilder.setTimestamp(configReadDT).build();
+        return new MapBasedPropertyProvider(finalMetaInfo, entries);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString(){
+        return "DefaultConfigurationUnit.Builder [configReadDT=" + configReadDT + ", entries=" + entries + "]";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertyProvider.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertyProvider.java b/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertyProvider.java
new file mode 100644
index 0000000..b929c30
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/PathBasedPropertyProvider.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.MetaInfo;
+import org.apache.tamaya.MetaInfoBuilder;
+import org.apache.tamaya.PropertyProvider;
+import org.apache.tamaya.core.config.ConfigurationFormats;
+import org.apache.tamaya.spi.Bootstrap;
+import org.apache.tamaya.core.spi.ConfigurationFormat;
+import org.apache.tamaya.core.spi.ResourceLoader;
+
+import java.net.URI;
+import java.util.*;
+
+/**
+ * Created by Anatole on 16.10.2014.
+ */
+final class PathBasedPropertyProvider extends AbstractPropertyProvider {
+
+    private List<String> paths = new ArrayList<>();
+    private Map<String,String> properties = new HashMap<>();
+
+    public PathBasedPropertyProvider(MetaInfo metaInfo, Collection<String> paths) {
+        super(metaInfo);
+        Objects.requireNonNull(paths);
+        this.paths.addAll(paths);
+        init();
+    }
+
+    @Override
+    public Map<String, String> toMap() {
+        return this.properties;
+    }
+
+    private void init() {
+        List<String> sources = new ArrayList<>();
+        List<String> effectivePaths = new ArrayList<>();
+        paths.forEach((path) -> {
+            effectivePaths.add(path);
+            for(URI uri : Bootstrap.getService(ResourceLoader.class).getResources(path)){
+                ConfigurationFormat format = ConfigurationFormats.getFormat(uri);
+                if(format != null){
+                    try{
+                        properties.putAll(format.readConfiguration(uri));
+                        sources.add(uri.toString());
+                    }
+                    catch(Exception e){
+                        e.printStackTrace();
+                    }
+                }
+            }
+        });
+        MetaInfoBuilder metaInfoBuilder = MetaInfoBuilder.of(getMetaInfo());
+        super.metaInfo = metaInfoBuilder.setSourceExpressions(new String[effectivePaths.size()])
+                .set("sources", sources.toString()).build();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/cf59ebbd/core/src/main/java/org/apache/tamaya/core/properties/PropertyProviderManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/tamaya/core/properties/PropertyProviderManager.java b/core/src/main/java/org/apache/tamaya/core/properties/PropertyProviderManager.java
new file mode 100644
index 0000000..d48b637
--- /dev/null
+++ b/core/src/main/java/org/apache/tamaya/core/properties/PropertyProviderManager.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.core.properties;
+
+import org.apache.tamaya.PropertyProvider;
+import java.util.Collection;
+
+/**
+ * Service for accessing configuration. A configuration service is always base
+ * on the environment definition provided by one instance of
+ * {@link org.apache.tamaya.core.spi.EnvironmentManagerSingletonSpi}. It is possible to define multiple
+ * {@link org.apache.tamaya.core.properties.PropertyProviderManager} instances, if required. <h3>Implementation
+ * PropertyMapSpec</h3> Implementations of this interface must be
+ * <ul>
+ * <li>Thread safe.
+ * </ul>
+ */
+public interface PropertyProviderManager{
+
+	/**
+	 * Access all defined {@link org.apache.tamaya.PropertyProvider} keys.
+	 *
+	 * @return all available PropertyMap keys, never{@code null}.
+	 */
+	Collection<String> getConfigMapKeys();
+
+	/**
+	 * Access a {@link org.apache.tamaya.PropertyProvider} by key.
+	 *
+	 * @param key
+	 *            The key of the required {@link org.apache.tamaya.PropertyProvider}, not
+	 *            {@code null}.
+	 * @return the corresponding {@link org.apache.tamaya.PropertyProvider} corresponding to the
+	 *         {@code key}.
+	 * @throws org.apache.tamaya.ConfigException
+	 *             if the required PropertyMap is not defined or not
+	 *             available.
+	 */
+    PropertyProvider getConfigMap(String key);
+
+	/**
+	 * Allows to check if a {@link org.apache.tamaya.PropertyProvider} with the given key is
+	 * defined.
+	 *
+	 * @param key
+     *            The key of the required {@link org.apache.tamaya.PropertyProvider}, not
+     *            {@code null}.
+	 * @return true, if the given {@link org.apache.tamaya.PropertyProvider} is defined.
+	 */
+	boolean isConfigMapDefined(String key);
+
+    /**
+     * Reload a property set. This may trigger a PropertySetChanged event.
+     * @param setId the set id.
+     */
+    public void reloadConfigMap(String setId);
+
+}


Mime
View raw message