camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [1/2] camel git commit: Revert "CAMEL-11655 - Camel-Nagios: Use Encryption enum instead of EncryptionMethod"
Date Tue, 22 Aug 2017 06:19:57 GMT
Repository: camel
Updated Branches:
  refs/heads/master f96385a50 -> 716928ced


Revert "CAMEL-11655 - Camel-Nagios: Use Encryption enum instead of EncryptionMethod"

This reverts commit efee1f707a41f3091955e11beab26d0afbf916cd.


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

Branch: refs/heads/master
Commit: 6e5dce3acaa3e1f6b669362198ae39f2cbd587e9
Parents: f96385a
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Tue Aug 22 08:04:20 2017 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Tue Aug 22 08:04:20 2017 +0200

----------------------------------------------------------------------
 .../src/main/docs/nagios-component.adoc         |  2 +-
 .../component/nagios/NagiosConfiguration.java   | 24 ++++++++++----------
 .../nagios/NagiosXorEncryptionTest.java         |  2 +-
 .../NagiosComponentConfiguration.java           | 12 +++++-----
 4 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6e5dce3a/components/camel-nagios/src/main/docs/nagios-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-nagios/src/main/docs/nagios-component.adoc b/components/camel-nagios/src/main/docs/nagios-component.adoc
index dd040ac..9bc6501 100644
--- a/components/camel-nagios/src/main/docs/nagios-component.adoc
+++ b/components/camel-nagios/src/main/docs/nagios-component.adoc
@@ -81,7 +81,7 @@ with the following path and query parameters:
 | **sendSync** (producer) | Whether or not to use synchronous when sending a passive check.
Setting it to false will allow Camel to continue routing the message and the passive check
message will be send asynchronously. | true | boolean
 | **timeout** (producer) | Sending timeout in millis. | 5000 | int
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used
or Camel is allowed to use asynchronous processing (if supported). | false | boolean
-| **encryption** (security) | To specify an encryption method. |  | Encryption
+| **encryptionMethod** (security) | To specify an encryption method. |  | NagiosEncryptionMethod
 | **password** (security) | Password to be authenticated when sending checks to Nagios. |
 | String
 |=======================================================================
 // endpoint options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/6e5dce3a/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosConfiguration.java
b/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosConfiguration.java
index a4b160a..69cdcee 100644
--- a/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosConfiguration.java
+++ b/components/camel-nagios/src/main/java/org/apache/camel/component/nagios/NagiosConfiguration.java
@@ -47,7 +47,7 @@ public class NagiosConfiguration implements Cloneable {
     @UriParam(label = "security", secret = true)
     private String password;
     @UriParam(label = "security")
-    private Encryption encryption = Encryption.NONE;
+    private NagiosEncryptionMethod encryptionMethod;
 
     /**
      * Returns a copy of this configuration
@@ -89,19 +89,19 @@ public class NagiosConfiguration implements Cloneable {
             nagiosSettings.setPort(getPort());
             nagiosSettings.setPassword(getPassword());
 
-            if (encryption != null) {
-                if (Encryption.NONE == encryption) {
+            if (encryptionMethod != null) {
+                if (NagiosEncryptionMethod.No == encryptionMethod) {
                     nagiosSettings.setEncryption(Encryption.NONE);
-                } else if (Encryption.XOR == encryption) {
+                } else if (NagiosEncryptionMethod.Xor == encryptionMethod) {
                     nagiosSettings.setEncryption(Encryption.XOR);
-                } else if (Encryption.TRIPLE_DES == encryption) {
+                } else if (NagiosEncryptionMethod.TripleDes == encryptionMethod) {
                     nagiosSettings.setEncryption(Encryption.TRIPLE_DES);
                 } else {
-                    throw new IllegalArgumentException("Unknown encryption method: " + encryption);
+                    throw new IllegalArgumentException("Unknown encryption method: " + encryptionMethod);
                 }
             }
         }
-        
+
         return nagiosSettings;
     }
 
@@ -164,21 +164,21 @@ public class NagiosConfiguration implements Cloneable {
         this.password = password;
     }
 
-    public Encryption getEncryptionMethod() {
-        return encryption;
+    public NagiosEncryptionMethod getEncryptionMethod() {
+        return encryptionMethod;
     }
 
     /**
      * To specify an encryption method.
      */
-    public void setEncryption(Encryption encryptionMethod) {
-        this.encryption = encryption;
+    public void setEncryptionMethod(NagiosEncryptionMethod encryptionMethod) {
+        this.encryptionMethod = encryptionMethod;
     }
 
     @Override
     public String toString() {
         return "NagiosConfiguration[host=" + host + ":" + port + ", connectionTimeout=" +
connectionTimeout
-                + ", timeout=" + timeout + ", encryption=" + encryption + "]";
+                + ", timeout=" + timeout + ", encryptionMethod=" + encryptionMethod + "]";
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/6e5dce3a/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosXorEncryptionTest.java
----------------------------------------------------------------------
diff --git a/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosXorEncryptionTest.java
b/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosXorEncryptionTest.java
index cf4766c..d9e5346 100644
--- a/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosXorEncryptionTest.java
+++ b/components/camel-nagios/src/test/java/org/apache/camel/component/nagios/NagiosXorEncryptionTest.java
@@ -72,7 +72,7 @@ public class NagiosXorEncryptionTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                String uri = "nagios:127.0.0.1:25664?password=secret&encryption=Xor";
+                String uri = "nagios:127.0.0.1:25664?password=secret&encryptionMethod=Xor";
 
                 NagiosComponent nagiosComponent = new NagiosComponent();
                 nagiosComponent.setCamelContext(context);

http://git-wip-us.apache.org/repos/asf/camel/blob/6e5dce3a/platforms/spring-boot/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.java
b/platforms/spring-boot/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.java
index bcbb527..cf7611c 100644
--- a/platforms/spring-boot/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-nagios-starter/src/main/java/org/apache/camel/component/nagios/springboot/NagiosComponentConfiguration.java
@@ -18,7 +18,7 @@ package org.apache.camel.component.nagios.springboot;
 
 import javax.annotation.Generated;
 import com.googlecode.jsendnsca.NagiosSettings;
-import com.googlecode.jsendnsca.encryption.Encryption;
+import org.apache.camel.component.nagios.NagiosEncryptionMethod;
 import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.boot.context.properties.NestedConfigurationProperty;
@@ -90,7 +90,7 @@ public class NagiosComponentConfiguration
         /**
          * To specify an encryption method.
          */
-        private Encryption encryption;
+        private NagiosEncryptionMethod encryptionMethod;
 
         public NagiosSettings getNagiosSettings() {
             return nagiosSettings;
@@ -140,12 +140,12 @@ public class NagiosComponentConfiguration
             this.password = password;
         }
 
-        public Encryption getEncryption() {
-            return encryption;
+        public NagiosEncryptionMethod getEncryptionMethod() {
+            return encryptionMethod;
         }
 
-        public void setEncryption(Encryption encryption) {
-            this.encryption = encryption;
+        public void setEncryptionMethod(NagiosEncryptionMethod encryptionMethod) {
+            this.encryptionMethod = encryptionMethod;
         }
     }
 }
\ No newline at end of file


Mime
View raw message