This is an automated email from the ASF dual-hosted git repository. sseifert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-caconfig-api.git
commit 3278436d6b9a86702067c0b3812010f5fba3a3aa Author: Stefan Seifert <stefanseif...@users.noreply.github.com> AuthorDate: Mon Jun 24 14:09:55 2024 +0200 SLING-12361 apply spotless code formatting --- pom.xml | 38 +++++++++++----------- .../sling/caconfig/ConfigurationBuilder.java | 19 +++++++---- .../caconfig/ConfigurationResolveException.java | 1 - .../sling/caconfig/ConfigurationResolver.java | 4 +-- .../sling/caconfig/annotation/Configuration.java | 1 - .../apache/sling/caconfig/annotation/Property.java | 1 - .../resource/ConfigurationResourceResolver.java | 11 ++++--- 7 files changed, 40 insertions(+), 35 deletions(-) diff --git a/pom.xml b/pom.xml index 39e4cdb..f39caa7 100644 --- a/pom.xml +++ b/pom.xml @@ -26,36 +26,23 @@ <version>60</version> <relativePath /> </parent> - + <artifactId>org.apache.sling.caconfig.api</artifactId> - <packaging>jar</packaging> <version>1.3.1-SNAPSHOT</version> + <packaging>jar</packaging> <name>Apache Sling Context-Aware Configuration API</name> <description>Apache Sling Context-Aware Configuration API</description> - <properties> - <project.build.outputTimestamp>2022-01-03T11:32:43Z</project.build.outputTimestamp> - </properties> - <scm> <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://github.com/apache/sling-org-apache-sling-caconfig-api.git</url> <tag>HEAD</tag> + <url>https://github.com/apache/sling-org-apache-sling-caconfig-api.git</url> </scm> - <build> - <plugins> - <plugin> - <groupId>biz.aQute.bnd</groupId> - <artifactId>bnd-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>biz.aQute.bnd</groupId> - <artifactId>bnd-baseline-maven-plugin</artifactId> - </plugin> - </plugins> - </build> + <properties> + <project.build.outputTimestamp>2022-01-03T11:32:43Z</project.build.outputTimestamp> + </properties> <dependencies> <dependency> @@ -81,4 +68,17 @@ </dependency> </dependencies> + <build> + <plugins> + <plugin> + <groupId>biz.aQute.bnd</groupId> + <artifactId>bnd-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>biz.aQute.bnd</groupId> + <artifactId>bnd-baseline-maven-plugin</artifactId> + </plugin> + </plugins> + </build> + </project> diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java index afb9481..736d379 100644 --- a/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java +++ b/src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java @@ -36,7 +36,8 @@ public interface ConfigurationBuilder { * @param configName Relative path * @return Configuration builder */ - @NotNull ConfigurationBuilder name(@NotNull String configName); + @NotNull + ConfigurationBuilder name(@NotNull String configName); /** * Get configuration as singleton resource and its properties mapped to the given annotation class. @@ -46,7 +47,8 @@ public interface ConfigurationBuilder { * @param <T> Annotation class type * @return Configuration object. Contains only the default values if content resource or configuration cannot be found. */ - @NotNull <T> T as(@NotNull 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. @@ -56,19 +58,22 @@ public interface ConfigurationBuilder { * @param <T> Annotation class type * @return Collection of configuration objects. Is empty if content resource or configuration cannot be found. */ - @NotNull <T> Collection<T> asCollection(@NotNull 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. 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(); + @NotNull + ValueMap asValueMap(); /** * Get collection of configuration resources with their properties mapped to the given annotation class. * @return Collection of value maps. Is empty if content resource or configuration cannot be found. */ - @NotNull Collection<ValueMap> asValueMapCollection(); + @NotNull + Collection<ValueMap> asValueMapCollection(); /** * Get configuration as singleton configuration resource and adapt it to the given class. @@ -84,7 +89,8 @@ 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. */ - @NotNull <T> Collection<T> asAdaptableCollection(@NotNull Class<T> clazz); + @NotNull + <T> Collection<T> asAdaptableCollection(@NotNull Class<T> clazz); /** * This method checks for the configuration existence based on {@code configName} defined in the configuration definition. It extracts the {@code configName} @@ -108,5 +114,4 @@ public interface ConfigurationBuilder { * @return True/False based on configuration resource node existence. */ boolean has(@NotNull String configName); - } diff --git a/src/main/java/org/apache/sling/caconfig/ConfigurationResolveException.java b/src/main/java/org/apache/sling/caconfig/ConfigurationResolveException.java index ae4a650..9679114 100644 --- a/src/main/java/org/apache/sling/caconfig/ConfigurationResolveException.java +++ b/src/main/java/org/apache/sling/caconfig/ConfigurationResolveException.java @@ -34,5 +34,4 @@ public final class ConfigurationResolveException extends RuntimeException { 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 index 6ffd444..665cadf 100644 --- a/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java +++ b/src/main/java/org/apache/sling/caconfig/ConfigurationResolver.java @@ -40,6 +40,6 @@ public interface ConfigurationResolver { * @param resource Context resource * @return Configuration builder */ - @NotNull ConfigurationBuilder get(@NotNull Resource resource); - + @NotNull + ConfigurationBuilder get(@NotNull 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 index da1496b..7b65feb 100644 --- a/src/main/java/org/apache/sling/caconfig/annotation/Configuration.java +++ b/src/main/java/org/apache/sling/caconfig/annotation/Configuration.java @@ -54,5 +54,4 @@ public @interface Configuration { * @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 index ba77213..3ccad1f 100644 --- a/src/main/java/org/apache/sling/caconfig/annotation/Property.java +++ b/src/main/java/org/apache/sling/caconfig/annotation/Property.java @@ -49,5 +49,4 @@ public @interface Property { * @return Number to control property order in configuration editor. */ int order() default 0; - } 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 bb8bcba..d877831 100644 --- a/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java +++ b/src/main/java/org/apache/sling/caconfig/resource/ConfigurationResourceResolver.java @@ -44,7 +44,8 @@ public interface ConfigurationResourceResolver { * @param configName Configuration name or relative path. * @return Configuration resource or {@code null}. */ - @Nullable Resource getResource(@NotNull Resource resource, @NotNull String bucketName, @NotNull 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. @@ -55,7 +56,9 @@ public interface ConfigurationResourceResolver { * @param configName Configuration name or relative path. * @return Collection of configuration resources, the collection might be empty. */ - @NotNull Collection<Resource> getResourceCollection(@NotNull Resource resource, @NotNull String bucketName, @NotNull 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)}. @@ -71,6 +74,6 @@ public interface ConfigurationResourceResolver { * @param resource Context resource to fetch configuration for * @return List of context paths */ - @NotNull Collection<String> getAllContextPaths(@NotNull Resource resource); - + @NotNull + Collection<String> getAllContextPaths(@NotNull Resource resource); }