tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anat...@apache.org
Subject incubator-tamaya git commit: TAMAYA-134: First batch of fixes done by Philipp Ottlinger.
Date Fri, 15 Jan 2016 07:44:09 GMT
Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 225aabc46 -> 49d787d8f


TAMAYA-134: First batch of fixes done by Philipp Ottlinger.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/49d787d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/49d787d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/49d787d8

Branch: refs/heads/master
Commit: 49d787d8f8086ff077579c63ff57364d01362b53
Parents: 225aabc
Author: anatole <anatole@apache.org>
Authored: Fri Jan 15 08:44:03 2016 +0100
Committer: anatole <anatole@apache.org>
Committed: Fri Jan 15 08:44:03 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/tamaya/Configuration.java   | 11 +++++++----
 .../java/org/apache/tamaya/spi/ConfigurationContext.java |  5 ++++-
 .../apache/tamaya/spi/ConfigurationContextBuilder.java   |  5 ++++-
 .../java/org/apache/tamaya/spi/ConversionContext.java    |  1 +
 .../java/org/apache/tamaya/spi/PropertyConverter.java    | 10 +++++++---
 .../main/java/org/apache/tamaya/spi/ServiceContext.java  |  1 +
 .../org/apache/tamaya/spi/ServiceContextManager.java     |  3 ++-
 modules/json/pom.xml                                     |  4 ++--
 8 files changed, 28 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/49d787d8/code/api/src/main/java/org/apache/tamaya/Configuration.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/Configuration.java b/code/api/src/main/java/org/apache/tamaya/Configuration.java
index 1034465..c4a373f 100644
--- a/code/api/src/main/java/org/apache/tamaya/Configuration.java
+++ b/code/api/src/main/java/org/apache/tamaya/Configuration.java
@@ -67,6 +67,7 @@ public interface Configuration {
      * org.apache.tamaya.spi.PropertyConverter} to be available that is capable current providing
type T
      * fromMap the given String keys.
      *
+     * @param <T> the type of the class modeled by the type parameter
      * @param key          the property's absolute, or relative path, e.g. @code
      *                     a/b/c/d.myProperty}.
      * @param type         The target type required, not null.
@@ -99,7 +100,7 @@ public interface Configuration {
      * @param key          the property's absolute, or relative path, e.g. @code
      *                     a/b/c/d.myProperty}.
      * @param type         The target type required, not null.
-     * @return the property value, never null..
+     * @return the property value, never null.
      * @throws ConfigException if the keys could not be converted to the required target
type.
      */
     <T> T get(String key, TypeLiteral<T> type);
