incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1555096 - in /sling/trunk/bundles/extensions/healthcheck/core/src: main/java/org/apache/sling/hc/api/execution/ main/java/org/apache/sling/hc/core/impl/executor/ main/java/org/apache/sling/hc/util/ test/java/org/apache/sling/hc/core/impl/e...
Date Fri, 03 Jan 2014 14:07:08 GMT
Author: bdelacretaz
Date: Fri Jan  3 14:07:08 2014
New Revision: 1555096

URL: http://svn.apache.org/r1555096
Log:
HealthCheckMetaData -> HealthCheckMetadata

Modified:
    sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/execution/HealthCheckExecutionResult.java
    sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/ExecutionResult.java
    sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/HealthCheckDescriptor.java
    sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java
    sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/executor/HealthCheckExecutorImplTest.java

Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/execution/HealthCheckExecutionResult.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/execution/HealthCheckExecutionResult.java?rev=1555096&r1=1555095&r2=1555096&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/execution/HealthCheckExecutionResult.java
(original)
+++ sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/api/execution/HealthCheckExecutionResult.java
Fri Jan  3 14:07:08 2014
@@ -3,7 +3,7 @@ package org.apache.sling.hc.api.executio
 import java.util.Date;
 
 import org.apache.sling.hc.api.Result;
-import org.apache.sling.hc.util.HealthCheckMetaData;
+import org.apache.sling.hc.util.HealthCheckMetadata;
 
 import aQute.bnd.annotation.ProviderType;
 
@@ -26,5 +26,5 @@ public interface HealthCheckExecutionRes
     /**
      * Get the meta data about the health check service
      */
-    HealthCheckMetaData getHealthCheckMetaData();
+    HealthCheckMetadata getHealthCheckMetadata();
 }
\ No newline at end of file

Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/ExecutionResult.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/ExecutionResult.java?rev=1555096&r1=1555095&r2=1555096&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/ExecutionResult.java
(original)
+++ sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/ExecutionResult.java
Fri Jan  3 14:07:08 2014
@@ -23,21 +23,21 @@ import java.util.Date;
 import org.apache.sling.hc.api.HealthCheck;
 import org.apache.sling.hc.api.Result;
 import org.apache.sling.hc.api.execution.HealthCheckExecutionResult;
-import org.apache.sling.hc.util.HealthCheckMetaData;
+import org.apache.sling.hc.util.HealthCheckMetadata;
 
 /** The result of executing a {@link HealthCheck} */
 public class ExecutionResult implements Comparable<ExecutionResult>, HealthCheckExecutionResult
{
 
     private final Result resultFromHC;
 
-    private final HealthCheckMetaData metaData;
+    private final HealthCheckMetadata metaData;
 
     private final Date finishedAt;
     private final long elapsedTimeInMs;
 
