camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [05/20] camel git commit: Fixes reported checkstyle errors.
Date Mon, 27 Mar 2017 07:49:23 GMT
Fixes reported checkstyle errors.


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

Branch: refs/heads/master
Commit: 0dd2c2f29fc281cbd73b161b111595d45a8e9598
Parents: db910e7
Author: Thomas Lehoux <tlehoux@gmail.com>
Authored: Fri Mar 24 15:54:46 2017 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Mar 27 09:48:34 2017 +0200

----------------------------------------------------------------------
 components/camel-digitalocean/.gitignore        |   5 +
 .../digitalocean/DigitalOceanComponent.java     |   9 +-
 .../digitalocean/DigitalOceanConfiguration.java |  11 +-
 .../digitalocean/DigitalOceanEndpoint.java      |  99 ++++---
 .../constants/DigitalOceanHeaders.java          |  62 ++---
 .../constants/DigitalOceanResources.java        |   1 -
 .../producer/DigitalOceanAccountProducer.java   |   4 +-
 .../producer/DigitalOceanActionsProducer.java   |  26 +-
 .../DigitalOceanBlockStoragesProducer.java      | 148 +++++-----
 .../producer/DigitalOceanDropletsProducer.java  | 273 +++++++++++--------
 .../DigitalOceanFloatingIPsProducer.java        |  88 +++---
 .../producer/DigitalOceanImagesProducer.java    | 103 +++----
 .../producer/DigitalOceanKeysProducer.java      |  88 +++---
 .../producer/DigitalOceanProducer.java          |   7 +-
 .../producer/DigitalOceanRegionsProducer.java   |   4 +-
 .../producer/DigitalOceanSizesProducer.java     |   4 +-
 .../producer/DigitalOceanSnapshotsProducer.java |  42 +--
 .../producer/DigitalOceanTagsProducer.java      |  62 +++--
 .../src/main/resources/log4j2.properties        |  13 +-
 .../digitalocean/DigitalOceanClientMock.java    |  20 +-
 .../digitalocean/DigitalOceanComponentTest.java |  33 ++-
 .../DigitalOceanComponentIntegrationTest.java   | 241 ++++++++--------
 .../integration/DigitalOceanTestSupport.java    |  26 +-
 .../src/test/resources/log4j2.properties        |  13 +-
 .../src/test/resources/test-options.properties  |   1 -
 25 files changed, 774 insertions(+), 609 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/.gitignore
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/.gitignore b/components/camel-digitalocean/.gitignore
new file mode 100644
index 0000000..f007cf2
--- /dev/null
+++ b/components/camel-digitalocean/.gitignore
@@ -0,0 +1,5 @@
+*.iml
+.idea/
+overlays/
+target/
+.gitignore
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanComponent.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanComponent.java
index 74daca2..8bbb9cc 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanComponent.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanComponent.java
@@ -18,10 +18,9 @@ package org.apache.camel.component.digitalocean;
 
 import java.util.Map;
 
-import org.apache.camel.component.digitalocean.constants.DigitalOceanResources;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
-
+import org.apache.camel.component.digitalocean.constants.DigitalOceanResources;
 import org.apache.camel.impl.UriEndpointComponent;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
