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/10/20 14:39:02 UTC

[sling-org-apache-sling-hc-support] 14/30: Inline metatype information - no functional changes

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-hc-support.git

commit 65e912aa56945dcb2b840bcce305b4c297b310a4
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Mon Jan 13 14:54:54 2014 +0000

    Inline metatype information - no functional changes
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1557739 13f79535-47bb-0310-9956-ffa450edef68
---
 .../hc/support/impl/DefaultLoginsHealthCheck.java  | 21 ++++++---
 .../impl/SlingRequestStatusHealthCheck.java        | 20 ++++++---
 .../OSGI-INF/metatype/metatype.properties          | 52 ----------------------
 3 files changed, 31 insertions(+), 62 deletions(-)

diff --git a/src/main/java/org/apache/sling/hc/support/impl/DefaultLoginsHealthCheck.java b/src/main/java/org/apache/sling/hc/support/impl/DefaultLoginsHealthCheck.java
index adb2b23..0f1e854 100644
--- a/src/main/java/org/apache/sling/hc/support/impl/DefaultLoginsHealthCheck.java
+++ b/src/main/java/org/apache/sling/hc/support/impl/DefaultLoginsHealthCheck.java
@@ -48,18 +48,29 @@ import org.slf4j.LoggerFactory;
         name="org.apache.sling.hc.support.DefaultLoginsHealthCheck",
         configurationFactory=true,
         policy=ConfigurationPolicy.REQUIRE,
-        metatype=true)
+        metatype=true,
+        label="Apache Sling Default Logins Health Check",
+        description="Expects default logins to fail, used to verify " +
+                "that they are disabled on production systems")
 @Properties({
-    @Property(name=HealthCheck.NAME),
-    @Property(name=HealthCheck.TAGS, unbounded=PropertyUnbounded.ARRAY),
-    @Property(name=HealthCheck.MBEAN_NAME)
+    @Property(name=HealthCheck.NAME,
+            label="Health Check Name", description="Name of this Health Check service."),
+    @Property(name=HealthCheck.TAGS, unbounded=PropertyUnbounded.ARRAY,
+             label="Health Check tags", description="List of tags for this Health Check service, used to select " +
+               "subsets of Health Check services for execution"),
+    @Property(name=HealthCheck.MBEAN_NAME,
+             label="MBean Name", description="Name of the MBean to create for this Health Check.")
 })
 @Service(value=HealthCheck.class)
 public class DefaultLoginsHealthCheck implements HealthCheck {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    @Property(unbounded=PropertyUnbounded.ARRAY)
+    @Property(unbounded=PropertyUnbounded.ARRAY,
+            label="Login credentials",
+            description="Which credentials to check. Each one is in the format \"user:password\" " +
+                "like \"admin:admin\" for example. Do *not* put any confidential passwords here, the goal " +
+                "is just to check that the default/demo logins, which passwords are known anyway, are disabled.")
     private static final String PROP_LOGINS = "logins";
 
     private List<String> logins;
diff --git a/src/main/java/org/apache/sling/hc/support/impl/SlingRequestStatusHealthCheck.java b/src/main/java/org/apache/sling/hc/support/impl/SlingRequestStatusHealthCheck.java
index 968174e..18a0530 100644
--- a/src/main/java/org/apache/sling/hc/support/impl/SlingRequestStatusHealthCheck.java
+++ b/src/main/java/org/apache/sling/hc/support/impl/SlingRequestStatusHealthCheck.java
@@ -47,11 +47,17 @@ import org.slf4j.LoggerFactory;
         name="org.apache.sling.hc.support.SlingRequestStatusHealthCheck",
         configurationFactory=true,
         policy=ConfigurationPolicy.REQUIRE,
-        metatype=true)
+        metatype=true,
+        label="Apache Sling Request Status Health Check",
+        description="Checks the HTTP status of Sling requests.")
 @Properties({
-    @Property(name=HealthCheck.NAME),
-    @Property(name=HealthCheck.TAGS, unbounded=PropertyUnbounded.ARRAY),
-    @Property(name=HealthCheck.MBEAN_NAME)
+    @Property(name=HealthCheck.NAME,
+            label="Health Check Name", description="Name of this Health Check service."),
+    @Property(name=HealthCheck.TAGS, unbounded=PropertyUnbounded.ARRAY,
+             label="Health Check tags", description="List of tags for this Health Check service, used to select " +
+               "subsets of Health Check services for execution"),
+    @Property(name=HealthCheck.MBEAN_NAME,
+             label="MBean Name", description="Name of the MBean to create for this Health Check.")
 })
 @Service(value=HealthCheck.class)
 public class SlingRequestStatusHealthCheck implements HealthCheck {
@@ -79,7 +85,11 @@ public class SlingRequestStatusHealthCheck implements HealthCheck {
         }
     }
 
-    @Property(unbounded=PropertyUnbounded.ARRAY)
+    @Property(unbounded=PropertyUnbounded.ARRAY,
+            label="Paths to Check",
+            description="The list of paths to check, optionally with expected HTTP status responses. " +
+                        "An entry like \"/tmp/test.txt:301\", for example, checks that /tmp/test.txt returns a " +
+                        "301 response.")
     private static final String PROP_PATH = "path";
 
     @Reference
diff --git a/src/main/resources/OSGI-INF/metatype/metatype.properties b/src/main/resources/OSGI-INF/metatype/metatype.properties
deleted file mode 100644
index 193b63b..0000000
--- a/src/main/resources/OSGI-INF/metatype/metatype.properties
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-#  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.
-#
-
-#
-# This file contains localization strings for configuration labels and
-# descriptions as used in the metatype.xml descriptor generated by the
-# the Sling SCR plugin
-
-org.apache.sling.hc.DefaultLoginsHealthCheck.name = Apache Sling  Default Logins Health Check 
-org.apache.sling.hc.DefaultLoginsHealthCheck.description = Expects default logins to fail, used to verify \
-    that they are disabled on production systems
-    
-org.apache.sling.hc.SlingRequestStatusHealthCheck.name = Apache Sling  Sling Request Status Health Check
-org.apache.sling.hc.SlingRequestStatusHealthCheck.description = Checks the HTTP status of Sling requests.
-
-hc.mbean.name.name = MBean name
-hc.mbean.name.description = Name of the MBean to create for this Health Check.
-
-hc.tags.name = Health Check tags
-hc.tags.description = List of tags for this Health Check service, used to select \
-    subsets of Health Check services for execution.
-
-hc.name.name = Health Check Name
-hc.name.description = Name of this Health Check service. Used for the MBean that's created \
-    for this Health Check as well, unless a specific MBean name is configured.
-
-logins.name = Login credentials
-logins.description = Which credentials to check. Each one is in the format "user:password" \
-    like "admin:admin" for example. Do *not* put any confidential passwords here, the goal \
-    is just to check that the default/demo logins, which passwords are known anyway, are \
-    disabled.
-
-path.name = Paths to check
-path.description = The list of paths to check, optionally with expected HTTP status responses. \
-    An entry like "/tmp/test.txt:301", for example, checks that /tmp/test.txt returns a \
-    301 response. 

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