     /** Build a single-value Result
      *  @param s if lower than OK, our status is set to OK */
-    ExecutionResult(final HealthCheckMetaData healthCheckDescriptor, Result simpleResult,
+    ExecutionResult(final HealthCheckMetadata healthCheckDescriptor, Result simpleResult,
             long elapsedTimeInMs) {
         this.metaData = healthCheckDescriptor;
         this.resultFromHC = simpleResult;
@@ -52,7 +52,7 @@ public class ExecutionResult implements 
      * @param status
      * @param errorMessage
      */
-    ExecutionResult(HealthCheckMetaData healthCheckDescriptor, Result.Status status, String
errorMessage) {
+    ExecutionResult(HealthCheckMetadata healthCheckDescriptor, Result.Status status, String
errorMessage) {
         this(healthCheckDescriptor, new Result(status, errorMessage), 0L);
     }
 
@@ -63,7 +63,7 @@ public class ExecutionResult implements 
      * @param status
      * @param errorMessage
      */
-    ExecutionResult(HealthCheckMetaData healthCheckDescriptor, Result.Status status, String
errorMessage, long elapsedTime) {
+    ExecutionResult(HealthCheckMetadata healthCheckDescriptor, Result.Status status, String
errorMessage, long elapsedTime) {
         this(healthCheckDescriptor, new Result(status, errorMessage), elapsedTime);
     }
 
@@ -84,7 +84,7 @@ public class ExecutionResult implements 
     }
 
     @Override
-    public HealthCheckMetaData getHealthCheckMetaData() {
+    public HealthCheckMetadata getHealthCheckMetadata() {
         return this.metaData;
     }
 
@@ -100,7 +100,7 @@ public class ExecutionResult implements 
     public int compareTo(ExecutionResult otherResult) {
         int retVal = otherResult.getHealthCheckResult().getStatus().compareTo(this.getHealthCheckResult().getStatus());
         if (retVal == 0) {
-            retVal = Collator.getInstance().compare(this.getHealthCheckMetaData().getTitle(),
otherResult.getHealthCheckMetaData().getTitle());
+            retVal = Collator.getInstance().compare(this.getHealthCheckMetadata().getTitle(),
otherResult.getHealthCheckMetadata().getTitle());
         }
         return retVal;
     }

Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/HealthCheckDescriptor.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/HealthCheckDescriptor.java?rev=1555096&r1=1555095&r2=1555096&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/HealthCheckDescriptor.java
(original)
+++ sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/executor/HealthCheckDescriptor.java
Fri Jan  3 14:07:08 2014
@@ -17,7 +17,7 @@
  */
 package org.apache.sling.hc.core.impl.executor;
 
-import org.apache.sling.hc.util.HealthCheckMetaData;
+import org.apache.sling.hc.util.HealthCheckMetadata;
 import org.osgi.framework.ServiceReference;
 
 /**
@@ -25,7 +25,7 @@ import org.osgi.framework.ServiceReferen
  */
 public class HealthCheckDescriptor {
 
-    private final HealthCheckMetaData metaData;
+    private final HealthCheckMetadata metaData;
     private final transient ServiceReference serviceReference;
 
     public HealthCheckDescriptor(final ServiceReference healthCheckRef) {
@@ -33,7 +33,7 @@ public class HealthCheckDescriptor {
             throw new IllegalArgumentException("HealthCheck reference must not be null");
         }
         this.serviceReference = healthCheckRef;
-        this.metaData = new HealthCheckMetaData(healthCheckRef);
+        this.metaData = new HealthCheckMetadata(healthCheckRef);
     }
 
     @Override
@@ -41,7 +41,7 @@ public class HealthCheckDescriptor {
         return "HealthCheck '" + this.metaData.getTitle() + "'";
     }
 
-    public HealthCheckMetaData getMetaData() {
+    public HealthCheckMetadata getMetaData() {
         return this.metaData;
     }
 

Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java?rev=1555096&r1=1555095&r2=1555096&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java
(original)
+++ sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java
Fri Jan  3 14:07:08 2014
@@ -31,7 +31,7 @@ import org.osgi.service.component.Compon
  * This class helps retrieving meta data information about a health check service.
  * @since 1.1
  */
-public class HealthCheckMetaData {
+public class HealthCheckMetadata {
 
     private final String name;
 
@@ -41,7 +41,7 @@ public class HealthCheckMetaData {
 
     private final List<String> tags;
 
-    public HealthCheckMetaData(final ServiceReference ref) {
+    public HealthCheckMetadata(final ServiceReference ref) {
         this.serviceId = (Long) ref.getProperty(Constants.SERVICE_ID);
         this.name = (String) ref.getProperty(HealthCheck.NAME);
         this.title = getHealthCheckTitle(ref);
@@ -76,10 +76,10 @@ public class HealthCheckMetaData {
 
     @Override
     public boolean equals(final Object obj) {
-        if ( !(obj instanceof HealthCheckMetaData)) {
+        if ( !(obj instanceof HealthCheckMetadata)) {
             return false;
         }
-        final HealthCheckMetaData other = (HealthCheckMetaData) obj;
+        final HealthCheckMetadata other = (HealthCheckMetadata) obj;
         return serviceId == other.serviceId;
     }
 

Modified: sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/executor/HealthCheckExecutorImplTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/executor/HealthCheckExecutorImplTest.java?rev=1555096&r1=1555095&r2=1555096&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/executor/HealthCheckExecutorImplTest.java
(original)
+++ sling/trunk/bundles/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/executor/HealthCheckExecutorImplTest.java
Fri Jan  3 14:07:08 2014
@@ -15,7 +15,7 @@ import java.util.TreeSet;
 
 import org.apache.sling.hc.api.Result;
 import org.apache.sling.hc.api.execution.HealthCheckExecutionResult;
-import org.apache.sling.hc.util.HealthCheckMetaData;
+import org.apache.sling.hc.util.HealthCheckMetadata;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
@@ -32,15 +32,15 @@ public class HealthCheckExecutorImplTest
     private HealthCheckDescriptor healthCheckDescriptor;
 
     @Mock
-    private HealthCheckMetaData healthCheckMetaData;
+    private HealthCheckMetadata HealthCheckMetadata;
 
     @Before
     public void setup() {
         MockitoAnnotations.initMocks(this);
 
         when(future.getHealthCheckDescriptor()).thenReturn(healthCheckDescriptor);
-        when(healthCheckDescriptor.getMetaData()).thenReturn(this.healthCheckMetaData);
-        when(healthCheckMetaData.getTitle()).thenReturn("Test Check");
+        when(healthCheckDescriptor.getMetaData()).thenReturn(this.HealthCheckMetadata);
+        when(HealthCheckMetadata.getTitle()).thenReturn("Test Check");
 
         healthCheckExecutorImpl = new HealthCheckExecutorImpl();
         // 2 sec normal timeout



Mime
View raw message