@@ -49,11 +48,11 @@ public class DigitalOceanComponent extends UriEndpointComponent {
         setProperties(configuration, parameters);
         configuration.setResource(DigitalOceanResources.valueOf(remaining));
 
-        if (ObjectHelper.isEmpty(configuration.getOAuthToken()) && ObjectHelper.isEmpty(configuration.getDigitalOceanClient()))
+        if (ObjectHelper.isEmpty(configuration.getOAuthToken()) && ObjectHelper.isEmpty(configuration.getDigitalOceanClient())) {
             throw new DigitalOceanException("oAuthToken or digitalOceanClient must be specified");
+        }
 
-        Endpoint endpoint = new DigitalOceanEndpoint(uri, this, configuration);
-        return endpoint;
+        return new DigitalOceanEndpoint(uri, this, configuration);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanConfiguration.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanConfiguration.java
index 895fa89..90b9dac 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanConfiguration.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanConfiguration.java
@@ -16,9 +16,10 @@
  */
 package org.apache.camel.component.digitalocean;
 
+
 import com.myjeeva.digitalocean.impl.DigitalOceanClient;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanResources;
 import org.apache.camel.component.digitalocean.constants.DigitalOceanOperations;
+import org.apache.camel.component.digitalocean.constants.DigitalOceanResources;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
@@ -32,10 +33,10 @@ public class DigitalOceanConfiguration {
     @Metadata(required = "true")
     private DigitalOceanResources resource;
 
-    @UriPath(enums = "create,update,delete,list,ownList,get,listBackups,listActions,listNeighbors,listSnapshots,listKernels,listAllNeighbors," +
-            "enableBackups,disableBackups,reboot,powerCycle,shutdown,powerOn,powerOff,restore,resetPassword," +
-            "resize,rebuild,rename,changeKernel,enableIpv6,enablePrivateNetworking,takeSnapshot,transfer,convert," +
-            "attach,detach,assign,unassign,tag,untag")
+    @UriPath(enums = "create,update,delete,list,ownList,get,listBackups,listActions,listNeighbors,listSnapshots,listKernels,listAllNeighbors,"
+        + "enableBackups,disableBackups,reboot,powerCycle,shutdown,powerOn,powerOff,restore,resetPassword,"
+        + "resize,rebuild,rename,changeKernel,enableIpv6,enablePrivateNetworking,takeSnapshot,transfer,convert,"
+        + "attach,detach,assign,unassign,tag,untag")
     private DigitalOceanOperations operation;
 
     @UriParam

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanEndpoint.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanEndpoint.java
index 576e22c..4cf5b15 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanEndpoint.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/DigitalOceanEndpoint.java
@@ -20,7 +20,17 @@ import com.myjeeva.digitalocean.impl.DigitalOceanClient;
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.component.digitalocean.producer.*;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanAccountProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanActionsProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanBlockStoragesProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanDropletsProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanFloatingIPsProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanImagesProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanKeysProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanRegionsProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanSizesProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanSnapshotsProducer;
+import org.apache.camel.component.digitalocean.producer.DigitalOceanTagsProducer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
@@ -36,7 +46,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Represents the DigitalOcean endpoint.
  */
-@UriEndpoint(scheme = "digitalocean", title = "DigitalOcean", syntax="digitalocean:label", producerOnly = true, label = "cloud,management")
+@UriEndpoint(scheme = "digitalocean", title = "DigitalOcean", syntax = "digitalocean:label", producerOnly = true, label = "cloud,management")
 public class DigitalOceanEndpoint extends DefaultEndpoint {
 
     private static final transient Logger LOG = LoggerFactory.getLogger(DigitalOceanEndpoint.class);
@@ -55,30 +65,30 @@ public class DigitalOceanEndpoint extends DefaultEndpoint {
         LOG.trace("Resolve producer digitalocean endpoint {" + configuration.getResource() + "}");
 
         switch (configuration.getResource()) {
-            case account:
-                return new DigitalOceanAccountProducer(this, configuration);
-            case actions:
-                return new DigitalOceanActionsProducer(this, configuration);
-            case blockStorages:
-                return new DigitalOceanBlockStoragesProducer(this, configuration);
-            case droplets:
-                return new DigitalOceanDropletsProducer(this, configuration);
-            case images:
-                return new DigitalOceanImagesProducer(this, configuration);
-            case snapshots:
-                return new DigitalOceanSnapshotsProducer(this, configuration);
-            case keys:
-                return new DigitalOceanKeysProducer(this, configuration);
-            case regions:
-                return new DigitalOceanRegionsProducer(this, configuration);
-            case sizes:
-                return new DigitalOceanSizesProducer(this, configuration);
-            case floatingIPs:
-                return new DigitalOceanFloatingIPsProducer(this, configuration);
-            case tags:
-                return new DigitalOceanTagsProducer(this, configuration);
-            default:
-                throw new UnsupportedOperationException("Operation specified is not valid for producer");
+        case account:
+            return new DigitalOceanAccountProducer(this, configuration);
+        case actions:
+            return new DigitalOceanActionsProducer(this, configuration);
+        case blockStorages:
+            return new DigitalOceanBlockStoragesProducer(this, configuration);
+        case droplets:
+            return new DigitalOceanDropletsProducer(this, configuration);
+        case images:
+            return new DigitalOceanImagesProducer(this, configuration);
+        case snapshots:
+            return new DigitalOceanSnapshotsProducer(this, configuration);
+        case keys:
+            return new DigitalOceanKeysProducer(this, configuration);
+        case regions:
+            return new DigitalOceanRegionsProducer(this, configuration);
+        case sizes:
+            return new DigitalOceanSizesProducer(this, configuration);
+        case floatingIPs:
+            return new DigitalOceanFloatingIPsProducer(this, configuration);
+        case tags:
+            return new DigitalOceanTagsProducer(this, configuration);
+        default:
+            throw new UnsupportedOperationException("Operation specified is not valid for producer");
         }
 
     }
@@ -96,33 +106,36 @@ public class DigitalOceanEndpoint extends DefaultEndpoint {
     public void doStart() throws Exception {
         super.doStart();
 
-        if(configuration.getDigitalOceanClient() != null)
+        if (configuration.getDigitalOceanClient() != null) {
             digitalOceanClient = configuration.getDigitalOceanClient();
-        else
-            if(configuration.getHttpProxyHost() != null && configuration.getHttpProxyPort() != null) {
+        } else if (configuration.getHttpProxyHost() != null && configuration.getHttpProxyPort() != null) {
 
-                 HttpClientBuilder builder = HttpClients.custom()
-                        .useSystemProperties()
-                        .setProxy(new HttpHost(configuration.getHttpProxyHost(), configuration.getHttpProxyPort()));
+            HttpClientBuilder builder = HttpClients.custom()
+                .useSystemProperties()
+                .setProxy(new HttpHost(configuration.getHttpProxyHost(), configuration.getHttpProxyPort()));
 
-                if(configuration.getHttpProxyUser() != null && configuration.getHttpProxyPassword() != null) {
-                    BasicCredentialsProvider credsProvider = new BasicCredentialsProvider();
-                    credsProvider.setCredentials(
-                            new AuthScope(configuration.getHttpProxyHost(), configuration.getHttpProxyPort()),
-                            new UsernamePasswordCredentials(configuration.getHttpProxyUser() , configuration.getHttpProxyPassword()));
-                    builder.setDefaultCredentialsProvider(credsProvider);
+            if (configuration.getHttpProxyUser() != null && configuration.getHttpProxyPassword() != null) {
+                BasicCredentialsProvider credsProvider = new BasicCredentialsProvider();
+                credsProvider.setCredentials(
+                    new AuthScope(configuration.getHttpProxyHost(), configuration.getHttpProxyPort()),
+                    new UsernamePasswordCredentials(configuration.getHttpProxyUser(), configuration.getHttpProxyPassword()));
+                builder.setDefaultCredentialsProvider(credsProvider);
 
-                }
+            }
 
-                digitalOceanClient =  new DigitalOceanClient("v2", configuration.getOAuthToken(), builder.build());
+            digitalOceanClient = new DigitalOceanClient("v2", configuration.getOAuthToken(), builder.build());
+
+        } else {
+            digitalOceanClient = new DigitalOceanClient(configuration.getOAuthToken());
+        }
 
-            } else
-                digitalOceanClient =  new DigitalOceanClient(configuration.getOAuthToken());
 
+    }
 
+    public DigitalOceanConfiguration getConfiguration() {
+        return configuration;
     }
 
-    public DigitalOceanConfiguration getConfiguration() { return configuration; }
     public DigitalOceanClient getDigitalOceanClient() {
         return digitalOceanClient;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanHeaders.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanHeaders.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanHeaders.java
index d4462c2..7950845 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanHeaders.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanHeaders.java
@@ -18,37 +18,33 @@ package org.apache.camel.component.digitalocean.constants;
 
 public interface DigitalOceanHeaders {
 
-        String OPERATION                            = "CamelDigitalOceanOperation";
-        String ID                                   = "CamelDigitalOceanId";
-        String TYPE                                 = "CamelDigitalOceanType";
-        String NAME                                 = "CamelDigitalOceanName";
-        String NEW_NAME                             = "CamelDigitalOceanNewName";
-        String NAMES                                = "CamelDigitalOceanNames";
-        String REGION                               = "CamelDigitalOceanRegion";
-        String DESCRIPTION                          = "CamelDigitalOceanDescription";
-
-        String DROPLET_SIZE                         = "CamelDigitalOceanDropletSize";
-        String DROPLET_IMAGE                        = "CamelDigitalOceanDropletImage";
-        String DROPLET_KEYS                         = "CamelDigitalOceanDropletSSHKeys";
-        String DROPLET_ENABLE_BACKUPS               = "CamelDigitalOceanDropletEnableBackups";
-        String DROPLET_ENABLE_IPV6                  = "CamelDigitalOceanDropletEnableIpv6";
-        String DROPLET_ENABLE_PRIVATE_NETWORKING    = "CamelDigitalOceanDropletEnablePrivateNetworking";
-        String DROPLET_USER_DATA                    = "CamelDigitalOceanDropletUserData";
-        String DROPLET_VOLUMES                      = "CamelDigitalOceanDropletVolumes";
-        String DROPLET_TAGS                         = "CamelDigitalOceanDropletTags";
-
-        String DROPLET_ID                           = "CamelDigitalOceanDropletId";
-        String IMAGE_ID                             = "CamelDigitalOceanImageId";
-        String KERNEL_ID                            = "CamelDigitalOceanKernelId";
-        String VOLUME_NAME                          = "CamelDigitalOceanVolumeName";
-        String VOLUME_SIZE_GIGABYTES                = "CamelDigitalOceanVolumeSizeGigabytes";
-
-        String FLOATING_IP_ADDRESS                  = "CamelDigitalOceanFloatingIPAddress";
-
-        String KEY_FINGERPRINT                      = "CamelDigitalOceanKeyFingerprint";
-        String KEY_PUBLIC_KEY                       = "CamelDigitalOceanKeyPublicKey";
-
-
-
-
+    String OPERATION = "CamelDigitalOceanOperation";
+    String ID = "CamelDigitalOceanId";
+    String TYPE = "CamelDigitalOceanType";
+    String NAME = "CamelDigitalOceanName";
+    String NEW_NAME = "CamelDigitalOceanNewName";
+    String NAMES = "CamelDigitalOceanNames";
+    String REGION = "CamelDigitalOceanRegion";
+    String DESCRIPTION = "CamelDigitalOceanDescription";
+
+    String DROPLET_SIZE = "CamelDigitalOceanDropletSize";
+    String DROPLET_IMAGE = "CamelDigitalOceanDropletImage";
+    String DROPLET_KEYS = "CamelDigitalOceanDropletSSHKeys";
+    String DROPLET_ENABLE_BACKUPS = "CamelDigitalOceanDropletEnableBackups";
+    String DROPLET_ENABLE_IPV6 = "CamelDigitalOceanDropletEnableIpv6";
+    String DROPLET_ENABLE_PRIVATE_NETWORKING = "CamelDigitalOceanDropletEnablePrivateNetworking";
+    String DROPLET_USER_DATA = "CamelDigitalOceanDropletUserData";
+    String DROPLET_VOLUMES = "CamelDigitalOceanDropletVolumes";
+    String DROPLET_TAGS = "CamelDigitalOceanDropletTags";
+
+    String DROPLET_ID = "CamelDigitalOceanDropletId";
+    String IMAGE_ID = "CamelDigitalOceanImageId";
+    String KERNEL_ID = "CamelDigitalOceanKernelId";
+    String VOLUME_NAME = "CamelDigitalOceanVolumeName";
+    String VOLUME_SIZE_GIGABYTES = "CamelDigitalOceanVolumeSizeGigabytes";
+
+    String FLOATING_IP_ADDRESS = "CamelDigitalOceanFloatingIPAddress";
+
+    String KEY_FINGERPRINT = "CamelDigitalOceanKeyFingerprint";
+    String KEY_PUBLIC_KEY = "CamelDigitalOceanKeyPublicKey";
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanResources.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanResources.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanResources.java
index 8188cb8..f3f9b84 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanResources.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/constants/DigitalOceanResources.java
@@ -32,5 +32,4 @@ public enum DigitalOceanResources {
     tags
 
 
-
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanAccountProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanAccountProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanAccountProducer.java
index dddc1a5..f5bb639 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanAccountProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanAccountProducer.java
@@ -16,10 +16,10 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
-import com.myjeeva.digitalocean.pojo.*;
+import com.myjeeva.digitalocean.pojo.Account;
+import org.apache.camel.Exchange;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
-import org.apache.camel.Exchange;
 
 /**
  * The DigitalOcean producer for Account API.

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanActionsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanActionsProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanActionsProducer.java
index 67fdd67..ac5050d 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanActionsProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanActionsProducer.java
@@ -16,11 +16,12 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
-import com.myjeeva.digitalocean.pojo.*;
+import com.myjeeva.digitalocean.pojo.Action;
+import com.myjeeva.digitalocean.pojo.Actions;
+import org.apache.camel.Exchange;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
 import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
-import org.apache.camel.Exchange;
 import org.apache.camel.util.ObjectHelper;
 
 /**
@@ -33,16 +34,16 @@ public class DigitalOceanActionsProducer extends DigitalOceanProducer {
     }
 
     public void process(Exchange exchange) throws Exception {
-        switch(determineOperation(exchange)) {
+        switch (determineOperation(exchange)) {
 
-            case list:
-                getActions(exchange);
-                break;
-            case get:
-                getAction(exchange);
-                break;
-            default:
-                throw new IllegalArgumentException("Unsupported operation");
+        case list:
+            getActions(exchange);
+            break;
+        case get:
+            getAction(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation");
         }
 
     }
@@ -51,8 +52,9 @@ public class DigitalOceanActionsProducer extends DigitalOceanProducer {
     private void getAction(Exchange exchange) throws Exception {
         Integer actionId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, Integer.class);
 
-        if (ObjectHelper.isEmpty(actionId))
+        if (ObjectHelper.isEmpty(actionId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
         Action action = getEndpoint().getDigitalOceanClient().getActionInfo(actionId);
         LOG.trace("Action [{}] ", action);
         exchange.getOut().setBody(action);

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanBlockStoragesProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanBlockStoragesProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanBlockStoragesProducer.java
index 0e00507..f6f9530 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanBlockStoragesProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanBlockStoragesProducer.java
@@ -16,16 +16,22 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
-import com.myjeeva.digitalocean.pojo.*;
-import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
-import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
+import java.util.List;
+
+import com.myjeeva.digitalocean.pojo.Action;
+import com.myjeeva.digitalocean.pojo.Actions;
+import com.myjeeva.digitalocean.pojo.Delete;
+import com.myjeeva.digitalocean.pojo.Region;
+import com.myjeeva.digitalocean.pojo.Snapshots;
+import com.myjeeva.digitalocean.pojo.Volume;
+import com.myjeeva.digitalocean.pojo.Volumes;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
+import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
+import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
+import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.util.ObjectHelper;
 
-import java.util.List;
-
 /**
  * The DigitalOcean producer for BlockStorages API.
  */
@@ -39,42 +45,43 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
 
         switch (determineOperation(exchange)) {
 
-            case list:
-                getVolumes(exchange);
-                break;
-            case get:
-                getVolume(exchange);
-                break;
-            case listSnapshots:
-                getVolumeSnapshots(exchange);
-                break;
-            case create:
-                createVolume(exchange);
-                break;
-            case delete:
-                deleteVolume(exchange);
-                break;
-            case attach:
-                attachVolumeToDroplet(exchange);
-                break;
-            case detach:
-                detachVolumeToDroplet(exchange);
-                break;
-            case resize:
-                resizeVolume(exchange);
-                break;
-            case listActions:
-                getVolumeActions(exchange);
-                break;
-            default:
-                throw new IllegalArgumentException("Unsupported operation");
+        case list:
+            getVolumes(exchange);
+            break;
+        case get:
+            getVolume(exchange);
+            break;
+        case listSnapshots:
+            getVolumeSnapshots(exchange);
+            break;
+        case create:
+            createVolume(exchange);
+            break;
+        case delete:
+            deleteVolume(exchange);
+            break;
+        case attach:
+            attachVolumeToDroplet(exchange);
+            break;
+        case detach:
+            detachVolumeToDroplet(exchange);
+            break;
+        case resize:
+            resizeVolume(exchange);
+            break;
+        case listActions:
+            getVolumeActions(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation");
         }
     }
 
     private void getVolumes(Exchange exchange) throws Exception {
         String region = exchange.getIn().getHeader(DigitalOceanHeaders.REGION, String.class);
-        if (ObjectHelper.isEmpty(region))
+        if (ObjectHelper.isEmpty(region)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.REGION + " must be specified");
+        }
 
         Volumes volumes = getEndpoint().getDigitalOceanClient().getAvailableVolumes(region);
         LOG.trace("All Volumes for region {} [{}] ", region, volumes.getVolumes());
@@ -87,25 +94,29 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
 
         Volume volume = new Volume();
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.VOLUME_SIZE_GIGABYTES)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.VOLUME_SIZE_GIGABYTES))) {
             volume.setSize(in.getHeader(DigitalOceanHeaders.VOLUME_SIZE_GIGABYTES, Double.class));
-        else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.VOLUME_SIZE_GIGABYTES + " must be specified");
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME))) {
             volume.setName(in.getHeader(DigitalOceanHeaders.NAME, String.class));
-        else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.NAME + " must be specified");
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.REGION)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.REGION))) {
             volume.setRegion(new Region(in.getHeader(DigitalOceanHeaders.REGION, String.class)));
-        else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.REGION + " must be specified");
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DESCRIPTION)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DESCRIPTION))) {
             volume.setDescription(in.getHeader(DigitalOceanHeaders.DESCRIPTION, String.class));
-        else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.DESCRIPTION + " must be specified");
+        }
 
         volume = getEndpoint().getDigitalOceanClient().createVolume(volume);
         LOG.trace("Volume created {} ", volume);
