You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2019/05/10 11:35:59 UTC

[sling-org-apache-sling-caconfig-api] branch master updated (2585dbb -> ec4daac)

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git.


    from 2585dbb  SLING-8275 clarify documentation of ConfigurationBuilder.asValueMap() method
     new 40b7cc6  [SLING-8272] Check if Caconfig Node Exists in JCR
     new e19681f  [SLING-8272] Fixed PR Comments
     new 3d29393  [SLING-8272] Adjusted Javadoc- PR Comment
     new 57117b0  [SLING-8272] Fixed PR Comments
     new 9eb5bda  [SLING-8272] Updated comments
     new 5e94d1e  [SLING-8272] Added additional method - PR Comments
     new 6b2258f  [SLING-8272] Fixed sonar issue
     new c0b3cb0  [SLING-8272] PR Comments
     new ec4daac  Merge pull request #2 from ompandeyy/SLING-8272_caconfig-nod-existence-check

The 31 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../sling/caconfig/ConfigurationBuilder.java       | 24 +++++++++++++++++++++-
 .../org/apache/sling/caconfig/package-info.java    |  2 +-
 2 files changed, 24 insertions(+), 2 deletions(-)


[sling-org-apache-sling-caconfig-api] 10/31: add documentation link

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit fd5c4b1c6b5f9f67da4e51fab39cf7337283fbff
Author: sseifert <ss...@pro-vision.de>
AuthorDate: Mon Nov 6 16:48:46 2017 +0100

    add documentation link
---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index dc85cf8..8d1fde2 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
 # Apache Sling Context-Aware Configuration API
 
 This module is part of the [Apache Sling](https://sling.apache.org) project.
+
+Documentation: [Apache Sling Context-Aware Configuration](https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration.html)


[sling-org-apache-sling-caconfig-api] 14/31: SLING-7798 Switch from JSR-305 annotations to JetBrains Nullable/NotNull annotations

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 2895aee06f036e7934d8c53af40eff4f364c66f6
Author: sseifert <ss...@pro-vision.de>
AuthorDate: Mon Aug 13 11:08:41 2018 +0200

    SLING-7798 Switch from JSR-305 annotations to JetBrains Nullable/NotNull annotations
---
 pom.xml                                                 |  5 +++--
 .../org/apache/sling/caconfig/ConfigurationBuilder.java | 17 ++++++++---------
 .../apache/sling/caconfig/ConfigurationResolver.java    |  5 ++---
 .../java/org/apache/sling/caconfig/package-info.java    |  2 +-
 .../resource/ConfigurationResourceResolver.java         | 13 ++++++-------
 .../apache/sling/caconfig/resource/package-info.java    |  2 +-
 6 files changed, 21 insertions(+), 23 deletions(-)

diff --git a/pom.xml b/pom.xml
index ea4ca9c..64a3898 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,8 +51,9 @@
 
     <dependencies>
         <dependency>
-            <groupId>com.google.code.findbugs</groupId>
-            <artifactId>jsr305</artifactId>
+            <groupId>org.jetbrains</groupId>
+            <artifactId>annotations</artifactId>
+            <version>16.0.2</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index be06432..b93ed82 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -20,9 +20,8 @@ package org.apache.sling.caconfig;
 
 import java.util.Collection;
 
-import javax.annotation.Nonnull;
-
 import org.apache.sling.api.resource.ValueMap;
+import org.jetbrains.annotations.NotNull;
 import org.osgi.annotation.versioning.ProviderType;
 
 /**
@@ -37,7 +36,7 @@ public interface ConfigurationBuilder {
      * @param configName Relative path
      * @return Configuration builder
      */
-    @Nonnull ConfigurationBuilder name(@Nonnull String configName);
+    @NotNull ConfigurationBuilder name(@NotNull String configName);
 
     /**
      * Get configuration as singleton resource and its properties mapped to the given annotation class.
@@ -47,7 +46,7 @@ public interface ConfigurationBuilder {
      * @param <T> Annotation class type
      * @return Configuration object. Contains only the default values if content resource or configuration cannot be found.
      */
-    @Nonnull <T> T as(@Nonnull Class<T> clazz);
+    @NotNull <T> T as(@NotNull Class<T> clazz);
 
     /**
      * Get collection of configuration resources with their properties mapped to the given annotation class.
@@ -57,19 +56,19 @@ public interface ConfigurationBuilder {
      * @param <T> Annotation class type
      * @return Collection of configuration objects. Is empty if content resource or configuration cannot be found.
      */
-    @Nonnull <T> Collection<T> asCollection(@Nonnull Class<T> clazz);
+    @NotNull <T> Collection<T> asCollection(@NotNull Class<T> clazz);
 
     /**
      * Get configuration as singleton resource and return its properties as value map.
      * @return Value map. Map is empty if content resource or configuration cannot be found.
      */
-    @Nonnull ValueMap asValueMap();
+    @NotNull ValueMap asValueMap();
 
     /**
      * Get collection of configuration resources with their properties mapped to the given annotation class.
      * @return Collection of value map. Is empty if content resource or configuration cannot be found.
      */
-    @Nonnull Collection<ValueMap> asValueMapCollection();
+    @NotNull Collection<ValueMap> asValueMapCollection();
 
     /**
      * Get configuration as singleton configuration resource and adapt it to the given class.
@@ -77,7 +76,7 @@ public interface ConfigurationBuilder {
      * @param <T> Annotation class type
      * @return Object instance or null if content resource or configuration cannot be found or if the adaption was not possible.
      */
-    <T> T asAdaptable(@Nonnull Class<T> clazz);
+    <T> T asAdaptable(@NotNull Class<T> clazz);
 
     /**
      * Get collection of configuration resources and adapt them to the given class.
@@ -85,6 +84,6 @@ public interface ConfigurationBuilder {
      * @param <T> Annotation class type
      * @return Collection of object instances. Is empty if content resource or configuration cannot be found or if the adaption was not possible.
      */
-    @Nonnull <T> Collection<T> asAdaptableCollection(@Nonnull Class<T> clazz);
+    @NotNull <T> Collection<T> asAdaptableCollection(@NotNull Class<T> clazz);
 
 }
diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java b/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java
index 885daf4..6ffd444 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java
@@ -18,9 +18,8 @@
  */
 package org.apache.sling.caconfig;
 
-import javax.annotation.Nonnull;
-
 import org.apache.sling.api.resource.Resource;
+import org.jetbrains.annotations.NotNull;
 import org.osgi.annotation.versioning.ProviderType;
 
 /**
@@ -41,6 +40,6 @@ public interface ConfigurationResolver {
      * @param resource Context resource
      * @return Configuration builder
      */
-    @Nonnull ConfigurationBuilder get(@Nonnull Resource resource);
+    @NotNull ConfigurationBuilder get(@NotNull Resource resource);
 
 }
diff --git a/src/main/java/org/apache/sling/caconfig/package-info.java b/src/main/java/org/apache/sling/caconfig/package-info.java
index 5a7580a..92feabe 100644
--- a/src/main/java/org/apache/sling/caconfig/package-info.java
+++ b/src/main/java/org/apache/sling/caconfig/package-info.java
@@ -19,5 +19,5 @@
 /**
  * API for accessing context-aware configuration.
  */
-@org.osgi.annotation.versioning.Version("1.0.0")
+@org.osgi.annotation.versioning.Version("1.0.1")
 package org.apache.sling.caconfig;
diff --git a/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java b/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java
index 12f13c3..65b7b14 100644
--- a/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java
+++ b/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java
@@ -20,10 +20,9 @@ package org.apache.sling.caconfig.resource;
 
 import java.util.Collection;
 
-import javax.annotation.CheckForNull;
-import javax.annotation.Nonnull;
-
 import org.apache.sling.api.resource.Resource;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 import org.osgi.annotation.versioning.ProviderType;
 
 /**
@@ -45,7 +44,7 @@ public interface ConfigurationResourceResolver {
      * @param configName Configuration name or relative path.
      * @return Configuration resource or {@code null}.
      */
-    @CheckForNull Resource getResource(@Nonnull Resource resource, @Nonnull String bucketName, @Nonnull String configName);
+    @Nullable Resource getResource(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName);
 
     /**
      * Get a collection of context-aware configuration resources defined by the given configuration name.
@@ -56,14 +55,14 @@ public interface ConfigurationResourceResolver {
      * @param configName Configuration name or relative path.
      * @return Collection of configuration resources, the collection might be empty.
      */
-    @Nonnull Collection<Resource> getResourceCollection(@Nonnull Resource resource, @Nonnull String bucketName, @Nonnull String configName);
+    @NotNull Collection<Resource> getResourceCollection(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName);
 
     /**
      * Get the inner-most context path (deepest path) returned by {@link #getAllContextPaths(Resource)}.
      * @param resource Context resource to fetch configuration for
      * @return Context path or null
      */
-    String getContextPath(@Nonnull Resource resource);
+    String getContextPath(@NotNull Resource resource);
 
     /**
      * Get all context paths for which context-aware configurations could be defined.
@@ -72,6 +71,6 @@ public interface ConfigurationResourceResolver {
      * @param resource Context resource to fetch configuration for
      * @return List of context paths
      */
-    @Nonnull Collection<String> getAllContextPaths(@Nonnull Resource resource);
+    @NotNull Collection<String> getAllContextPaths(@NotNull Resource resource);
 
 }
diff --git a/src/main/java/org/apache/sling/caconfig/resource/package-info.java b/src/main/java/org/apache/sling/caconfig/resource/package-info.java
index ef04a94..6577b50 100644
--- a/src/main/java/org/apache/sling/caconfig/resource/package-info.java
+++ b/src/main/java/org/apache/sling/caconfig/resource/package-info.java
@@ -20,5 +20,5 @@
  * API for accessing context-aware configuration resources.
  * This is a low-level API.
  */
-@org.osgi.annotation.versioning.Version("1.0.0")
+@org.osgi.annotation.versioning.Version("1.0.1")
 package org.apache.sling.caconfig.resource;


