From dev-return-96125-archive-asf-public=cust-asf.ponee.io@sling.apache.org Tue Apr 9 05:07:11 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id DA117180654 for ; Tue, 9 Apr 2019 07:07:10 +0200 (CEST) Received: (qmail 93231 invoked by uid 500); 9 Apr 2019 04:47:32 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 93210 invoked by uid 99); 9 Apr 2019 04:47:32 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Apr 2019 04:47:32 +0000 From: GitBox To: dev@sling.apache.org Subject: [GitHub] [sling-org-apache-sling-caconfig-api] ompandeyy commented on a change in pull request #2: [SLING-8272] Check if Caconfig Node Exists in JCR Message-ID: <155478642995.15504.8682701772861362961.gitbox@gitbox.apache.org> Date: Tue, 09 Apr 2019 05:07:09 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit ompandeyy commented on a change in pull request #2: [SLING-8272] Check if Caconfig Node Exists in JCR URL: https://github.com/apache/sling-org-apache-sling-caconfig-api/pull/2#discussion_r273326346 ########## File path: src/main/java/org/apache/sling/caconfig/ConfigurationBuilder.java ########## @@ -86,4 +86,15 @@ */ @NotNull Collection asAdaptableCollection(@NotNull Class 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} + * 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 Annotation class type + * @return True/False based on configuration resource node existence in JCR. + */ + @NotNull boolean has(@NotNull Class clazz); Review comment: Should we then go with one method? has(String configName) What do you suggest @kwin ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services