@@ -119,14 +130,17 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
             String name = exchange.getIn().getHeader(DigitalOceanHeaders.NAME, String.class);
             String region = exchange.getIn().getHeader(DigitalOceanHeaders.REGION, String.class);
 
-            if (ObjectHelper.isEmpty(name) && ObjectHelper.isEmpty(region))
+            if (ObjectHelper.isEmpty(name) && ObjectHelper.isEmpty(region)) {
                 throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " + DigitalOceanHeaders.NAME + " and " + DigitalOceanHeaders.REGION + " must be specified");
+            }
 
             List<Volume> volumes = getEndpoint().getDigitalOceanClient().getVolumeInfo(name, region).getVolumes();
-            if (volumes.size() > 0)
+            if (volumes.size() > 0) {
                 volume = volumes.get(1);
-        } else
+            }
+        } else {
             volume = getEndpoint().getDigitalOceanClient().getVolumeInfo(volumeId);
+        }
 
         LOG.trace("Volume [{}] ", volume);
         exchange.getOut().setBody(volume);
@@ -135,8 +149,9 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
 
     private void getVolumeSnapshots(Exchange exchange) throws Exception {
         String volumeId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, String.class);
-        if (ObjectHelper.isEmpty(volumeId))
+        if (ObjectHelper.isEmpty(volumeId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
 
         Snapshots snapshots = getEndpoint().getDigitalOceanClient().getVolumeSnapshots(volumeId, configuration.getPage(), configuration.getPerPage());
         LOG.trace("All Snapshots for volume {} [{}] ", volumeId, snapshots.getSnapshots());
@@ -150,13 +165,15 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
             String name = exchange.getIn().getHeader(DigitalOceanHeaders.NAME, String.class);
             String region = exchange.getIn().getHeader(DigitalOceanHeaders.REGION, String.class);
 
-            if (ObjectHelper.isEmpty(name) && ObjectHelper.isEmpty(region))
+            if (ObjectHelper.isEmpty(name) && ObjectHelper.isEmpty(region)) {
                 throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " + DigitalOceanHeaders.NAME + " and " + DigitalOceanHeaders.REGION + " must be specified");
+            }
 
             delete = getEndpoint().getDigitalOceanClient().deleteVolume(name, region);
 
-        } else
+        } else {
             delete = getEndpoint().getDigitalOceanClient().deleteVolume(volumeId);
+        }
 
         LOG.trace("Delete Volume [{}] ", delete);
         exchange.getOut().setBody(delete);
