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:36:41 UTC

[sling-org-apache-sling-hc-annotations] annotated tag org.apache.sling.hc.annotations-1.0.2 created (now 1613530)

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

rombert pushed a change to annotated tag org.apache.sling.hc.annotations-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git.


      at 1613530  (tag)
 tagging 7e77030af7c3de6cf8114d5aae569f1f2169bb05 (commit)
      by Bertrand Delacretaz
      on Mon Sep 1 11:16:52 2014 +0000

- Log -----------------------------------------------------------------
org.apache.sling.hc.annotations-1.0.2
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 38738d5  SLING-3624 - move SlingHealthCheck annotation to a new annotations jar
     new 22ae6bd  SLING-3624 - MBean name and async cron expression added, contributed by Georg Henzler, thanks!
     new 54f53d9  Updated to parent version 20
     new 027610a  [maven-release-plugin] prepare release org.apache.sling.hc.core-1.1.2
     new b9d4201  [maven-release-plugin] prepare for next development iteration
     new 271b2d2  [maven-release-plugin] prepare release org.apache.sling.hc.annotations-1.0.2
     new 7e77030  [maven-release-plugin]  copy for tag org.apache.sling.hc.annotations-1.0.2

The 7 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.


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

[sling-org-apache-sling-hc-annotations] 02/07: SLING-3624 - MBean name and async cron expression added, contributed by Georg Henzler, thanks!

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

rombert pushed a commit to annotated tag org.apache.sling.hc.annotations-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git

commit 22ae6bdfbd0a2f0fe0297c85bb394002ddad6e67
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Thu Jul 31 08:35:49 2014 +0000

    SLING-3624 - MBean name and async cron expression added, contributed by Georg Henzler, thanks!
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations@1614826 13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/hc/annotations/SlingHealthCheck.java     | 30 +++++++----
 .../hc/annotations/SlingHealthCheckProcessor.java  | 61 ++++++++++------------
 2 files changed, 50 insertions(+), 41 deletions(-)

