tamaya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ple...@apache.org
Subject [2/2] incubator-tamaya git commit: TAMAYA-60 JavaDoc...
Date Tue, 10 Mar 2015 21:44:04 GMT
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 <plexus@apache.org>
Authored: Tue Mar 10 22:43:39 2015 +0100
Committer: Oliver B. Fischer <plexus@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() {


Mime
View raw message