@@ -169,11 +186,13 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
         Integer dropletId = exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ID, Integer.class);
         String region = exchange.getIn().getHeader(DigitalOceanHeaders.REGION, String.class);
 
-        if (ObjectHelper.isEmpty(dropletId))
+        if (ObjectHelper.isEmpty(dropletId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.DROPLET_ID + " must be specified");
+        }
 
-        if (ObjectHelper.isEmpty(region))
+        if (ObjectHelper.isEmpty(region)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.REGION + " must be specified");
+        }
 
         Action action;
 
@@ -183,25 +202,27 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
         } else if (ObjectHelper.isNotEmpty(volumeId)) {
             action = getEndpoint().getDigitalOceanClient().attachVolume(dropletId, volumeId, region);
             LOG.trace("Attach Volume {} to Droplet {} [{}] ", volumeId, dropletId, action);
-        } else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " + DigitalOceanHeaders.VOLUME_NAME + " must be specified");
+        }
 
         exchange.getOut().setBody(action);
     }
 
 
-
     private void detachVolumeToDroplet(Exchange exchange) throws Exception {
         String volumeId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, String.class);
         String volumeName = exchange.getIn().getHeader(DigitalOceanHeaders.VOLUME_NAME, String.class);
         Integer dropletId = exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ID, Integer.class);
         String region = exchange.getIn().getHeader(DigitalOceanHeaders.REGION, String.class);
 
-        if (ObjectHelper.isEmpty(dropletId))
+        if (ObjectHelper.isEmpty(dropletId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.DROPLET_ID + " must be specified");
+        }
 
-        if (ObjectHelper.isEmpty(region))
+        if (ObjectHelper.isEmpty(region)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.REGION + " must be specified");
+        }
 
         Action action;
 
@@ -211,8 +232,9 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
         } else if (ObjectHelper.isNotEmpty(volumeId)) {
             action = getEndpoint().getDigitalOceanClient().detachVolume(dropletId, volumeId, region);
             LOG.trace("Detach Volume {} to Droplet {} [{}] ", volumeId, dropletId, action);
-        } else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " + DigitalOceanHeaders.VOLUME_NAME + " must be specified");
+        }
 
         exchange.getOut().setBody(action);
 
@@ -221,18 +243,21 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
     private void resizeVolume(Exchange exchange) throws Exception {
         String volumeId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, String.class);
 
-        if (ObjectHelper.isEmpty(volumeId))
+        if (ObjectHelper.isEmpty(volumeId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
 
         String region = exchange.getIn().getHeader(DigitalOceanHeaders.REGION, String.class);
 
-        if (ObjectHelper.isEmpty(region))
+        if (ObjectHelper.isEmpty(region)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.REGION + " must be specified");
+        }
 
         Double size = exchange.getIn().getHeader(DigitalOceanHeaders.VOLUME_SIZE_GIGABYTES, Double.class);
 
-        if (ObjectHelper.isEmpty(size))
+        if (ObjectHelper.isEmpty(size)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.VOLUME_SIZE_GIGABYTES + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().resizeVolume(volumeId, region, size);
         LOG.trace("Resize Volume {} [{}] ", volumeId, action);
@@ -241,8 +266,9 @@ public class DigitalOceanBlockStoragesProducer extends DigitalOceanProducer {
     private void getVolumeActions(Exchange exchange) throws Exception {
         String volumeId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, String.class);
 
-        if (ObjectHelper.isEmpty(volumeId))
+        if (ObjectHelper.isEmpty(volumeId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
 
         Actions actions = getEndpoint().getDigitalOceanClient().getAvailableVolumeActions(volumeId);
         LOG.trace("Actions for Volume {} [{}] ", volumeId, actions.getActions());

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanDropletsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanDropletsProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanDropletsProducer.java
index 444a68d..3c51fea 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanDropletsProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanDropletsProducer.java
@@ -16,133 +16,146 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
 import com.myjeeva.digitalocean.common.ResourceType;
-import com.myjeeva.digitalocean.pojo.*;
+import com.myjeeva.digitalocean.pojo.Action;
+import com.myjeeva.digitalocean.pojo.Actions;
+import com.myjeeva.digitalocean.pojo.Backups;
+import com.myjeeva.digitalocean.pojo.Delete;
+import com.myjeeva.digitalocean.pojo.Droplet;
+import com.myjeeva.digitalocean.pojo.Droplets;
+import com.myjeeva.digitalocean.pojo.Image;
+import com.myjeeva.digitalocean.pojo.Kernels;
+import com.myjeeva.digitalocean.pojo.Key;
+import com.myjeeva.digitalocean.pojo.Neighbors;
+import com.myjeeva.digitalocean.pojo.Region;
+import com.myjeeva.digitalocean.pojo.Resource;
 import com.myjeeva.digitalocean.pojo.Response;
+import com.myjeeva.digitalocean.pojo.Snapshots;
+import org.apache.camel.Exchange;
+import org.apache.camel.Message;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
+import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.component.digitalocean.constants.DigitalOceanOperations;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
 import org.apache.camel.util.ObjectHelper;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
 /**
  * The DigitalOcean producer for Droplets API.
  */
 public class DigitalOceanDropletsProducer extends DigitalOceanProducer {
 
+    private Integer dropletId;
+
     public DigitalOceanDropletsProducer(DigitalOceanEndpoint endpoint, DigitalOceanConfiguration configuration) {
         super(endpoint, configuration);
     }
 
-    private Integer dropletId;
-
     public void process(Exchange exchange) throws Exception {
 
         DigitalOceanOperations op = determineOperation(exchange);
         if (op != DigitalOceanOperations.create && op != DigitalOceanOperations.list && op != DigitalOceanOperations.listAllNeighbors) {
             dropletId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, Integer.class);
-            if (ObjectHelper.isEmpty(dropletId))
+            if (ObjectHelper.isEmpty(dropletId)) {
                 throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+            }
+
         }
 
         switch (op) {
-            case create:
-                createDroplet(exchange);
-                break;
-            case list:
-                getDroplets(exchange);
-                break;
-            case delete:
-                deleteDroplet(exchange);
-                break;
-            case get:
-                getDroplet(exchange);
-                break;
-            case listActions:
-                getDropletActions(exchange);
-                break;
-            case listSnapshots:
-                getDropletSnapshots(exchange);
-                break;
-            case listKernels:
-                getDropletKernels(exchange);
-                break;
-            case listBackups:
-                getDropletBackups(exchange);
-                break;
-            case listNeighbors:
-                getDropletNeighbors(exchange);
-                break;
-            case listAllNeighbors:
-                getAllDropletNeighbors(exchange);
-                break;
-            case enableBackups:
-                enableDropletBackups(exchange);
-                break;
-            case disableBackups:
-                disableDropletBackups(exchange);
-                break;
-            case reboot:
-                rebootDroplet(exchange);
-                break;
-            case powerCycle:
-                powerCycleDroplet(exchange);
-                break;
-            case shutdown:
-                shutdownDroplet(exchange);
-                break;
-            case powerOn:
-                powerOnDroplet(exchange);
-                break;
-            case powerOff:
-                powerOffDroplet(exchange);
-                break;
-            case restore:
-                restoreDroplet(exchange);
-                break;
-            case resetPassword:
-                resetDropletPassword(exchange);
-                break;
-            case resize:
-                resizeDroplet(exchange);
-                break;
-            case rebuild:
-                rebuildDroplet(exchange);
-                break;
-            case rename:
-                renameDroplet(exchange);
-                break;
-            case changeKernel:
-                changeDropletKernel(exchange);
-                break;
-            case enableIpv6:
-                enableDropletIpv6(exchange);
-                break;
-            case enablePrivateNetworking:
-                enableDropletPrivateNetworking(exchange);
-                break;
-            case takeSnapshot:
-                takeDropletSnapshot(exchange);
-                break;
-            case tag:
-                tagDroplet(exchange);
-                break;
-            case untag:
-                untagDroplet(exchange);
-                break;
-            default:
-                throw new IllegalArgumentException("Unsupported operation");
+        case create:
+            createDroplet(exchange);
+            break;
+        case list:
+            getDroplets(exchange);
+            break;
+        case delete:
+            deleteDroplet(exchange);
+            break;
+        case get:
+            getDroplet(exchange);
+            break;
+        case listActions:
+            getDropletActions(exchange);
+            break;
+        case listSnapshots:
+            getDropletSnapshots(exchange);
+            break;
+        case listKernels:
+            getDropletKernels(exchange);
+            break;
+        case listBackups:
+            getDropletBackups(exchange);
+            break;
+        case listNeighbors:
+            getDropletNeighbors(exchange);
+            break;
+        case listAllNeighbors:
+            getAllDropletNeighbors(exchange);
+            break;
+        case enableBackups:
+            enableDropletBackups(exchange);
+            break;
+        case disableBackups:
+            disableDropletBackups(exchange);
+            break;
+        case reboot:
+            rebootDroplet(exchange);
+            break;
+        case powerCycle:
+            powerCycleDroplet(exchange);
+            break;
+        case shutdown:
+            shutdownDroplet(exchange);
+            break;
+        case powerOn:
+            powerOnDroplet(exchange);
+            break;
+        case powerOff:
+            powerOffDroplet(exchange);
+            break;
+        case restore:
+            restoreDroplet(exchange);
+            break;
+        case resetPassword:
+            resetDropletPassword(exchange);
+            break;
+        case resize:
+            resizeDroplet(exchange);
+            break;
+        case rebuild:
+            rebuildDroplet(exchange);
+            break;
+        case rename:
+            renameDroplet(exchange);
+            break;
+        case changeKernel:
+            changeDropletKernel(exchange);
+            break;
+        case enableIpv6:
+            enableDropletIpv6(exchange);
+            break;
+        case enablePrivateNetworking:
+            enableDropletPrivateNetworking(exchange);
+            break;
+        case takeSnapshot:
+            takeDropletSnapshot(exchange);
+            break;
+        case tag:
+            tagDroplet(exchange);
+            break;
+        case untag:
+            untagDroplet(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation");
         }
     }
 
 
-
     private void getDroplet(Exchange exchange) throws Exception {
         Droplet droplet = getEndpoint().getDigitalOceanClient().getDropletInfo(dropletId);
         LOG.trace("Droplet {} ", droplet);
@@ -205,62 +218,73 @@ public class DigitalOceanDropletsProducer extends DigitalOceanProducer {
 
         Droplet droplet = new Droplet();
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.REGION)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.REGION))) {
             droplet.setRegion(new Region(in.getHeader(DigitalOceanHeaders.REGION, String.class)));
-        else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.REGION + " must be specified");
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_SIZE)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_SIZE))) {
             droplet.setSize(in.getHeader(DigitalOceanHeaders.DROPLET_SIZE, String.class));
-        else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.DROPLET_SIZE + " must be specified");
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_IMAGE)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_IMAGE))) {
             droplet.setImage(new Image(in.getHeader(DigitalOceanHeaders.DROPLET_IMAGE, String.class)));
-        else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.DROPLET_IMAGE + " must be specified");
+        }
 
         if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_KEYS))) {
             List<String> keys = (List<String>) exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_KEYS);
             droplet.setKeys(keys.stream().map(Key::new).collect(Collectors.toList()));
         }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ENABLE_BACKUPS)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ENABLE_BACKUPS))) {
             droplet.setEnableBackup(in.getHeader(DigitalOceanHeaders.DROPLET_ENABLE_BACKUPS, Boolean.class));
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ENABLE_IPV6)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ENABLE_IPV6))) {
             droplet.setEnableIpv6(in.getHeader(DigitalOceanHeaders.DROPLET_ENABLE_IPV6, Boolean.class));
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ENABLE_PRIVATE_NETWORKING)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ENABLE_PRIVATE_NETWORKING))) {
             droplet.setEnablePrivateNetworking(in.getHeader(DigitalOceanHeaders.DROPLET_ENABLE_PRIVATE_NETWORKING, Boolean.class));
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_USER_DATA)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_USER_DATA))) {
             droplet.setUserData(in.getHeader(DigitalOceanHeaders.DROPLET_USER_DATA, String.class));
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_VOLUMES)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_VOLUMES))) {
             droplet.setVolumeIds((List<String>) exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_VOLUMES));