diff --git a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java
index dcba01f..9c7abd5 100644
--- a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java
+++ b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java
@@ -27,6 +27,27 @@ import org.apache.felix.scr.annotations.ConfigurationPolicy;
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.CLASS)
 public @interface SlingHealthCheck {
+    
+    /** Defines the name of the health check. <p>
+     * This attribute is converted to values for the <code>hc.name</code> property. */
+    String name() default "";    
+
+    /** One ore more tags.
+     * <p>
+     * This attribute is converted to values for the <code>hc.tags</code> property. */
+    String[] tags() default {};
+    
+    /** The JMX mbean name (optional, the mbean is only registered if attribute present).
+     * <p>
+     * This attribute is converted to values for the <code>hc.mbean.name</code> property. */
+    String mbeanName() default "";    
+    
+    /** Cron expression for asynchronous execution (optional, default is synchronous execution).
+     * <p>
+     * This attribute is converted to values for the <code>hc.async.cronExpression</code> property. */
+    String asyncCronExpression() default "";       
+    
+    // handling of service and component properties (optional)
 
     /** Whether to generate a default SCR component tag. If set to false, a {@link org.apache.felix.scr.annotations.Component} annotation can be added manually
      * with defined whatever configuration needed. */
@@ -35,9 +56,6 @@ public @interface SlingHealthCheck {
     /** Whether to generate a default SCR service tag with "interface=org.apache.sling.hc.api.HealthCheck". If set to false, a
      * {@link org.apache.felix.scr.annotations.Service} annotation can be added manually with defined whatever configuration needed. */
     boolean generateService() default true;
-
-    /** Defines the name of the health check. */
-    String name();
     
     /** Defines the Component name also used as the PID for the Configuration Admin Service. Default value: Fully qualified name of the Java class. */
     String componentName() default "";
@@ -59,10 +77,4 @@ public @interface SlingHealthCheck {
     /** This is generally used as a description for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default
      * value: %&lt;name&gt;.description */
     String description() default "";
-
-    /** One ore more tags.
-     * <p>
-     * This attribute is converted to values for the <code>hc.tags</code> property. */
-    String[] tags() default {};
-
 }
diff --git a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
index 84562e4..fe388ba 100644
--- a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
+++ b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
@@ -57,14 +57,18 @@ public class SlingHealthCheckProcessor implements AnnotationProcessor {
 
         // generate ComponentDescription if required
         if (generateComponent) {
+            String nameOfAnnotatedClass = classDescription.getDescribedClass().getName();
+            
             final ComponentDescription cd = new ComponentDescription(cad);
-            cd.setName(cad.getStringValue("componentName", classDescription.getDescribedClass().getName()));
+            cd.setName(cad.getStringValue("componentName", nameOfAnnotatedClass));
             cd.setConfigurationPolicy(ComponentConfigurationPolicy.valueOf(cad.getEnumValue("configurationPolicy",
                     ComponentConfigurationPolicy.OPTIONAL.name())));
             cd.setSetMetatypeFactoryPid(cad.getBooleanValue("configurationFactory", false));
 
-            cd.setLabel(cad.getStringValue("label", null));
-            cd.setDescription(cad.getStringValue("description", null));
+            String nameFromAnnotation = (String) cad.getValue("name");
+            String defaultLabel = "Sling Health Check: " + (nameFromAnnotation!=null ? nameFromAnnotation : nameOfAnnotatedClass);
+            cd.setLabel(cad.getStringValue("label", defaultLabel));
+            cd.setDescription(cad.getStringValue("description", "Health Check Configuration"));
 
             cd.setCreateMetatype(metatype);
 
@@ -79,48 +83,41 @@ public class SlingHealthCheckProcessor implements AnnotationProcessor {
             classDescription.add(sd);
         }
 
-        // generate PropertyDescriptions
-        generateStringArrPropertyDescriptor(cad, classDescription, metatype, "tags", HealthCheck.TAGS);
-        generateStringPropertyDescriptor(cad, classDescription, metatype, "name", HealthCheck.NAME);
+        // generate HC PropertyDescriptions
+        generateStringPropertyDescriptor(cad, classDescription, metatype, "name", HealthCheck.NAME, "Name", "Name", false);
+        generateStringPropertyDescriptor(cad, classDescription, metatype, "tags", HealthCheck.TAGS, "Tags", "Tags", true);
+        generateStringPropertyDescriptor(cad, classDescription, metatype, "mbeanName", HealthCheck.MBEAN_NAME, "MBean", "MBean name (leave empty for not using JMX)", false);
+        generateStringPropertyDescriptor(cad, classDescription, metatype, "asyncCronExpression", "hc.async.cronExpression" /* use constant once API is released */ , "Cron expression", "Cron expression for asynchronous execution (leave empty for synchronous execution)", false);
     }
 
     /** Generates a property descriptor of type {@link PropertyType#String[]} */
-    private void generateStringArrPropertyDescriptor(final ClassAnnotation cad, final ClassDescription classDescription,
-            final boolean metatype, final String annotationName, final String propertyDescriptorName) {
-
-        final String[] values = (String[]) cad.getValue(annotationName);
-        if (values == null) {
-            return;
-        }
-
-        final PropertyDescription pd = new PropertyDescription(cad);
-        pd.setName(propertyDescriptorName);
-        pd.setMultiValue(values);
-        pd.setType(PropertyType.String);
-        pd.setUnbounded(PropertyUnbounded.ARRAY);
-        pd.setCardinality(Integer.MAX_VALUE);
-        if (metatype) {
-            pd.setPrivate(true);
-        }
-        classDescription.add(pd);
-    }
-
-    
-    /** Generates a property descriptor of type {@link PropertyType#String} */
     private void generateStringPropertyDescriptor(final ClassAnnotation cad, final ClassDescription classDescription,
-            final boolean metatype, final String annotationName, final String propertyDescriptorName) {
+            final boolean metatype, final String propertyName, final String propertyDescriptorName, String label, String description, boolean isArray) {
 
-        final String hcName = (String) cad.getValue(annotationName);
 
         final PropertyDescription pd = new PropertyDescription(cad);
         pd.setName(propertyDescriptorName);
-        pd.setValue(hcName);
+        pd.setLabel(label);
+        pd.setDescription(description);
         pd.setType(PropertyType.String);
-        if (metatype) {
+
+        if(isArray) {
+            final String[] values = (String[]) cad.getValue(propertyName);
+            pd.setMultiValue(values);
+            pd.setUnbounded(PropertyUnbounded.ARRAY);
+            pd.setCardinality(Integer.MAX_VALUE);
+        } else {
+            final String propertyVal = (String) cad.getValue(propertyName);
+            pd.setValue(propertyVal);
+            pd.setUnbounded(PropertyUnbounded.DEFAULT);
+        }
+        
+        if (!metatype) {
             pd.setPrivate(true);
         }
         classDescription.add(pd);
     }
+
     
     @Override
     public int getRanking() {

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

[sling-org-apache-sling-hc-annotations] 04/07: [maven-release-plugin] prepare release org.apache.sling.hc.core-1.1.2

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

rombert pushed a commit to annotated tag org.apache.sling.hc.annotations-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git

commit 027610a09c1da109dea3153e65bb95d7366e8a6a
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Sep 1 11:10:31 2014 +0000

    [maven-release-plugin] prepare release org.apache.sling.hc.core-1.1.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations@1621733 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index eb94c8d..83a535a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
     <groupId>org.apache.sling</groupId>
     <artifactId>org.apache.sling.hc.annotations</artifactId>
     <packaging>jar</packaging>
-    <version>0.9.9-SNAPSHOT</version>
+    <version>1.0.0</version>
 
     <name>Apache Sling Health Check Annotations</name>
     <inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/annotations</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.1.2/annotations</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.1.2/annotations</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.1.2/annotations</url>
     </scm>
 
     <dependencies>

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

[sling-org-apache-sling-hc-annotations] 01/07: SLING-3624 - move SlingHealthCheck annotation to a new annotations jar

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

rombert pushed a commit to annotated tag org.apache.sling.hc.annotations-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git

commit 38738d56600c66ea2413326a60e25c1e3ec4718e
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Wed Jul 30 19:51:03 2014 +0000

    SLING-3624 - move SlingHealthCheck annotation to a new annotations jar
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations@1614748 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            |  57 +++++++++
 .../sling/hc/annotations/SlingHealthCheck.java     |  68 +++++++++++
 .../hc/annotations/SlingHealthCheckProcessor.java  | 134 +++++++++++++++++++++
 ...felix.scrplugin.annotations.AnnotationProcessor |   1 +
 4 files changed, 260 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..13547ef
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 http://maven.apache.org/maven-v4_0_0.xsd">
+    
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>19</version>
+        <relativePath>../../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.sling</groupId>
+    <artifactId>org.apache.sling.hc.annotations</artifactId>
+    <packaging>jar</packaging>
+    <version>0.9.9-SNAPSHOT</version>
+
+    <name>Apache Sling Health Check Annotations</name>
+    <inceptionYear>2013</inceptionYear>
+    
+    <description>
+        Sling Health Check Annotations
+    </description>
+
+    <properties>
+        <sling.java.version>6</sling.java.version>
+    </properties>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/annotations</url>
+    </scm>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.generator</artifactId>
+            <version>1.10.0</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.hc.core</artifactId>
+            <version>1.1.0</version>
+            <scope>provided</scope>
+        </dependency>
+     </dependencies>
+</project>
diff --git a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java
new file mode 100644
index 0000000..dcba01f
--- /dev/null
+++ b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheck.java
@@ -0,0 +1,68 @@
+/*
+ * 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 SF 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.hc.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.felix.scr.annotations.ConfigurationPolicy;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.CLASS)
+public @interface SlingHealthCheck {
+
+    /** Whether to generate a default SCR component tag. If set to false, a {@link org.apache.felix.scr.annotations.Component} annotation can be added manually
+     * with defined whatever configuration needed. */
+    boolean generateComponent() default true;
+
+    /** Whether to generate a default SCR service tag with "interface=org.apache.sling.hc.api.HealthCheck". If set to false, a
+     * {@link org.apache.felix.scr.annotations.Service} annotation can be added manually with defined whatever configuration needed. */
+    boolean generateService() default true;
+
+    /** Defines the name of the health check. */
+    String name();
+    
+    /** Defines the Component name also used as the PID for the Configuration Admin Service. Default value: Fully qualified name of the Java class. */
+    String componentName() default "";
+
+    /** Whether Metatype Service data is generated or not. If this parameter is set to true Metatype Service data is generated in the <code>metatype.xml</code>
+     * file for this component. Otherwise no Metatype Service data is generated for this component. */
+    boolean metatype() default true;
+
+    /** Set the metatype factory pid property (only for non factory components). */
+    boolean configurationFactory() default false;
+
+    /** The component configuration policy */
+    ConfigurationPolicy configurationPolicy() default ConfigurationPolicy.OPTIONAL;
+
+    /** This is generally used as a title for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default
+     * value: %&lt;name&gt;.name */
+    String label() default "";
+
+    /** This is generally used as a description for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default
+     * value: %&lt;name&gt;.description */
+    String description() default "";
+
+    /** One ore more tags.
+     * <p>
+     * This attribute is converted to values for the <code>hc.tags</code> property. */
+    String[] tags() default {};
+
+}
diff --git a/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
new file mode 100644
index 0000000..84562e4
--- /dev/null
+++ b/src/main/java/org/apache/sling/hc/annotations/SlingHealthCheckProcessor.java
@@ -0,0 +1,134 @@
+/*
+ * 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 SF 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.hc.annotations;
+
+import java.util.List;
+
+import org.apache.felix.scrplugin.SCRDescriptorException;
+import org.apache.felix.scrplugin.SCRDescriptorFailureException;
+import org.apache.felix.scrplugin.annotations.AnnotationProcessor;
+import org.apache.felix.scrplugin.annotations.ClassAnnotation;
+import org.apache.felix.scrplugin.annotations.ScannedClass;
+import org.apache.felix.scrplugin.description.ClassDescription;
+import org.apache.felix.scrplugin.description.ComponentConfigurationPolicy;
+import org.apache.felix.scrplugin.description.ComponentDescription;
+import org.apache.felix.scrplugin.description.PropertyDescription;
+import org.apache.felix.scrplugin.description.PropertyType;
+import org.apache.felix.scrplugin.description.PropertyUnbounded;
+import org.apache.felix.scrplugin.description.ServiceDescription;
+import org.apache.sling.hc.api.HealthCheck;
+
+/** Annotation processor for the SlingHealthCheck annotation. */
+public class SlingHealthCheckProcessor implements AnnotationProcessor {
+
+    @Override
+    public void process(final ScannedClass scannedClass, final ClassDescription classDescription) throws SCRDescriptorException, SCRDescriptorFailureException {
+        final List<ClassAnnotation> servlets = scannedClass.getClassAnnotations(SlingHealthCheck.class.getName());
+        scannedClass.processed(servlets);
+
+        for (final ClassAnnotation cad : servlets) {
+            processHealthCheck(cad, classDescription);
+        }
+    }
+
+    /** Processes the given healthcheck annotation.
+     * 
+     * @param cad the annotation
+     * @param classDescription the class description */
+    private void processHealthCheck(final ClassAnnotation cad, final ClassDescription classDescription) {
+
+        final boolean generateComponent = cad.getBooleanValue("generateComponent", true);
+        final boolean metatype = cad.getBooleanValue("metatype", true);
+
+        // generate ComponentDescription if required
+        if (generateComponent) {
+            final ComponentDescription cd = new ComponentDescription(cad);
+            cd.setName(cad.getStringValue("componentName", classDescription.getDescribedClass().getName()));
+            cd.setConfigurationPolicy(ComponentConfigurationPolicy.valueOf(cad.getEnumValue("configurationPolicy",
+                    ComponentConfigurationPolicy.OPTIONAL.name())));
+            cd.setSetMetatypeFactoryPid(cad.getBooleanValue("configurationFactory", false));
+
+            cd.setLabel(cad.getStringValue("label", null));
+            cd.setDescription(cad.getStringValue("description", null));
+
+            cd.setCreateMetatype(metatype);
+
+            classDescription.add(cd);
+        }
+
+        // generate ServiceDescription if required
+        final boolean generateService = cad.getBooleanValue("generateService", true);
+        if (generateService) {
+            final ServiceDescription sd = new ServiceDescription(cad);
+            sd.addInterface(HealthCheck.class.getName());
+            classDescription.add(sd);
+        }
+
+        // generate PropertyDescriptions
+        generateStringArrPropertyDescriptor(cad, classDescription, metatype, "tags", HealthCheck.TAGS);
+        generateStringPropertyDescriptor(cad, classDescription, metatype, "name", HealthCheck.NAME);
+    }
+
+    /** Generates a property descriptor of type {@link PropertyType#String[]} */
+    private void generateStringArrPropertyDescriptor(final ClassAnnotation cad, final ClassDescription classDescription,
+            final boolean metatype, final String annotationName, final String propertyDescriptorName) {
+
+        final String[] values = (String[]) cad.getValue(annotationName);
+        if (values == null) {
+            return;
+        }
+
+        final PropertyDescription pd = new PropertyDescription(cad);
+        pd.setName(propertyDescriptorName);
+        pd.setMultiValue(values);
+        pd.setType(PropertyType.String);
+        pd.setUnbounded(PropertyUnbounded.ARRAY);
+        pd.setCardinality(Integer.MAX_VALUE);
+        if (metatype) {
+            pd.setPrivate(true);
+        }
+        classDescription.add(pd);
+    }
+
+    
+    /** Generates a property descriptor of type {@link PropertyType#String} */
+    private void generateStringPropertyDescriptor(final ClassAnnotation cad, final ClassDescription classDescription,
+            final boolean metatype, final String annotationName, final String propertyDescriptorName) {
+
+        final String hcName = (String) cad.getValue(annotationName);
+
+        final PropertyDescription pd = new PropertyDescription(cad);
+        pd.setName(propertyDescriptorName);
+        pd.setValue(hcName);
+        pd.setType(PropertyType.String);
+        if (metatype) {
+            pd.setPrivate(true);
+        }
+        classDescription.add(pd);
+    }
+    
+    @Override
+    public int getRanking() {
+        return 500;
+    }
+
+    @Override
+    public String getName() {
+        return SlingHealthCheck.class.getName() + " annotation processor.";
+    }
+}
diff --git a/src/main/resources/META-INF/services/org.apache.felix.scrplugin.annotations.AnnotationProcessor b/src/main/resources/META-INF/services/org.apache.felix.scrplugin.annotations.AnnotationProcessor
new file mode 100644
index 0000000..c463fbb
--- /dev/null
+++ b/src/main/resources/META-INF/services/org.apache.felix.scrplugin.annotations.AnnotationProcessor
@@ -0,0 +1 @@
+org.apache.sling.hc.annotations.SlingHealthCheckProcessor
\ No newline at end of file

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

[sling-org-apache-sling-hc-annotations] 07/07: [maven-release-plugin] copy for tag org.apache.sling.hc.annotations-1.0.2

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

rombert pushed a commit to annotated tag org.apache.sling.hc.annotations-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git

commit 7e77030af7c3de6cf8114d5aae569f1f2169bb05
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Sep 1 11:16:52 2014 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.hc.annotations-1.0.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.annotations-1.0.2@1621738 13f79535-47bb-0310-9956-ffa450edef68

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

[sling-org-apache-sling-hc-annotations] 03/07: Updated to parent version 20

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

rombert pushed a commit to annotated tag org.apache.sling.hc.annotations-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git

commit 54f53d9154deae0870de6d4ed2fe9f87db10f77d
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Aug 1 19:16:26 2014 +0000

    Updated to parent version 20
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations@1615208 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 13547ef..eb94c8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling</artifactId>
-        <version>19</version>
+        <version>20</version>
         <relativePath>../../../../parent/pom.xml</relativePath>
     </parent>
 

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

[sling-org-apache-sling-hc-annotations] 06/07: [maven-release-plugin] prepare release org.apache.sling.hc.annotations-1.0.2

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

rombert pushed a commit to annotated tag org.apache.sling.hc.annotations-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git

commit 271b2d2e438d089fb121e19edb129083fd0b19be
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Sep 1 11:16:42 2014 +0000

    [maven-release-plugin] prepare release org.apache.sling.hc.annotations-1.0.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations@1621737 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 2b4f689..7c02124 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
     <groupId>org.apache.sling</groupId>
     <artifactId>org.apache.sling.hc.annotations</artifactId>
     <packaging>jar</packaging>
-    <version>1.0.1-SNAPSHOT</version>
+    <version>1.0.2</version>
 
     <name>Apache Sling Health Check Annotations</name>
     <inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/annotations</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.annotations-1.0.2</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.annotations-1.0.2</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.annotations-1.0.2</url>
     </scm>
 
     <dependencies>

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

[sling-org-apache-sling-hc-annotations] 05/07: [maven-release-plugin] prepare for next development iteration

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

rombert pushed a commit to annotated tag org.apache.sling.hc.annotations-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-annotations.git

commit b9d4201242b5398b29aa2a3c3c671790d5c9dfc5
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Sep 1 11:10:51 2014 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations@1621735 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 83a535a..2b4f689 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
     <groupId>org.apache.sling</groupId>
     <artifactId>org.apache.sling.hc.annotations</artifactId>
     <packaging>jar</packaging>
-    <version>1.0.0</version>
+    <version>1.0.1-SNAPSHOT</version>
 
     <name>Apache Sling Health Check Annotations</name>
     <inceptionYear>2013</inceptionYear>
@@ -27,9 +27,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.1.2/annotations</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.hc.core-1.1.2/annotations</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.hc.core-1.1.2/annotations</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/healthcheck/annotations</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/annotations</url>
     </scm>
 
     <dependencies>

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