@@ -114,16 +115,17 @@ public interface Configuration {
      *                     {@code a/b/c/d.myProperty}.
      * @param type         The target type required, not null.
      * @param defaultValue default value to be used, if no value is present.
-     * @return the property value, never null..
+     * @return the property value, never null.
      * @throws ConfigException if the keys could not be converted to the required target
type.
      */
     <T> T getOrDefault(String key, TypeLiteral<T> type, T defaultValue);
 
     /**
-     * Access all current known Configuration properties as a full {@code Map<String,String>}.
+     * Access all currently known configuration properties as a full {@code Map<String,String>}.
      * Be aware that entries from non scannable parts of the registered {@link org.apache.tamaya.spi.PropertySource}
      * instances may not be contained in the result, but nevertheless be accessible calling
one of the
      * {@code get(...)} methods.
+     * @return all currently known configuration properties.
      */
     Map<String,String> getProperties();
 
@@ -139,8 +141,9 @@ public interface Configuration {
     /**
      * Query a configuration.
      *
+     * @param <T> the type of the configuration.
      * @param query the query, never {@code null}.
-     * @return the result returned by the {@code query}
+     * @return the result returned by the {@code query}.
      */
     <T> T query(ConfigQuery<T> query);
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/49d787d8/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java b/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java
index f0354af..a8416a9 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContext.java
@@ -58,6 +58,7 @@ public interface ConfigurationContext {
      * This method can be used for programmatically adding {@link PropertyConverter}s.
      * It is not needed for normal 'usage' by end users, but only for Extension Developers!
      *
+     * @param <T> the type of the type literal
      * @param typeToConvert the type which the converter is for
      * @param propertyConverter the PropertyConverters to add for this type
      */
@@ -129,7 +130,9 @@ public interface ConfigurationContext {
      * No more converters are called after a converter has successfully converted the input
into
      * the required target type.
      * </p>
-     *
+     * 
+     * @param <T> the type of the type literal
+     * @param type type of the desired converter
      * @return a sorted list of registered PropertySources per type.
      */
     <T> List<PropertyConverter<T>> getPropertyConverters(TypeLiteral<T>
type);

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/49d787d8/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
b/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
index 1490628..6416959 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/ConfigurationContextBuilder.java
@@ -34,6 +34,7 @@ import java.util.Collection;
  * After all changes are applied to a builder a new {@link ConfigurationContext} instance
can
  * be created and can be applied by calling
  * {@link org.apache.tamaya.ConfigurationProvider#setConfigurationContext(org.apache.tamaya.spi.ConfigurationContext)}.
+ * 
  */
 
 /* @todo This is some Javadoc which is outdated. I am not sure if I can deleted it. The author
@@ -127,7 +128,8 @@ public interface ConfigurationContextBuilder {
      * This method can be used for programmatically adding {@link PropertyConverter}s.
      * It is not needed for normal 'usage' by end users, but only for Extension Developers!
      *
-     * @param typeToConvert     the type which the converter is for
+     * @param <T> the type of the type literal
+     * @param typeToConvert     the type for which the converter is for
      * @param propertyConverter the PropertyConverters to add for this type
      * @return this builder, for chaining, never null.
      */
@@ -165,6 +167,7 @@ public interface ConfigurationContextBuilder {
 
     /**
      * Builds a {@link ConfigurationContext} based on the data set.
+     * @return final context with the current builder's properties.
      */
     ConfigurationContext build();
 

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/49d787d8/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java b/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java
index 73727dd..14e683f 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/ConversionContext.java
@@ -160,6 +160,7 @@ public class ConversionContext {
          * Creates a new Builder instance.
          * @param configuration the configuration, not null.
          * @param key the requested key, may be null.
+         * @param targetType the target type
          */
         public Builder(Configuration configuration, String key, TypeLiteral<?> targetType){
             this.key = key;

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/49d787d8/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java b/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java
index 02ca904..ef6e2ac 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/PropertyConverter.java
@@ -22,16 +22,20 @@ package org.apache.tamaya.spi;
 /**
  * Interface for an property that converts a configured String into something else.
  * This is used for implementing type conversion from a property (String) to a certain target
- * type. Hereby the target type can be multivalued (eg collections) or complex if needed.
+ * type. Hereby the target type can be multivalued (e.g. collections) or complex if needed.
+ * 
+ * @param <T> the type of the type literal
  */
 public interface PropertyConverter<T>{
 
     /**
-     * Convert the given configuration keys from it' String representation into the required
target type.
+     * Convert the given configuration keys from its String representation into the required
target type.
      * The context instance passed also allows to add a list of supported formats, which
is very handy in case a
      * value could not be converted. This list of supported formats can then shown to the
user to give some hints
      * how a value could be configured.
-     * @param context the  {@link ConversionContext}, containing the String value and the
requested configuration key.
+     * 
+     * @param value configuration key that needs to be converted
+     * @param context the {@link ConversionContext}, containing the String value and the
requested configuration key.
      * @return converted keys
      * @see ConversionContext#addSupportedFormats(Class, String...)
      */

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/49d787d8/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java b/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
index 2fba4c4..c66b87b 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/ServiceContext.java
@@ -37,6 +37,7 @@ public interface ServiceContext {
      * If multiple implementations for the very serviceType exist then
      * the one with the highest {@link javax.annotation.Priority} will be used.
      *
+     * @param <T> the type of the service type.
      * @param serviceType the service type.
      * @return The instance to be used, or {@code null}
      * @throws org.apache.tamaya.ConfigException if there are multiple service implementations
with the maximum priority.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/49d787d8/code/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java
----------------------------------------------------------------------
diff --git a/code/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java b/code/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java
index 259493c..e325365 100644
--- a/code/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java
+++ b/code/api/src/main/java/org/apache/tamaya/spi/ServiceContextManager.java
@@ -86,6 +86,7 @@ public final class ServiceContextManager {
      * Replace the current {@link ServiceContext} in use.
      *
      * @param serviceContextProvider the new {@link ServiceContext}, not null.
+     * @return the currently used context after setting it.
      */
     public static ServiceContext set(ServiceContext serviceContextProvider) {
         ServiceContext currentContext = ServiceContextManager.serviceContextProviderDelegate;
@@ -122,4 +123,4 @@ public final class ServiceContextManager {
         return serviceContextProviderDelegate;
     }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/49d787d8/modules/json/pom.xml
----------------------------------------------------------------------
diff --git a/modules/json/pom.xml b/modules/json/pom.xml
index 3ffff57..18ca1f9 100644
--- a/modules/json/pom.xml
+++ b/modules/json/pom.xml
@@ -21,11 +21,11 @@ under the License.
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <artifactId>tamaya-extensions</artifactId>
         <groupId>org.apache.tamaya.ext</groupId>
+        <artifactId>tamaya-extensions</artifactId>
         <version>0.2-incubating-SNAPSHOT</version>
+        <relativePath>..</relativePath>
     </parent>
-
     <artifactId>tamaya-json</artifactId>
     <name>Apache Tamaya JSON Support</name>
     <packaging>bundle</packaging>


Mime
View raw message