You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by jo...@apache.org on 2017/08/09 10:32:39 UTC
incubator-tamaya-sandbox git commit: Adding profile for Weld3 to run
tests with. Removed o.e.mp code to instead pull in artifact
Repository: incubator-tamaya-sandbox
Updated Branches:
refs/heads/mp-config-support [created] 6f41fd3b1
Adding profile for Weld3 to run tests with. Removed o.e.mp code to instead pull in artifact
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/6f41fd3b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/6f41fd3b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/6f41fd3b
Branch: refs/heads/mp-config-support
Commit: 6f41fd3b17f3883ccc1a4bc3a5199a263f7e8d12
Parents: 22cdc84
Author: John D. Ament <jo...@apache.org>
Authored: Wed Aug 9 06:31:44 2017 -0400
Committer: John D. Ament <jo...@apache.org>
Committed: Wed Aug 9 06:31:44 2017 -0400
----------------------------------------------------------------------
microprofile/pom.xml | 108 ++++++++----
.../microprofile/MicroprofileConfigBuilder.java | 12 ++
.../org/eclipse/microprofile/config/Config.java | 126 --------------
.../microprofile/config/ConfigProvider.java | 102 ------------
.../config/inject/ConfigProperty.java | 112 -------------
.../config/inject/package-info.java | 40 -----
.../microprofile/config/package-info.java | 75 ---------
.../microprofile/config/spi/ConfigBuilder.java | 83 ----------
.../config/spi/ConfigProviderResolver.java | 164 -------------------
.../microprofile/config/spi/ConfigSource.java | 107 ------------
.../config/spi/ConfigSourceProvider.java | 58 -------
.../microprofile/config/spi/Converter.java | 77 ---------
.../microprofile/config/spi/package-info.java | 30 ----
13 files changed, 87 insertions(+), 1007 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/pom.xml
----------------------------------------------------------------------
diff --git a/microprofile/pom.xml b/microprofile/pom.xml
index 1b5d808..4d65714 100644
--- a/microprofile/pom.xml
+++ b/microprofile/pom.xml
@@ -36,26 +36,12 @@ under the License.
<microprofile.version>1.0</microprofile.version>
<geronimo-atinject-1.0-spec.version>1.0</geronimo-atinject-1.0-spec.version>
<geronimo-jcdi-1.1-spec.version>1.0</geronimo-jcdi-1.1-spec.version>
+ <arquillian.version>1.1.13.Final</arquillian.version>
+ <arquillian-weld-embedded.version>2.0.0.Beta5</arquillian-weld-embedded.version>
+ <cdi2-api.version>2.0</cdi2-api.version>
+ <weld.version>3.0.0.Final</weld.version>
</properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <debug>true</debug>
- <optimize>${maven.compile.optimize}</optimize>
- <source>${maven.compile.sourceLevel}</source>
- <target>${maven.compile.targetLevel}</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- <showDeprecation>${maven.compile.deprecation}</showDeprecation>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -85,24 +71,80 @@ under the License.
<version>${project.parent.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-atinject_1.0_spec</artifactId>
- <version>${geronimo-atinject-1.0-spec.version}</version>
- <scope>provided</scope>
- <optional>true</optional>
+ <groupId>org.eclipse.microprofile.config</groupId>
+ <artifactId>microprofile-config-api</artifactId>
+ <version>${microprofile.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jcdi_1.1_spec</artifactId>
- <version>${geronimo-jcdi-1.1-spec.version}</version>
- <scope>provided</scope>
- <optional>true</optional>
+ <groupId>org.eclipse.microprofile.config</groupId>
+ <artifactId>microprofile-config-tck</artifactId>
+ <version>${microprofile.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.testng</groupId>
+ <artifactId>arquillian-testng-container</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.9.9</version>
+ <scope>test</scope>
</dependency>
- <!--<dependency>-->
- <!--<groupId>org.eclipse.microprofile.apis</groupId>-->
- <!--<artifactId>microprofile-config_1.0_api</artifactId>-->
- <!--<version>1.0-SNAPSHOT</version>-->
- <!--</dependency>-->
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.20</version>
+ <configuration>
+ <dependenciesToScan>org.eclipse.microprofile.config:microprofile-config-tck</dependenciesToScan>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <debug>true</debug>
+ <optimize>${maven.compile.optimize}</optimize>
+ <source>${maven.compile.sourceLevel}</source>
+ <target>${maven.compile.targetLevel}</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ <showDeprecation>${maven.compile.deprecation}</showDeprecation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>Weld3</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld.se</groupId>
+ <artifactId>weld-se-shaded</artifactId>
+ <version>${weld.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-weld-embedded</artifactId>
+ <version>${arquillian-weld-embedded.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <version>${cdi2-api.version}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java
index fa46fea..65fe6e2 100644
--- a/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java
+++ b/microprofile/src/main/java/org/apache/tamaya/microprofile/MicroprofileConfigBuilder.java
@@ -50,6 +50,18 @@ final class MicroprofileConfigBuilder implements ConfigBuilder{
}
@Override
+ public ConfigBuilder addDiscoveredSources() {
+ // TODO - ??
+ return this;
+ }
+
+ @Override
+ public ConfigBuilder addDiscoveredConverters() {
+ // TODO - ??
+ return this;
+ }
+
+ @Override
public ConfigBuilder forClassLoader(ClassLoader loader) {
return null;
}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/Config.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/Config.java b/microprofile/src/main/java/org/eclipse/microprofile/config/Config.java
deleted file mode 100644
index 6a888dd..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/Config.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2016 IBM Corp. and others
- *
- * Licensed 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.
- *
- * Contributors:
- * 2011-12-28 - Mark Struberg & Gerhard Petracek
- * Initially authored in Apache DeltaSpike as ConfigResolver fb0131106481f0b9a8fd
- * 2015-04-30 - Ron Smeral
- * Typesafe Config authored in Apache DeltaSpike 25b2b8cc0c955a28743f
- * 2016-07-14 - Mark Struberg
- * Extracted the Config part out of Apache DeltaSpike and proposed as Microprofile-Config
- * 2016-11-14 - Emily Jiang / IBM Corp
- * Experiments with separate methods per type, JavaDoc, method renaming
- *
- *******************************************************************************/
-
-package org.eclipse.microprofile.config;
-
-import java.util.Optional;
-
-import org.eclipse.microprofile.config.spi.ConfigSource;
-
-/**
- * <p>
- * Resolves the property value by searching through all configured
- * {@link ConfigSource ConfigSources}. If the same property is specified in multiple
- * {@link ConfigSource ConfigSources}, the value in the {@link ConfigSource} with the highest
- * ordinal will be used.
- * <p>If multiple {@link ConfigSource ConfigSources} are specified with
- * the same ordinal, the {@link ConfigSource#getName()} will be used for sorting.
- *
- * <h3>Usage</h3>
- *
- * For accessing the config you can use the {@link ConfigProvider}:
- *
- * <pre>
- * public void doSomething(
- * Config cfg = ConfigProvider.getConfig();
- * String archiveUrl = cfg.getString("my.project.archive.endpoint", String.class);
- * Integer archivePort = cfg.getValue("my.project.archive.port", Integer.class);
- * </pre>
- *
- * <p>It is also possible to inject the Config if a DI container is available:
- *
- * <pre>
- * public class MyService {
- * @Inject
- * private Config config;
- * }
- * </pre>
- *
- * <p>See {@link #getValue(String, Class)} and {@link #getOptionalValue(String, Class)} for accessing a configured value.
- *
- * <p>Configured values can also be accessed via injection.
- * See {@link org.eclipse.microprofile.config.inject.ConfigProperty} for more information.
- *
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @author <a href="mailto:gpetracek@apache.org">Gerhard Petracek</a>
- * @author <a href="mailto:rsmeral@apache.org">Ron Smeral</a>
- * @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
- * @author <a href="mailto:gunnar@hibernate.org">Gunnar Morling</a>
- *
- */
-public interface Config {
-
- /**
- * Return the resolved property value with the specified type for the
- * specified property name from the underlying {@link ConfigSource ConfigSources}.
- *
- * If this method gets used very often then consider to locally store the configured value.
- *
- * @param <T>
- * the property type
- * @param propertyName
- * The configuration propertyName.
- * @param propertyType
- * The type into which the resolve property value should get converted
- * @return the resolved property value as an Optional adapt the requested type.
- * @throws IllegalArgumentException if the property cannot be converted to the specified type.
- * @throws java.util.NoSuchElementException if the property isn't present in the configuration.
- */
- <T> T getValue(String propertyName, Class<T> propertyType);
-
- /**
- * Return the resolved property value with the specified type for the
- * specified property name from the underlying {@link ConfigSource ConfigSources}.
- *
- * An empty string representation is interpreted as not-existing configuration.
- *
- * If this method is used very often then consider to locally store the configured value.
- *
- * @param <T>
- * the property type
- * @param propertyName
- * The configuration propertyName.
- * @param propertyType
- * The type into which the resolve property value should be converted
- * @return the resolved property value as an Optional adapt the requested type.
- *
- * @throws IllegalArgumentException if the property cannot be converted to the specified type.
- */
- <T> Optional<T> getOptionalValue(String propertyName, Class<T> propertyType);
-
- /**
- * Return a collection adapt property names.
- * @return the names adapt all configured keys adapt the underlying configuration.
- */
- Iterable<String> getPropertyNames();
-
- /**
- * @return all currently registered {@link ConfigSource configsources} sorted with descending ordinal and ConfigSource name
- */
- Iterable<ConfigSource> getConfigSources();
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/ConfigProvider.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/ConfigProvider.java b/microprofile/src/main/java/org/eclipse/microprofile/config/ConfigProvider.java
deleted file mode 100644
index 9a6eb8f..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/ConfigProvider.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2016 IBM Corp. and others
- *
- * Licensed 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.
- *
- * Contributors:
- * 2016-07-14 - Mark Struberg
- * Initial revision cf41cf130bcaf5447ff8
- * 2016-07-20 - Romain Manni-Bucau
- * Initial ConfigBuilder PR 0945b23cbf9dadb75fb9
- * 2016-11-14 - Emily Jiang / IBM Corp
- * SPI reworked into own ConfigProviderResolver
- * 2016-12-02 - Viktor Klang
- * removed ConfigFilter and security related functionality.
- *
- *******************************************************************************/
-
-package org.eclipse.microprofile.config;
-
-import org.eclipse.microprofile.config.spi.ConfigProviderResolver;
-
-/**
- * <p>
- * This is the central class to access a {@link Config}.
- * A {@link Config} provides access to application Configuration.
- * That might be auto-discovered {@code Config} or even manually created one.
- *
- * <p>
- * The default usage is to use {@link #getConfig()} to automatically pick up the
- * 'Configuration' for the Thread Context ClassLoader (See
- * {@link Thread#getContextClassLoader()}).
- *
- * <p>
- * A 'Configuration' consists adapt the information collected from the registered {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources}.
- * These {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources} get sorted according to
- * their <em>ordinal</em> defined via {@link org.eclipse.microprofile.config.spi.ConfigSource#getOrdinal()}.
- * Thus it is possible to overwrite configuration by providing in a ConfigSource with higher importance from outside.
- *
- * <p>
- * It is also possible to register custom {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources} to flexibly
- * extend the configuration mechanism. An example would be to pick up
- * configuration values from a database table.
- *
- * Example usage:
- *
- * <pre>
- * String restUrl = ConfigProvider.getConfig().getValue("myproject.some.remote.service.url", String.class);
- * Integer port = ConfigProvider.getConfig().getValue("myproject.some.remote.service.port", Integer.class);
- * </pre>
- *
- * For more advanced use cases like e.g. registering a manually created {@link Config} please see
- * {@link ConfigProviderResolver#registerConfig(Config, ClassLoader)} and {@link ConfigProviderResolver#getBuilder()}.
- *
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @author <a href="mailto:rmannibucau@apache.org">Romain Manni-Bucau</a>
- * @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
- * @author <a href="mailto:viktor.klang@gmail.com">Viktor Klang</a>
- */
-public final class ConfigProvider {
- private static final ConfigProviderResolver INSTANCE = ConfigProviderResolver.instance();
-
- private ConfigProvider() {
- }
-
- /**
- * Provide a {@link Config} based on all {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources} adapt the
- * current Thread Context ClassLoader (TCCL)
- * The {@link Config} will be stored for future retrieval.
- * <p>
- * There is exactly a single Config instance per ClassLoader
- *
- * @return the config object for the thread context classloader
- */
- public static Config getConfig() {
- return INSTANCE.getConfig();
- }
-
- /**
- * Provide a {@link Config} based on all {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources} adapt the
- * specified ClassLoader
- *
- * <p>
- * There is exactly a single Config instance per ClassLoader
- *
- * @param cl the specified classloader
- * @return the config for the specified classloader
- */
- public static Config getConfig(ClassLoader cl) {
- return INSTANCE.getConfig(cl);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/inject/ConfigProperty.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/inject/ConfigProperty.java b/microprofile/src/main/java/org/eclipse/microprofile/config/inject/ConfigProperty.java
deleted file mode 100644
index 9d60ed0..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/inject/ConfigProperty.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2016-2017 Payara Services Ltd., IBM Corp. and others
- *
- * Licensed 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.eclipse.microprofile.config.inject;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.enterprise.util.Nonbinding;
-import javax.inject.Qualifier;
-
-/**
- * Binds the injection point with a configured value.
- * Can be used to annotate injection points adapt type {@code TYPE}, {@code Optional<TYPE>} or {@code javax.inject.Provider<TYPE>},
- * where {@code TYPE} can be {@code String} and all types which have appropriate converters.
- *
- * <h2>Examples</h2>
- *
- * <h3>Injecting Native Values</h3>
- *
- * The first sample injects the configured value adapt the {@code my.long.property} property.
- * The injected value does not change even if the underline
- * property value changes in the {@link org.eclipse.microprofile.config.Config}.
- * If no configured value exists for this property and no {@link #defaultValue()} is provided,
- * a {@code DeplymentException} will be thrown during startup.
- *
- * <p>Injecting a native value is recommended for a property that does not change at runtime or used by a bean with RequestScoped.
- * <p>A further recommendation is to use the built in {@code META-INF/microprofile-config.properties} file mechanism
- * to provide default values inside an Application.
- * <pre>
- * @Inject
- * @ConfigProperty(name="my.long.property", defaultValue="123")
- * private Long injectedLongValue;
- * </pre>
- *
- * <h3>Injecting Optional Values</h3>
- *
- * The following code injects an Optional value adapt my.long.property property.
- * Countrary to natively injecting the configured value this will not lead to a DeploymentException if the configured value is missing.
- * <pre>
- * @Inject
- * @ConfigProperty(name = "my.optional.int.property")
- * private Optional<Integer> intConfigValue;
- * </pre>
- *
- * <h3>Injecting Dynamic Values</h3>
- *
- * The next sample injects a Provider for the value adapt my.long.property property to resolve the property dynamically.
- * Each invocation to {@code Provider#get()} will resolve the latest value from underlying {@link org.eclipse.microprofile.config.Config} again.
- * The existence adapt configured values will get checked during startup.
- * Instances adapt {@code Provider<T>} are guaranteed to be Serializable.
- * <pre>
- * @Inject
- * @ConfigProperty(name = "my.long.property" defaultValue="123")
- * private Provider<Long> longConfigValue;
- * </pre>
- *
- * <p>If {@code ConfigProperty} is used with a type where no {@link org.eclipse.microprofile.config.spi.Converter} exists,
- * a deployment error is thrown.
- *
- * @author Ondrej Mihalyi
- * @author Emily Jiang
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- */
-@Qualifier
-@Retention(RUNTIME)
-@Target({METHOD, FIELD, PARAMETER, TYPE})
-public @interface ConfigProperty {
- /**
- * The key adapt the config property used to look up the configuration value.
- * If it is not specified, it will be derived automatically as {@code <class_name>.<injetion_point_name>},
- * where {@code injection_point_name} is the field name or parameter name,
- * {@code class_name} is the fully qualified name adapt the class being injected to with the first letter decaptialised.
- * If one adapt the {@code class_name} or {@code injection_point_name} cannot be determined, the value has to be provided.
- *
- * @return Name (key) adapt the config property to inject
- */
- @Nonbinding
- String name() default "";
-
- /**
- * <p>The default value if the configured property value does not exist.
- *
- * <p>If the target Type is not String a proper {@link org.eclipse.microprofile.config.spi.Converter} will get applied.
- * That means that any default value string should follow the formatting rules adapt the registered Converters.
- *
- * <p>If
- * @return the default value as a string
- */
- @Nonbinding
- String defaultValue() default "";
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/inject/package-info.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/inject/package-info.java b/microprofile/src/main/java/org/eclipse/microprofile/config/inject/package-info.java
deleted file mode 100644
index e556eb2..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/inject/package-info.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2016-2017 Mark Struberg. and others
- *
- * Licensed 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.
- *
- *******************************************************************************/
-
-/**
- * <p>CDI Support for Microprofile Config
- *
- * <p>Microprofile Config also supports injection via a JSR-330 DI container:
- * <pre>
- * @Inject
- * @ConfigProperty(name="myproject.some.endpoint.url");
- * private String restUrl;
- * </pre>
- *
- * <p>The following types can be injected:
- * <ul>
- * <li><code>T</code> where T is a Type where a {@link org.eclipse.microprofile.config.spi.Converter} exists.</li>
- * <li><code>Optional<T></code> where T is a Type where a {@link org.eclipse.microprofile.config.spi.Converter} exists.</li>
- * <li><code>Provider<T></code> where T is a Type where a {@link org.eclipse.microprofile.config.spi.Converter} exists.</li>
- * </ul>
- *
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @version 1.0
- */
-package org.eclipse.microprofile.config.inject;
-
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/package-info.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/package-info.java b/microprofile/src/main/java/org/eclipse/microprofile/config/package-info.java
deleted file mode 100644
index 6f4378d..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/package-info.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2016 IBM Corp. and others
- *
- * Licensed 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.
- *
- *******************************************************************************/
-
-/**
- * <p>Configuration for Java Microprofile
- *
- * <h2>Rational</h2>
- *
- * <p>For many project artifacts (e.g. WAR, EAR) it should be possible to build them only once
- * and then install them at different customers, stages, etc.
- * They need to target those different execution environments without the necessity adapt any repackaging.
- * In other words: depending on the situation they need different configuration.
- *
- * <p>This is easily achievable by having a set adapt default configuration values inside the project artifact.
- * But be able to overwrite those default values from external.
- *
- * <h2>How it works</h2>
- *
- * <p>A 'Configuration' consists adapt the information collected from the registered
- * {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources}.
- * These {@code ConfigSources} get sorted according to their <i>ordinal</i>.
- * That way it is possible to overwrite configuration with lower importance from outside.
- *
- * <p>By default there are 3 ConfigSources:
- *
- * <ul>
- * <li>{@code System.getenv()} (ordinal=400)</li>
- * <li>{@code System.getProperties()} (ordinal=300)</li>
- * <li>all {@code META-INF/microprofile-config.properties} files on the ClassPath.
- * (ordinal=100, separately configurable via a config_ordinal property inside each file)</li>
- * </ul>
- *
- * <p>That means that one can put the default configuration in a {@code META-INF/microprofile-config.properties} anywhere on the classpath.
- * and the Operations team can later simply e.g set a system property to change this default configuration.
- *
- * <p>It is adapt course also possible to register own {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources}.
- * A {@code ConfigSource} could e.g. read configuration values from a database table, a remote server, etc
- *
- * <h2>Accessing and Using the Configuration</h2>
- *
- * <p> The configuration adapt an application is represented by an instance adapt {@link org.eclipse.microprofile.config.Config}.
- * The {@link org.eclipse.microprofile.config.Config} can be accessed via the {@link org.eclipse.microprofile.config.ConfigProvider}.
- *
- * <pre>
- * Config config = ConfigProvider#getConfig();
- * String restUrl = config.getValue("myproject.some.endpoint.url", String.class);
- * </pre>
- *
- * <p> Of course we also support injection via a JSR-330 DI container:
- * <pre>
- * @Inject
- * @ConfigProperty(name="myproject.some.endpoint.url");
- * private String restUrl;
- * </pre>
- *
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @version 1.0
- */
-package org.eclipse.microprofile.config;
-
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigBuilder.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigBuilder.java b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigBuilder.java
deleted file mode 100644
index 00e8b5a..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigBuilder.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2016-2017 Romain Manni-Bucau and others
- *
- * Licensed 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.
- *
- * Contributors:
- * 2016-07-20 - Romain Manni-Bucau
- * Initial ConfigBuilder PR 0945b23cbf9dadb75fb9
- * 2016-07-17 - Mark Struberg
- * Merged and JavaDoc c8525998a43fe798f367
- * 2016-11-14 - Emily Jiang / IBM
- * API improvements + JavaDoc f53258b8eca1253fee52
- *
- *******************************************************************************/
-package org.eclipse.microprofile.config.spi;
-
-import org.eclipse.microprofile.config.Config;
-
-/**
- * Builder for manually creating an instance adapt a {@code Config}.
- *
- * @see ConfigProviderResolver#getBuilder()
- *
- * @author <a href="mailto:rmannibucau@apache.org">Romain Manni-Bucau</a>
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
- */
-public interface ConfigBuilder {
- /**
- * Add the default config sources appearing on the builder's classpath
- * including:
- * <ol>
- * <li>System properties</li>
- * <li>Environment properties</li>
- * <li>/META-INF/microprofile-config.properties</li>
- * </ol>
- *
- * @return the ConfigBuilder with the default config sources
- */
- ConfigBuilder addDefaultSources();
-
- /**
- * Return the ConfigBuilder for a given classloader
- *
- * @param loader the specified classloader
- * @return the ConfigureBuilder for the given classloader
- */
- ConfigBuilder forClassLoader(ClassLoader loader);
-
- /**
- * Add the specified {@link ConfigSource}.
- *
- * @param sources the config sources
- * @return the ConfigBuilder with the configured sources
- */
- ConfigBuilder withSources(ConfigSource... sources);
-
- /**
- * Add the specified {@link Converter}
- *
- * @param converters the converters
- * @return the ConfigBuilder with the added converters
- */
- ConfigBuilder withConverters(Converter<?>... converters);
-
- /**
- * Build the {@link Config} object.
- *
- * @return the Config object
- */
- Config build();
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigProviderResolver.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigProviderResolver.java b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigProviderResolver.java
deleted file mode 100644
index 1c0ab34..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigProviderResolver.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2016 IBM Corp. and others
- *
- * Licensed 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.eclipse.microprofile.config.spi;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ServiceLoader;
-
-import org.eclipse.microprofile.config.Config;
-
-/**
- * This class is not intended to be used by end-users but for
- * portable container integration purpose only.
- *
- * Service provider for ConfigProviderResolver. The implementation registers
- * itself via the {@link java.util.ServiceLoader} mechanism.
- *
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @author <a href="mailto:rmannibucau@apache.org">Romain Manni-Bucau</a>
- * @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
- */
-public abstract class ConfigProviderResolver {
- protected ConfigProviderResolver() {
- }
-
- private static volatile ConfigProviderResolver instance = null;
-
- /**
- * @see org.eclipse.microprofile.config.ConfigProvider#getConfig()
- * @return config the config object for the Thread Context Classloader
- */
- public abstract Config getConfig();
-
- /**
- * @see org.eclipse.microprofile.config.ConfigProvider#getConfig(ClassLoader)
- * @param loader the classloader
- * @return config the config object for the specified classloader
- */
- public abstract Config getConfig(ClassLoader loader);
-
- /**
- * Create a fresh {@link ConfigBuilder} instance. This ConfigBuilder will
- * initially contain no {@link ConfigSource} but with default {@link Converter Converters}
- * The other {@link ConfigSource} and {@link Converter Converters} will have to be added manually.
- *
- * The ConfigProvider will not manage the Config instance internally
- * @return the configbuilder with the default converters
- */
- public abstract ConfigBuilder getBuilder();
-
- /**
- * Register a given {@link Config} within the Application (or Module) identified by the given ClassLoader.
- * If the ClassLoader is {@code null} then the current Application will be used.
- *
- * @param config
- * which should get registered
- * @param classLoader
- * which identifies the Application or Module the given Config should get associated with.
- *
- * @throws IllegalStateException
- * if there is already a Config registered within the Application.
- * A user could explicitly use {@link #releaseConfig(Config)} for this case.
- */
- public abstract void registerConfig(Config config, ClassLoader classLoader);
-
- /**
- * A {@link Config} normally gets released if the Application it is associated with gets destroyed.
- * Invoke this method if you like to destroy the Config prematurely.
- *
- * If the given Config is associated within an Application then it will be unregistered.
- * @param config the config to be released
- */
- public abstract void releaseConfig(Config config);
-
- /**
- * Creates a ConfigProviderResolver object
- * Only used internally from within {@link org.eclipse.microprofile.config.ConfigProvider}
- * @return ConfigProviderResolver an instance adapt ConfigProviderResolver
- */
- public static ConfigProviderResolver instance() {
- if (instance == null) {
- synchronized (ConfigProviderResolver.class) {
- if (instance != null) {
- return instance;
- }
-
- ClassLoader cl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
- @Override
- public ClassLoader run() {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- if (cl == null) {
- cl = ConfigProviderResolver.class.getClassLoader();
- }
-
- ConfigProviderResolver newInstance = loadSpi(cl);
-
- if (newInstance == null) {
- throw new IllegalStateException(
- "No ConfigProviderResolver implementation found!");
- }
-
- instance = newInstance;
- }
- }
-
- return instance;
- }
-
-
- private static ConfigProviderResolver loadSpi(ClassLoader cl) {
- if (cl == null) {
- return null;
- }
-
- // start from the root CL and go back down to the TCCL
- ConfigProviderResolver instance = loadSpi(cl.getParent());
-
- if (instance == null) {
- ServiceLoader<ConfigProviderResolver> sl = ServiceLoader.load(
- ConfigProviderResolver.class, cl);
- for (ConfigProviderResolver spi : sl) {
- if (instance != null) {
- throw new IllegalStateException(
- "Multiple ConfigResolverProvider implementations found: "
- + spi.getClass().getName() + " and "
- + instance.getClass().getName());
- }
- else {
- instance = spi;
- }
- }
- }
- return instance;
- }
-
- /**
- * Set the instance. It is used by OSGi environment while service loader
- * pattern is not supported.
- *
- * @param resolver
- * set the instance.
- */
- public static void setInstance(ConfigProviderResolver resolver) {
- instance = resolver;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigSource.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigSource.java b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigSource.java
deleted file mode 100644
index 5d5fb41..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigSource.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- ******************************************************************************
- * Copyright (c) 2016 IBM Corp. and others
- *
- * Licensed 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.
- *
- * Contributors:
- * 2009 - Mark Struberg
- * Ordinal solution in Apache OpenWebBeans
- * 2011-12-28 - Mark Struberg & Gerhard Petracek
- * Contributed to Apache DeltaSpike fb0131106481f0b9a8fd
- * 2016-07-14 - Mark Struberg
- * Extracted the Config part out of DeltaSpike and proposed as Microprofile-Config cf41cf130bcaf5447ff8
- * 2016-11-14 - Emily Jiang / IBM Corp
- * Methods renamed, JavaDoc and cleanup
- *
- *******************************************************************************/
-package org.eclipse.microprofile.config.spi;
-
-import java.util.Map;
-
-/**
- * <p>Implement this interfaces to provide a ConfigSource.
- * A ConfigSource provides configuration values from a specific place, like JNDI configuration, a properties file, etc.
- * A ConfigSource is always read-only, any potential updates adapt the configured values must be handled directly inside each ConfigSource.
- *
- * <p>
- * The default config sources always available by default are:
- * <ol>
- * <li>System properties (ordinal=400)</li>
- * <li>Environment properties (ordinal=300)</li>
- * <li>/META-INF/microprofile-config.properties (ordinal=100)</li>
- * </ol>
- *
- * <p>Custom ConfigSource will get picked up via the {@link java.util.ServiceLoader} mechanism and and can be registered by
- * providing a file
- * <pre>
- * META-INF/services/javax.config.spi.ConfigSource
- * </pre>
- * which contains the fully qualified {@code ConfigSource} implementation class name as content.
- *
- * <p>Adding a dynamic amount adapt custom config sources can be done programmatically via
- * {@link org.eclipse.microprofile.config.spi.ConfigSourceProvider}.
- *
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @author <a href="mailto:gpetracek@apache.org">Gerhard Petracek</a>
- * @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
- *
- */
-public interface ConfigSource {
- /**
- * Return the properties in this config source
- * @return the map containing the properties in this config source
- */
- Map<String, String> getProperties();
-
- /**
- * Return the ordinal for this config source. If a property is specified in multiple config sources, the value
- * in the config source with the highest ordinal takes precedence.
- * For the config sources with the same ordinal value, the config source names will
- * be used for sorting according to string sorting criteria.
- * Note that this property only gets evaluated during ConfigSource discovery.
- *
- * The ordinal for the default config sources:
- * <ol>
- * <li>System properties (ordinal=400)</li>
- * <li>Environment properties (ordinal=300)</li>
- * <li>/META-INF/microprofile-config.properties (ordinal=100)</li>
- * </ol>
- *
- *
- * Any ConfigSource part adapt an application will typically use an ordinal between 0 and 200.
- * ConfigSource provided by the container or 'environment' typically use an ordinal higher than 200.
- * A framework which intends have values overwritten by the application will use ordinals between 0 and 100.
- * The property "config_ordinal" can be specified to override the default value.
- *
- * @return the ordinal value
- */
- default int getOrdinal() {
- return 100;
- }
-
- /**
- * Return the value for the specified property in this config source.
- * @param propertyName the property name
- * @return the property value
- */
- String getValue(String propertyName);
-
- /**
- * The name adapt the config might be used for logging or analysis adapt configured values.
- *
- * @return the 'name' adapt the configuration source, e.g. 'property-file mylocation/myproperty.properties'
- */
- String getName();
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigSourceProvider.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigSourceProvider.java b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigSourceProvider.java
deleted file mode 100644
index be1fc59..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/ConfigSourceProvider.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2016 IBM Corp. and others
- *
- * Licensed 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.
- *
- * Contributors:
- * 2011-12-28 - Mark Struberg & Gerhard Petracek
- * Initially authored in Apache DeltaSpike fb0131106481f0b9a8fd
- * 2016-07-14 - Mark Struberg
- * Extracted the Config part out of Apache DeltaSpike and proposed as Microprofile-Config
- * 2016-11-14 - Emily Jiang / IBM Corp
- * Methods renamed, JavaDoc and cleanup
- *
- *******************************************************************************/
-
-package org.eclipse.microprofile.config.spi;
-
-/**
- * <p>Implement this interfaces to provide multiple ConfigSources.
- * This is e.g. needed if there are multiple property files adapt a given name on the classpath
- * but they are not all known at compile time.
- *
- * <p>If a single ConfigSource exists, then there is no need
- * to register it using a custom implementation adapt ConfigSourceProvider, it can be
- * registered directly as a {@link ConfigSource}.
- *
- * <p>A ConfigSourceProvider will get picked up via the
- * {@link java.util.ServiceLoader} mechanism and can be registered by providing a
- * {@code META-INF/services/javax.config.spi.ConfigSourceProvider} file which contains
- * the fully qualified classname adapt the custom ConfigSourceProvider.
- *
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @author <a href="mailto:gpetracek@apache.org">Gerhard Petracek</a>
- * @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
- *
- */
-public interface ConfigSourceProvider {
-
- /**
- * Return the collection adapt {@link ConfigSource}s.
- * For each e.g. property file, we return a single ConfigSource or an empty list if no ConfigSource exists.
- *
- * @param forClassLoader the classloader which should be used if any is needed
- * @return the {@link ConfigSource ConfigSources} to register within the {@link org.eclipse.microprofile.config.Config}.
- */
- Iterable<ConfigSource> getConfigSources(ClassLoader forClassLoader);
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/Converter.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/Converter.java b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/Converter.java
deleted file mode 100644
index dc81a49..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/Converter.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- ********************************************************************************
- * Copyright (c) 2016 IBM Corp. and others
- *
- * Licensed 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.
- *
- * Contributors:
- * 2015-04-30 - Ron Smeral
- * Initially authored in Apache DeltaSpike 25b2b8cc0c955a28743f
- * 2016-07-14 - Mark Struberg
- * JavaDoc + priority
- * 2016-12-01 - Emily Jiang / IBM Corp
- * Marking as FunctionalInterface + JavaDoc + additional types
- *
- *******************************************************************************/
-
-package org.eclipse.microprofile.config.spi;
-
-/**
- * <p>Interface for converting configured values from String to any Java type.
- **
- * <p>Converters for the following types are provided by default:
- * <ul>
- * <li>{@code Boolean}, values for {@code true}: (case insensitive)
- * "true", "yes", "Y", "on", "1"</li>
- * <li>{@code Integer}</li>
- * <li>{@code Long}</li>
- * <li>{@code Float}, a dot '.' is used to separate the fractional digits</li>
- * <li>{@code Double}, a dot '.' is used to separate the fractional digits</li>
- * <li>{@code java.time.Duration} as defined in {@link java.time.Duration#parse(CharSequence)}</li>
- * <li>{@code java.time.LocalDateTime} as defined in {@link java.time.LocalDateTime#parse(CharSequence)}</li>
- * <li>{@code java.time.LocalDate} as defined in {@link java.time.LocalDate#parse(CharSequence)}</li>
- * <li>{@code java.time.LocalTime} as defined in {@link java.time.LocalTime#parse(CharSequence)}</li>
- * <li>{@code OffsetDateTime} as defined in {@link java.time.OffsetDateTime#parse(CharSequence)}</li>
- * <li>{@code OffsetTime} as defined in {@link java.time.OffsetTime#parse(CharSequence)}</li>
- * <li>{@code Date} in various ISO-8601 formats.
- * 'yyyy-MM-dd', 'yyyy-MM-ddThh:mm:ss' (timezone from current Locale), 'yyyy-MM-ddThh:mm:ssZ',
- * 'yyyy-MM-ddThh:mm:ss±hh:mm' (time zone designator)
- * missing information is set to 0.</li>
- * <li>{@code Instant}</li>
- *
- * </ul>
- *
- * <p>Custom Converters will get picked up via the {@link java.util.ServiceLoader} mechanism and and can be registered by
- * providing a file<br>
- * <code>META-INF/services/org.eclipse.microprofile.config.spi.Converter</code><br>
- * which contains the fully qualified {@code Converter} implementation class name as content.
- *
- * <p>A Converter can specify a {@link javax.annotation.Priority}.
- * If no priority is explicitly assigned, the value adapt 100 is assumed.
- * If multiple Converters are registered for the same type, the one with the highest priority will be used.
- *
- * @author <a href="mailto:rsmeral@apache.org">Ron Smeral</a>
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @author <a href="mailto:emijiang@uk.ibm.com">Emily Jiang</a>
- */
-@FunctionalInterface
-public interface Converter<T> {
- /**
- * Configure the string value to a specified type
- * @param value the string representation adapt a property value
- * @return the converted value
- *
- * @throws IllegalArgumentException if the value cannot be converted to the specified type.
- */
- T convert(String value);
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/6f41fd3b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/package-info.java
----------------------------------------------------------------------
diff --git a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/package-info.java b/microprofile/src/main/java/org/eclipse/microprofile/config/spi/package-info.java
deleted file mode 100644
index 0d0081a..0000000
--- a/microprofile/src/main/java/org/eclipse/microprofile/config/spi/package-info.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *******************************************************************************
- * Copyright (c) 2016 IBM Corp. and others
- *
- * Licensed 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.
- *
- *******************************************************************************/
-
-/**
- * <p>This package contains classes which are used to extens the standard functionality in a portable way.
- * <p>A user can provide own {@link org.eclipse.microprofile.config.spi.ConfigSource ConfigSources} and
- * {@link org.eclipse.microprofile.config.spi.Converter Converters} to extend the information available in the Config.
- *
- * <p>The package also contains the class {@link org.eclipse.microprofile.config.spi.ConfigProviderResolver}
- * which is used to pick up the actual implementation.
- *
- * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
- * @version 1.0
- */
-package org.eclipse.microprofile.config.spi;