You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:18:59 UTC

[sling-org-apache-sling-caconfig-api] 13/24: SLING-5982 implement support for nested configuration classes, and use native valuemap support for type conversion

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

rombert pushed a commit to annotated tag org.apache.sling.caconfig.api-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git

commit 27b75fa98bdb32090305098a4e597f698cbd5677
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Aug 23 21:48:45 2016 +0000

    SLING-5982 implement support for nested configuration classes, and use native valuemap support for type conversion
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/contextaware-config/api@1757438 13f79535-47bb-0310-9956-ffa450edef68
---
 ...ver.java => ConfigurationResolveException.java} | 28 ++++++++--------------
 .../contextaware/config/ConfigurationResolver.java |  2 +-
 2 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/src/main/java/org/apache/sling/contextaware/config/ConfigurationResolver.java b/src/main/java/org/apache/sling/contextaware/config/ConfigurationResolveException.java
similarity index 51%
copy from src/main/java/org/apache/sling/contextaware/config/ConfigurationResolver.java
copy to src/main/java/org/apache/sling/contextaware/config/ConfigurationResolveException.java
index a0434f8..d41b274 100644
--- a/src/main/java/org/apache/sling/contextaware/config/ConfigurationResolver.java
+++ b/src/main/java/org/apache/sling/contextaware/config/ConfigurationResolveException.java
@@ -18,29 +18,21 @@
  */
 package org.apache.sling.contextaware.config;
 
-import javax.annotation.Nonnull;
-
-import org.apache.sling.api.resource.Resource;
 import org.osgi.annotation.versioning.ProviderType;
 
 /**
- * Getting context-specific 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.contextaware.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}.
+ * Is thrown when configuration cannot be resolved.
  */
 @ProviderType
-public interface ConfigurationResolver {
+public final class ConfigurationResolveException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    public ConfigurationResolveException(String message, Throwable cause) {
+        super(message, cause);
+    }
 
-    /**
-     * Get configuration for given resource.
-     * @param resource Context resource
-     * @return Configuration builder
-     */
-    @Nonnull ConfigurationBuilder get(@Nonnull Resource resource);
+    public ConfigurationResolveException(String message) {
+        super(message);
+    }
 
 }
diff --git a/src/main/java/org/apache/sling/contextaware/config/ConfigurationResolver.java b/src/main/java/org/apache/sling/contextaware/config/ConfigurationResolver.java
index a0434f8..c59c372 100644
--- a/src/main/java/org/apache/sling/contextaware/config/ConfigurationResolver.java
+++ b/src/main/java/org/apache/sling/contextaware/config/ConfigurationResolver.java
@@ -28,7 +28,7 @@ import org.osgi.annotation.versioning.ProviderType;
  * 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.contextaware.resource.ConfigurationResourceResolver}
+ * This service builds on top of the {@link org.apache.sling.contextaware.config.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}.

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.