You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by pl...@apache.org on 2015/03/10 22:44:03 UTC

[1/2] incubator-tamaya git commit: TAMAYA-60 Worked on the JavaDoc...

Repository: incubator-tamaya
Updated Branches:
  refs/heads/master 0d83a6fe8 -> afdd6c8c0


TAMAYA-60 Worked on the JavaDoc...


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

Branch: refs/heads/master
Commit: 72e119e72f1ee230c33517c5467050fd71a14604
Parents: 0d83a6f
Author: Oliver B. Fischer <pl...@apache.org>
Authored: Mon Mar 9 07:53:57 2015 +0100
Committer: Oliver B. Fischer <pl...@apache.org>
Committed: Mon Mar 9 07:53:57 2015 +0100

----------------------------------------------------------------------
 .../modules/builder/ConfigurationBuilder.java   | 51 ++++++++++++++++++++
 1 file changed, 51 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/72e119e7/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java b/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java
index 01180d0..cd55a27 100644
--- a/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java
+++ b/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java
@@ -121,6 +121,9 @@ public class ConfigurationBuilder {
         return this;
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder addPropertySource(URL url) {
         try {
             ConfigurationData data = getConfigurationDataFromURL(url);
@@ -179,6 +182,9 @@ public class ConfigurationBuilder {
         return this;
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder addPropertySource(String url, String... urls) {
         Stream.of(Collections.singletonList(url), Arrays.asList(urls))
               .flatMap(Collection::stream)
@@ -190,6 +196,9 @@ public class ConfigurationBuilder {
         return this;
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder addPropertySources(PropertySource... sources){
         checkBuilderState();
 
@@ -203,11 +212,17 @@ public class ConfigurationBuilder {
         }
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder addPropertySourceProviders(PropertySourceProvider... propertySourceProviders){
         contextBuilder.addPropertySourceProviders(propertySourceProviders);
         return this;
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder addPropertyFilters(PropertyFilter... propertyFilters){
         Objects.requireNonNull(propertyFilters);
 
@@ -215,11 +230,17 @@ public class ConfigurationBuilder {
         return this;
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder setPropertyValueCombinationPolicy(PropertyValueCombinationPolicy propertyValueCombinationPolicy){
         contextBuilder.setPropertyValueCombinationPolicy(propertyValueCombinationPolicy);
         return this;
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public <T> ConfigurationBuilder addPropertyConverter(Class<T> type, PropertyConverter<T> propertyConverter) {
         Objects.requireNonNull(type);
         Objects.requireNonNull(propertyConverter);
@@ -227,6 +248,9 @@ public class ConfigurationBuilder {
         return addPropertyConverter(TypeLiteral.of(type), propertyConverter);
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public <T> ConfigurationBuilder addPropertyConverter(TypeLiteral<T> type, PropertyConverter<T> propertyConverter){
         Objects.requireNonNull(type);
         Objects.requireNonNull(propertyConverter);
@@ -244,6 +268,8 @@ public class ConfigurationBuilder {
      * Enables the loading of all {@link org.apache.tamaya.PropertyConverter}
      * service providers.
      *
+     * @return the builder instance currently used
+     *
      * @see org.apache.tamaya.PropertyConverter
      * @see #disableProvidedPropertyConverters()
      */
@@ -259,6 +285,8 @@ public class ConfigurationBuilder {
      * Disables the loading of all {@link org.apache.tamaya.PropertyConverter}
      * service providers.
      *
+     * @return the builder instance currently used
+     *
      * @see org.apache.tamaya.PropertyConverter
      * @see #enableProvidedPropertyConverters()
      */
@@ -271,6 +299,9 @@ public class ConfigurationBuilder {
     }
 
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder enableProvidedPropertySources() {
         checkBuilderState();
 
@@ -289,6 +320,9 @@ public class ConfigurationBuilder {
     }
 
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder enabledProvidedPropertyFilters() {
         checkBuilderState();
 
@@ -297,6 +331,9 @@ public class ConfigurationBuilder {
         return this;
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder disableProvidedPropertyFilters() {
         checkBuilderState();
 
@@ -305,6 +342,9 @@ public class ConfigurationBuilder {
         return this;
     }
 
+    /**
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder disableProvidedPropertySources() {
         checkBuilderState();
 
@@ -313,6 +353,11 @@ public class ConfigurationBuilder {
         return this;
     }
 
+    /**
+     *
+     *
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder enableProvidedPropertySourceProviders() {
         checkBuilderState();
 
@@ -321,6 +366,12 @@ public class ConfigurationBuilder {
         return this;
     }
 
+    /**
+     * Disables the automatic loading of {@link org.apache.tamaya.spi.PropertySourceProvider
+     * property source providers} provided via the SPI API.
+     *
+     * @return the builder instance currently used
+     */
     public ConfigurationBuilder disableProvidedPropertySourceProviders() {
         checkBuilderState();
 


[2/2] incubator-tamaya git commit: TAMAYA-60 JavaDoc...

Posted by pl...@apache.org.
TAMAYA-60 JavaDoc...


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

Branch: refs/heads/master
Commit: afdd6c8c06651e611a9364c4162f84509246a0ba
Parents: 72e119e
Author: Oliver B. Fischer <pl...@apache.org>
Authored: Tue Mar 10 22:43:39 2015 +0100
Committer: Oliver B. Fischer <pl...@apache.org>
Committed: Tue Mar 10 22:43:39 2015 +0100

----------------------------------------------------------------------
 .../modules/builder/ConfigurationBuilder.java   | 63 ++++++++++++++++++--
 1 file changed, 57 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/afdd6c8c/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java b/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java
index cd55a27..173117a 100644
--- a/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java
+++ b/modules/builder/src/main/java/org/apache/tamaya/modules/builder/ConfigurationBuilder.java
@@ -157,16 +157,16 @@ public class ConfigurationBuilder {
      * <p>If a specific format is supported depends on the available
      * {@link org.apache.tamaya.format.ConfigurationFormat} implementations.</p>
      *
-     *<pre>
-     * URL first = new URL("file:/etc/service/config.json");
-     * URL second = new URL(file:/etc/defaults/values.properties");
+     *<pre>{@code URL first = new URL("file:/etc/service/config.json");
+     * URL second = new URL("file:/etc/defaults/values.properties");
      *
-     * builder.addPropertySources(first, second);
+     * builder.addPropertySources(first, second);}
      *</pre>
      *
      * @param url first resource with properties for the the configuration to be build.
      * @param urls list additional of resources with properties for the configuration to be
      *             build.
+     *
      * @return the builder instance currently used
      *
      * @see org.apache.tamaya.format.ConfigurationFormat
@@ -182,8 +182,26 @@ public class ConfigurationBuilder {
         return this;
     }
 
+
     /**
+     * Adds one or more resources with properties in an arbitrary format
+     * to the configuration to be build.
+     *
+     * <p>If a specific format is supported depends on the available
+     * {@link org.apache.tamaya.format.ConfigurationFormat} implementations.</p>
+     *
+     *<pre>{@code builder.addPropertySources("file:/etc/service/config.json",
+     *                            "file:/etc/defaults/values.properties");}
+     *</pre>
+     *
+     * @param url first resource with properties for the the configuration to be build.
+     * @param urls list additional of resources with properties for the configuration to be
+     *             build.
+     *
      * @return the builder instance currently used
+     *
+     * @see org.apache.tamaya.format.ConfigurationFormat
+     * @see org.apache.tamaya.format.ConfigurationFormats#getFormats()
      */
     public ConfigurationBuilder addPropertySource(String url, String... urls) {
         Stream.of(Collections.singletonList(url), Arrays.asList(urls))
@@ -197,7 +215,20 @@ public class ConfigurationBuilder {
     }
 
     /**
+     * Adds one or more property source instances to the configuration to be build.
+     *
+     *<pre>{@code PropertySource first = new CustomPropertySource();
+     * PropertySource second = new YetAnotherPropertySource();
+     *
+     * builder.addPropertySources(first, second)};
+     *</pre>
+     *
+     * @param sources list of property source instances with properties for the
+     *                configuration to be build.
+     *
      * @return the builder instance currently used
+     *
+     * @see org.apache.tamaya.spi.PropertySource
      */
     public ConfigurationBuilder addPropertySources(PropertySource... sources){
         checkBuilderState();
@@ -213,10 +244,22 @@ public class ConfigurationBuilder {
     }
 
     /**
+     * Adds one or more property source provider instances to the configuration to be build.
+     *
+     * <pre>{@code PropertySourceProvider jc = new JavaConfigurationProvider();
+     *
+     * builder.addPropertySources(jc)};
+     * </pre>
+     *
+     * @param providers list of property source provider instances each providing a set
+     *                  of property source instances for the configuration to be build.
+     *
      * @return the builder instance currently used
+     *
+     * @see org.apache.tamaya.spi.PropertySourceProvider
      */
-    public ConfigurationBuilder addPropertySourceProviders(PropertySourceProvider... propertySourceProviders){
-        contextBuilder.addPropertySourceProviders(propertySourceProviders);
+    public ConfigurationBuilder addPropertySourceProviders(PropertySourceProvider... providers){
+        contextBuilder.addPropertySourceProviders(providers);
         return this;
     }
 
@@ -332,6 +375,14 @@ public class ConfigurationBuilder {
     }
 
     /**
+     * Disables the loading of all {@link org.apache.tamaya.spi.PropertyFilter}
+     * service providers.
+     *
+     * @return the builder instance currently used
+     *
+     * @see org.apache.tamaya.spi.PropertyFilter
+     * @see #enabledProvidedPropertyFilters()
+     *
      * @return the builder instance currently used
      */
     public ConfigurationBuilder disableProvidedPropertyFilters() {