[sling-org-apache-sling-caconfig-api] 12/31: Updating badges for org-apache-sling-caconfig-api

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit bec592d1795c7d28f76ef90231948daa323d3e06
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Jun 8 11:37:05 2018 -0400

    Updating badges for org-apache-sling-caconfig-api
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 2ff52f7..0627d85 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 [<img src="http://sling.apache.org/res/logos/sling.png"/>](http://sling.apache.org)
 
- [![Build Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-caconfig-api-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-caconfig-api-1.8) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.caconfig.api/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.caconfig.api%22) [![License](https://img.shields.io/badge/License-Apache [...]
+ [![Build Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-caconfig-api-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-caconfig-api-1.8) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.caconfig.api/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.caconfig.api%22) [![License](https://img.shields.io/badge/License-Apache [...]
 
 # Apache Sling Context-Aware Configuration API
 


[sling-org-apache-sling-caconfig-api] 13/31: Updating badges for org-apache-sling-caconfig-api

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit c66d3598af45271bec63a5098d5a3172db328808
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Jun 8 12:21:01 2018 -0400

    Updating badges for org-apache-sling-caconfig-api
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 0627d85..de5f7dc 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 [<img src="http://sling.apache.org/res/logos/sling.png"/>](http://sling.apache.org)
 
- [![Build Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-caconfig-api-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-caconfig-api-1.8) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.caconfig.api/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.caconfig.api%22) [![License](https://img.shields.io/badge/License-Apache [...]
+ [![Build Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-caconfig-api-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-caconfig-api-1.8) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.caconfig.api/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.caconfig.api%22) [![JavaDocs](https://www.javadoc.io/badge/org.apache.sl [...]
 
 # Apache Sling Context-Aware Configuration API
 


[sling-org-apache-sling-caconfig-api] 30/31: [SLING-8272] PR Comments

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit c0b3cb002b449ea1961a150e62dfc17044cf8747
Author: ompandey <om...@gmail.com>
AuthorDate: Fri May 10 13:13:25 2019 +0200

    [SLING-8272] PR Comments
---
 src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index f5399d1..063fe9c 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -94,7 +94,7 @@ public interface ConfigurationBuilder {
      * the configuration definition.
      * @param clazz Class that can be adapted from a {@link org.apache.sling.api.resource.Resource}
      * @param <T> Annotation class type
-     * @return True/False based on configuration resource node existence in JCR.
+     * @return True/False based on configuration resource node existence.
      */
     <T> boolean has(@NotNull Class<T> clazz);
 
@@ -105,7 +105,7 @@ public interface ConfigurationBuilder {
      * which by default are {@code /conf/global}, {@code /apps/config} and {@code /libs/config}.This method does not consider the default values provided in
      * the configuration definition.
      * @param configName Name of the configuration
-     * @return True/False based on configuration resource node existence in JCR.
+     * @return True/False based on configuration resource node existence.
      */
     boolean has(String configName);
 }


[sling-org-apache-sling-caconfig-api] 21/31: Updating badges for org-apache-sling-caconfig-api

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 402f33dd79ea4ccd07f761cd61f0ee8b1e312258
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Jan 31 13:07:54 2019 +0100

    Updating badges for org-apache-sling-caconfig-api
---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index de5f7dc..9aee193 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-[<img src="http://sling.apache.org/res/logos/sling.png"/>](http://sling.apache.org)
+[<img src="https://sling.apache.org/res/logos/sling.png"/>](https://sling.apache.org)
 
- [![Build Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-caconfig-api-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-caconfig-api-1.8) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.caconfig.api/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.caconfig.api%22) [![JavaDocs](https://www.javadoc.io/badge/org.apache.sl [...]
+ [![Build Status](https://builds.apache.org/buildStatus/icon?job=Sling/sling-org-apache-sling-caconfig-api/master)](https://builds.apache.org/job/Sling/job/sling-org-apache-sling-caconfig-api/job/master) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.caconfig.api/badge.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.caconfig.api%22) [![JavaDocs](https://www.javadoc.io/badge/org.ap [...]
 
 # Apache Sling Context-Aware Configuration API
 


[sling-org-apache-sling-caconfig-api] 20/31: SLING-7245 - Validate pull requests using Jenkins

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 942095dbe7794c064863ff08ada608542e7cac12
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Jan 30 09:26:21 2019 +0100

    SLING-7245 - Validate pull requests using Jenkins
---
 Jenkinsfile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..f582519
--- /dev/null
+++ b/Jenkinsfile
@@ -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 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.
+ */
+
+slingOsgiBundleBuild()


[sling-org-apache-sling-caconfig-api] 24/31: [SLING-8272] Fixed PR Comments

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit e19681fc3698e067417668ef5d6ef36b328e2c8e
Author: ompandey <om...@gmail.com>
AuthorDate: Sat Mar 9 12:01:38 2019 +0100

    [SLING-8272] Fixed PR Comments
---
 src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index 2ca00e7..84d7843 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -87,7 +87,12 @@ public interface ConfigurationBuilder {
     @NotNull <T> Collection<T> asAdaptableCollection(@NotNull Class<T> clazz);
 
     /**
-     * Check if the configuration node is existing
+     * Check if the configuration node is existing in the JCR. This method checks for the configuration existence based on {@code configName} defined in the
+     * configuration definition. It checks if the configuration is available for the context path in the current resource hierarchy and if not found, also
+     * checks in the global fall-back paths configured via {@link org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy}
+     * which by default are {@code /conf/global}, {@code /apps/config} and {@code /libs/config}.This method does not consider the default values provided in
+     * the configuration definition.
+     * Configuration name is optional - if not given via {@link #name(String)} method, it is derived from the annotation interface class name.
      * @param clazz Class that can be adapted from a {@link org.apache.sling.api.resource.Resource}
      * @param <T> Annotation class type
      * @return True/False based on configuration resource node existence in JCR.


[sling-org-apache-sling-caconfig-api] 11/31: Updating badges for org-apache-sling-caconfig-api

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 752eaabaf64f12e9755216fb67b04dcc31bf51a9
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Jun 8 09:30:25 2018 -0400

    Updating badges for org-apache-sling-caconfig-api
---
 README.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/README.md b/README.md
index 8d1fde2..2ff52f7 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,7 @@
+[<img src="http://sling.apache.org/res/logos/sling.png"/>](http://sling.apache.org)
+
+ [![Build Status](https://builds.apache.org/buildStatus/icon?job=sling-org-apache-sling-caconfig-api-1.8)](https://builds.apache.org/view/S-Z/view/Sling/job/sling-org-apache-sling-caconfig-api-1.8) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.sling/org.apache.sling.caconfig.api/badge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.sling%22%20a%3A%22org.apache.sling.caconfig.api%22) [![License](https://img.shields.io/badge/License-Apache [...]
+
 # Apache Sling Context-Aware Configuration API
 
 This module is part of the [Apache Sling](https://sling.apache.org) project.


[sling-org-apache-sling-caconfig-api] 01/31: SLING-6427 Move Sling Context-Aware Config out of contrib - move in svn - update all SCM URLs - update jenkins build jobs

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 2c0f4039f27391c7c91c441627780c7b152e124b
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Dec 22 09:52:16 2016 +0000

    SLING-6427 Move Sling Context-Aware Config out of contrib
    - move in svn
    - update all SCM URLs
    - update jenkins build jobs
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1775601 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt                                         | 25 ++++++
 pom.xml                                            | 70 +++++++++++++++++
 .../sling/caconfig/ConfigurationBuilder.java       | 90 ++++++++++++++++++++++
 .../caconfig/ConfigurationResolveException.java    | 38 +++++++++
 .../sling/caconfig/ConfigurationResolver.java      | 46 +++++++++++
 .../sling/caconfig/annotation/Configuration.java   | 58 ++++++++++++++
 .../apache/sling/caconfig/annotation/Property.java | 53 +++++++++++++
 .../sling/caconfig/annotation/package-info.java    | 23 ++++++
 .../org/apache/sling/caconfig/package-info.java    | 23 ++++++
 .../resource/ConfigurationResourceResolver.java    | 77 ++++++++++++++++++
 .../sling/caconfig/resource/package-info.java      | 24 ++++++
 11 files changed, 527 insertions(+)

diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..2cf6174
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,25 @@
+Apache Sling Context-Aware Configuration API
+
+
+Getting Started
+===============
+
+This component uses a Maven 3 (http://maven.apache.org/) build
+environment. It requires a Java 7 JDK (or higher) and Maven (http://maven.apache.org/)
+3.3.9 or later. We recommend to use the latest Maven version.
+
+If you have Maven 3 installed, you can compile and
+package the jar using the following command:
+
+    mvn package
+
+See the Maven 3 documentation for other build features.
+
+The latest source code for this component is available in the
+Subversion (http://subversion.tigris.org/) source repository of
+the Apache Software Foundation. If you have Subversion installed,
+you can checkout the latest source using the following command:
+
+    svn checkout https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/contextaware-config/api
+
+See the Subversion documentation for other source control features.
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..3e24abd
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>29</version>
+        <relativePath />
+    </parent>
+    
+    <artifactId>org.apache.sling.caconfig.api</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.1.1-SNAPSHOT</version>
+    <name>Apache Sling Context-Aware Configuration API</name>
+    <description>Apache Sling Context-Aware Configuration API</description>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/caconfig/api</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/caconfig/api</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/caconfig/api</url>
+    </scm>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>jsr305</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.api</artifactId>
+            <version>2.9.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
new file mode 100644
index 0000000..be06432
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -0,0 +1,90 @@
+/*
+ * 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.sling.caconfig;
+
+import java.util.Collection;
+
+import javax.annotation.Nonnull;
+
+import org.apache.sling.api.resource.ValueMap;
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * Defines how the configuration should be mapped and returned.
+ */
+@ProviderType
+public interface ConfigurationBuilder {
+
+    /**
+     * Define configuration name.
+     * Optional for the {@link #as(Class)} and {@link #asCollection(Class)} methods, mandatory for the others. 
+     * @param configName Relative path
+     * @return Configuration builder
+     */
+    @Nonnull ConfigurationBuilder name(@Nonnull String configName);
+
+    /**
+     * Get configuration as singleton resource and its properties mapped to the given annotation class.
+     * Configuration name is optional - if not given via {@link #name(String)} method it is derived
+     * from the annotation interface class name.
+     * @param clazz Annotation interface class
+     * @param <T> Annotation class type
+     * @return Configuration object. Contains only the default values if content resource or configuration cannot be found.
+     */
+    @Nonnull <T> T as(@Nonnull Class<T> clazz);
+
+    /**
+     * Get collection of configuration resources with their properties mapped to the given annotation class.
+     * Configuration name is optional - if not given via {@link #name(String)} method it is derived
+     * from the annotation interface class name.
+     * @param clazz Annotation interface class
+     * @param <T> Annotation class type
+     * @return Collection of configuration objects. Is empty if content resource or configuration cannot be found.
+     */
+    @Nonnull <T> Collection<T> asCollection(@Nonnull Class<T> clazz);
+
+    /**
+     * Get configuration as singleton resource and return its properties as value map.
+     * @return Value map. Map is empty if content resource or configuration cannot be found.
+     */
+    @Nonnull ValueMap asValueMap();
+
+    /**
+     * Get collection of configuration resources with their properties mapped to the given annotation class.
+     * @return Collection of value map. Is empty if content resource or configuration cannot be found.
+     */
+    @Nonnull Collection<ValueMap> asValueMapCollection();
+
+    /**
+     * Get configuration as singleton configuration resource and adapt it to the given class.
+     * @param clazz Class that can be adapted from a {@link org.apache.sling.api.resource.Resource}
+     * @param <T> Annotation class type
+     * @return Object instance or null if content resource or configuration cannot be found or if the adaption was not possible.
+     */
+    <T> T asAdaptable(@Nonnull Class<T> clazz);
+
+    /**
+     * Get collection of configuration resources and adapt them to the given class.
+     * @param clazz Class that can be adapted from a {@link org.apache.sling.api.resource.Resource}
+     * @param <T> Annotation class type
+     * @return Collection of object instances. Is empty if content resource or configuration cannot be found or if the adaption was not possible.
+     */
+    @Nonnull <T> Collection<T> asAdaptableCollection(@Nonnull Class<T> clazz);
+
+}
diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationResolveException.java b/src/main/java/org/apache/sling/caconfig/ConfigurationResolveException.java
new file mode 100644
index 0000000..ae4a650
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationResolveException.java
@@ -0,0 +1,38 @@
+/*
+ * 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.sling.caconfig;
+
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * Is thrown when configuration cannot be resolved.
+ */
+@ProviderType
+public final class ConfigurationResolveException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    public ConfigurationResolveException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public ConfigurationResolveException(String message) {
+        super(message);
+    }
+
+}
diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java b/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java
new file mode 100644
index 0000000..885daf4
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java
@@ -0,0 +1,46 @@
+/*
+ * 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.sling.caconfig;
+
+import javax.annotation.Nonnull;
+
+import org.apache.sling.api.resource.Resource;
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * Getting context-aware configurations for a given resource context.
+ * Context-specific configuration may be different for different parts of the resource
+ * hierarchy, and configuration parameter inheritance may take place.
+ *
+ * This service builds on top of the {@link org.apache.sling.caconfig.resource.ConfigurationResourceResolver}
+ * and uses that service to resolve configuration resources. These resources
+ * can then be converted into application specific configuration objects
+ * using the {@link ConfigurationBuilder}.
+ */
+@ProviderType
+public interface ConfigurationResolver {
+
+    /**
+     * Get configuration for given resource.
+     * @param resource Context resource
+     * @return Configuration builder
+     */
+    @Nonnull ConfigurationBuilder get(@Nonnull Resource resource);
+
+}
diff --git a/src/main/java/org/apache/sling/caconfig/annotation/Configuration.java b/src/main/java/org/apache/sling/caconfig/annotation/Configuration.java
new file mode 100644
index 0000000..c5aa8f8
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/annotation/Configuration.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sling.caconfig.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Marks an annotation class to be useable with Sling context-aware configuration. 
+ */
+@Target(ElementType.ANNOTATION_TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Configuration {
+
+    /**
+     * @return Allows to overwrite the configuration name. If not set the class name of the annotation is used.
+     */
+    String name() default "";
+    
+    /**
+     * @return Label for the resource (e.g. for configuration editor GUIs).
+     */
+    String label() default "";
+    
+    /**
+     * @return Description for the resource (e.g. for configuration editor GUIs).
+     */
+    String description() default "";
+    
+    /**
+     * @return Further properties e.g. for configuration editor GUIs.
+     */
+    String[] property() default {};
+    
+    /**
+     * @return Indicates that this definition should be used for configuration collections.
+     */
+    boolean collection() default false;
+
+}
diff --git a/src/main/java/org/apache/sling/caconfig/annotation/Property.java b/src/main/java/org/apache/sling/caconfig/annotation/Property.java
new file mode 100644
index 0000000..579c751
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/annotation/Property.java
@@ -0,0 +1,53 @@
+/*
+ * 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.sling.caconfig.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Adds further metadata for properties of context-aware configuration annotation classes.
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Property {
+
+    /**
+     * @return Label for the property (e.g. for configuration editor GUIs).
+     */
+    String label() default "";
+    
+    /**
+     * @return Description for the property (e.g. for configuration editor GUIs).
+     */
+    String description() default "";
+    
+    /**
+     * @return Further properties e.g. for configuration editor GUIs.
+     */
+    String[] property() default {};
+    
+    /**
+     * @return Number to control property order in configuration editor.
+     */
+    int order() default 0;
+    
+}
diff --git a/src/main/java/org/apache/sling/caconfig/annotation/package-info.java b/src/main/java/org/apache/sling/caconfig/annotation/package-info.java
new file mode 100644
index 0000000..d4ef2b2
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/annotation/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+/**
+ * Annotations for context-aware configurations.
+ */
+@org.osgi.annotation.versioning.Version("1.1.0")
+package org.apache.sling.caconfig.annotation;
diff --git a/src/main/java/org/apache/sling/caconfig/package-info.java b/src/main/java/org/apache/sling/caconfig/package-info.java
new file mode 100644
index 0000000..5a7580a
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+/**
+ * API for accessing context-aware configuration.
+ */
+@org.osgi.annotation.versioning.Version("1.0.0")
+package org.apache.sling.caconfig;
diff --git a/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java b/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java
new file mode 100644
index 0000000..12f13c3
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java
@@ -0,0 +1,77 @@
+/*
+ * 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.sling.caconfig.resource;
+
+import java.util.Collection;
+
+import javax.annotation.CheckForNull;
+import javax.annotation.Nonnull;
+
+import org.apache.sling.api.resource.Resource;
+import org.osgi.annotation.versioning.ProviderType;
+
+/**
+ * Getting context-aware configuration resources for a given resource context.
+ * This is a low-level interface for supporting advanced use cases. If you just want to fetch
+ * some configuration parameters {@link org.apache.sling.caconfig.ConfigurationResolver}
+ * is the right place.
+ */
+@ProviderType
+public interface ConfigurationResourceResolver {
+
+    /**
+     * Get a context-aware singleton configuration resource defined by the given configuration name.
+     *
+     * @param resource Context resource to fetch configuration for
+     * @param bucketName Configuration "bucket" name. Each high-level configuration resolver should store 
+     *     it's configuration data grouped in a child resource of the configuration resource. This is what
+     *     we call a "bucket", and the resource name is specified with this parameter.
+     * @param configName Configuration name or relative path.
+     * @return Configuration resource or {@code null}.
+     */
+    @CheckForNull Resource getResource(@Nonnull Resource resource, @Nonnull String bucketName, @Nonnull String configName);
+
+    /**
+     * Get a collection of context-aware configuration resources defined by the given configuration name.
+     * @param resource Context resource to fetch configuration for
+     * @param bucketName Configuration "bucket" name. Each high-level configuration resolver should store 
+     *     it's configuration data grouped in a child resource of the configuration resource. This is what
+     *     we call a "bucket", and the resource name is specified with this parameter.
+     * @param configName Configuration name or relative path.
+     * @return Collection of configuration resources, the collection might be empty.
+     */
+    @Nonnull Collection<Resource> getResourceCollection(@Nonnull Resource resource, @Nonnull String bucketName, @Nonnull String configName);
+
+    /**
+     * Get the inner-most context path (deepest path) returned by {@link #getAllContextPaths(Resource)}.
+     * @param resource Context resource to fetch configuration for
+     * @return Context path or null
+     */
+    String getContextPath(@Nonnull Resource resource);
+
+    /**
+     * Get all context paths for which context-aware configurations could be defined.
+     * The context paths are always ancestors of the resource path, or the resource path itself.
+     * Which ancestors are allowed for context-aware configuration depends on configuration.
+     * @param resource Context resource to fetch configuration for
+     * @return List of context paths
+     */
+    @Nonnull Collection<String> getAllContextPaths(@Nonnull Resource resource);
+
+}
diff --git a/src/main/java/org/apache/sling/caconfig/resource/package-info.java b/src/main/java/org/apache/sling/caconfig/resource/package-info.java
new file mode 100644
index 0000000..ef04a94
--- /dev/null
+++ b/src/main/java/org/apache/sling/caconfig/resource/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+/**
+ * API for accessing context-aware configuration resources.
+ * This is a low-level API.
+ */
+@org.osgi.annotation.versioning.Version("1.0.0")
+package org.apache.sling.caconfig.resource;


[sling-org-apache-sling-caconfig-api] 08/31: SLING-7214 - Add the LICENSE file to every module

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit f128beabdafc4ec73ecfd97e78d44a9e164caf79
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 23 18:38:23 2017 +0200

    SLING-7214 - Add the LICENSE file to every module
---
 LICENSE | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 202 insertions(+)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.


[sling-org-apache-sling-caconfig-api] 23/31: [SLING-8272] Check if Caconfig Node Exists in JCR

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 40b7cc6d680264ac6d963c8e3f03a70aea6964d9
Author: ompandey <om...@gmail.com>
AuthorDate: Fri Mar 8 12:29:43 2019 +0100

    [SLING-8272] Check if Caconfig Node Exists in JCR
---
 src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java | 7 +++++++
 src/main/java/org/apache/sling/caconfig/package-info.java         | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index 1027141..2ca00e7 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -86,4 +86,11 @@ public interface ConfigurationBuilder {
      */
     @NotNull <T> Collection<T> asAdaptableCollection(@NotNull Class<T> clazz);
 
+    /**
+     * Check if the configuration node is existing
+     * @param clazz Class that can be adapted from a {@link org.apache.sling.api.resource.Resource}
+     * @param <T> Annotation class type
+     * @return True/False based on configuration resource node existence in JCR.
+     */
+    @NotNull <T> boolean has(@NotNull Class<T> clazz);
 }
diff --git a/src/main/java/org/apache/sling/caconfig/package-info.java b/src/main/java/org/apache/sling/caconfig/package-info.java
index 92feabe..e78110d 100644
--- a/src/main/java/org/apache/sling/caconfig/package-info.java
+++ b/src/main/java/org/apache/sling/caconfig/package-info.java
@@ -19,5 +19,5 @@
 /**
  * API for accessing context-aware configuration.
  */
-@org.osgi.annotation.versioning.Version("1.0.1")
+@org.osgi.annotation.versioning.Version("1.1.0")
 package org.apache.sling.caconfig;


[sling-org-apache-sling-caconfig-api] 29/31: [SLING-8272] Fixed sonar issue

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 6b2258ffc72fe960f7cb33217b0cbc583e7f6610
Author: ompandey <om...@gmail.com>
AuthorDate: Mon May 6 16:17:45 2019 +0200

    [SLING-8272] Fixed sonar issue
---
 src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index 592b80a..f5399d1 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -107,5 +107,5 @@ public interface ConfigurationBuilder {
      * @param configName Name of the configuration
      * @return True/False based on configuration resource node existence in JCR.
      */
-    <T> boolean has(String configName);
+    boolean has(String configName);
 }


[sling-org-apache-sling-caconfig-api] 15/31: [maven-release-plugin] prepare release org.apache.sling.caconfig.api-1.1.2

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit bf80e231d3b58046b44e072e927c4e6b8ddc22ed
Author: sseifert <ss...@pro-vision.de>
AuthorDate: Sun Sep 2 22:42:45 2018 +0200

    [maven-release-plugin] prepare release org.apache.sling.caconfig.api-1.1.2
---
 pom.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 64a3898..db69875 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
     
     <artifactId>org.apache.sling.caconfig.api</artifactId>
     <packaging>bundle</packaging>
-    <version>1.1.1-SNAPSHOT</version>
+    <version>1.1.2</version>
     <name>Apache Sling Context-Aware Configuration API</name>
     <description>Apache Sling Context-Aware Configuration API</description>
 
@@ -37,7 +37,8 @@
         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</developerConnection>
         <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-caconfig-api.git</url>
-    </scm>
+      <tag>org.apache.sling.caconfig.api-1.1.2</tag>
+  </scm>
     
     <build>
         <plugins>


[sling-org-apache-sling-caconfig-api] 04/31: SLING-7167 Adjust READMEs

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 83c2a4c25dcc1364889a3be61d2305f3c77cfca3
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Oct 2 16:12:08 2017 +0000

    SLING-7167 Adjust READMEs
    
    switch from plain text to Markdown
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810468 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt => README.md | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/README.txt b/README.md
similarity index 100%
rename from README.txt
rename to README.md


[sling-org-apache-sling-caconfig-api] 06/31: SLING-7162 - Update SCM information in all POM files to reference Git

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 21d8e1ed220950e5d03382b3dd50dbdf40b98097
Author: Robert Munteanu <ro...@gmail.com>
AuthorDate: Fri Oct 20 19:13:13 2017 +0200

    SLING-7162 - Update SCM information in all POM files to reference Git
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index dff81f9..85610e6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,9 +34,9 @@
     <description>Apache Sling Context-Aware Configuration API</description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/caconfig/api</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/caconfig/api</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/caconfig/api</url>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</conncetion>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-caconfig-api.git</url>
     </scm>
     
     <build>


[sling-org-apache-sling-caconfig-api] 22/31: SLING-8275 clarify documentation of ConfigurationBuilder.asValueMap() method

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 2585dbb9bcf1acce473c42225ce4e28f56b9493a
Author: sseifert <ss...@pro-vision.de>
AuthorDate: Thu Feb 14 12:14:24 2019 +0100

    SLING-8275 clarify documentation of ConfigurationBuilder.asValueMap() method
---
 src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index b93ed82..1027141 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -60,13 +60,13 @@ public interface ConfigurationBuilder {
 
     /**
      * Get configuration as singleton resource and return its properties as value map.
-     * @return Value map. Map is empty if content resource or configuration cannot be found.
+     * @return Value map. If content resource or configuration cannot be found the map is empty unless default or configuration override values are present for this configuration.
      */
     @NotNull ValueMap asValueMap();
 
     /**
      * Get collection of configuration resources with their properties mapped to the given annotation class.
-     * @return Collection of value map. Is empty if content resource or configuration cannot be found.
+     * @return Collection of value maps. Is empty if content resource or configuration cannot be found.
      */
     @NotNull Collection<ValueMap> asValueMapCollection();
 


[sling-org-apache-sling-caconfig-api] 18/31: SLING-7215 - [nice-to-have] Add a CONTRIBUTING file to every module

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 7f8fdf065cee8aecb78a32940080394de2240b74
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Sep 19 18:29:16 2018 +0200

    SLING-7215 - [nice-to-have] Add a CONTRIBUTING file to every module
---
 CONTRIBUTING.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..ca36072
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,6 @@
+Contributing
+====
+
+Thanks for choosing to contribute!
+
+You will find all the necessary details about how you can do this at https://sling.apache.org/contributing.html.


[sling-org-apache-sling-caconfig-api] 17/31: SLING-7216 - [nice-to-have] Add a CODE_OF_CONDUCT file to every module

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 9fc9dfaf0c7cf5600e60e7833290b2e23996db0e
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Wed Sep 19 18:03:59 2018 +0200

    SLING-7216 - [nice-to-have] Add a CODE_OF_CONDUCT file to every module
---
 CODE_OF_CONDUCT.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..52f21cb
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,4 @@
+Apache Software Foundation Code of Conduct
+====
+
+Being an Apache project, Apache Sling adheres to the Apache Software Foundation's [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html).


[sling-org-apache-sling-caconfig-api] 05/31: SLING-7167 Adjust READMEs

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit f713b22d1dd43c3d8497e194ab0ecd1ac79be03d
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Oct 3 09:53:34 2017 +0000

    SLING-7167 Adjust READMEs
    
    add uniform header linking to Sling project
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810835 13f79535-47bb-0310-9956-ffa450edef68
---
 README.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index cf214dc..dc85cf8 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,3 @@
-Apache Sling Context-Aware Configuration API
+# Apache Sling Context-Aware Configuration API
+
+This module is part of the [Apache Sling](https://sling.apache.org) project.


[sling-org-apache-sling-caconfig-api] 02/31: use Sling Parent 30

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit c91cf5bba1539ac41a389d75d1ec2e1b697efa10
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Mar 6 10:22:30 2017 +0000

    use Sling Parent 30
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1785621 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 3e24abd..dff81f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>29</version>
+        <version>30</version>
         <relativePath />
     </parent>
     


[sling-org-apache-sling-caconfig-api] 25/31: [SLING-8272] Adjusted Javadoc- PR Comment

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 3d293934c1a708e6cd013551c12e4898a162818a
Author: ompandey <om...@gmail.com>
AuthorDate: Mon Mar 11 08:56:30 2019 +0100

    [SLING-8272] Adjusted Javadoc- PR Comment
---
 src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index 84d7843..8f7035f 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -32,7 +32,7 @@ public interface ConfigurationBuilder {
 
     /**
      * Define configuration name.
-     * Optional for the {@link #as(Class)} and {@link #asCollection(Class)} methods, mandatory for the others. 
+     * Optional for the {@link #as(Class)}, {@link #asCollection(Class)} and {@link #has(Class)} methods, mandatory for the others.
      * @param configName Relative path
      * @return Configuration builder
      */
@@ -92,7 +92,6 @@ public interface ConfigurationBuilder {
      * checks in the global fall-back paths configured via {@link org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy}
      * which by default are {@code /conf/global}, {@code /apps/config} and {@code /libs/config}.This method does not consider the default values provided in
      * the configuration definition.
-     * Configuration name is optional - if not given via {@link #name(String)} method, it is derived from the annotation interface class name.
      * @param clazz Class that can be adapted from a {@link org.apache.sling.api.resource.Resource}
      * @param <T> Annotation class type
      * @return True/False based on configuration resource node existence in JCR.


[sling-org-apache-sling-caconfig-api] 27/31: [SLING-8272] Updated comments

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 9eb5bda6457b70831fcb84f5be124bc1764a448b
Author: ompandey <om...@gmail.com>
AuthorDate: Thu Apr 18 12:29:15 2019 +0200

    [SLING-8272] Updated comments
---
 src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index 9cb344e..4014206 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -32,7 +32,7 @@ public interface ConfigurationBuilder {
 
     /**
      * Define configuration name.
-     * Optional for the {@link #as(Class)}, {@link #asCollection(Class)} and {@link #has(Class)} methods, mandatory for the others.
+     * Optional for the {@link #as(Class)} and {@link #asCollection(Class)}, mandatory for the others.
      * @param configName Relative path
      * @return Configuration builder
      */


[sling-org-apache-sling-caconfig-api] 16/31: [maven-release-plugin] prepare for next development iteration

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit ede9c481bcb6df7f44ae7c360aa9ad3eef901539
Author: sseifert <ss...@pro-vision.de>
AuthorDate: Sun Sep 2 22:43:08 2018 +0200

    [maven-release-plugin] prepare for next development iteration
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index db69875..92e3f76 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
     
     <artifactId>org.apache.sling.caconfig.api</artifactId>
     <packaging>bundle</packaging>
-    <version>1.1.2</version>
+    <version>1.1.3-SNAPSHOT</version>
     <name>Apache Sling Context-Aware Configuration API</name>
     <description>Apache Sling Context-Aware Configuration API</description>
 
@@ -37,7 +37,7 @@
         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</developerConnection>
         <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-caconfig-api.git</url>
-      <tag>org.apache.sling.caconfig.api-1.1.2</tag>
+      <tag>HEAD</tag>
   </scm>
     
     <build>


[sling-org-apache-sling-caconfig-api] 03/31: SLING-7167 Adjust READMEs

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 46b89f1c9ebea930219cc41c7b3b1602082cd8f2
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Mon Oct 2 14:54:33 2017 +0000

    SLING-7167 Adjust READMEs
    
    remove outdated information
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1810381 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/README.txt b/README.txt
index 2cf6174..cf214dc 100644
--- a/README.txt
+++ b/README.txt
@@ -1,25 +1 @@
 Apache Sling Context-Aware Configuration API
-
-
-Getting Started
-===============
-
-This component uses a Maven 3 (http://maven.apache.org/) build
-environment. It requires a Java 7 JDK (or higher) and Maven (http://maven.apache.org/)
-3.3.9 or later. We recommend to use the latest Maven version.
-
-If you have Maven 3 installed, you can compile and
-package the jar using the following command:
-
-    mvn package
-
-See the Maven 3 documentation for other build features.
-
-The latest source code for this component is available in the
-Subversion (http://subversion.tigris.org/) source repository of
-the Apache Software Foundation. If you have Subversion installed,
-you can checkout the latest source using the following command:
-
-    svn checkout https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/contextaware-config/api
-
-See the Subversion documentation for other source control features.


[sling-org-apache-sling-caconfig-api] 09/31: SLING-7213 - Add a default .gitignore file to every module

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 52d43d9d8ec2f6dcb6a5f9f74e84088d09414270
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Oct 24 13:41:00 2017 +0200

    SLING-7213 - Add a default .gitignore file to every module
---
 .gitignore | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5b783ed
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,17 @@
+/target
+.idea
+.classpath
+.metadata
+.project
+.settings
+.externalToolBuilders
+maven-eclipse.xml
+*.swp
+*.iml
+*.ipr
+*.iws
+*.bak
+.vlt
+.DS_Store
+jcr.log
+atlassian-ide-plugin.xml


[sling-org-apache-sling-caconfig-api] 31/31: Merge pull request #2 from ompandeyy/SLING-8272_caconfig-nod-existence-check

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit ec4daac117f61d4f8aeeac291a494a5388224a19
Merge: 2585dbb c0b3cb0
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri May 10 13:35:55 2019 +0200

    Merge pull request #2 from ompandeyy/SLING-8272_caconfig-nod-existence-check
    
    [SLING-8272] Check if Caconfig Node Exists in JCR

 .../sling/caconfig/ConfigurationBuilder.java       | 24 +++++++++++++++++++++-
 .../org/apache/sling/caconfig/package-info.java    |  2 +-
 2 files changed, 24 insertions(+), 2 deletions(-)


[sling-org-apache-sling-caconfig-api] 28/31: [SLING-8272] Added additional method - PR Comments

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 5e94d1e3850835333e23da9b926c08045d9f6d40
Author: ompandey <om...@gmail.com>
AuthorDate: Fri May 3 10:25:57 2019 +0200

    [SLING-8272] Added additional method - PR Comments
---
 .../sling/caconfig/ConfigurationBuilder.java       | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index 4014206..592b80a 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -32,7 +32,7 @@ public interface ConfigurationBuilder {
 
     /**
      * Define configuration name.
-     * Optional for the {@link #as(Class)} and {@link #asCollection(Class)}, mandatory for the others.
+     * Optional for the {@link #as(Class)}, {@link #asCollection(Class)} and {@link #has(Class)} methods, mandatory for the others.
      * @param configName Relative path
      * @return Configuration builder
      */
@@ -87,13 +87,25 @@ public interface ConfigurationBuilder {
     @NotNull <T> Collection<T> asAdaptableCollection(@NotNull Class<T> clazz);
 
     /**
-     * Check if the configuration node is existing in the resource hierarchy. This method checks for the configuration existence based on {@code configName} 
-     * defined in the configuration definition. It checks if the configuration is available for the context path in the current resource hierarchy and if not 
-     * found, also checks in the global fall-back paths configured via {@link org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy}
+     * This method checks for the configuration existence based on {@code configName} defined in the configuration definition. It extracts the {@code configName} 
+     * from the given annotation class and checks if the configuration is available for the context path in the current resource hierarchy. If not found, also
+     * checks in the global fall-back paths configured via {@link org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy}
+     * which by default are {@code /conf/global}, {@code /apps/config} and {@code /libs/config}.This method does not consider the default values provided in
+     * the configuration definition.
+     * @param clazz Class that can be adapted from a {@link org.apache.sling.api.resource.Resource}
+     * @param <T> Annotation class type
+     * @return True/False based on configuration resource node existence in JCR.
+     */
+    <T> boolean has(@NotNull Class<T> clazz);
+
+    /**
+     * This method checks for the configuration existence based on provided {@code configName} value.
+     * It checks if the configuration is available for the context path in the current resource hierarchy and if not found, also
+     * checks in the global fall-back paths configured via {@link org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy}
      * which by default are {@code /conf/global}, {@code /apps/config} and {@code /libs/config}.This method does not consider the default values provided in
      * the configuration definition.
      * @param configName Name of the configuration
      * @return True/False based on configuration resource node existence in JCR.
      */
-    boolean has(@NotNull String configName);
+    <T> boolean has(String configName);
 }


[sling-org-apache-sling-caconfig-api] 26/31: [SLING-8272] Fixed PR Comments

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 57117b05c362b8911b0250420d978002976e6d5b
Author: ompandey <om...@gmail.com>
AuthorDate: Thu Apr 18 12:13:55 2019 +0200

    [SLING-8272] Fixed PR Comments
---
 .../java/org/apache/sling/caconfig/ConfigurationBuilder.java  | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
index 8f7035f..9cb344e 100644
--- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
+++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java
@@ -87,14 +87,13 @@ public interface ConfigurationBuilder {
     @NotNull <T> Collection<T> asAdaptableCollection(@NotNull Class<T> clazz);
 
     /**
-     * Check if the configuration node is existing in the JCR. This method checks for the configuration existence based on {@code configName} defined in the
-     * configuration definition. It checks if the configuration is available for the context path in the current resource hierarchy and if not found, also
-     * checks in the global fall-back paths configured via {@link org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy}
+     * Check if the configuration node is existing in the resource hierarchy. This method checks for the configuration existence based on {@code configName} 
+     * defined in the configuration definition. It checks if the configuration is available for the context path in the current resource hierarchy and if not 
+     * found, also checks in the global fall-back paths configured via {@link org.apache.sling.caconfig.resource.impl.def.DefaultConfigurationResourceResolvingStrategy}
      * which by default are {@code /conf/global}, {@code /apps/config} and {@code /libs/config}.This method does not consider the default values provided in
      * the configuration definition.
-     * @param clazz Class that can be adapted from a {@link org.apache.sling.api.resource.Resource}
-     * @param <T> Annotation class type
+     * @param configName Name of the configuration
      * @return True/False based on configuration resource node existence in JCR.
      */
-    @NotNull <T> boolean has(@NotNull Class<T> clazz);
+    boolean has(@NotNull String configName);
 }


[sling-org-apache-sling-caconfig-api] 07/31: Fix typo in pom.xml : conncetion should be connection

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit afb472b53c8df2d6a4750c1d209994e1d44e3caf
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Oct 23 12:06:30 2017 +0300

    Fix typo in pom.xml : conncetion should be connection
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 85610e6..ea4ca9c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
     <description>Apache Sling Context-Aware Configuration API</description>
 
     <scm>
-        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</conncetion>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git</developerConnection>
         <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-caconfig-api.git</url>
     </scm>


[sling-org-apache-sling-caconfig-api] 19/31: trivial: added license header to *.md files

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit f1b4620c25b8b80103f013a4bf8c45afa3659b9b
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Thu Sep 20 11:09:01 2018 +0200

    trivial: added license header to *.md files
---
 CODE_OF_CONDUCT.md | 18 ++++++++++++++++++
 CONTRIBUTING.md    | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 52f21cb..0fa18e5 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,3 +1,21 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
 Apache Software Foundation Code of Conduct
 ====
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ca36072..ac82a1a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,3 +1,21 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  ~ 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.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
 Contributing
 ====