Repository: incubator-tamaya Updated Branches: refs/heads/configjsr 0be1acbf3 -> 094720846
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigBuilderTest.java ---------------------------------------------------------------------- diff --git a/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigBuilderTest.java b/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigBuilderTest.java index 006bd2d..f575023 100644 --- a/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigBuilderTest.java +++ b/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigBuilderTest.java @@ -18,16 +18,10 @@ */ package org.apache.tamaya.base; -import org.apache.tamaya.spi.TamayaConfigBuilder; -import org.apache.tamaya.spi.ConfigContext; -import org.apache.tamaya.spi.ConfigValueCombinationPolicy; -import org.apache.tamaya.spi.TypeLiteral; -import org.apache.tamaya.spi.Filter; -import org.apache.tamaya.base.DefaultConfigBuilder; +import org.apache.tamaya.base.ConfigValueCombinationPolicy; +import org.apache.tamaya.base.filter.Filter; import org.junit.Test; -import javax.config.Config; -import javax.config.ConfigProvider; import javax.config.spi.ConfigBuilder; import javax.config.spi.ConfigProviderResolver; import javax.config.spi.ConfigSource; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigTest.java ---------------------------------------------------------------------- diff --git a/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigTest.java b/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigTest.java index 587fe5a..fb67095 100644 --- a/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigTest.java +++ b/code/base/src/test/java/org/apache/tamaya/base/DefaultConfigTest.java @@ -18,7 +18,6 @@ */ package org.apache.tamaya.base; -import org.apache.tamaya.spi.TypeLiteral; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/java/org/apache/tamaya/base/TestConfigurationProvider.java ---------------------------------------------------------------------- diff --git a/code/base/src/test/java/org/apache/tamaya/base/TestConfigurationProvider.java b/code/base/src/test/java/org/apache/tamaya/base/TestConfigurationProvider.java index be10fb7..82fb911 100644 --- a/code/base/src/test/java/org/apache/tamaya/base/TestConfigurationProvider.java +++ b/code/base/src/test/java/org/apache/tamaya/base/TestConfigurationProvider.java @@ -18,9 +18,8 @@ */ package org.apache.tamaya.base; -import org.apache.tamaya.spi.Filter; -import org.apache.tamaya.spi.ServiceContext; -import org.apache.tamaya.base.DefaultConfigBuilder; +import org.apache.tamaya.base.filter.Filter; +import org.apache.tamaya.base.ServiceContext; import javax.config.Config; import javax.config.spi.ConfigBuilder; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/java/org/apache/tamaya/base/configsource/EnumConverterTest.java ---------------------------------------------------------------------- diff --git a/code/base/src/test/java/org/apache/tamaya/base/configsource/EnumConverterTest.java b/code/base/src/test/java/org/apache/tamaya/base/configsource/EnumConverterTest.java index 5aefbd0..c09bd4d 100644 --- a/code/base/src/test/java/org/apache/tamaya/base/configsource/EnumConverterTest.java +++ b/code/base/src/test/java/org/apache/tamaya/base/configsource/EnumConverterTest.java @@ -19,7 +19,6 @@ package org.apache.tamaya.base.configsource; import org.apache.tamaya.base.convert.ConversionContext; -import org.apache.tamaya.spi.TypeLiteral; import org.apache.tamaya.base.convert.EnumConverter; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/java/org/apache/tamaya/base/convert/EnumConverterTest.java ---------------------------------------------------------------------- diff --git a/code/base/src/test/java/org/apache/tamaya/base/convert/EnumConverterTest.java b/code/base/src/test/java/org/apache/tamaya/base/convert/EnumConverterTest.java index e8c40f6..34abf6e 100644 --- a/code/base/src/test/java/org/apache/tamaya/base/convert/EnumConverterTest.java +++ b/code/base/src/test/java/org/apache/tamaya/base/convert/EnumConverterTest.java @@ -18,9 +18,6 @@ */ package org.apache.tamaya.base.convert; -import org.apache.tamaya.base.convert.EnumConverter; -import org.apache.tamaya.base.convert.ConversionContext; -import org.apache.tamaya.spi.TypeLiteral; import org.junit.Test; import java.math.RoundingMode; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/java/org/apache/tamaya/base/services/DefaultServiceContext.java ---------------------------------------------------------------------- diff --git a/code/base/src/test/java/org/apache/tamaya/base/services/DefaultServiceContext.java b/code/base/src/test/java/org/apache/tamaya/base/services/DefaultServiceContext.java index 3c91f12..e51a266 100644 --- a/code/base/src/test/java/org/apache/tamaya/base/services/DefaultServiceContext.java +++ b/code/base/src/test/java/org/apache/tamaya/base/services/DefaultServiceContext.java @@ -19,7 +19,7 @@ package org.apache.tamaya.base.services; import org.apache.tamaya.base.PriorityServiceComparator; -import org.apache.tamaya.spi.ServiceContext; +import org.apache.tamaya.base.ServiceContext; import javax.annotation.Priority; import java.io.IOException; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/java/org/apache/tamaya/filter/FilterComparatorTest.java ---------------------------------------------------------------------- diff --git a/code/base/src/test/java/org/apache/tamaya/filter/FilterComparatorTest.java b/code/base/src/test/java/org/apache/tamaya/filter/FilterComparatorTest.java index 56afd47..268d524 100644 --- a/code/base/src/test/java/org/apache/tamaya/filter/FilterComparatorTest.java +++ b/code/base/src/test/java/org/apache/tamaya/filter/FilterComparatorTest.java @@ -19,8 +19,7 @@ package org.apache.tamaya.filter; import org.apache.tamaya.base.filter.FilterComparator; -import org.apache.tamaya.spi.ConfigValue; -import org.apache.tamaya.spi.Filter; +import org.apache.tamaya.base.filter.Filter; import org.junit.Test; import javax.annotation.Priority; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/resources/META-INF/services/org.apache.tamaya.base.ServiceContext ---------------------------------------------------------------------- diff --git a/code/base/src/test/resources/META-INF/services/org.apache.tamaya.base.ServiceContext b/code/base/src/test/resources/META-INF/services/org.apache.tamaya.base.ServiceContext new file mode 100644 index 0000000..7b8a81d --- /dev/null +++ b/code/base/src/test/resources/META-INF/services/org.apache.tamaya.base.ServiceContext @@ -0,0 +1,19 @@ +# +# 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 current 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. +# +org.apache.tamaya.base.DefaultServiceContext \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/base/src/test/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext ---------------------------------------------------------------------- diff --git a/code/base/src/test/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext b/code/base/src/test/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext deleted file mode 100644 index 7b8a81d..0000000 --- a/code/base/src/test/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext +++ /dev/null @@ -1,19 +0,0 @@ -# -# 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 current 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. -# -org.apache.tamaya.base.DefaultServiceContext \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/bnd.bnd ---------------------------------------------------------------------- diff --git a/code/compat/bnd.bnd b/code/compat/bnd.bnd index 0409b56..8a2771a 100644 --- a/code/compat/bnd.bnd +++ b/code/compat/bnd.bnd @@ -30,5 +30,4 @@ Import-Package: \ org.apache.tamaya.base,\ org.apache.tamaya.base.configsource,\ org.apache.tamaya.base.convert,\ - org.apache.tamaya.base.filter,\ - org.apache.tamaya.spi + org.apache.tamaya.base.filter http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/Configuration.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/Configuration.java b/code/compat/src/main/java/org/apache/tamaya/Configuration.java index 3cf57f7..e4cd2e6 100644 --- a/code/compat/src/main/java/org/apache/tamaya/Configuration.java +++ b/code/compat/src/main/java/org/apache/tamaya/Configuration.java @@ -56,7 +56,7 @@ public interface Configuration { * @return the property's value. */ default String get(String key){ - return get(key, org.apache.tamaya.spi.TypeLiteral.of(String.class)); + return get(key, TypeLiteral.of(String.class)); } /** @@ -67,7 +67,7 @@ public interface Configuration { * @return the property's keys. */ default String getOrDefault(String key, String defaultValue){ - return getOrDefault(key, org.apache.tamaya.spi.TypeLiteral.of(String.class), defaultValue); + return getOrDefault(key, TypeLiteral.of(String.class), defaultValue); } /** @@ -84,7 +84,7 @@ public interface Configuration { * @throws ConfigException if the keys could not be converted to the required target type. */ default <T> T getOrDefault(String key, Class<T> type, T defaultValue){ - return getOrDefault(key, org.apache.tamaya.spi.TypeLiteral.of(type), defaultValue); + return getOrDefault(key, TypeLiteral.of(type), defaultValue); } /** @@ -100,7 +100,7 @@ public interface Configuration { * @throws ConfigException if the keys could not be converted to the required target type. */ default <T> T get(String key, Class<T> type){ - return get(key, org.apache.tamaya.spi.TypeLiteral.of(type)); + return get(key, TypeLiteral.of(type)); } /** @@ -115,7 +115,7 @@ public interface Configuration { * @return the property value, never {@code null}. * @throws ConfigException if the keys could not be converted to the required target type. */ - <T> T get(String key, org.apache.tamaya.spi.TypeLiteral<T> type); + <T> T get(String key, TypeLiteral<T> type); /** * Get the property keys as type T. This will implicitly require a corresponding {@link http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/ConfigurationProvider.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/ConfigurationProvider.java b/code/compat/src/main/java/org/apache/tamaya/ConfigurationProvider.java index 9eae5af..d3bf0d2 100644 --- a/code/compat/src/main/java/org/apache/tamaya/ConfigurationProvider.java +++ b/code/compat/src/main/java/org/apache/tamaya/ConfigurationProvider.java @@ -18,6 +18,7 @@ */ package org.apache.tamaya; +import org.apache.tamaya.base.ServiceContextManager; import org.apache.tamaya.spi.*; import java.util.logging.Logger; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationBuilder.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationBuilder.java b/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationBuilder.java index ac3e3b9..d043229 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationBuilder.java +++ b/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationBuilder.java @@ -19,6 +19,7 @@ package org.apache.tamaya.spi; import org.apache.tamaya.Configuration; +import org.apache.tamaya.spi.TypeLiteral; import java.util.Collection; import java.util.Comparator; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java b/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java index 43f7ea0..f4bec74 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java +++ b/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java @@ -19,6 +19,8 @@ package org.apache.tamaya.spi; +import org.apache.tamaya.spi.TypeLiteral; + import java.util.List; import java.util.Map; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java b/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java index 8e3f307..104aadd 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java +++ b/code/compat/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java @@ -18,6 +18,8 @@ */ package org.apache.tamaya.spi; +import org.apache.tamaya.spi.TypeLiteral; + import java.util.Collection; import java.util.Comparator; import java.util.List; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spi/FilterContext.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spi/FilterContext.java b/code/compat/src/main/java/org/apache/tamaya/spi/FilterContext.java index 2851697..02ee66a 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spi/FilterContext.java +++ b/code/compat/src/main/java/org/apache/tamaya/spi/FilterContext.java @@ -19,6 +19,7 @@ package org.apache.tamaya.spi; import org.apache.tamaya.Configuration; +import org.apache.tamaya.base.Experimental; import java.util.Collections; import java.util.HashMap; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spi/PropertyFilter.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spi/PropertyFilter.java b/code/compat/src/main/java/org/apache/tamaya/spi/PropertyFilter.java index 3054496..3449e47 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spi/PropertyFilter.java +++ b/code/compat/src/main/java/org/apache/tamaya/spi/PropertyFilter.java @@ -19,9 +19,10 @@ package org.apache.tamaya.spi; + /** * <p>Interface for filtering the current map of properties during the evaluation of the chain of PropertySources. - * Filters can be registered using the {@link org.apache.tamaya.spi.ServiceContext}. The ordinal + * Filters can be registered using the {@link org.apache.tamaya.base.ServiceContext}. The ordinal * hereby is defined by the corresponding {@code @Priority} annotation.</p> * <p>Filters </p> */ http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spi/TypeLiteral.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spi/TypeLiteral.java b/code/compat/src/main/java/org/apache/tamaya/spi/TypeLiteral.java new file mode 100644 index 0000000..9240602 --- /dev/null +++ b/code/compat/src/main/java/org/apache/tamaya/spi/TypeLiteral.java @@ -0,0 +1,225 @@ +/* + * 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.spi; + + +import java.io.Serializable; +import java.lang.reflect.GenericArrayType; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.util.Objects; + +/** + * <p>Class for instantiation of objects that represent parameterized types + * with current parameters.</p> + * + * <p>An object that represents a parameterized type may be obtained by + * subclassing <tt>TypeLiteral</tt>.</p> + * + * <pre> + * TypeLiteral<List<Integer>> stringListType = new TypeLiteral<List<Integer>>() {}; + * </pre> + * + * @param <T> the type, including all type parameters + */ +public class TypeLiteral<T> implements Serializable { + + private static final long serialVersionUID = 1L; + private static final Type[] EMPTY_TYPE_ARRAY = new Type[0]; + /** The current defined type. */ + private final Type definedType; + + /** + * Constructor. + * @param definedType the defined type. + */ + public TypeLiteral(Type definedType) { + Objects.requireNonNull(definedType, "Type must be given"); + + this.definedType = definedType; + } + + /** + * Constructor only for directly implemeting a TypeLiteral hereby dynamically implementing a generic interface. + */ + public TypeLiteral() { + this.definedType = getDefinedType(this.getClass()); + } + + /** + * Creates a new TypeLiteral based on a given type. + * + * @param type the type , not {@code null}. + * @param <R> the literal generic type. + * @return the corresponding TypeLiteral, never {@code null}. + */ + public static <R> TypeLiteral<R> of(Type type) { + Objects.requireNonNull(type, "Type must be given."); + + return new TypeLiteral<R>(type); + } + + /** + * Checks the current implemented generic interfaces and evaluates the given single type parameter. + * + * @param clazz the class to check, not {@code null}. + * @param interfaceType the interface type to be checked, not {@code null}. + * @return the generic type parameters, or an empty array, if it cannot be evaluated. + */ + public static Type[] getGenericInterfaceTypeParameters(Class<?> clazz, Class<?> interfaceType) { + Objects.requireNonNull(clazz, "Class parameter must be given."); + Objects.requireNonNull(interfaceType, "Interface parameter must be given."); + + for (Type type : clazz.getGenericInterfaces()) { + if (type instanceof ParameterizedType) { + ParameterizedType parameterizedType = (ParameterizedType) type; + if(parameterizedType.getRawType().equals(interfaceType)){ + return parameterizedType.getActualTypeArguments(); + } + } + } + return EMPTY_TYPE_ARRAY; + } + + /** + * Method that checks the class's type for a generic interface implementation type. + * + * @param type the type, not {@code null}. + * @return the generic type parameter of the given single type generic interfaceType, or an empty array. + */ + public static Type[] getTypeParameters(Type type) { + Objects.requireNonNull(type, "Type must be given."); + + if (type instanceof ParameterizedType) { + ParameterizedType parameterizedType = (ParameterizedType) type; + return parameterizedType.getActualTypeArguments(); + } + return EMPTY_TYPE_ARRAY; + } + + public final Type getType() { + return definedType; + } + + /** + * Returns basic raw Java type. + * + * @return the actual type represented by this object + */ + @SuppressWarnings("unchecked") + public final Class<T> getRawType() { + Class<T> rawType; + + if (this.definedType instanceof ParameterizedType) { + ParameterizedType pt = (ParameterizedType) this.definedType; + rawType = (Class<T>) pt.getRawType(); + } else if (this.definedType instanceof GenericArrayType) { + rawType = (Class<T>) Object[].class; + } else if (this.definedType instanceof Class) { + rawType = (Class<T>) this.definedType; + } else { + throw new RuntimeException("Illegal type for the Type Literal Class"); + } + + return rawType; + } + + /** + * Returns actual type arguments, if present. + * + * @return the actual type represented by defined class, or an empty array. + */ + public final Type[] getActualTypeArguments() { + if (this.definedType instanceof ParameterizedType) { + ParameterizedType pt = (ParameterizedType) this.definedType; + return pt.getActualTypeArguments(); + } + return new Type[0]; + } + + + protected Type getDefinedType(Class<?> clazz) { + Type type; + + if (clazz == null) { + throw new RuntimeException("Class parameter clazz can not be null"); + } + + Type superClazz = clazz.getGenericSuperclass(); + + if (superClazz instanceof ParameterizedType) { + ParameterizedType pt = (ParameterizedType) superClazz; + Type[] actualArgs = pt.getActualTypeArguments(); + + if (actualArgs.length == 1) { + type = actualArgs[0]; + + } else { + throw new RuntimeException("More than one parametric type"); + } + + } else if (superClazz.equals(Object.class)) { + throw new RuntimeException("Super class must be parametrized type"); + } else { + type = getDefinedType((Class<?>) superClazz); + } + + return type; + } + + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((definedType == null) ? 0 : definedType.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + TypeLiteral<?> other = (TypeLiteral<?>) obj; + if (definedType == null) { + if (other.definedType != null) { + return false; + } + } else if (!definedType.equals(other.definedType)) { + return false; + } + return true; + } + + + @Override + public String toString() { + return "TypeLiteral{" + + "type=" + definedType + + '}'; + } + +} http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfiguration.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfiguration.java b/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfiguration.java index bdbd09c..7a4d72b 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfiguration.java +++ b/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfiguration.java @@ -29,7 +29,7 @@ import org.apache.tamaya.spi.PropertyConverter; import org.apache.tamaya.spi.PropertySource; import org.apache.tamaya.spi.PropertyValue; import org.apache.tamaya.spi.PropertyValueCombinationPolicy; -import org.apache.tamaya.spi.ServiceContextManager; +import org.apache.tamaya.base.ServiceContextManager; import java.util.HashMap; import java.util.List; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationBuilder.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationBuilder.java b/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationBuilder.java index 1b3f1ce..2089eb9 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationBuilder.java +++ b/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationBuilder.java @@ -19,6 +19,7 @@ package org.apache.tamaya.spisupport; import org.apache.tamaya.Configuration; +import org.apache.tamaya.spi.TypeLiteral; import org.apache.tamaya.spi.*; import org.apache.tamaya.spi.ConfigurationBuilder; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java b/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java index 2c300ad..1717203 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java +++ b/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContext.java @@ -18,6 +18,7 @@ */ package org.apache.tamaya.spisupport; +import org.apache.tamaya.base.ServiceContextManager; import org.apache.tamaya.spi.TypeLiteral; import org.apache.tamaya.spi.*; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContextBuilder.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContextBuilder.java b/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContextBuilder.java index 0ee54da..200556f 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContextBuilder.java +++ b/code/compat/src/main/java/org/apache/tamaya/spisupport/DefaultConfigurationContextBuilder.java @@ -18,6 +18,7 @@ */ package org.apache.tamaya.spisupport; +import org.apache.tamaya.base.ServiceContextManager; import org.apache.tamaya.spi.TypeLiteral; import org.apache.tamaya.spi.*; import org.apache.tamaya.spisupport.propertysource.CLIPropertySource; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java b/code/compat/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java index 7bc8d26..bc1f30d 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java +++ b/code/compat/src/main/java/org/apache/tamaya/spisupport/PropertyConverterManager.java @@ -23,7 +23,7 @@ import org.apache.tamaya.spi.TypeLiteral; import org.apache.tamaya.base.PriorityServiceComparator; import org.apache.tamaya.spi.ConversionContext; import org.apache.tamaya.spi.PropertyConverter; -import org.apache.tamaya.spi.ServiceContextManager; +import org.apache.tamaya.base.ServiceContextManager; import java.lang.reflect.Constructor; import java.lang.reflect.Method; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java b/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java index 92f520e..7f64810 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java +++ b/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/JavaConfigurationPropertySource.java @@ -21,7 +21,7 @@ package org.apache.tamaya.spisupport.propertysource; import org.apache.tamaya.ConfigException; import org.apache.tamaya.spi.PropertySource; import org.apache.tamaya.spi.PropertyValue; -import org.apache.tamaya.spi.ServiceContextManager; +import org.apache.tamaya.base.ServiceContextManager; import org.apache.tamaya.spisupport.PropertySourceComparator; import java.io.IOException; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java ---------------------------------------------------------------------- diff --git a/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java b/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java index 27b6e4b..ec69913 100644 --- a/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java +++ b/code/compat/src/main/java/org/apache/tamaya/spisupport/propertysource/PropertiesResourcePropertySource.java @@ -18,7 +18,7 @@ */ package org.apache.tamaya.spisupport.propertysource; -import org.apache.tamaya.spi.ServiceContextManager; +import org.apache.tamaya.base.ServiceContextManager; import java.io.InputStream; import java.net.URL; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/java/org/apache/tamaya/TestConfiguration.java ---------------------------------------------------------------------- diff --git a/code/compat/src/test/java/org/apache/tamaya/TestConfiguration.java b/code/compat/src/test/java/org/apache/tamaya/TestConfiguration.java index a035467..ec37098 100644 --- a/code/compat/src/test/java/org/apache/tamaya/TestConfiguration.java +++ b/code/compat/src/test/java/org/apache/tamaya/TestConfiguration.java @@ -103,7 +103,7 @@ public class TestConfiguration implements Configuration{ } @Override - public <T> T get(String key, org.apache.tamaya.spi.TypeLiteral<T> type) { + public <T> T get(String key, TypeLiteral<T> type) { throw new RuntimeException("Method not implemented yet."); } http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/java/org/apache/tamaya/TypeLiteralTest.java ---------------------------------------------------------------------- diff --git a/code/compat/src/test/java/org/apache/tamaya/TypeLiteralTest.java b/code/compat/src/test/java/org/apache/tamaya/TypeLiteralTest.java index 8e2ddc6..c6bf0f0 100644 --- a/code/compat/src/test/java/org/apache/tamaya/TypeLiteralTest.java +++ b/code/compat/src/test/java/org/apache/tamaya/TypeLiteralTest.java @@ -30,39 +30,39 @@ import org.apache.tamaya.spi.TypeLiteral; import org.junit.Test; /** - * Tests for the {@link org.apache.tamaya.spi.TypeLiteral} class. + * Tests for the {@link TypeLiteral} class. */ @SuppressWarnings("serial") public class TypeLiteralTest { @Test(expected = NullPointerException.class) public void constructorRequiresNonNullParameter() { - new org.apache.tamaya.spi.TypeLiteral<List<String>>(null){}; + new TypeLiteral<List<String>>(null){}; } @Test public void test_constrcutor(){ - org.apache.tamaya.spi.TypeLiteral<List<String>> listTypeLiteral = new org.apache.tamaya.spi.TypeLiteral<List<String>>(){}; + TypeLiteral<List<String>> listTypeLiteral = new TypeLiteral<List<String>>(){}; assertEquals(List.class, listTypeLiteral.getRawType()); - assertEquals(String.class, org.apache.tamaya.spi.TypeLiteral.getTypeParameters(listTypeLiteral.getType())[0]); + assertEquals(String.class, TypeLiteral.getTypeParameters(listTypeLiteral.getType())[0]); } @Test public void test_of(){ class MyListClass extends ArrayList<String>{} - org.apache.tamaya.spi.TypeLiteral<MyListClass> listTypeLiteral = org.apache.tamaya.spi.TypeLiteral.of(MyListClass.class); + TypeLiteral<MyListClass> listTypeLiteral = TypeLiteral.of(MyListClass.class); assertEquals(MyListClass.class, listTypeLiteral.getRawType()); assertEquals(MyListClass.class, listTypeLiteral.getType()); } @Test(expected = NullPointerException.class) public void ofDoesNotAcceptNullAsParamter() { - org.apache.tamaya.spi.TypeLiteral.of(null); + TypeLiteral.of(null); } @Test public void test_getTypeParameter(){ - org.apache.tamaya.spi.TypeLiteral<List<String>> listTypeLiteral = new org.apache.tamaya.spi.TypeLiteral<List<String>>(){}; + TypeLiteral<List<String>> listTypeLiteral = new TypeLiteral<List<String>>(){}; assertEquals(List.class, listTypeLiteral.getRawType()); assertEquals(String.class, TypeLiteral.getTypeParameters(listTypeLiteral.getType())[0]); } http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/java/org/apache/tamaya/spi/ConversionContextTest.java ---------------------------------------------------------------------- diff --git a/code/compat/src/test/java/org/apache/tamaya/spi/ConversionContextTest.java b/code/compat/src/test/java/org/apache/tamaya/spi/ConversionContextTest.java index 42673f8..bb61dc7 100644 --- a/code/compat/src/test/java/org/apache/tamaya/spi/ConversionContextTest.java +++ b/code/compat/src/test/java/org/apache/tamaya/spi/ConversionContextTest.java @@ -21,6 +21,7 @@ package org.apache.tamaya.spi; import org.apache.tamaya.ConfigOperator; import org.apache.tamaya.ConfigQuery; import org.apache.tamaya.Configuration; +import org.apache.tamaya.spi.TypeLiteral; import org.junit.Test; import java.net.InetAddress; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/java/org/apache/tamaya/spi/FilterContextTest.java ---------------------------------------------------------------------- diff --git a/code/compat/src/test/java/org/apache/tamaya/spi/FilterContextTest.java b/code/compat/src/test/java/org/apache/tamaya/spi/FilterContextTest.java index e272b9a..99b5679 100644 --- a/code/compat/src/test/java/org/apache/tamaya/spi/FilterContextTest.java +++ b/code/compat/src/test/java/org/apache/tamaya/spi/FilterContextTest.java @@ -18,7 +18,7 @@ */ package org.apache.tamaya.spi; -import org.apache.tamaya.spi.FilterContext; +import org.apache.tamaya.spi.TypeLiteral; import org.junit.Test; import java.util.Collections; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java ---------------------------------------------------------------------- diff --git a/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java b/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java index 31fb2f8..332717a 100644 --- a/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java +++ b/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextManagerTest.java @@ -18,6 +18,8 @@ */ package org.apache.tamaya.spi; +import org.apache.tamaya.base.ServiceContext; +import org.apache.tamaya.base.ServiceContextManager; import org.junit.Test; import java.io.IOException; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextTest.java ---------------------------------------------------------------------- diff --git a/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextTest.java b/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextTest.java index fe4ee05..6ed3e7c 100644 --- a/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextTest.java +++ b/code/compat/src/test/java/org/apache/tamaya/spi/ServiceContextTest.java @@ -28,6 +28,8 @@ import java.io.IOException; import java.net.URL; import java.util.*; +import org.apache.tamaya.base.ServiceContext; +import org.apache.tamaya.base.ServiceContextManager; import org.junit.Test; public class ServiceContextTest { http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/java/org/apache/tamaya/spi/TestServiceContext.java ---------------------------------------------------------------------- diff --git a/code/compat/src/test/java/org/apache/tamaya/spi/TestServiceContext.java b/code/compat/src/test/java/org/apache/tamaya/spi/TestServiceContext.java index 4b8edc1..55637ca 100644 --- a/code/compat/src/test/java/org/apache/tamaya/spi/TestServiceContext.java +++ b/code/compat/src/test/java/org/apache/tamaya/spi/TestServiceContext.java @@ -18,6 +18,8 @@ */ package org.apache.tamaya.spi; +import org.apache.tamaya.base.ServiceContext; + import java.io.IOException; import java.net.URL; import java.util.*; @@ -26,7 +28,7 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * This class implements the (default) {@link org.apache.tamaya.spi.ServiceContext} interface and hereby uses the JDK + * This class implements the (default) {@link ServiceContext} interface and hereby uses the JDK * {@link java.util.ServiceLoader} to load the services required. */ public final class TestServiceContext implements ServiceContext { http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/resources/META-INF/services/org.apache.tamaya.base.ServiceContext ---------------------------------------------------------------------- diff --git a/code/compat/src/test/resources/META-INF/services/org.apache.tamaya.base.ServiceContext b/code/compat/src/test/resources/META-INF/services/org.apache.tamaya.base.ServiceContext new file mode 100644 index 0000000..199956f --- /dev/null +++ b/code/compat/src/test/resources/META-INF/services/org.apache.tamaya.base.ServiceContext @@ -0,0 +1,19 @@ +# +# 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 current 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. +# +org.apache.tamaya.spi.TestServiceContext \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/compat/src/test/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext ---------------------------------------------------------------------- diff --git a/code/compat/src/test/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext b/code/compat/src/test/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext deleted file mode 100644 index 199956f..0000000 --- a/code/compat/src/test/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext +++ /dev/null @@ -1,19 +0,0 @@ -# -# 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 current 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. -# -org.apache.tamaya.spi.TestServiceContext \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/bnd.bnd ---------------------------------------------------------------------- diff --git a/code/core/bnd.bnd b/code/core/bnd.bnd index 7c85414..ff0a686 100644 --- a/code/core/bnd.bnd +++ b/code/core/bnd.bnd @@ -29,7 +29,6 @@ Import-Package: \ org.apache.tamaya.base.configsource,\ org.apache.tamaya.base.convert,\ org.apache.tamaya.base.filter,\ - org.apache.tamaya.spi,\ org.osgi.framework,\ javax.annotation Private-Package: \ @@ -41,5 +40,5 @@ Export-Service: \ javax.config.spi.ConfigProviderResolver,\ javax.config.spi.Converter,\ javax.config.spi.ConfigSource,\ - org.apache.tamaya.spi.ServiceContext + org.apache.tamaya.ServiceContext \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/main/java/org/apache/tamaya/core/OSGIActivator.java ---------------------------------------------------------------------- diff --git a/code/core/src/main/java/org/apache/tamaya/core/OSGIActivator.java b/code/core/src/main/java/org/apache/tamaya/core/OSGIActivator.java index 3e0fdba..150663c 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/OSGIActivator.java +++ b/code/core/src/main/java/org/apache/tamaya/core/OSGIActivator.java @@ -19,10 +19,10 @@ package org.apache.tamaya.core; import org.apache.tamaya.base.DefaultConfigBuilder; +import org.apache.tamaya.base.ServiceContext; +import org.apache.tamaya.base.ServiceContextManager; import org.apache.tamaya.base.configsource.ConfigSourceComparator; import org.apache.tamaya.base.filter.FilterComparator; -import org.apache.tamaya.spi.ServiceContext; -import org.apache.tamaya.spi.ServiceContextManager; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/main/java/org/apache/tamaya/core/OSGIServiceContext.java ---------------------------------------------------------------------- diff --git a/code/core/src/main/java/org/apache/tamaya/core/OSGIServiceContext.java b/code/core/src/main/java/org/apache/tamaya/core/OSGIServiceContext.java index eb01733..8359fb9 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/OSGIServiceContext.java +++ b/code/core/src/main/java/org/apache/tamaya/core/OSGIServiceContext.java @@ -18,7 +18,7 @@ */ package org.apache.tamaya.core; -import org.apache.tamaya.spi.ServiceContext; +import org.apache.tamaya.base.ServiceContext; import org.osgi.framework.Bundle; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/main/java/org/apache/tamaya/core/TamayaConfigProviderResolver.java ---------------------------------------------------------------------- diff --git a/code/core/src/main/java/org/apache/tamaya/core/TamayaConfigProviderResolver.java b/code/core/src/main/java/org/apache/tamaya/core/TamayaConfigProviderResolver.java index 9c9d587..81f01e1 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/TamayaConfigProviderResolver.java +++ b/code/core/src/main/java/org/apache/tamaya/core/TamayaConfigProviderResolver.java @@ -19,7 +19,10 @@ package org.apache.tamaya.core; import org.apache.tamaya.base.DefaultConfigBuilder; -import org.apache.tamaya.spi.*; +import org.apache.tamaya.base.ConfigContext; +import org.apache.tamaya.base.ServiceContext; +import org.apache.tamaya.base.ServiceContextManager; +import org.apache.tamaya.base.filter.Filter; import org.osgi.service.component.annotations.Component; import javax.config.Config; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/main/java/org/apache/tamaya/core/converters/ConvertQuery.java ---------------------------------------------------------------------- diff --git a/code/core/src/main/java/org/apache/tamaya/core/converters/ConvertQuery.java b/code/core/src/main/java/org/apache/tamaya/core/converters/ConvertQuery.java index 2b22d83..859e8b3 100644 --- a/code/core/src/main/java/org/apache/tamaya/core/converters/ConvertQuery.java +++ b/code/core/src/main/java/org/apache/tamaya/core/converters/ConvertQuery.java @@ -19,8 +19,8 @@ package org.apache.tamaya.core.converters; import org.apache.tamaya.base.convert.ConversionContext; -import org.apache.tamaya.spi.ConfigContext; -import org.apache.tamaya.spi.ConfigContextSupplier; +import org.apache.tamaya.base.ConfigContext; +import org.apache.tamaya.base.ConfigContextSupplier; import javax.config.Config; import javax.config.spi.Converter; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/main/resources/META-INF/services/org.apache.tamaya.base.ServiceContext ---------------------------------------------------------------------- diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.base.ServiceContext b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.base.ServiceContext new file mode 100644 index 0000000..4364f06 --- /dev/null +++ b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.base.ServiceContext @@ -0,0 +1,19 @@ +# +# 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 current 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. +# +org.apache.tamaya.base.DefaultServiceContext http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigValueEvaluator ---------------------------------------------------------------------- diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigValueEvaluator b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigValueEvaluator deleted file mode 100644 index 26d41ab..0000000 --- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ConfigValueEvaluator +++ /dev/null @@ -1,19 +0,0 @@ -# -# 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 current 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. -# -org.apache.tamaya.base.DefaultConfigValueEvaluator \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext ---------------------------------------------------------------------- diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext deleted file mode 100644 index 4364f06..0000000 --- a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spi.ServiceContext +++ /dev/null @@ -1,19 +0,0 @@ -# -# 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 current 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. -# -org.apache.tamaya.base.DefaultServiceContext http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spisupport.ConfigValueEvaluator ---------------------------------------------------------------------- diff --git a/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spisupport.ConfigValueEvaluator b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spisupport.ConfigValueEvaluator new file mode 100644 index 0000000..26d41ab --- /dev/null +++ b/code/core/src/main/resources/META-INF/services/org.apache.tamaya.spisupport.ConfigValueEvaluator @@ -0,0 +1,19 @@ +# +# 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 current 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. +# +org.apache.tamaya.base.DefaultConfigValueEvaluator \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/test/java/org/apache/tamaya/core/TamayaConfigProviderResolverTest.java ---------------------------------------------------------------------- diff --git a/code/core/src/test/java/org/apache/tamaya/core/TamayaConfigProviderResolverTest.java b/code/core/src/test/java/org/apache/tamaya/core/TamayaConfigProviderResolverTest.java index dafe7a3..d3713cf 100644 --- a/code/core/src/test/java/org/apache/tamaya/core/TamayaConfigProviderResolverTest.java +++ b/code/core/src/test/java/org/apache/tamaya/core/TamayaConfigProviderResolverTest.java @@ -18,9 +18,7 @@ */ package org.apache.tamaya.core; -import org.apache.tamaya.core.TamayaConfigProviderResolver; -import org.apache.tamaya.spi.ConfigContext; -import org.apache.tamaya.spi.ConfigContextSupplier; +import org.apache.tamaya.base.ConfigContextSupplier; import org.junit.Test; import static org.junit.Assert.*; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/test/java/org/apache/tamaya/core/testdata/TestFilter.java ---------------------------------------------------------------------- diff --git a/code/core/src/test/java/org/apache/tamaya/core/testdata/TestFilter.java b/code/core/src/test/java/org/apache/tamaya/core/testdata/TestFilter.java index e0f93bf..4f7bca7 100644 --- a/code/core/src/test/java/org/apache/tamaya/core/testdata/TestFilter.java +++ b/code/core/src/test/java/org/apache/tamaya/core/testdata/TestFilter.java @@ -19,8 +19,7 @@ package org.apache.tamaya.core.testdata; import org.apache.tamaya.base.filter.FilterContext; -import org.apache.tamaya.spi.Filter; -import org.apache.tamaya.spi.ConfigValue; +import org.apache.tamaya.base.filter.Filter; import javax.annotation.Priority; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingFilter.java ---------------------------------------------------------------------- diff --git a/code/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingFilter.java b/code/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingFilter.java index 795ec37..919d808 100644 --- a/code/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingFilter.java +++ b/code/core/src/test/java/org/apache/tamaya/core/testdata/TestRemovingFilter.java @@ -19,8 +19,7 @@ package org.apache.tamaya.core.testdata; import org.apache.tamaya.base.filter.FilterContext; -import org.apache.tamaya.spi.Filter; -import org.apache.tamaya.spi.ConfigValue; +import org.apache.tamaya.base.filter.Filter; import javax.annotation.Priority; import javax.config.ConfigProvider; http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/test/resources/META-INF/services/org.apache.tamaya.base.filter.Filter ---------------------------------------------------------------------- diff --git a/code/core/src/test/resources/META-INF/services/org.apache.tamaya.base.filter.Filter b/code/core/src/test/resources/META-INF/services/org.apache.tamaya.base.filter.Filter new file mode 100644 index 0000000..d727173 --- /dev/null +++ b/code/core/src/test/resources/META-INF/services/org.apache.tamaya.base.filter.Filter @@ -0,0 +1,20 @@ +# +# 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 current 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. +# +org.apache.tamaya.core.testdata.TestFilter +org.apache.tamaya.core.testdata.TestRemovingFilter http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/09472084/code/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.Filter ---------------------------------------------------------------------- diff --git a/code/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.Filter b/code/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.Filter deleted file mode 100644 index d727173..0000000 --- a/code/core/src/test/resources/META-INF/services/org.apache.tamaya.spi.Filter +++ /dev/null @@ -1,20 +0,0 @@ -# -# 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 current 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. -# -org.apache.tamaya.core.testdata.TestFilter -org.apache.tamaya.core.testdata.TestRemovingFilter