You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gz...@apache.org on 2017/07/09 10:57:24 UTC

camel git commit: Rename class CamelMvcRoutesEndpoint to CamelRoutesMvcEndpoint

Repository: camel
Updated Branches:
  refs/heads/master d3a4d5965 -> 15b0d1785


Rename class CamelMvcRoutesEndpoint to CamelRoutesMvcEndpoint

Signed-off-by: Gregor Zurowski <gr...@zurowski.org>


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/15b0d178
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/15b0d178
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/15b0d178

Branch: refs/heads/master
Commit: 15b0d1785455c842cc9b9385f81c7901c6aee252
Parents: d3a4d59
Author: Gregor Zurowski <gr...@zurowski.org>
Authored: Sun Jul 9 12:55:50 2017 +0200
Committer: Gregor Zurowski <gr...@zurowski.org>
Committed: Sun Jul 9 12:55:50 2017 +0200

----------------------------------------------------------------------
 .../endpoint/CamelMvcRoutesEndpoint.java        | 69 --------------------
 .../CamelRoutesEndpointAutoConfiguration.java   |  4 +-
 .../endpoint/CamelRoutesMvcEndpoint.java        | 69 ++++++++++++++++++++
 .../endpoint/CamelMvcRoutesEndpointTest.java    |  2 +-
 4 files changed, 72 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/15b0d178/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpoint.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpoint.java
deleted file mode 100644
index 1886f07..0000000
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpoint.java
+++ /dev/null
@@ -1,69 +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.
- */
-package org.apache.camel.spring.boot.actuate.endpoint;
-
-import org.springframework.boot.actuate.endpoint.mvc.ActuatorMediaTypes;
-import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-/**
- * Adapter to expose {@link CamelRoutesEndpoint} as an {@link MvcEndpoint}.
- *
- * @author Ben Hale
- * @author Kazuki Shimizu
- * @author Eddú Meléndez
- * @since 1.5.0
- */
-@ConfigurationProperties(prefix = "endpoints." + CamelRoutesEndpoint.ENDPOINT_ID)
-public class CamelMvcRoutesEndpoint extends EndpointMvcAdapter {
-    private static final ResponseEntity<?> NOT_FOUND = ResponseEntity.notFound().build();
-    private final CamelRoutesEndpoint delegate;
-
-    public CamelMvcRoutesEndpoint(CamelRoutesEndpoint delegate) {
-        super(delegate);
-
-        this.delegate = delegate;
-    }
-
-    @RequestMapping(
-        method = RequestMethod.GET,
-        value = "/{id}",
-        produces = {
-            ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE,
-            MediaType.APPLICATION_JSON_VALUE
-        }
-    )
-    @ResponseBody
-    public Object get(@PathVariable String id) {
-        if (!delegate.isEnabled()) {
-            return getDisabledResponse();
-        }
-
-        Object result = delegate.getRouteInfo(id);
-        if (result == null) {
-            result = NOT_FOUND;
-        }
-
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/15b0d178/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpointAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpointAutoConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpointAutoConfiguration.java
index 485c28c..2425359 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpointAutoConfiguration.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesEndpointAutoConfiguration.java
@@ -43,7 +43,7 @@ public class CamelRoutesEndpointAutoConfiguration {
     @Bean
     @ConditionalOnClass(CamelContext.class)
     @ConditionalOnMissingBean
-    public CamelMvcRoutesEndpoint camelMvcEndpoint(CamelRoutesEndpoint delegate) {
-        return new CamelMvcRoutesEndpoint(delegate);
+    public CamelRoutesMvcEndpoint camelMvcEndpoint(CamelRoutesEndpoint delegate) {
+        return new CamelRoutesMvcEndpoint(delegate);
     }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/15b0d178/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesMvcEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesMvcEndpoint.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesMvcEndpoint.java
new file mode 100644
index 0000000..5aa91a5
--- /dev/null
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/endpoint/CamelRoutesMvcEndpoint.java
@@ -0,0 +1,69 @@
+/**
+ * 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.
+ */
+package org.apache.camel.spring.boot.actuate.endpoint;
+
+import org.springframework.boot.actuate.endpoint.mvc.ActuatorMediaTypes;
+import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+/**
+ * Adapter to expose {@link CamelRoutesEndpoint} as an {@link MvcEndpoint}.
+ *
+ * @author Ben Hale
+ * @author Kazuki Shimizu
+ * @author Eddú Meléndez
+ * @since 1.5.0
+ */
+@ConfigurationProperties(prefix = "endpoints." + CamelRoutesEndpoint.ENDPOINT_ID)
+public class CamelRoutesMvcEndpoint extends EndpointMvcAdapter {
+    private static final ResponseEntity<?> NOT_FOUND = ResponseEntity.notFound().build();
+    private final CamelRoutesEndpoint delegate;
+
+    public CamelRoutesMvcEndpoint(CamelRoutesEndpoint delegate) {
+        super(delegate);
+
+        this.delegate = delegate;
+    }
+
+    @RequestMapping(
+        method = RequestMethod.GET,
+        value = "/{id}",
+        produces = {
+            ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE,
+            MediaType.APPLICATION_JSON_VALUE
+        }
+    )
+    @ResponseBody
+    public Object get(@PathVariable String id) {
+        if (!delegate.isEnabled()) {
+            return getDisabledResponse();
+        }
+
+        Object result = delegate.getRouteInfo(id);
+        if (result == null) {
+            result = NOT_FOUND;
+        }
+
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/15b0d178/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpointTest.java b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpointTest.java
index 518b7a2..697dcff 100644
--- a/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpointTest.java
+++ b/components/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/endpoint/CamelMvcRoutesEndpointTest.java
@@ -42,7 +42,7 @@ import org.springframework.test.context.junit4.SpringRunner;
 public class CamelMvcRoutesEndpointTest extends Assert {
 
     @Autowired
-    CamelMvcRoutesEndpoint endpoint;
+    CamelRoutesMvcEndpoint endpoint;
 
     @Autowired
     CamelContext camelContext;