+        }
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_TAGS)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_TAGS))) {
             droplet.setTags((List<String>) exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_TAGS));
+        }
 
         if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAMES))) {
             droplet.setNames((List<String>) in.getHeader(DigitalOceanHeaders.NAMES));
             Droplets droplets = getEndpoint().getDigitalOceanClient().createDroplets(droplet);
             LOG.trace("Droplets created {} ", droplets);
             exchange.getOut().setBody(droplets.getDroplets());
-        } else if(ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME))) {
+        } else if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME))) {
             droplet.setName(in.getHeader(DigitalOceanHeaders.NAME, String.class));
             droplet = getEndpoint().getDigitalOceanClient().createDroplet(droplet);
             LOG.trace("Droplet created {} ", droplet);
             exchange.getOut().setBody(droplet);
-        } else
+        } else {
             throw new IllegalArgumentException(DigitalOceanHeaders.NAMES + " or " + DigitalOceanHeaders.NAME + " must be specified");
+        }
 
     }
 
     private void restoreDroplet(Exchange exchange) throws Exception {
-        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.IMAGE_ID)))
+        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.IMAGE_ID))) {
             throw new IllegalArgumentException(DigitalOceanHeaders.IMAGE_ID + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().restoreDroplet(dropletId, exchange.getIn().getHeader(DigitalOceanHeaders.IMAGE_ID, Integer.class));
         LOG.trace("DropletAction Restore [{}] ", action);
@@ -269,8 +293,9 @@ public class DigitalOceanDropletsProducer extends DigitalOceanProducer {
     }
 
     private void resizeDroplet(Exchange exchange) throws Exception {
-        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_SIZE)))
+        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_SIZE))) {
             throw new IllegalArgumentException(DigitalOceanHeaders.DROPLET_SIZE + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().resizeDroplet(dropletId, exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_SIZE, String.class));
         LOG.trace("DropletAction Resize [{}] ", action);
@@ -279,8 +304,9 @@ public class DigitalOceanDropletsProducer extends DigitalOceanProducer {
 
 
     private void rebuildDroplet(Exchange exchange) throws Exception {
-        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.IMAGE_ID)))
+        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.IMAGE_ID))) {
             throw new IllegalArgumentException(DigitalOceanHeaders.IMAGE_ID + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().rebuildDroplet(dropletId, exchange.getIn().getHeader(DigitalOceanHeaders.IMAGE_ID, Integer.class));
         LOG.trace("Rebuild Droplet {} : [{}] ", dropletId, action);
@@ -288,8 +314,9 @@ public class DigitalOceanDropletsProducer extends DigitalOceanProducer {
     }
 
     private void renameDroplet(Exchange exchange) throws Exception {
-        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME)))
+        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME))) {
             throw new IllegalArgumentException(DigitalOceanHeaders.NAME + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().renameDroplet(dropletId, exchange.getIn().getHeader(DigitalOceanHeaders.NAME, String.class));
         LOG.trace("Rename Droplet {} : [{}] ", dropletId, action);
@@ -298,8 +325,9 @@ public class DigitalOceanDropletsProducer extends DigitalOceanProducer {
 
 
     private void changeDropletKernel(Exchange exchange) throws Exception {
-        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.KERNEL_ID)))
+        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.KERNEL_ID))) {
             throw new IllegalArgumentException(DigitalOceanHeaders.KERNEL_ID + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().changeDropletKernel(dropletId, exchange.getIn().getHeader(DigitalOceanHeaders.KERNEL_ID, Integer.class));
         LOG.trace("Rename Droplet {} : [{}] ", dropletId, action);
@@ -371,18 +399,20 @@ public class DigitalOceanDropletsProducer extends DigitalOceanProducer {
     private void takeDropletSnapshot(Exchange exchange) throws Exception {
         Action action;
 
-        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME)))
+        if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME))) {
             action = getEndpoint().getDigitalOceanClient().takeDropletSnapshot(dropletId, exchange.getIn().getHeader(DigitalOceanHeaders.NAME, String.class));
-        else
+        } else {
             action = getEndpoint().getDigitalOceanClient().takeDropletSnapshot(dropletId);
+        }
 
         LOG.trace("Take Snapshot for Droplet {} : [{}] ", dropletId, action);
         exchange.getOut().setBody(action);
     }
 
     private void tagDroplet(Exchange exchange) throws Exception {
-        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME)))
+        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME))) {
             throw new IllegalArgumentException(DigitalOceanHeaders.NAME + " must be specified");
+        }
 
         ArrayList<Resource> resources = new ArrayList<>(1);
         resources.add(new Resource(dropletId.toString(), ResourceType.DROPLET));
@@ -392,8 +422,9 @@ public class DigitalOceanDropletsProducer extends DigitalOceanProducer {
     }
 
     private void untagDroplet(Exchange exchange) throws Exception {
-        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME)))
+        if (ObjectHelper.isEmpty(exchange.getIn().getHeader(DigitalOceanHeaders.NAME))) {
             throw new IllegalArgumentException(DigitalOceanHeaders.NAME + " must be specified");
+        }
 
         ArrayList<Resource> resources = new ArrayList<>(1);
         resources.add(new Resource(dropletId.toString(), ResourceType.DROPLET));

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanFloatingIPsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanFloatingIPsProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanFloatingIPsProducer.java
index 3bb90de..fad44f2 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanFloatingIPsProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanFloatingIPsProducer.java
@@ -16,12 +16,15 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
-import com.myjeeva.digitalocean.pojo.*;
+import com.myjeeva.digitalocean.pojo.Action;
+import com.myjeeva.digitalocean.pojo.Actions;
+import com.myjeeva.digitalocean.pojo.Delete;
+import com.myjeeva.digitalocean.pojo.FloatingIP;
+import com.myjeeva.digitalocean.pojo.FloatingIPs;
+import org.apache.camel.Exchange;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanOperations;
+import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.util.ObjectHelper;
 
 /**
@@ -34,31 +37,31 @@ public class DigitalOceanFloatingIPsProducer extends DigitalOceanProducer {
     }
 
     public void process(Exchange exchange) throws Exception {
-        switch(determineOperation(exchange)) {
-
-            case list:
-                getFloatingIPs(exchange);
-                break;
-            case create:
-                createFloatingIp(exchange);
-                break;
-            case get:
-                getFloatingIP(exchange);
-                break;
-            case delete:
-                deleteFloatingIP(exchange);
-                break;
-            case assign:
-                assignFloatingIPToDroplet(exchange);
-                break;
-            case unassign:
-                unassignFloatingIP(exchange);
-                break;
-            case listActions:
-                getFloatingIPActions(exchange);
-                break;
-            default:
-                throw new IllegalArgumentException("Unsupported operation");
+        switch (determineOperation(exchange)) {
+
+        case list:
+            getFloatingIPs(exchange);
+            break;
+        case create:
+            createFloatingIp(exchange);
+            break;
+        case get:
+            getFloatingIP(exchange);
+            break;
+        case delete:
+            deleteFloatingIP(exchange);
+            break;
+        case assign:
+            assignFloatingIPToDroplet(exchange);
+            break;
+        case unassign:
+            unassignFloatingIP(exchange);
+            break;
+        case listActions:
+            getFloatingIPActions(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation");
         }
     }
 
@@ -67,12 +70,13 @@ public class DigitalOceanFloatingIPsProducer extends DigitalOceanProducer {
         String region = exchange.getIn().getHeader(DigitalOceanHeaders.REGION, String.class);
         FloatingIP ip;
 
-        if (ObjectHelper.isNotEmpty(dropletId))
+        if (ObjectHelper.isNotEmpty(dropletId)) {
             ip = getEndpoint().getDigitalOceanClient().createFloatingIP(dropletId);
-        else if (ObjectHelper.isNotEmpty(region))
+        } else if (ObjectHelper.isNotEmpty(region)) {
             ip = getEndpoint().getDigitalOceanClient().createFloatingIP(region);
-        else
-            throw new IllegalArgumentException(DigitalOceanHeaders.DROPLET_ID + " or " +  DigitalOceanHeaders.REGION + " must be specified");
+        } else {
+            throw new IllegalArgumentException(DigitalOceanHeaders.DROPLET_ID + " or " + DigitalOceanHeaders.REGION + " must be specified");
+        }
 
         LOG.trace("FloatingIP [{}] ", ip);
         exchange.getOut().setBody(ip);
@@ -89,8 +93,9 @@ public class DigitalOceanFloatingIPsProducer extends DigitalOceanProducer {
     private void getFloatingIP(Exchange exchange) throws Exception {
         String ipAddress = exchange.getIn().getHeader(DigitalOceanHeaders.FLOATING_IP_ADDRESS, String.class);
 
-        if (ObjectHelper.isEmpty(ipAddress))
+        if (ObjectHelper.isEmpty(ipAddress)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.FLOATING_IP_ADDRESS + " must be specified");
+        }
 
 
         FloatingIP ip = getEndpoint().getDigitalOceanClient().getFloatingIPInfo(ipAddress);
@@ -102,8 +107,9 @@ public class DigitalOceanFloatingIPsProducer extends DigitalOceanProducer {
     private void deleteFloatingIP(Exchange exchange) throws Exception {
         String ipAddress = exchange.getIn().getHeader(DigitalOceanHeaders.FLOATING_IP_ADDRESS, String.class);
 
-        if (ObjectHelper.isEmpty(ipAddress))
+        if (ObjectHelper.isEmpty(ipAddress)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.FLOATING_IP_ADDRESS + " must be specified");
+        }
 
 
         Delete delete = getEndpoint().getDigitalOceanClient().deleteFloatingIP(ipAddress);
@@ -114,13 +120,15 @@ public class DigitalOceanFloatingIPsProducer extends DigitalOceanProducer {
     private void assignFloatingIPToDroplet(Exchange exchange) throws Exception {
         Integer dropletId = exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_ID, Integer.class);
 
-        if(ObjectHelper.isEmpty(dropletId))
+        if (ObjectHelper.isEmpty(dropletId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.DROPLET_ID + " must be specified");
+        }
 
         String ipAddress = exchange.getIn().getHeader(DigitalOceanHeaders.FLOATING_IP_ADDRESS, String.class);
 
-        if (ObjectHelper.isEmpty(ipAddress))
+        if (ObjectHelper.isEmpty(ipAddress)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.FLOATING_IP_ADDRESS + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().assignFloatingIP(dropletId, ipAddress);
         LOG.trace("Assign Floating IP to Droplet {} ", action);
@@ -130,8 +138,9 @@ public class DigitalOceanFloatingIPsProducer extends DigitalOceanProducer {
     private void unassignFloatingIP(Exchange exchange) throws Exception {
         String ipAddress = exchange.getIn().getHeader(DigitalOceanHeaders.FLOATING_IP_ADDRESS, String.class);
 
-        if (ObjectHelper.isEmpty(ipAddress))
+        if (ObjectHelper.isEmpty(ipAddress)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.FLOATING_IP_ADDRESS + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().unassignFloatingIP(ipAddress);
         LOG.trace("Unassign Floating IP {} ", action);
@@ -141,8 +150,9 @@ public class DigitalOceanFloatingIPsProducer extends DigitalOceanProducer {
     private void getFloatingIPActions(Exchange exchange) throws Exception {
         String ipAddress = exchange.getIn().getHeader(DigitalOceanHeaders.FLOATING_IP_ADDRESS, String.class);
 
-        if (ObjectHelper.isEmpty(ipAddress))
+        if (ObjectHelper.isEmpty(ipAddress)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.FLOATING_IP_ADDRESS + " must be specified");
+        }
 
         Actions actions = getEndpoint().getDigitalOceanClient().getAvailableFloatingIPActions(ipAddress, configuration.getPage(), configuration.getPerPage());
         LOG.trace("Actions for FloatingIP {} : page {} / {} per page [{}] ", ipAddress, configuration.getPage(), configuration.getPerPage(), actions.getActions());

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanImagesProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanImagesProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanImagesProducer.java
index b433596..4590cfb 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanImagesProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanImagesProducer.java
@@ -17,13 +17,16 @@
 package org.apache.camel.component.digitalocean.producer;
 
 import com.myjeeva.digitalocean.common.ActionType;
-import com.myjeeva.digitalocean.pojo.*;
+import com.myjeeva.digitalocean.pojo.Action;
+import com.myjeeva.digitalocean.pojo.Actions;
+import com.myjeeva.digitalocean.pojo.Delete;
+import com.myjeeva.digitalocean.pojo.Image;
+import com.myjeeva.digitalocean.pojo.Images;
+import org.apache.camel.Exchange;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
+import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.component.digitalocean.constants.DigitalOceanImageTypes;
-import org.apache.camel.Exchange;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanOperations;
 import org.apache.camel.util.ObjectHelper;
 
 /**
@@ -37,34 +40,34 @@ public class DigitalOceanImagesProducer extends DigitalOceanProducer {
 
     public void process(Exchange exchange) throws Exception {
 
-        switch(determineOperation(exchange)) {
-
-            case list:
-                getImages(exchange);
-                break;
-            case ownList:
-                getUserImages(exchange);
-                break;
-            case listActions:
-                getImageActions(exchange);
-                break;
-            case get:
-                getImage(exchange);
-                break;
-            case update:
-                updateImage(exchange);
-                break;
-            case delete:
-                deleteImage(exchange);
-                break;
-            case transfer:
-                transferImage(exchange);
-                break;
-            case convert:
-                convertImageToSnapshot(exchange);
-                break;
-            default:
-                throw new IllegalArgumentException("Unsupported operation");
+        switch (determineOperation(exchange)) {
+
+        case list:
+            getImages(exchange);
+            break;
+        case ownList:
+            getUserImages(exchange);
+            break;
+        case listActions:
+            getImageActions(exchange);
+            break;
+        case get:
+            getImage(exchange);
+            break;
+        case update:
+            updateImage(exchange);
+            break;
+        case delete:
+            deleteImage(exchange);
+            break;
+        case transfer:
+            transferImage(exchange);
+            break;
+        case convert:
+            convertImageToSnapshot(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation");
         }
     }
 
@@ -80,10 +83,11 @@ public class DigitalOceanImagesProducer extends DigitalOceanProducer {
         DigitalOceanImageTypes type = exchange.getIn().getHeader(DigitalOceanHeaders.TYPE, DigitalOceanImageTypes.class);
         Images images;
 
-        if (ObjectHelper.isNotEmpty(type))
+        if (ObjectHelper.isNotEmpty(type)) {
             images = getEndpoint().getDigitalOceanClient().getAvailableImages(configuration.getPage(), configuration.getPerPage(), ActionType.valueOf(type.name()));
-        else
+        } else {
             images = getEndpoint().getDigitalOceanClient().getAvailableImages(configuration.getPage(), configuration.getPerPage());
+        }
         LOG.trace("All Images : page {} / {} per page [{}] ", configuration.getPage(), configuration.getPerPage(), images.getImages());
         exchange.getOut().setBody(images.getImages());
     }
@@ -94,12 +98,13 @@ public class DigitalOceanImagesProducer extends DigitalOceanProducer {
         String slug = exchange.getIn().getHeader(DigitalOceanHeaders.DROPLET_IMAGE, String.class);
         Image image;
 
-        if (ObjectHelper.isNotEmpty(imageId))
+        if (ObjectHelper.isNotEmpty(imageId)) {
             image = getEndpoint().getDigitalOceanClient().getImageInfo(imageId);
-        else if (ObjectHelper.isNotEmpty(slug))
+        } else if (ObjectHelper.isNotEmpty(slug)) {
             image = getEndpoint().getDigitalOceanClient().getImageInfo(slug);
-        else
-            throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " +  DigitalOceanHeaders.DROPLET_IMAGE + " must be specified");
+        } else {
+            throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " + DigitalOceanHeaders.DROPLET_IMAGE + " must be specified");
+        }
 
         LOG.trace("Image [{}] ", image);
         exchange.getOut().setBody(image);
@@ -109,8 +114,9 @@ public class DigitalOceanImagesProducer extends DigitalOceanProducer {
     private void getImageActions(Exchange exchange) throws Exception {
         Integer imageId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, Integer.class);
 
-        if (ObjectHelper.isEmpty(imageId))
+        if (ObjectHelper.isEmpty(imageId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
 
         Actions actions = getEndpoint().getDigitalOceanClient().getAvailableImageActions(imageId, configuration.getPage(), configuration.getPerPage());
         LOG.trace("Actions for Image {} : page {} / {} per page [{}] ", imageId, configuration.getPage(), configuration.getPerPage(), actions.getActions());
@@ -120,14 +126,15 @@ public class DigitalOceanImagesProducer extends DigitalOceanProducer {
     private void updateImage(Exchange exchange) throws Exception {
         Integer imageId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, Integer.class);
 
-        if (ObjectHelper.isEmpty(imageId))
+        if (ObjectHelper.isEmpty(imageId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
 
         String name = exchange.getIn().getHeader(DigitalOceanHeaders.NAME, String.class);
 
-        if (ObjectHelper.isEmpty(name))
+        if (ObjectHelper.isEmpty(name)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.NAME + " must be specified");
-
+        }
         Image image = new Image();
         image.setId(imageId);
         image.setName(name);
@@ -139,8 +146,9 @@ public class DigitalOceanImagesProducer extends DigitalOceanProducer {
     private void deleteImage(Exchange exchange) throws Exception {
         Integer imageId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, Integer.class);
 
-        if (ObjectHelper.isEmpty(imageId))
+        if (ObjectHelper.isEmpty(imageId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
 
         Delete delete = getEndpoint().getDigitalOceanClient().deleteImage(imageId);
         LOG.trace("Delete  Image {} [{}] ", imageId, delete);
@@ -150,13 +158,15 @@ public class DigitalOceanImagesProducer extends DigitalOceanProducer {
     private void transferImage(Exchange exchange) throws Exception {
         Integer imageId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, Integer.class);
 
-        if (ObjectHelper.isEmpty(imageId))
+        if (ObjectHelper.isEmpty(imageId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
 
         String region = exchange.getIn().getHeader(DigitalOceanHeaders.REGION, String.class);
 
-        if (ObjectHelper.isEmpty(region))
+        if (ObjectHelper.isEmpty(region)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.REGION + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().transferImage(imageId, region);
         LOG.trace("Transfer  Image {} to Region {} [{}] ", imageId, region, action);
@@ -166,8 +176,9 @@ public class DigitalOceanImagesProducer extends DigitalOceanProducer {
     private void convertImageToSnapshot(Exchange exchange) throws Exception {
         Integer imageId = exchange.getIn().getHeader(DigitalOceanHeaders.ID, Integer.class);
 
-        if (ObjectHelper.isEmpty(imageId))
+        if (ObjectHelper.isEmpty(imageId)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.ID + " must be specified");
+        }
 
         Action action = getEndpoint().getDigitalOceanClient().convertImage(imageId);
         LOG.trace("Convert Image {} [{}] ", imageId, action);

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanKeysProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanKeysProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanKeysProducer.java
index 3dec39b..f16866f 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanKeysProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanKeysProducer.java
@@ -16,11 +16,13 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
-import com.myjeeva.digitalocean.pojo.*;
+import com.myjeeva.digitalocean.pojo.Delete;
+import com.myjeeva.digitalocean.pojo.Key;
+import com.myjeeva.digitalocean.pojo.Keys;
+import org.apache.camel.Exchange;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
-import org.apache.camel.Exchange;
+import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.util.ObjectHelper;
 
 /**
@@ -34,25 +36,25 @@ public class DigitalOceanKeysProducer extends DigitalOceanProducer {
 
     public void process(Exchange exchange) throws Exception {
 
-        switch(determineOperation(exchange)) {
-
-            case list:
-                getKeys(exchange);
-                break;
-            case create:
-                createKey(exchange);
-                break;
-            case get:
-                getKey(exchange);
-                break;
-            case update:
-                updateKey(exchange);
-                break;
-            case delete:
-                deleteKey(exchange);
-                break;
-            default:
-                throw new IllegalArgumentException("Unsupported operation");
+        switch (determineOperation(exchange)) {
+
+        case list:
+            getKeys(exchange);
+            break;
+        case create:
+            createKey(exchange);
+            break;
+        case get:
+            getKey(exchange);
+            break;
+        case update:
+            updateKey(exchange);
+            break;
+        case delete:
+            deleteKey(exchange);
+            break;
+        default:
+            throw new IllegalArgumentException("Unsupported operation");
         }
     }
 
@@ -62,13 +64,13 @@ public class DigitalOceanKeysProducer extends DigitalOceanProducer {
         String fingerprint = exchange.getIn().getHeader(DigitalOceanHeaders.KEY_FINGERPRINT, String.class);
         Key key;
 
-        if (ObjectHelper.isNotEmpty(keyId))
+        if (ObjectHelper.isNotEmpty(keyId)) {
             key = getEndpoint().getDigitalOceanClient().getKeyInfo(keyId);
-        else if (ObjectHelper.isNotEmpty(fingerprint))
+        } else if (ObjectHelper.isNotEmpty(fingerprint)) {
             key = getEndpoint().getDigitalOceanClient().getKeyInfo(fingerprint);
-        else
-            throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " +  DigitalOceanHeaders.KEY_FINGERPRINT + " must be specified");
-
+        } else {
+            throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " + DigitalOceanHeaders.KEY_FINGERPRINT + " must be specified");
+        }
         LOG.trace("Key [{}] ", key);
         exchange.getOut().setBody(key);
     }
@@ -84,12 +86,13 @@ public class DigitalOceanKeysProducer extends DigitalOceanProducer {
         String fingerprint = exchange.getIn().getHeader(DigitalOceanHeaders.KEY_FINGERPRINT, String.class);
         Delete delete;
 
-        if (ObjectHelper.isNotEmpty(keyId))
+        if (ObjectHelper.isNotEmpty(keyId)) {
             delete = getEndpoint().getDigitalOceanClient().deleteKey(keyId);
-        else if (ObjectHelper.isNotEmpty(fingerprint))
+        } else if (ObjectHelper.isNotEmpty(fingerprint)) {
             delete = getEndpoint().getDigitalOceanClient().deleteKey(fingerprint);
-        else
-            throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " +  DigitalOceanHeaders.KEY_FINGERPRINT + " must be specified");
+        } else {
+            throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " + DigitalOceanHeaders.KEY_FINGERPRINT + " must be specified");
+        }
 
         LOG.trace("Delete Key {} ", delete);
         exchange.getOut().setBody(delete);
@@ -101,17 +104,20 @@ public class DigitalOceanKeysProducer extends DigitalOceanProducer {
 
         String name = exchange.getIn().getHeader(DigitalOceanHeaders.NAME, String.class);
 
-        if (ObjectHelper.isEmpty(name))
+        if (ObjectHelper.isEmpty(name)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.NAME + " must be specified");
-        else
+
+        } else {
             key.setName(name);
+        }
 
         String publicKey = exchange.getIn().getHeader(DigitalOceanHeaders.KEY_PUBLIC_KEY, String.class);
 
-        if (ObjectHelper.isEmpty(publicKey))
+        if (ObjectHelper.isEmpty(publicKey)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.KEY_PUBLIC_KEY + " must be specified");
-        else
+        } else {
             key.setPublicKey(publicKey);
+        }
 
         key = getEndpoint().getDigitalOceanClient().createKey(key);
         LOG.trace("Key created {} ", key);
@@ -126,15 +132,17 @@ public class DigitalOceanKeysProducer extends DigitalOceanProducer {
 
         String name = exchange.getIn().getHeader(DigitalOceanHeaders.NAME, String.class);
 
-        if (ObjectHelper.isEmpty(name))
+        if (ObjectHelper.isEmpty(name)) {
             throw new IllegalArgumentException(DigitalOceanHeaders.NAME + " must be specified");
+        }
 
-        if (ObjectHelper.isNotEmpty(keyId))
+        if (ObjectHelper.isNotEmpty(keyId)) {
             key = getEndpoint().getDigitalOceanClient().updateKey(keyId, name);
-        else if (ObjectHelper.isNotEmpty(fingerprint))
+        } else if (ObjectHelper.isNotEmpty(fingerprint)) {
             key = getEndpoint().getDigitalOceanClient().updateKey(fingerprint, name);
-        else
-            throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " +  DigitalOceanHeaders.KEY_FINGERPRINT + " must be specified");
+        } else {
+            throw new IllegalArgumentException(DigitalOceanHeaders.ID + " or " + DigitalOceanHeaders.KEY_FINGERPRINT + " must be specified");
+        }
 
         LOG.trace("Update Key [{}] ", key);
         exchange.getOut().setBody(key);

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanProducer.java
index fa35f4a..1b81bac 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanProducer.java
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
+import org.apache.camel.Exchange;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
-import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
+import org.apache.camel.component.digitalocean.constants.DigitalOceanHeaders;
 import org.apache.camel.component.digitalocean.constants.DigitalOceanOperations;
-import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultProducer;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
@@ -31,9 +31,8 @@ import org.slf4j.LoggerFactory;
  */
 public abstract class DigitalOceanProducer extends DefaultProducer {
     protected static final Logger LOG = LoggerFactory.getLogger(DigitalOceanProducer.class);
-
-    private DigitalOceanEndpoint endpoint;
     protected DigitalOceanConfiguration configuration;
+    private DigitalOceanEndpoint endpoint;
 
     public DigitalOceanProducer(DigitalOceanEndpoint endpoint, DigitalOceanConfiguration configuration) {
         super(endpoint);

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanRegionsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanRegionsProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanRegionsProducer.java
index b03c22f..9f9eefb 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanRegionsProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanRegionsProducer.java
@@ -16,10 +16,10 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
-import com.myjeeva.digitalocean.pojo.*;
+import com.myjeeva.digitalocean.pojo.Regions;
+import org.apache.camel.Exchange;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
-import org.apache.camel.Exchange;
 
 /**
  * The DigitalOcean producer for Regions API.

http://git-wip-us.apache.org/repos/asf/camel/blob/0dd2c2f2/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanSizesProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanSizesProducer.java b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanSizesProducer.java
index 668a80a..53c6d5e 100644
--- a/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanSizesProducer.java
+++ b/components/camel-digitalocean/src/main/java/org/apache/camel/component/digitalocean/producer/DigitalOceanSizesProducer.java
@@ -16,10 +16,10 @@
  */
 package org.apache.camel.component.digitalocean.producer;
 
-import com.myjeeva.digitalocean.pojo.*;
+import com.myjeeva.digitalocean.pojo.Sizes;
+import org.apache.camel.Exchange;
 import org.apache.camel.component.digitalocean.DigitalOceanConfiguration;
 import org.apache.camel.component.digitalocean.DigitalOceanEndpoint;
-import org.apache.camel.Exchange;
 
 /**
  * The DigitalOcean producer for Sizes API.


Mime
View raw message