You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/04/30 08:16:50 UTC

[01/12] stratos git commit: Formatting CLI code

Repository: stratos
Updated Branches:
  refs/heads/master e97d336ea -> 3ae231b66


http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDeploymentPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDeploymentPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDeploymentPolicyCommand.java
index 774ff2d..c5af557 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDeploymentPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDeploymentPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDomainMappingsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDomainMappingsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDomainMappingsCommand.java
index 9a9c66a..08d0010 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDomainMappingsCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveDomainMappingsCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java
index a7f3a34..8024edb 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesHostCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesHostCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesHostCommand.java
index 1c04feb..36a67c0 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesHostCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesHostCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveNetworkPartitionCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveNetworkPartitionCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveNetworkPartitionCommand.java
index 5181cce..b7bedd7 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveNetworkPartitionCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveNetworkPartitionCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SynchronizeArtifactsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SynchronizeArtifactsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SynchronizeArtifactsCommand.java
index 6842d2c..01d84d6 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SynchronizeArtifactsCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/SynchronizeArtifactsCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -33,47 +33,47 @@ import org.slf4j.LoggerFactory;
  */
 public class SynchronizeArtifactsCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(SynchronizeArtifactsCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(SynchronizeArtifactsCommand.class);
 
-	public SynchronizeArtifactsCommand() {
-	}
+    public SynchronizeArtifactsCommand() {
+    }
 
-	@Override
-	public String getName() {
-		return "synchronize-artifacts";
-	}
+    @Override
+    public String getName() {
+        return "synchronize-artifacts";
+    }
 
-	@Override
-	public String getDescription() {
-		return "Synchronize artifacts with Git repository for cartridge subscriptions";
-	}
+    @Override
+    public String getDescription() {
+        return "Synchronize artifacts with Git repository for cartridge subscriptions";
+    }
 
-	@Override
-	public String getArgumentSyntax() {
-		return "[cartridge-subscription-alias]";
-	}
+    @Override
+    public String getArgumentSyntax() {
+        return "[cartridge-subscription-alias]";
+    }
 
-	@Override
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String cartridgeSubscriptionAlias = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Synchronizing repository for cartridge subscription alias {}", cartridgeSubscriptionAlias);
-			}
+    @Override
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String cartridgeSubscriptionAlias = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Synchronizing repository for cartridge subscription alias {}", cartridgeSubscriptionAlias);
+            }
 
-			RestCommandLineService.getInstance().synchronizeArtifacts(cartridgeSubscriptionAlias);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
-	}
+            RestCommandLineService.getInstance().synchronizeArtifacts(cartridgeSubscriptionAlias);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
+    }
 
-	@Override
-	public Options getOptions() {
-		return null;
-	}
+    @Override
+    public Options getOptions() {
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UndeployApplicationCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UndeployApplicationCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UndeployApplicationCommand.java
index e2f3a8b..5c7793e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UndeployApplicationCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UndeployApplicationCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateApplicationPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateApplicationPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateApplicationPolicyCommand.java
index 4cfe692..17bf983 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateApplicationPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateApplicationPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -39,7 +39,7 @@ public class UpdateApplicationPolicyCommand implements Command<StratosCommandCon
 
     private final Options options;
 
-    public UpdateApplicationPolicyCommand(){
+    public UpdateApplicationPolicyCommand() {
         options = constructOptions();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateAutoscalingPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateAutoscalingPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateAutoscalingPolicyCommand.java
index 65ce25c..0c23215 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateAutoscalingPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateAutoscalingPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -41,7 +41,7 @@ public class UpdateAutoscalingPolicyCommand implements Command<StratosCommandCon
 
     private final Options options;
 
-    public UpdateAutoscalingPolicyCommand(){
+    public UpdateAutoscalingPolicyCommand() {
         options = constructOptions();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateCartridgeCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateCartridgeCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateCartridgeCommand.java
index 23a7acd..6141b6d 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateCartridgeCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateCartridgeCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -41,7 +41,7 @@ public class UpdateCartridgeCommand implements Command<StratosCommandContext> {
 
     private final Options options;
 
-    public UpdateCartridgeCommand(){
+    public UpdateCartridgeCommand() {
         options = constructOptions();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateDeploymentPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateDeploymentPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateDeploymentPolicyCommand.java
index 816ca71..8ebb673 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateDeploymentPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateDeploymentPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -38,7 +38,7 @@ public class UpdateDeploymentPolicyCommand implements Command<StratosCommandCont
 
     private final Options options;
 
-    public UpdateDeploymentPolicyCommand(){
+    public UpdateDeploymentPolicyCommand() {
         options = constructOptions();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java
index 200b825..7367f12 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesHostCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -58,6 +58,7 @@ public class UpdateKubernetesHostCommand implements Command<StratosCommandContex
         resourcePathOption.setArgName("resource path");
         options.addOption(resourcePathOption);
     }
+
     @Override
     public String getName() {
         return "update-kubernetes-host";
@@ -70,7 +71,7 @@ public class UpdateKubernetesHostCommand implements Command<StratosCommandContex
 
     @Override
     public String getArgumentSyntax() {
-    	return null;
+        return null;
     }
 
     @Override
@@ -83,43 +84,43 @@ public class UpdateKubernetesHostCommand implements Command<StratosCommandContex
         if (log.isDebugEnabled()) {
             log.debug("Executing command: ", getName());
         }
-        
+
         if ((args == null) || (args.length <= 0)) {
             context.getStratosApplication().printUsage(getName());
             return CliConstants.COMMAND_FAILED;
         }
-        
+
         try {
             CommandLineParser parser = new GnuParser();
             CommandLine commandLine = parser.parse(options, args);
             //merge newly discovered options with previously discovered ones.
             Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
-            
-            if((opts.hasOption(CliConstants.RESOURCE_PATH)) && (opts.hasOption(CliConstants.HOST_ID_OPTION)) 
-            		&& (opts.hasOption(CliConstants.CLUSTER_ID_OPTION))) {
-            	               
+
+            if ((opts.hasOption(CliConstants.RESOURCE_PATH)) && (opts.hasOption(CliConstants.HOST_ID_OPTION))
+                    && (opts.hasOption(CliConstants.CLUSTER_ID_OPTION))) {
+
                 // get cluster id arg value
-            	String clusterId = opts.getOption(CliConstants.CLUSTER_ID_OPTION).getValue();
+                String clusterId = opts.getOption(CliConstants.CLUSTER_ID_OPTION).getValue();
                 if (clusterId == null) {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
-                
+
                 // get host id arg value
-            	String hostId = opts.getOption(CliConstants.HOST_ID_OPTION).getValue();
+                String hostId = opts.getOption(CliConstants.HOST_ID_OPTION).getValue();
                 if (hostId == null) {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
-                
+
                 // get resource path arg value
-            	String resourcePath = opts.getOption(CliConstants.RESOURCE_PATH).getValue();
+                String resourcePath = opts.getOption(CliConstants.RESOURCE_PATH).getValue();
                 if (resourcePath == null) {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
                 String resourceFileContent = CliUtils.readResource(resourcePath);
-                
+
                 RestCommandLineService.getInstance().updateKubernetesHost(resourceFileContent, clusterId, hostId);
                 return CliConstants.COMMAND_SUCCESSFULL;
             } else {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java
index eecaa9e..3ac1d47 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateKubernetesMasterCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -53,6 +53,7 @@ public class UpdateKubernetesMasterCommand implements Command<StratosCommandCont
         clusterIdOption.setArgName("cluster id");
         options.addOption(clusterIdOption);
     }
+
     @Override
     public String getName() {
         return "update-kubernetes-master";
@@ -65,7 +66,7 @@ public class UpdateKubernetesMasterCommand implements Command<StratosCommandCont
 
     @Override
     public String getArgumentSyntax() {
-    	return null;
+        return null;
     }
 
     @Override
@@ -78,7 +79,7 @@ public class UpdateKubernetesMasterCommand implements Command<StratosCommandCont
         if (log.isDebugEnabled()) {
             log.debug("Executing command: ", getName());
         }
-        
+
         if ((args == null) || (args.length <= 0)) {
             context.getStratosApplication().printUsage(getName());
             return CliConstants.COMMAND_FAILED;
@@ -89,30 +90,30 @@ public class UpdateKubernetesMasterCommand implements Command<StratosCommandCont
             CommandLine commandLine = parser.parse(options, args);
             //merge newly discovered options with previously discovered ones.
             Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
-            if((opts.hasOption(CliConstants.RESOURCE_PATH)) && (opts.hasOption(CliConstants.CLUSTER_ID_OPTION))) {
-            	               
+            if ((opts.hasOption(CliConstants.RESOURCE_PATH)) && (opts.hasOption(CliConstants.CLUSTER_ID_OPTION))) {
+
                 // get cluster id arg value
-            	String clusterId = opts.getOption(CliConstants.CLUSTER_ID_OPTION).getValue();
+                String clusterId = opts.getOption(CliConstants.CLUSTER_ID_OPTION).getValue();
                 if (clusterId == null) {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
-                
+
                 // get resource path arg value
-            	String resourcePath = opts.getOption(CliConstants.RESOURCE_PATH).getValue();
+                String resourcePath = opts.getOption(CliConstants.RESOURCE_PATH).getValue();
                 if (resourcePath == null) {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
                 String resourceFileContent = CliUtils.readResource(resourcePath);
-                
+
                 RestCommandLineService.getInstance().updateKubernetesMaster(resourceFileContent, clusterId);
                 return CliConstants.COMMAND_SUCCESSFULL;
             } else {
                 context.getStratosApplication().printUsage(getName());
                 return CliConstants.COMMAND_FAILED;
             }
-            
+
         } catch (ParseException e) {
             log.error("Error parsing arguments", e);
             System.out.println(e.getMessage());

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateNetworkPartitionCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateNetworkPartitionCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateNetworkPartitionCommand.java
index e6d0d25..acc60bd 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateNetworkPartitionCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateNetworkPartitionCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -41,7 +41,7 @@ public class UpdateNetworkPartitionCommand implements Command<StratosCommandCont
 
     private final Options options;
 
-    public UpdateNetworkPartitionCommand(){
+    public UpdateNetworkPartitionCommand() {
         options = constructOptions();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateTenantCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateTenantCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateTenantCommand.java
index de49015..257d490 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateTenantCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateTenantCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -38,7 +38,7 @@ public class UpdateTenantCommand implements Command<StratosCommandContext> {
 
     private final Options options;
 
-    public UpdateTenantCommand(){
+    public UpdateTenantCommand() {
         options = constructOptions();
     }
 
@@ -107,7 +107,7 @@ public class UpdateTenantCommand implements Command<StratosCommandContext> {
             String password = null;
             String domain = null;
             String email = null;
-            int id=0;
+            int id = 0;
 
             final CommandLineParser parser = new GnuParser();
             CommandLine commandLine;
@@ -167,12 +167,12 @@ public class UpdateTenantCommand implements Command<StratosCommandContext> {
 
                 }
 
-                if (id == 0 ||admin == null || firstName == null || lastName == null || password == null || domain == null || email == null) {
+                if (id == 0 || admin == null || firstName == null || lastName == null || password == null || domain == null || email == null) {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
 
-                RestCommandLineService.getInstance().updateTenant(id,admin, firstName, lastName, password, domain, email);
+                RestCommandLineService.getInstance().updateTenant(id, admin, firstName, lastName, password, domain, email);
                 return CliConstants.COMMAND_SUCCESSFULL;
 
             } catch (ParseException e) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateUserCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateUserCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateUserCommand.java
index 5701732..8bcdda4 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateUserCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/UpdateUserCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -38,7 +38,7 @@ public class UpdateUserCommand implements Command<StratosCommandContext> {
 
     private final Options options;
 
-    public UpdateUserCommand(){
+    public UpdateUserCommand() {
         options = constructOptions();
     }
 
@@ -101,13 +101,13 @@ public class UpdateUserCommand implements Command<StratosCommandContext> {
         }
 
         if (args != null && args.length > 0) {
-            String userName= null;
-            String credential= null;
-            String role= null;
-            String firstName= null;
-            String lastName= null;
-            String email= null;
-            String profileName= null;
+            String userName = null;
+            String credential = null;
+            String role = null;
+            String firstName = null;
+            String lastName = null;
+            String email = null;
+            String profileName = null;
 
             final CommandLineParser parser = new GnuParser();
             CommandLine commandLine;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java
index 0ba3cd8..777b9f3 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.completer;
 
@@ -42,101 +42,101 @@ import org.apache.stratos.cli.utils.CliConstants;
 
 public class CommandCompleter implements Completer {
 
-	private static final Logger logger = LoggerFactory.getLogger(StratosApplication.class);
+    private static final Logger logger = LoggerFactory.getLogger(StratosApplication.class);
+
+    /**
+     * Keep arguments for each command
+     */
+    private final Map<String, Collection<String>> argumentMap;
+
+    private final Completer helpCommandCompleter;
+
+    private final Completer defaultCommandCompleter;
+
+    private final Completer fileNameCompleter;
 
-	/**
-	 * Keep arguments for each command
-	 */
-	private final Map<String, Collection<String>> argumentMap;
-	
-	private final Completer helpCommandCompleter;
+    public CommandCompleter(Map<String, Command<StratosCommandContext>> commands) {
+        if (logger.isDebugEnabled()) {
+            logger.debug("Creating auto complete for {} commands", commands.size());
+        }
+        fileNameCompleter = new StratosFileNameCompleter();
+        argumentMap = new HashMap<String, Collection<String>>();
+        defaultCommandCompleter = new StringsCompleter(commands.keySet());
+        helpCommandCompleter = new ArgumentCompleter(new StringsCompleter(CliConstants.HELP_ACTION),
+                defaultCommandCompleter);
+        for (String action : commands.keySet()) {
 
-	private final Completer defaultCommandCompleter;
-	
-	private final Completer fileNameCompleter;
+            Command<StratosCommandContext> command = commands.get(action);
+            Options commandOptions = command.getOptions();
+            if (commandOptions != null) {
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Creating argument completer for command: {}", action);
+                }
+                List<String> arguments = new ArrayList<String>();
+                Collection<?> allOptions = commandOptions.getOptions();
+                for (Object o : allOptions) {
+                    Option option = (Option) o;
+                    String longOpt = option.getLongOpt();
+                    String opt = option.getOpt();
+                    if (StringUtils.isNotBlank(longOpt)) {
+                        arguments.add("--" + longOpt);
+                    } else if (StringUtils.isNotBlank(opt)) {
+                        arguments.add("-" + opt);
+                    }
+                }
 
-	public CommandCompleter(Map<String, Command<StratosCommandContext>> commands) {
-		if (logger.isDebugEnabled()) {
-			logger.debug("Creating auto complete for {} commands", commands.size());
-		}
-		fileNameCompleter = new StratosFileNameCompleter();
-		argumentMap = new HashMap<String, Collection<String>>();
-		defaultCommandCompleter = new StringsCompleter(commands.keySet());
-		helpCommandCompleter = new ArgumentCompleter(new StringsCompleter(CliConstants.HELP_ACTION),
-				defaultCommandCompleter);
-		for (String action : commands.keySet()) {
-			
-			Command<StratosCommandContext> command = commands.get(action);
-			Options commandOptions = command.getOptions();
-			if (commandOptions != null) {
-				if (logger.isDebugEnabled()) {
-					logger.debug("Creating argument completer for command: {}", action);
-				}
-				List<String> arguments = new ArrayList<String>();
-				Collection<?> allOptions = commandOptions.getOptions();
-				for (Object o : allOptions) {
-					Option option = (Option) o;
-					String longOpt = option.getLongOpt();
-					String opt = option.getOpt();
-					if (StringUtils.isNotBlank(longOpt)) {
-						arguments.add("--" + longOpt);
-					} else if (StringUtils.isNotBlank(opt)) {
-						arguments.add("-" + opt);
-					}
-				}
+                argumentMap.put(action, arguments);
+            }
+        }
+    }
 
-				argumentMap.put(action, arguments);
-			}
-		}
-	}
+    @Override
+    public int complete(String buffer, int cursor, List<CharSequence> candidates) {
 
-	@Override
-	public int complete(String buffer, int cursor, List<CharSequence> candidates) {
-			
-		if(buffer.contains(CliConstants.RESOURCE_PATH_LONG_OPTION)) {
-			return fileNameCompleter.complete(buffer, cursor, candidates);
-		}
-		if (logger.isTraceEnabled()) {
-			logger.trace("Buffer: {}, cursor: {}", buffer, cursor);
-			logger.trace("Candidates {}", candidates);
-		}
-		if (StringUtils.isNotBlank(buffer)) {
-			// User is typing a command
-			StrTokenizer strTokenizer = new StrTokenizer(buffer);
-			String action = strTokenizer.next();
-			Collection<String> arguments = argumentMap.get(action);
-			if (arguments != null) {
-				if (logger.isTraceEnabled()) {
-					logger.trace("Arguments found for {}, Tokens: {}", action, strTokenizer.getTokenList());
-					logger.trace("Arguments for {}: {}", action, arguments);
-				}
-				List<String> args = new ArrayList<String>(arguments);
-				List<Completer> completers = new ArrayList<Completer>();
-				for (String token : strTokenizer.getTokenList()) {
-					boolean argContains = arguments.contains(token);
-					if (token.startsWith("-") && !argContains) {
-						continue;
-					}
-					if (argContains) {
-						if (logger.isTraceEnabled()) {
-							logger.trace("Removing argument {}", token);
-						}
-						args.remove(token);
-					}
-					completers.add(new StringsCompleter(token));
-				}
-				completers.add(new StringsCompleter(args));
-				Completer completer = new ArgumentCompleter(completers);
-				return completer.complete(buffer, cursor, candidates);
-			} else if (CliConstants.HELP_ACTION.equals(action)) {
-				// For help action, we need to display available commands as arguments
-				return helpCommandCompleter.complete(buffer, cursor, candidates);
-			}
-		}
-		if (logger.isTraceEnabled()) {
-			logger.trace("Using Default Completer...");
-		}
-		return defaultCommandCompleter.complete(buffer, cursor, candidates);
-	}
+        if (buffer.contains(CliConstants.RESOURCE_PATH_LONG_OPTION)) {
+            return fileNameCompleter.complete(buffer, cursor, candidates);
+        }
+        if (logger.isTraceEnabled()) {
+            logger.trace("Buffer: {}, cursor: {}", buffer, cursor);
+            logger.trace("Candidates {}", candidates);
+        }
+        if (StringUtils.isNotBlank(buffer)) {
+            // User is typing a command
+            StrTokenizer strTokenizer = new StrTokenizer(buffer);
+            String action = strTokenizer.next();
+            Collection<String> arguments = argumentMap.get(action);
+            if (arguments != null) {
+                if (logger.isTraceEnabled()) {
+                    logger.trace("Arguments found for {}, Tokens: {}", action, strTokenizer.getTokenList());
+                    logger.trace("Arguments for {}: {}", action, arguments);
+                }
+                List<String> args = new ArrayList<String>(arguments);
+                List<Completer> completers = new ArrayList<Completer>();
+                for (String token : strTokenizer.getTokenList()) {
+                    boolean argContains = arguments.contains(token);
+                    if (token.startsWith("-") && !argContains) {
+                        continue;
+                    }
+                    if (argContains) {
+                        if (logger.isTraceEnabled()) {
+                            logger.trace("Removing argument {}", token);
+                        }
+                        args.remove(token);
+                    }
+                    completers.add(new StringsCompleter(token));
+                }
+                completers.add(new StringsCompleter(args));
+                Completer completer = new ArgumentCompleter(completers);
+                return completer.complete(buffer, cursor, candidates);
+            } else if (CliConstants.HELP_ACTION.equals(action)) {
+                // For help action, we need to display available commands as arguments
+                return helpCommandCompleter.complete(buffer, cursor, candidates);
+            }
+        }
+        if (logger.isTraceEnabled()) {
+            logger.trace("Using Default Completer...");
+        }
+        return defaultCommandCompleter.complete(buffer, cursor, candidates);
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java
index 94e93cc..ce98b48 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java
@@ -9,40 +9,40 @@ import jline.console.completer.FileNameCompleter;
 
 public class StratosFileNameCompleter extends FileNameCompleter {
 
-	@Override
-	public int complete(String buf, int arg1, List<CharSequence> candidates) {
+    @Override
+    public int complete(String buf, int arg1, List<CharSequence> candidates) {
 
-		String buffer = (buf == null) ? "" : buf;
-		String subString = null;
-		int index = buf.lastIndexOf("--"+CliConstants.RESOURCE_PATH_LONG_OPTION);
-		if (buf.length() >= index + 16) {
-			subString = buf.substring(index + 16);
-		}
+        String buffer = (buf == null) ? "" : buf;
+        String subString = null;
+        int index = buf.lastIndexOf("--" + CliConstants.RESOURCE_PATH_LONG_OPTION);
+        if (buf.length() >= index + 16) {
+            subString = buf.substring(index + 16);
+        }
 
-		String translated = (subString == null || subString.isEmpty()) ? buf
-				: subString;
-		if (translated.startsWith("~" + File.separator)) {
-			translated = System.getProperty("user.home")
-					+ translated.substring(1);
-		} else if (translated.startsWith("." + File.separator)) {
-			translated = new File("").getAbsolutePath() + File.separator
-					+ translated;
-		}
+        String translated = (subString == null || subString.isEmpty()) ? buf
+                : subString;
+        if (translated.startsWith("~" + File.separator)) {
+            translated = System.getProperty("user.home")
+                    + translated.substring(1);
+        } else if (translated.startsWith("." + File.separator)) {
+            translated = new File("").getAbsolutePath() + File.separator
+                    + translated;
+        }
 
-		File f = new File(translated);
+        File f = new File(translated);
 
-		final File dir;
+        final File dir;
 
-		if (translated.endsWith(File.separator)) {
-			dir = f;
-		} else {
-			dir = f.getParentFile();
-		}
+        if (translated.endsWith(File.separator)) {
+            dir = f;
+        } else {
+            dir = f.getParentFile();
+        }
 
-		final File[] entries = (dir == null) ? new File[0] : dir.listFiles();
+        final File[] entries = (dir == null) ? new File[0] : dir.listFiles();
 
-		return matchFiles(buffer, translated, entries, candidates);
+        return matchFiles(buffer, translated, entries, candidates);
 
-	}
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/CommandException.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/CommandException.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/CommandException.java
index cae002b..74e9435 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/CommandException.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/CommandException.java
@@ -1,39 +1,39 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.exception;
 
 public class CommandException extends Exception {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public CommandException() {
-	}
+    public CommandException() {
+    }
 
-	public CommandException(String message) {
-		super(message);
-	}
+    public CommandException(String message) {
+        super(message);
+    }
 
-	public CommandException(Throwable cause) {
-		super(cause);
-	}
+    public CommandException(Throwable cause) {
+        super(cause);
+    }
 
-	public CommandException(String message, Throwable cause) {
-		super(message, cause);
-	}
+    public CommandException(String message, Throwable cause) {
+        super(message, cause);
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ErrorWrapper.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ErrorWrapper.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ErrorWrapper.java
index cc71ea0..7a8ac5a 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ErrorWrapper.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ErrorWrapper.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.exception;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java
index 325d68b..97c769e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.exception;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java
index 4825e58..52e2bfa 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliConstants.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.utils;
@@ -83,7 +83,7 @@ public class CliConstants {
     /**
      * List the available deploy services
      */
-    public static final String LIST_DEPLOY_SERVICE= "list-deploy-services";
+    public static final String LIST_DEPLOY_SERVICE = "list-deploy-services";
 
     /**
      * Add tenant
@@ -224,7 +224,7 @@ public class CliConstants {
     /**
      * Delete user
      */
-    public static final String DELETE_USER= "remove-user";
+    public static final String DELETE_USER = "remove-user";
     /**
      * Deactivate tenant
      */
@@ -257,18 +257,18 @@ public class CliConstants {
     /**
      * remove network partition
      */
-    public static final String REMOVE_NETWORK_PARTITION= "remove-network-partition";
+    public static final String REMOVE_NETWORK_PARTITION = "remove-network-partition";
 
     /**
      * Delete application
      */
-    public static final String DELETE_APPLICATION= "remove-application";
+    public static final String DELETE_APPLICATION = "remove-application";
 
 
     /**
      * Delete application signup
      */
-    public static final String DELETE_APPLICATION_SIGNUP= "remove-application-signup";
+    public static final String DELETE_APPLICATION_SIGNUP = "remove-application-signup";
 
     /**
      * Exit action

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java
index 42b980d..b10ffb6 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.utils;
 
@@ -42,72 +42,72 @@ public class CliUtils {
     private static final String LINE_SEPARATOR = System.getProperty("line.separator");
     private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("Resources");
 
-	public static <T> void printTable(T[] data, RowMapper<T> mapper, String... headers) {
-		if (data == null) {
-			return;
-		}
-		// The maximum number of columns
-		// All data String[] length must be equal to this
-		int columns = headers.length;
-		int rows = data.length + 1;
-
-		String[][] table = new String[rows][columns];
-		table[0] = headers;
-
-		for (int i = 0; i < data.length; i++) {
-			T t = data[i];
-			table[i + 1] = mapper.getData(t);
-		}
-
-		// Find the maximum length of a string in each column
-		int[] lengths = new int[columns];
-		for (int i = 0; i < table.length; i++) {
-			for (int j = 0; j < table[i].length; j++) {
-				lengths[j] = Math.max(table[i][j].length(), lengths[j]);
-			}
-		}
-
-		// The border rows
-		String borders[] = new String[lengths.length];
-		// Generate a format string for each column
-		String[] formats = new String[lengths.length];
-		for (int i = 0; i < lengths.length; i++) {
-			StringBuilder stringBuilder = new StringBuilder();
-			stringBuilder.append("+");
-			for (int j = 0; j < lengths[i] + 2; j++) {
-				stringBuilder.append("-");
-			}
-			boolean finalColumn = (i + 1 == lengths.length);
-			if (finalColumn) {
-				stringBuilder.append("+\n");
-			}
-			borders[i] = stringBuilder.toString();
-			formats[i] = "| %1$-" + lengths[i] + "s " + (finalColumn ? "|\n" : "");
-		}
-
-		// Print the table
-		for (int i = 0; i < table.length; i++) {
-			for (int j = 0; j < table[i].length; j++) {
-				System.out.print(borders[j]);
-			}
-			for (int j = 0; j < table[i].length; j++) {
-				System.out.format(formats[j], table[i][j]);
-			}
-			if (i + 1 == table.length) {
-				for (int j = 0; j < table[i].length; j++) {
-					System.out.print(borders[j]);
-				}
-			}
-		}
-	}
-	
-	public static String getMessage(String key, Object... args) {
-		String message = BUNDLE.getString(key);
-		if (args != null && args.length > 0) {
-			message = MessageFormat.format(message, args);
-		}
-		return message;
-	}
+    public static <T> void printTable(T[] data, RowMapper<T> mapper, String... headers) {
+        if (data == null) {
+            return;
+        }
+        // The maximum number of columns
+        // All data String[] length must be equal to this
+        int columns = headers.length;
+        int rows = data.length + 1;
+
+        String[][] table = new String[rows][columns];
+        table[0] = headers;
+
+        for (int i = 0; i < data.length; i++) {
+            T t = data[i];
+            table[i + 1] = mapper.getData(t);
+        }
+
+        // Find the maximum length of a string in each column
+        int[] lengths = new int[columns];
+        for (int i = 0; i < table.length; i++) {
+            for (int j = 0; j < table[i].length; j++) {
+                lengths[j] = Math.max(table[i][j].length(), lengths[j]);
+            }
+        }
+
+        // The border rows
+        String borders[] = new String[lengths.length];
+        // Generate a format string for each column
+        String[] formats = new String[lengths.length];
+        for (int i = 0; i < lengths.length; i++) {
+            StringBuilder stringBuilder = new StringBuilder();
+            stringBuilder.append("+");
+            for (int j = 0; j < lengths[i] + 2; j++) {
+                stringBuilder.append("-");
+            }
+            boolean finalColumn = (i + 1 == lengths.length);
+            if (finalColumn) {
+                stringBuilder.append("+\n");
+            }
+            borders[i] = stringBuilder.toString();
+            formats[i] = "| %1$-" + lengths[i] + "s " + (finalColumn ? "|\n" : "");
+        }
+
+        // Print the table
+        for (int i = 0; i < table.length; i++) {
+            for (int j = 0; j < table[i].length; j++) {
+                System.out.print(borders[j]);
+            }
+            for (int j = 0; j < table[i].length; j++) {
+                System.out.format(formats[j], table[i][j]);
+            }
+            if (i + 1 == table.length) {
+                for (int j = 0; j < table[i].length; j++) {
+                    System.out.print(borders[j]);
+                }
+            }
+        }
+    }
+
+    public static String getMessage(String key, Object... args) {
+        String message = BUNDLE.getString(key);
+        if (args != null && args.length > 0) {
+            message = MessageFormat.format(message, args);
+        }
+        return message;
+    }
 
     public static String readResource(String fileName) throws IOException {
         BufferedReader br = new BufferedReader(new FileReader(fileName));
@@ -131,12 +131,12 @@ public class CliUtils {
      * @param response
      * @return
      */
-    public static String getHttpResponseString (HttpResponse response) {
+    public static String getHttpResponseString(HttpResponse response) {
         try {
             String output;
             String result = "";
 
-            if((response != null) && (response.getEntity() != null) && (response.getEntity().getContent() != null)) {
+            if ((response != null) && (response.getEntity() != null) && (response.getEntity().getContent() != null)) {
                 BufferedReader reader = new BufferedReader(new InputStreamReader((response.getEntity().getContent())));
                 while ((output = reader.readLine()) != null) {
                     result += output;
@@ -153,7 +153,7 @@ public class CliUtils {
             System.out.println(message);
             log.error(message, e);
             return null;
-        } catch(Exception e) {
+        } catch (Exception e) {
             String message = "An unknown error occurred while reading response message: " + e.getMessage();
             System.out.println(message);
             log.error(message, e);
@@ -186,13 +186,13 @@ public class CliUtils {
             System.out.println(response.getStatusLine().toString());
         }
     }
-    
+
     public static Options mergeOptionArrays(Option[] a, Option[] b) {
         Options opts = new Options();
-        for (Option o: a) {
+        for (Option o : a) {
             opts.addOption(o);
         }
-        for (Option o: b) {
+        for (Option o : b) {
             opts.addOption(o);
         }
         return opts;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/RowMapper.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/RowMapper.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/RowMapper.java
index 7c3dd98..2b40b02 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/RowMapper.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/RowMapper.java
@@ -1,23 +1,23 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.utils;
 
 public interface RowMapper<T> {
-	String[] getData(T t);
+    String[] getData(T t);
 }
\ No newline at end of file


[06/12] stratos git commit: FOrmat recent code and organize imports in autoscaler component

Posted by la...@apache.org.
FOrmat recent code and organize imports in autoscaler component


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5ab5867a
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5ab5867a
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5ab5867a

Branch: refs/heads/master
Commit: 5ab5867a8e5385dbb75f8f29238e143586454605
Parents: 4e4fcce
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Apr 29 23:28:26 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Apr 29 23:28:26 2015 +0530

----------------------------------------------------------------------
 .../applications/dependency/DependencyTree.java   |  2 +-
 .../context/cluster/ClusterContext.java           | 18 +++++++++---------
 .../monitor/component/GroupMonitor.java           |  2 --
 .../monitor/component/ParentComponentMonitor.java |  6 +++---
 .../autoscaler/pojo/policy/PolicyManager.java     |  4 ++--
 .../autoscaler/services/AutoscalerService.java    |  1 -
 .../services/impl/AutoscalerServiceImpl.java      |  3 +--
 7 files changed, 16 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab5867a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
index f489158..945f91c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/dependency/DependencyTree.java
@@ -120,7 +120,7 @@ public class DependencyTree {
         }
         //if not found in the top level search recursively
         for (ApplicationChildContext context : this.primaryApplicationContextList) {
-            if(context.getApplicationChildContextList() != null &&
+            if (context.getApplicationChildContextList() != null &&
                     !context.getApplicationChildContextList().isEmpty()) {
                 return findParentContextWithId(context, id, context.getApplicationChildContextList());
             }

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab5867a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
index f7b4448..d39a071 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContext.java
@@ -164,8 +164,8 @@ public class ClusterContext extends AbstractClusterContext {
                 log.info(String.format("Cluster instance context has been added to network partition," +
                                 " [application] %s [cluster] %s  [cluster instance] %s " +
                                 "[network partition] %s", cluster.getAppId(), cluster.getClusterId(),
-                                clusterInstance.getInstanceId(),
-                                clusterInstance.getNetworkPartitionId()));
+                        clusterInstance.getInstanceId(),
+                        clusterInstance.getNetworkPartitionId()));
             }
         }
 
@@ -249,7 +249,7 @@ public class ClusterContext extends AbstractClusterContext {
         //Getting the associated  partition
         if (clusterInstance.getPartitionId() == null && partition == null) {
             String msg = "[Partition] " + clusterInstance.getPartitionId() + " for [application] " +
-                    cluster.getAppId() +" [networkPartition] " +
+                    cluster.getAppId() + " [networkPartition] " +
                     clusterInstance.getNetworkPartitionId() + "is null " +
                     "in deployment policy: [cluster-alias]: " + clusterInstance.getAlias();
             log.error(msg);
@@ -258,7 +258,7 @@ public class ClusterContext extends AbstractClusterContext {
 
         ClusterInstanceContext clusterInstanceContext =
                 (ClusterInstanceContext) clusterLevelNetworkPartitionContext.
-                getInstanceContext(clusterInstance.getInstanceId());
+                        getInstanceContext(clusterInstance.getInstanceId());
         int maxInstances = 1;
         if (clusterInstanceContext == null) {
             int minInstances = 1;
@@ -363,8 +363,8 @@ public class ClusterContext extends AbstractClusterContext {
                     clusterLevelPartitionContext.addActiveMember(memberContext);
                     if (log.isDebugEnabled()) {
                         String msg = String.format("Active member read from topology and added " +
-                                "to active member list: [application] %s [cluster] %s " +
-                                "[clusterInstanceContext] %s [partitionContext] %s [member-id] %s",
+                                        "to active member list: [application] %s [cluster] %s " +
+                                        "[clusterInstanceContext] %s [partitionContext] %s [member-id] %s",
                                 cluster.getAppId(), cluster.getClusterId(), ClusterInstanceId,
                                 clusterLevelPartitionContext.getPartitionId(), member.toString());
                         log.debug(msg);
@@ -374,8 +374,8 @@ public class ClusterContext extends AbstractClusterContext {
                     clusterLevelPartitionContext.addPendingMember(memberContext);
                     if (log.isDebugEnabled()) {
                         String msg = String.format("Pending member read from topology and added to " +
-                                "pending member list: [application] %s [cluster] %s " +
-                                "[clusterInstanceContext] %s [partitionContext] %s [member-id] %s",
+                                        "pending member list: [application] %s [cluster] %s " +
+                                        "[clusterInstanceContext] %s [partitionContext] %s [member-id] %s",
                                 cluster.getAppId(), cluster.getClusterId(), ClusterInstanceId,
                                 clusterLevelPartitionContext.getPartitionId(), member.toString());
                         log.debug(msg);
@@ -384,7 +384,7 @@ public class ClusterContext extends AbstractClusterContext {
                 clusterLevelPartitionContext.addMemberStatsContext(new MemberStatsContext(memberId));
                 if (log.isInfoEnabled()) {
                     log.info(String.format("Member stat context has been added: [application] %s " +
-                            "[cluster] %s [clusterInstanceContext] %s [partitionContext] %s [member-id] %s",
+                                    "[cluster] %s [clusterInstanceContext] %s [partitionContext] %s [member-id] %s",
                             cluster.getAppId(), cluster.getClusterId(), ClusterInstanceId,
                             clusterLevelPartitionContext.getPartitionId(), memberId));
                 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab5867a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
index 5e49e13..56837f5 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/GroupMonitor.java
@@ -917,8 +917,6 @@ public class GroupMonitor extends ParentComponentMonitor {
     }
 
 
-
-
     @Override
     public void destroy() {
         stopScheduler();

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab5867a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java
index 8c25447..d5831ba 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/component/ParentComponentMonitor.java
@@ -550,7 +550,7 @@ public abstract class ParentComponentMonitor extends Monitor implements Runnable
 
     public boolean verifyGroupStatus(String childId, String instanceId, GroupStatus requiredStatus) {
         Monitor monitor = this.getMonitor(childId);
-        if(!(monitor instanceof GroupMonitor)) {
+        if (!(monitor instanceof GroupMonitor)) {
             return false;
         }
         List<String> groupInstances;
@@ -576,8 +576,8 @@ public abstract class ParentComponentMonitor extends Monitor implements Runnable
         }
 
         if (!groupInstances.isEmpty()) {
-                GroupLevelNetworkPartitionContext networkPartitionContext =
-                    (GroupLevelNetworkPartitionContext) ((GroupMonitor)monitor).
+            GroupLevelNetworkPartitionContext networkPartitionContext =
+                    (GroupLevelNetworkPartitionContext) ((GroupMonitor) monitor).
                             getNetworkPartitionCtxts().get(networkPartitionId);
             int minInstances = networkPartitionContext.getMinInstanceCount();
             //if terminated all the instances in this instances map should be in terminated state

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab5867a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
index 262e5dc..20c1a76 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
@@ -80,7 +80,7 @@ public class PolicyManager {
     }
 
     // Add the policy to information model and persist.
-    public boolean addAutoscalePolicy(AutoscalePolicy policy) throws AutoScalingPolicyAlreadyExistException{
+    public boolean addAutoscalePolicy(AutoscalePolicy policy) throws AutoScalingPolicyAlreadyExistException {
         if (log.isInfoEnabled()) {
             log.info(String.format("Adding autoscaling policy: [id] %s", policy.getId()));
         }
@@ -185,7 +185,7 @@ public class PolicyManager {
         }
     }
 
-    public void addASPolicyToInformationModel(AutoscalePolicy asPolicy) throws AutoScalingPolicyAlreadyExistException{
+    public void addASPolicyToInformationModel(AutoscalePolicy asPolicy) throws AutoScalingPolicyAlreadyExistException {
         if (!autoscalePolicyListMap.containsKey(asPolicy.getId())) {
             if (log.isDebugEnabled()) {
                 log.debug("Adding autoscaling policy: " + asPolicy.getId());

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab5867a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/AutoscalerService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/AutoscalerService.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/AutoscalerService.java
index 7726068..2794ef3 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/AutoscalerService.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/AutoscalerService.java
@@ -33,7 +33,6 @@ import org.apache.stratos.autoscaler.pojo.ServiceGroup;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.ApplicationPolicy;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
-import org.apache.stratos.autoscaler.exception.policy.UnremovablePolicyException;
 import org.apache.stratos.common.Properties;
 
 import java.rmi.RemoteException;

http://git-wip-us.apache.org/repos/asf/stratos/blob/5ab5867a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index f6523d7..2844a88 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -44,7 +44,6 @@ import org.apache.stratos.autoscaler.monitor.cluster.ClusterMonitor;
 import org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor;
 import org.apache.stratos.autoscaler.pojo.Dependencies;
 import org.apache.stratos.autoscaler.pojo.ServiceGroup;
-import org.apache.stratos.autoscaler.exception.policy.PolicyDoesNotExistException;
 import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
 import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
 import org.apache.stratos.autoscaler.pojo.policy.deployment.ApplicationPolicy;
@@ -88,7 +87,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
     }
 
     @Override
-    public boolean addAutoScalingPolicy(AutoscalePolicy autoscalePolicy) throws AutoScalingPolicyAlreadyExistException{
+    public boolean addAutoScalingPolicy(AutoscalePolicy autoscalePolicy) throws AutoScalingPolicyAlreadyExistException {
         return PolicyManager.getInstance().addAutoscalePolicy(autoscalePolicy);
     }
 


[02/12] stratos git commit: Formatting CLI code

Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java
index 4516a31..323a736 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -56,18 +56,18 @@ public class DescribeCartridgeCommand implements Command<StratosCommandContext>
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String cartridgeType = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting cartridge info {}", cartridgeType);
-			}
-			 RestCommandLineService.getInstance().describeCartridge(cartridgeType);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String cartridgeType = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting cartridge info {}", cartridgeType);
+            }
+            RestCommandLineService.getInstance().describeCartridge(cartridgeType);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeGroupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeGroupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeGroupCommand.java
index d74c8ab..fd578cf 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeGroupCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeGroupCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -34,38 +34,38 @@ import org.slf4j.LoggerFactory;
  */
 public class DescribeCartridgeGroupCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(DescribeCartridgeGroupCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(DescribeCartridgeGroupCommand.class);
 
-	public DescribeCartridgeGroupCommand() {
-	}
+    public DescribeCartridgeGroupCommand() {
+    }
 
-	public String getName() {
-		return "describe-cartridge-group";
-	}
+    public String getName() {
+        return "describe-cartridge-group";
+    }
 
-	public String getDescription() {
-		return "Describe cartridge group";
-	}
+    public String getDescription() {
+        return "Describe cartridge group";
+    }
 
-	public String getArgumentSyntax() {
-		return "[cartridge-group-name]";
-	}
+    public String getArgumentSyntax() {
+        return "[cartridge-group-name]";
+    }
 
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing command: ", getName());
-		}
-		if ((args == null) || (args.length == 0)) {
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing command: ", getName());
+        }
+        if ((args == null) || (args.length == 0)) {
             context.getStratosApplication().printUsage(getName());
             return CliConstants.COMMAND_FAILED;
-		} else {
+        } else {
             String groupId = args[0];
             RestCommandLineService.getInstance().describeServiceGroup(groupId);
             return CliConstants.COMMAND_SUCCESSFULL;
-		}
-	}
+        }
+    }
 
-	public Options getOptions() {
-		return null;
-	}
+    public Options getOptions() {
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java
index 0f77fbd..b209c2e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -56,18 +56,18 @@ public class DescribeDeploymentPolicyCommand implements Command<StratosCommandCo
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String deploymentPolicyId = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting deployment policy {}", deploymentPolicyId);
-			}
-			 RestCommandLineService.getInstance().describeDeploymentPolicy(deploymentPolicyId);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String deploymentPolicyId = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting deployment policy {}", deploymentPolicyId);
+            }
+            RestCommandLineService.getInstance().describeDeploymentPolicy(deploymentPolicyId);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesClusterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesClusterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesClusterCommand.java
index ac1ffa8..26be1dd 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesClusterCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesClusterCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesMasterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesMasterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesMasterCommand.java
index 4693566..166d1f9 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesMasterCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeKubernetesMasterCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeNetworkPartitionCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeNetworkPartitionCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeNetworkPartitionCommand.java
index 6534780..c9ede33 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeNetworkPartitionCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeNetworkPartitionCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java
index 2a64127..3217c94 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory;
 public class DescribeTenantCommand implements Command<StratosCommandContext> {
 
     private static final Logger log = LoggerFactory.getLogger(DescribeAutoScalingPolicyCommand.class);
+
     /**
      * @return The name of the command
      */

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java
index 7443cef..03b83d2 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -32,43 +32,43 @@ import org.apache.stratos.cli.utils.CliConstants;
  */
 public class ExitCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(ExitCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(ExitCommand.class);
 
-	public ExitCommand() {
-	}
+    public ExitCommand() {
+    }
 
-	@Override
-	public String getName() {
-		return CliConstants.EXIT_ACTION;
-	}
+    @Override
+    public String getName() {
+        return CliConstants.EXIT_ACTION;
+    }
 
-	@Override
-	public String getDescription() {
-		return "Exit from stratos client tool";
-	}
+    @Override
+    public String getDescription() {
+        return "Exit from stratos client tool";
+    }
 
-	@Override
-	public String getArgumentSyntax() {
-		return null;
-	}
+    @Override
+    public String getArgumentSyntax() {
+        return null;
+    }
 
-	@Override
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		// Nothing to execute here. This is a special command.
-		if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args == null || args.length == 0) {
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
-	}
+    @Override
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        // Nothing to execute here. This is a special command.
+        if (log.isDebugEnabled()) {
+            log.debug("Executing {} command...", getName());
+        }
+        if (args == null || args.length == 0) {
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
+    }
 
-	@Override
-	public Options getOptions() {
-		return null;
-	}
+    @Override
+    public Options getOptions() {
+        return null;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java
index 0dddcaa..082270f 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -32,46 +32,46 @@ import org.apache.stratos.cli.utils.CliConstants;
  */
 public class HelpCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(HelpCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(HelpCommand.class);
 
-	public HelpCommand() {
-	}
+    public HelpCommand() {
+    }
 
-	@Override
-	public String getName() {
-		return CliConstants.HELP_ACTION;
-	}
+    @Override
+    public String getName() {
+        return CliConstants.HELP_ACTION;
+    }
 
-	@Override
-	public String getDescription() {
-		return "Help for commands";
-	}
+    @Override
+    public String getDescription() {
+        return "Help for commands";
+    }
 
-	@Override
-	public String getArgumentSyntax() {
-		return "[command]";
-	}
+    @Override
+    public String getArgumentSyntax() {
+        return "[command]";
+    }
 
-	@Override
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args == null || args.length == 0) {
-			context.getStratosApplication().printHelp();
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else if (args.length == 1) {
-			context.getStratosApplication().printHelp(args[0]);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
-	}
+    @Override
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing {} command...", getName());
+        }
+        if (args == null || args.length == 0) {
+            context.getStratosApplication().printHelp();
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else if (args.length == 1) {
+            context.getStratosApplication().printHelp(args[0]);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
+    }
 
-	@Override
-	public Options getOptions() {
-		return null;
-	}
+    @Override
+    public Options getOptions() {
+        return null;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/InfoCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/InfoCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/InfoCommand.java
index 5086395..e31ca38 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/InfoCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/InfoCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -29,32 +29,32 @@ import org.slf4j.LoggerFactory;
 
 public class InfoCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(InfoCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(InfoCommand.class);
 
-	public InfoCommand() {
-	}
+    public InfoCommand() {
+    }
 
-	@Override
-	public String getName() {
-		return CliConstants.INFO_ACTION;
-	}
+    @Override
+    public String getName() {
+        return CliConstants.INFO_ACTION;
+    }
 
-	@Override
-	public String getDescription() {
-		return "Get information about a subscribed cartridge";
-	}
+    @Override
+    public String getDescription() {
+        return "Get information about a subscribed cartridge";
+    }
 
-	@Override
-	public String getArgumentSyntax() {
-		return "[Cartridge alias]";
-	}
+    @Override
+    public String getArgumentSyntax() {
+        return "[Cartridge alias]";
+    }
 
-	@Override
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		throw new RuntimeException("Not implemented");
+    @Override
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing {} command...", getName());
+        }
+        throw new RuntimeException("Not implemented");
 
 //		if (args != null && args.length == 1) {
 //			String alias = args[0];
@@ -67,11 +67,11 @@ public class InfoCommand implements Command<StratosCommandContext> {
 //			context.getStratosApplication().printUsage(getName());
 //			return CliConstants.COMMAND_FAILED;
 //		}
-	}
+    }
 
-	@Override
-	public Options getOptions() {
-		return null;
-	}
+    @Override
+    public Options getOptions() {
+        return null;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationPoliciesCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationPoliciesCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationPoliciesCommand.java
index 44c1485..ad25d09 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationPoliciesCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationPoliciesCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -47,7 +47,7 @@ public class ListApplicationPoliciesCommand implements Command<StratosCommandCon
         return null;
     }
 
-    public int execute(StratosCommandContext context, String[] args,Option[] alreadyParsedOpts) throws CommandException {
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
             log.debug("Executing {} command...", getName());
         }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationsCommand.java
index 0ae4caa..c095d3c 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationsCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListApplicationsCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListAutoscalePolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListAutoscalePolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListAutoscalePolicyCommand.java
index 4d9573d..c02c336 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListAutoscalePolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListAutoscalePolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgeGroupsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgeGroupsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgeGroupsCommand.java
index eadb1a0..4048640 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgeGroupsCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgeGroupsCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -33,38 +33,38 @@ import org.slf4j.LoggerFactory;
  */
 public class ListCartridgeGroupsCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(ListCartridgeGroupsCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(ListCartridgeGroupsCommand.class);
 
-	public ListCartridgeGroupsCommand() {
-	}
+    public ListCartridgeGroupsCommand() {
+    }
 
-	public String getName() {
-		return "list-cartridge-groups";
-	}
+    public String getName() {
+        return "list-cartridge-groups";
+    }
 
-	public String getDescription() {
-		return "List available cartridge groups";
-	}
+    public String getDescription() {
+        return "List available cartridge groups";
+    }
 
-	public String getArgumentSyntax() {
-		return null;
-	}
+    public String getArgumentSyntax() {
+        return null;
+    }
 
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args == null || args.length == 0) {
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing {} command...", getName());
+        }
+        if (args == null || args.length == 0) {
             RestCommandLineService.getInstance().listCartridgeGroups();
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
-	}
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
+    }
 
-	public Options getOptions() {
-		return null;
-	}
+    public Options getOptions() {
+        return null;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java
index 824a586..d1c82ea 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -33,38 +33,38 @@ import org.apache.stratos.cli.utils.CliConstants;
  */
 public class ListCartridgesCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(ListCartridgesCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(ListCartridgesCommand.class);
 
-	public ListCartridgesCommand() {
-	}
+    public ListCartridgesCommand() {
+    }
 
-	public String getName() {
-		return "list-cartridges";
-	}
+    public String getName() {
+        return "list-cartridges";
+    }
 
-	public String getDescription() {
-		return "List available cartridges";
-	}
+    public String getDescription() {
+        return "List available cartridges";
+    }
 
-	public String getArgumentSyntax() {
-		return null;
-	}
+    public String getArgumentSyntax() {
+        return null;
+    }
 
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args == null || args.length == 0) {
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing {} command...", getName());
+        }
+        if (args == null || args.length == 0) {
             RestCommandLineService.getInstance().listCartridges();
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
-	}
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
+    }
 
-	public Options getOptions() {
-		return null;
-	}
+    public Options getOptions() {
+        return null;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDeploymentPoliciesCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDeploymentPoliciesCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDeploymentPoliciesCommand.java
index 82ff596..eaedb3b 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDeploymentPoliciesCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDeploymentPoliciesCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDomainMappingsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDomainMappingsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDomainMappingsCommand.java
index f9b334a..eecd5b9 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDomainMappingsCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListDomainMappingsCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -34,38 +34,38 @@ import org.slf4j.LoggerFactory;
  */
 public class ListDomainMappingsCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(ListDomainMappingsCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(ListDomainMappingsCommand.class);
 
-	public ListDomainMappingsCommand() {
-	}
+    public ListDomainMappingsCommand() {
+    }
 
-	public String getName() {
-		return "list-domain-mappings";
-	}
+    public String getName() {
+        return "list-domain-mappings";
+    }
 
-	public String getDescription() {
-		return "List domain mappings";
-	}
+    public String getDescription() {
+        return "List domain mappings";
+    }
 
-	public String getArgumentSyntax() {
-		return "[application-id]";
-	}
+    public String getArgumentSyntax() {
+        return "[application-id]";
+    }
 
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing command: ", getName());
-		}
-		if ((args == null) || (args.length == 0)) {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		} else {
-			String applicationId = args[0];
-			RestCommandLineService.getInstance().listDomainMappings(applicationId);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		}
-	}
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing command: ", getName());
+        }
+        if ((args == null) || (args.length == 0)) {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        } else {
+            String applicationId = args[0];
+            RestCommandLineService.getInstance().listDomainMappings(applicationId);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        }
+    }
 
-	public Options getOptions() {
-		return null;
-	}
+    public Options getOptions() {
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java
index 1c2774a..2cbb8bf 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesClustersCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -34,37 +34,37 @@ import org.slf4j.LoggerFactory;
  */
 public class ListKubernetesClustersCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(ListKubernetesClustersCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(ListKubernetesClustersCommand.class);
 
-	public ListKubernetesClustersCommand() {
-	}
+    public ListKubernetesClustersCommand() {
+    }
 
-	public String getName() {
-		return "list-kubernetes-clusters";
-	}
+    public String getName() {
+        return "list-kubernetes-clusters";
+    }
 
-	public String getDescription() {
-		return "List Kubernetes clusters";
-	}
+    public String getDescription() {
+        return "List Kubernetes clusters";
+    }
 
-	public String getArgumentSyntax() {
-		return null;
-	}
+    public String getArgumentSyntax() {
+        return null;
+    }
 
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing command: ", getName());
-		}
-		if ((args == null) || (args.length == 0)) {
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing command: ", getName());
+        }
+        if ((args == null) || (args.length == 0)) {
             RestCommandLineService.getInstance().listKubernetesClusters();
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
-	}
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
+    }
 
-	public Options getOptions() {
-		return null;
-	}
+    public Options getOptions() {
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesHostsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesHostsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesHostsCommand.java
index 60556de..ec4b960 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesHostsCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListKubernetesHostsCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -35,11 +35,11 @@ import static org.apache.stratos.cli.utils.CliUtils.mergeOptionArrays;
  */
 public class ListKubernetesHostsCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(ListKubernetesHostsCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(ListKubernetesHostsCommand.class);
 
     private final Options options;
 
-    public ListKubernetesHostsCommand(){
+    public ListKubernetesHostsCommand() {
         options = constructOptions();
     }
 
@@ -54,17 +54,17 @@ public class ListKubernetesHostsCommand implements Command<StratosCommandContext
         return options;
     }
 
-	public String getName() {
-		return "list-kubernetes-hosts";
-	}
+    public String getName() {
+        return "list-kubernetes-hosts";
+    }
 
-	public String getDescription() {
-		return "List Kubernetes hosts";
-	}
+    public String getDescription() {
+        return "List Kubernetes hosts";
+    }
 
-	public String getArgumentSyntax() {
-		return null;
-	}
+    public String getArgumentSyntax() {
+        return null;
+    }
 
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
@@ -72,7 +72,7 @@ public class ListKubernetesHostsCommand implements Command<StratosCommandContext
         }
 
         if (args != null && args.length > 0) {
-            String clusterId= null;
+            String clusterId = null;
 
             final CommandLineParser parser = new GnuParser();
             CommandLine commandLine;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListNetworkPartitionCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListNetworkPartitionCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListNetworkPartitionCommand.java
index 06ac831..bd6e2df 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListNetworkPartitionCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListNetworkPartitionCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListPartialSearchTenantsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListPartialSearchTenantsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListPartialSearchTenantsCommand.java
index 74f030d..d4da11e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListPartialSearchTenantsCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListPartialSearchTenantsCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -33,13 +33,13 @@ import static org.apache.stratos.cli.utils.CliUtils.mergeOptionArrays;
 /**
  * List cartridges by partial domain search
  */
-public class ListPartialSearchTenantsCommand implements Command<StratosCommandContext>{
+public class ListPartialSearchTenantsCommand implements Command<StratosCommandContext> {
 
     private static final Logger log = LoggerFactory.getLogger(ListPartialSearchTenantsCommand.class);
 
     private final Options options;
 
-    public ListPartialSearchTenantsCommand(){
+    public ListPartialSearchTenantsCommand() {
         options = constructOptions();
     }
 
@@ -72,7 +72,7 @@ public class ListPartialSearchTenantsCommand implements Command<StratosCommandCo
         }
 
         if (args != null && args.length > 0) {
-            String partialDomain= null;
+            String partialDomain = null;
 
             final CommandLineParser parser = new GnuParser();
             CommandLine commandLine;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListTenants.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListTenants.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListTenants.java
index da9a50d..8ec0d8e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListTenants.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListTenants.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -35,7 +35,7 @@ public class ListTenants implements Command<StratosCommandContext> {
 
     private static final Logger log = LoggerFactory.getLogger(ListTenants.class);
 
-    public ListTenants(){
+    public ListTenants() {
     }
 
     public String getName() {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListUsers.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListUsers.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListUsers.java
index 73fd1ec..7203356 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListUsers.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListUsers.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -35,7 +35,7 @@ public class ListUsers implements Command<StratosCommandContext> {
 
     private static final Logger log = LoggerFactory.getLogger(ListUsers.class);
 
-    public ListUsers(){
+    public ListUsers() {
     }
 
     public String getName() {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveApplicationPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveApplicationPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveApplicationPolicyCommand.java
index 3154946..fff101a 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveApplicationPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveApplicationPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeCommand.java
index 40de231..b5300b0 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -57,18 +57,18 @@ public class RemoveCartridgeCommand implements Command<StratosCommandContext> {
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String cartridgeType = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting Remove cartridge definition info {}", cartridgeType);
-			}
-			RestCommandLineService.getInstance().undeployCartrigdeDefinition(cartridgeType);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String cartridgeType = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting Remove cartridge definition info {}", cartridgeType);
+            }
+            RestCommandLineService.getInstance().undeployCartrigdeDefinition(cartridgeType);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeGroupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeGroupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeGroupCommand.java
index 27a7064..4ed309e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeGroupCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveCartridgeGroupCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;


[11/12] stratos git commit: Update wsdl, client and rest service to handle InvalidApplicationPolicyException only

Posted by la...@apache.org.
Update wsdl, client and rest service to handle InvalidApplicationPolicyException only


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5f94f7e8
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5f94f7e8
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5f94f7e8

Branch: refs/heads/master
Commit: 5f94f7e829f0ed41fa4acd0ec0455426079cd826
Parents: dc0d23d
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Thu Apr 30 10:42:35 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Thu Apr 30 10:42:35 2015 +0530

----------------------------------------------------------------------
 .../common/client/AutoscalerServiceClient.java  |   2 +-
 .../rest/endpoint/api/StratosApiV41.java        |   5 +-
 .../rest/endpoint/api/StratosApiV41Utils.java   |   1 -
 .../src/main/resources/AutoscalerService.wsdl   | 257 +++++++++----------
 4 files changed, 128 insertions(+), 137 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/5f94f7e8/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java
index 2352f68..12a0c91 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/client/AutoscalerServiceClient.java
@@ -118,7 +118,7 @@ public class AutoscalerServiceClient {
     }
 
     public void addApplicationPolicy(ApplicationPolicy applicationPolicy)
-            throws RemoteException, AutoscalerServiceInvalidPolicyExceptionException,
+            throws RemoteException,
             AutoscalerServiceRemoteExceptionException, AutoscalerServiceInvalidApplicationPolicyExceptionException {
         stub.addApplicationPolicy(applicationPolicy);
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/5f94f7e8/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 5120efc..a1a1505 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -763,10 +763,9 @@ public class StratosApiV41 extends AbstractApi {
                             applicationPolicy.getId()))).build();
         } catch (RestAPIException e) {
             throw e;
-        } catch (AutoscalerServiceInvalidPolicyExceptionException e) {
-            return Response.status(Response.Status.BAD_REQUEST).build();
         } catch (AutoscalerServiceInvalidApplicationPolicyExceptionException e) {
-            return Response.status(Response.Status.BAD_REQUEST).build();
+            return Response.status(Response.Status.BAD_REQUEST).entity(new ErrorResponseBean(
+                    Response.Status.BAD_REQUEST.getStatusCode(), "Invalid application policy")).build();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/5f94f7e8/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 47b72fc..ff8d36f 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -575,7 +575,6 @@ public class StratosApiV41Utils {
     }
 
     public static void addApplicationPolicy(ApplicationPolicyBean applicationPolicyBean) throws RestAPIException,
-            AutoscalerServiceInvalidPolicyExceptionException,
             AutoscalerServiceInvalidApplicationPolicyExceptionException {
 
         if (applicationPolicyBean == null) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/5f94f7e8/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
----------------------------------------------------------------------
diff --git a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
index 4103617..73cb632 100644
--- a/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
+++ b/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources/AutoscalerService.wsdl
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax25="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://rmi.java/xsd" xmlns:ax21="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax22="http://common.stratos.apache.org/xsd" xmlns:ax218="http://io.java/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax221="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://partition.common.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax223="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://deployment.policy.pojo.au
 toscaler.stratos.apache.org/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ax29="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ns="http://impl.services.autoscaler.stratos.apache.org" xmlns:ax27="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax25="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax21="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax22="http://common.stratos.apache.org/xsd" xmlns:ax219="http://rmi.java/xsd" xmlns:ax214="http://partition.common.stratos.apache.org/xsd" xmlns:ax220="http://io.java/xsd" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ax213="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ax223="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax211="http://autoscale.policy.pojo.au
 toscaler.stratos.apache.org/xsd" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
     <wsdl:types>
-        <xs:schema xmlns:ax219="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
+        <xs:schema xmlns:ax221="http://io.java/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://rmi.java/xsd">
             <xs:import namespace="http://io.java/xsd"/>
             <xs:complexType name="RemoteException">
                 <xs:complexContent>
-                    <xs:extension base="ax219:IOException">
+                    <xs:extension base="ax220:IOException">
                         <xs:sequence>
                             <xs:element minOccurs="0" name="cause" nillable="true" type="xs:anyType"/>
                             <xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
@@ -21,7 +21,7 @@
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="instanceRoundingFactor" type="xs:float"/>
                     <xs:element minOccurs="0" name="isPublic" type="xs:boolean"/>
-                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax29:LoadThresholds"/>
+                    <xs:element minOccurs="0" name="loadThresholds" nillable="true" type="ax211:LoadThresholds"/>
                     <xs:element minOccurs="0" name="tenantId" type="xs:int"/>
                 </xs:sequence>
             </xs:complexType>
@@ -156,15 +156,15 @@
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax28="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax215="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax220="http://rmi.java/xsd" xmlns:ax222="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax210="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax224="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
+        <xs:schema xmlns:ax28="http://pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax26="http://exception.autoscaler.stratos.apache.org/xsd" xmlns:ax24="http://pojo.applications.autoscaler.stratos.apache.org/xsd" xmlns:ax217="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax212="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd" xmlns:ax222="http://rmi.java/xsd" xmlns:ax210="http://application.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax224="http://policy.exception.autoscaler.stratos.apache.org/xsd" xmlns:ax226="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://impl.services.autoscaler.stratos.apache.org">
             <xs:import namespace="http://pojo.applications.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
+            <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://pojo.autoscaler.stratos.apache.org/xsd"/>
+            <xs:import namespace="http://application.exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://autoscale.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://rmi.java/xsd"/>
             <xs:import namespace="http://policy.exception.autoscaler.stratos.apache.org/xsd"/>
-            <xs:import namespace="http://exception.autoscaler.stratos.apache.org/xsd"/>
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:element name="getApplications">
                 <xs:complexType>
@@ -178,10 +178,50 @@
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
+            <xs:element name="serviceGroupExist">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="serviceGroupExistResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="AutoscalerServiceAutoScalerException">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax25:AutoScalerException"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getServiceGroups">
+                <xs:complexType>
+                    <xs:sequence/>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="getServiceGroupsResponse">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:ServiceGroup"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="removeServiceGroup">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
             <xs:element name="AutoscalerServiceApplicationDefinitionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax25:ApplicationDefinitionException"/>
+                        <xs:element minOccurs="0" name="ApplicationDefinitionException" nillable="true" type="ax29:ApplicationDefinitionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -216,7 +256,7 @@
             <xs:element name="getAutoscalingPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -230,7 +270,7 @@
             <xs:element name="getDeploymentPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax215:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -248,31 +288,31 @@
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplicationPolicy">
+            <xs:element name="updateApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax24:ApplicationContext"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="getApplicationPolicyResponse">
+            <xs:element name="deleteApplication">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="return" nillable="true" type="ax215:ApplicationPolicy"/>
+                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="updateApplication">
+            <xs:element name="getApplicationPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationContext" nillable="true" type="ax24:ApplicationContext"/>
+                        <xs:element minOccurs="0" name="applicationPolicyId" nillable="true" type="xs:string"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
-            <xs:element name="deleteApplication">
+            <xs:element name="getApplicationPolicyResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationId" nillable="true" type="xs:string"/>
+                        <xs:element minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -284,63 +324,63 @@
             <xs:element name="getDeploymentPoliciesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:DeploymentPolicy"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:DeploymentPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoscalerServiceRemoteException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax217:RemoteException"/>
+                        <xs:element minOccurs="0" name="RemoteException" nillable="true" type="ax219:RemoteException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoscalerServiceInvalidDeploymentPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax221:InvalidDeploymentPolicyException"/>
+                        <xs:element minOccurs="0" name="InvalidDeploymentPolicyException" nillable="true" type="ax223:InvalidDeploymentPolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoscalerServiceDeploymentPolicyNotExistsException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax221:DeploymentPolicyNotExistsException"/>
+                        <xs:element minOccurs="0" name="DeploymentPolicyNotExistsException" nillable="true" type="ax223:DeploymentPolicyNotExistsException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoscalerServiceInvalidPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax221:InvalidPolicyException"/>
+                        <xs:element minOccurs="0" name="InvalidPolicyException" nillable="true" type="ax223:InvalidPolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoscalerServiceCloudControllerConnectionException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax223:CloudControllerConnectionException"/>
+                        <xs:element minOccurs="0" name="CloudControllerConnectionException" nillable="true" type="ax25:CloudControllerConnectionException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateDeploymentPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax215:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoscalerServiceInvalidApplicationPolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax25:InvalidApplicationPolicyException"/>
+                        <xs:element minOccurs="0" name="InvalidApplicationPolicyException" nillable="true" type="ax29:InvalidApplicationPolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addApplicationPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax215:ApplicationPolicy"/>
+                        <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -354,14 +394,14 @@
             <xs:element name="AutoscalerServiceApplicatioinPolicyNotExistsException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax221:ApplicatioinPolicyNotExistsException"/>
+                        <xs:element minOccurs="0" name="ApplicatioinPolicyNotExistsException" nillable="true" type="ax223:ApplicatioinPolicyNotExistsException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateApplicationPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax215:ApplicationPolicy"/>
+                        <xs:element minOccurs="0" name="applicationPolicy" nillable="true" type="ax217:ApplicationPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -373,61 +413,21 @@
             <xs:element name="getApplicationPoliciesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax215:ApplicationPolicy"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="serviceGroupExist">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="serviceName" nillable="true" type="xs:string"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="serviceGroupExistResponse">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="return" type="xs:boolean"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="AutoscalerServiceAutoScalerException">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="AutoScalerException" nillable="true" type="ax223:AutoScalerException"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getServiceGroups">
-                <xs:complexType>
-                    <xs:sequence/>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="getServiceGroupsResponse">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax27:ServiceGroup"/>
-                    </xs:sequence>
-                </xs:complexType>
-            </xs:element>
-            <xs:element name="removeServiceGroup">
-                <xs:complexType>
-                    <xs:sequence>
-                        <xs:element minOccurs="0" name="groupName" nillable="true" type="xs:string"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax217:ApplicationPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoscalerServiceAutoScalingPolicyAlreadyExistException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax223:AutoScalingPolicyAlreadyExistException"/>
+                        <xs:element minOccurs="0" name="AutoScalingPolicyAlreadyExistException" nillable="true" type="ax25:AutoScalingPolicyAlreadyExistException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -446,14 +446,14 @@
             <xs:element name="getAutoScalingPoliciesResponse">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax29:AutoscalePolicy"/>
+                        <xs:element maxOccurs="unbounded" minOccurs="0" name="return" nillable="true" type="ax212:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="updateAutoScalingPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax29:AutoscalePolicy"/>
+                        <xs:element minOccurs="0" name="autoscalePolicy" nillable="true" type="ax212:AutoscalePolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -467,14 +467,14 @@
             <xs:element name="AutoscalerServiceUnremovablePolicyException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax221:UnremovablePolicyException"/>
+                        <xs:element minOccurs="0" name="UnremovablePolicyException" nillable="true" type="ax223:UnremovablePolicyException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="AutoscalerServicePolicyDoesNotExistException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax221:PolicyDoesNotExistException"/>
+                        <xs:element minOccurs="0" name="PolicyDoesNotExistException" nillable="true" type="ax223:PolicyDoesNotExistException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -532,7 +532,7 @@
             <xs:element name="AutoscalerServiceInvalidArgumentException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax223:InvalidArgumentException"/>
+                        <xs:element minOccurs="0" name="InvalidArgumentException" nillable="true" type="ax25:InvalidArgumentException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -547,7 +547,7 @@
             <xs:element name="AutoscalerServiceInvalidServiceGroupException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax25:InvalidServiceGroupException"/>
+                        <xs:element minOccurs="0" name="InvalidServiceGroupException" nillable="true" type="ax29:InvalidServiceGroupException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -590,14 +590,14 @@
             <xs:element name="AutoscalerServiceDeploymentPolicyAlreadyExistsException">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax221:DeploymentPolicyAlreadyExistsException"/>
+                        <xs:element minOccurs="0" name="DeploymentPolicyAlreadyExistsException" nillable="true" type="ax223:DeploymentPolicyAlreadyExistsException"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
             <xs:element name="addDeployementPolicy">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax215:DeploymentPolicy"/>
+                        <xs:element minOccurs="0" name="deploymentPolicy" nillable="true" type="ax217:DeploymentPolicy"/>
                     </xs:sequence>
                 </xs:complexType>
             </xs:element>
@@ -616,13 +616,13 @@
                 </xs:complexType>
             </xs:element>
         </xs:schema>
-        <xs:schema xmlns:ax216="http://common.stratos.apache.org/xsd" xmlns:ax214="http://partition.common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax216="http://partition.common.stratos.apache.org/xsd" xmlns:ax218="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://deployment.policy.pojo.autoscaler.stratos.apache.org/xsd">
             <xs:import namespace="http://partition.common.stratos.apache.org/xsd"/>
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:complexType name="DeploymentPolicy">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="deploymentPolicyID" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="ax214:NetworkPartition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="ax216:NetworkPartition"/>
                 </xs:sequence>
             </xs:complexType>
             <xs:complexType name="ApplicationPolicy">
@@ -631,18 +631,18 @@
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitionGroups" nillable="true" type="xs:string"/>
                     <xs:element maxOccurs="unbounded" minOccurs="0" name="networkPartitions" nillable="true" type="xs:string"/>
-                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax216:Properties"/>
+                    <xs:element minOccurs="0" name="properties" nillable="true" type="ax22:Properties"/>
                 </xs:sequence>
             </xs:complexType>
         </xs:schema>
-        <xs:schema xmlns:ax213="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
+        <xs:schema xmlns:ax215="http://common.stratos.apache.org/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://partition.common.stratos.apache.org/xsd">
             <xs:import namespace="http://common.stratos.apache.org/xsd"/>
             <xs:complexType name="NetworkPartition">
                 <xs:sequence>
                     <xs:element minOccurs="0" name="activeByDefault" type="xs:boolean"/>
                     <xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
                     <xs:element minOccurs="0" name="partitionAlgo" nillable="true" type="xs:string"/>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax212:Partition"/>
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="partitions" nillable="true" type="ax214:Partition"/>
                     <xs:element minOccurs="0" name="provider" nillable="true" type="xs:string"/>
                 </xs:sequence>
             </xs:complexType>
@@ -708,14 +708,14 @@
             </xs:complexType>
             <xs:complexType name="UnremovablePolicyException">
                 <xs:complexContent>
-                    <xs:extension base="ax223:AutoScalerException">
+                    <xs:extension base="ax25:AutoScalerException">
                         <xs:sequence/>
                     </xs:extension>
                 </xs:complexContent>
             </xs:complexType>
             <xs:complexType name="PolicyDoesNotExistException">
                 <xs:complexContent>
-                    <xs:extension base="ax223:AutoScalerException">
+                    <xs:extension base="ax25:AutoScalerException">
                         <xs:sequence/>
                     </xs:extension>
                 </xs:complexContent>
@@ -730,9 +730,6 @@
             </xs:complexType>
         </xs:schema>
         <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.autoscaler.stratos.apache.org/xsd">
-            <xs:complexType name="CloudControllerConnectionException">
-                <xs:sequence/>
-            </xs:complexType>
             <xs:complexType name="AutoScalerException">
                 <xs:complexContent>
                     <xs:extension base="xs:RuntimeException">
@@ -740,9 +737,12 @@
                     </xs:extension>
                 </xs:complexContent>
             </xs:complexType>
+            <xs:complexType name="CloudControllerConnectionException">
+                <xs:sequence/>
+            </xs:complexType>
             <xs:complexType name="AutoScalingPolicyAlreadyExistException">
                 <xs:complexContent>
-                    <xs:extension base="ax223:AutoScalerException">
+                    <xs:extension base="ax25:AutoScalerException">
                         <xs:sequence/>
                     </xs:extension>
                 </xs:complexContent>
@@ -787,9 +787,6 @@
     <wsdl:message name="AutoscalerServiceInvalidApplicationPolicyException">
         <wsdl:part name="parameters" element="ns:AutoscalerServiceInvalidApplicationPolicyException"/>
     </wsdl:message>
-    <wsdl:message name="AutoscalerServiceInvalidPolicyException">
-        <wsdl:part name="parameters" element="ns:AutoscalerServiceInvalidPolicyException"/>
-    </wsdl:message>
     <wsdl:message name="getDeploymentPoliciesRequest">
         <wsdl:part name="parameters" element="ns:getDeploymentPolicies"/>
     </wsdl:message>
@@ -904,6 +901,9 @@
     <wsdl:message name="updateAutoScalingPolicyResponse">
         <wsdl:part name="parameters" element="ns:updateAutoScalingPolicyResponse"/>
     </wsdl:message>
+    <wsdl:message name="AutoscalerServiceInvalidPolicyException">
+        <wsdl:part name="parameters" element="ns:AutoscalerServiceInvalidPolicyException"/>
+    </wsdl:message>
     <wsdl:message name="findClusterIdRequest">
         <wsdl:part name="parameters" element="ns:findClusterId"/>
     </wsdl:message>
@@ -940,15 +940,15 @@
     <wsdl:message name="removeServiceGroupRequest">
         <wsdl:part name="parameters" element="ns:removeServiceGroup"/>
     </wsdl:message>
-    <wsdl:message name="updateApplicationRequest">
-        <wsdl:part name="parameters" element="ns:updateApplication"/>
-    </wsdl:message>
     <wsdl:message name="getApplicationPolicyRequest">
         <wsdl:part name="parameters" element="ns:getApplicationPolicy"/>
     </wsdl:message>
     <wsdl:message name="getApplicationPolicyResponse">
         <wsdl:part name="parameters" element="ns:getApplicationPolicyResponse"/>
     </wsdl:message>
+    <wsdl:message name="updateApplicationRequest">
+        <wsdl:part name="parameters" element="ns:updateApplication"/>
+    </wsdl:message>
     <wsdl:portType name="AutoscalerServicePortType">
         <wsdl:operation name="removeAutoScalingPolicy">
             <wsdl:input message="ns:removeAutoScalingPolicyRequest" wsaw:Action="urn:removeAutoScalingPolicy"/>
@@ -968,7 +968,6 @@
             <wsdl:input message="ns:addApplicationPolicyRequest" wsaw:Action="urn:addApplicationPolicy"/>
             <wsdl:fault message="ns:AutoscalerServiceRemoteException" name="AutoscalerServiceRemoteException" wsaw:Action="urn:addApplicationPolicyAutoscalerServiceRemoteException"/>
             <wsdl:fault message="ns:AutoscalerServiceInvalidApplicationPolicyException" name="AutoscalerServiceInvalidApplicationPolicyException" wsaw:Action="urn:addApplicationPolicyAutoscalerServiceInvalidApplicationPolicyException"/>
-            <wsdl:fault message="ns:AutoscalerServiceInvalidPolicyException" name="AutoscalerServiceInvalidPolicyException" wsaw:Action="urn:addApplicationPolicyAutoscalerServiceInvalidPolicyException"/>
         </wsdl:operation>
         <wsdl:operation name="getDeploymentPolicies">
             <wsdl:input message="ns:getDeploymentPoliciesRequest" wsaw:Action="urn:getDeploymentPolicies"/>
@@ -1084,14 +1083,14 @@
         <wsdl:operation name="removeServiceGroup">
             <wsdl:input message="ns:removeServiceGroupRequest" wsaw:Action="urn:removeServiceGroup"/>
         </wsdl:operation>
-        <wsdl:operation name="updateApplication">
-            <wsdl:input message="ns:updateApplicationRequest" wsaw:Action="urn:updateApplication"/>
-            <wsdl:fault message="ns:AutoscalerServiceApplicationDefinitionException" name="AutoscalerServiceApplicationDefinitionException" wsaw:Action="urn:updateApplicationAutoscalerServiceApplicationDefinitionException"/>
-        </wsdl:operation>
         <wsdl:operation name="getApplicationPolicy">
             <wsdl:input message="ns:getApplicationPolicyRequest" wsaw:Action="urn:getApplicationPolicy"/>
             <wsdl:output message="ns:getApplicationPolicyResponse" wsaw:Action="urn:getApplicationPolicyResponse"/>
         </wsdl:operation>
+        <wsdl:operation name="updateApplication">
+            <wsdl:input message="ns:updateApplicationRequest" wsaw:Action="urn:updateApplication"/>
+            <wsdl:fault message="ns:AutoscalerServiceApplicationDefinitionException" name="AutoscalerServiceApplicationDefinitionException" wsaw:Action="urn:updateApplicationAutoscalerServiceApplicationDefinitionException"/>
+        </wsdl:operation>
     </wsdl:portType>
     <wsdl:binding name="AutoscalerServiceSoap11Binding" type="ns:AutoscalerServicePortType">
         <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -1133,9 +1132,6 @@
             <wsdl:input>
                 <soap:body use="literal"/>
             </wsdl:input>
-            <wsdl:fault name="AutoscalerServiceInvalidPolicyException">
-                <soap:fault use="literal" name="AutoscalerServiceInvalidPolicyException"/>
-            </wsdl:fault>
             <wsdl:fault name="AutoscalerServiceRemoteException">
                 <soap:fault use="literal" name="AutoscalerServiceRemoteException"/>
             </wsdl:fault>
@@ -1407,15 +1403,6 @@
                 <soap:body use="literal"/>
             </wsdl:input>
         </wsdl:operation>
-        <wsdl:operation name="getApplicationPolicy">
-            <soap:operation soapAction="urn:getApplicationPolicy" style="document"/>
-            <wsdl:input>
-                <soap:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output>
-                <soap:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
         <wsdl:operation name="updateApplication">
             <soap:operation soapAction="urn:updateApplication" style="document"/>
             <wsdl:input>
@@ -1425,6 +1412,15 @@
                 <soap:fault use="literal" name="AutoscalerServiceApplicationDefinitionException"/>
             </wsdl:fault>
         </wsdl:operation>
+        <wsdl:operation name="getApplicationPolicy">
+            <soap:operation soapAction="urn:getApplicationPolicy" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
     </wsdl:binding>
     <wsdl:binding name="AutoscalerServiceSoap12Binding" type="ns:AutoscalerServicePortType">
         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
@@ -1466,9 +1462,6 @@
             <wsdl:input>
                 <soap12:body use="literal"/>
             </wsdl:input>
-            <wsdl:fault name="AutoscalerServiceInvalidPolicyException">
-                <soap12:fault use="literal" name="AutoscalerServiceInvalidPolicyException"/>
-            </wsdl:fault>
             <wsdl:fault name="AutoscalerServiceRemoteException">
                 <soap12:fault use="literal" name="AutoscalerServiceRemoteException"/>
             </wsdl:fault>
@@ -1740,15 +1733,6 @@
                 <soap12:body use="literal"/>
             </wsdl:input>
         </wsdl:operation>
-        <wsdl:operation name="getApplicationPolicy">
-            <soap12:operation soapAction="urn:getApplicationPolicy" style="document"/>
-            <wsdl:input>
-                <soap12:body use="literal"/>
-            </wsdl:input>
-            <wsdl:output>
-                <soap12:body use="literal"/>
-            </wsdl:output>
-        </wsdl:operation>
         <wsdl:operation name="updateApplication">
             <soap12:operation soapAction="urn:updateApplication" style="document"/>
             <wsdl:input>
@@ -1758,6 +1742,15 @@
                 <soap12:fault use="literal" name="AutoscalerServiceApplicationDefinitionException"/>
             </wsdl:fault>
         </wsdl:operation>
+        <wsdl:operation name="getApplicationPolicy">
+            <soap12:operation soapAction="urn:getApplicationPolicy" style="document"/>
+            <wsdl:input>
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap12:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
     </wsdl:binding>
     <wsdl:binding name="AutoscalerServiceHttpBinding" type="ns:AutoscalerServicePortType">
         <http:binding verb="POST"/>
@@ -1992,6 +1985,12 @@
                 <mime:content type="text/xml" part="parameters"/>
             </wsdl:input>
         </wsdl:operation>
+        <wsdl:operation name="updateApplication">
+            <http:operation location="updateApplication"/>
+            <wsdl:input>
+                <mime:content type="text/xml" part="parameters"/>
+            </wsdl:input>
+        </wsdl:operation>
         <wsdl:operation name="getApplicationPolicy">
             <http:operation location="getApplicationPolicy"/>
             <wsdl:input>
@@ -2001,12 +2000,6 @@
                 <mime:content type="text/xml" part="parameters"/>
             </wsdl:output>
         </wsdl:operation>
-        <wsdl:operation name="updateApplication">
-            <http:operation location="updateApplication"/>
-            <wsdl:input>
-                <mime:content type="text/xml" part="parameters"/>
-            </wsdl:input>
-        </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="AutoscalerService">
         <wsdl:port name="AutoscalerServiceHttpSoap11Endpoint" binding="ns:AutoscalerServiceSoap11Binding">


[03/12] stratos git commit: Formatting CLI code

Posted by la...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java
index 03584b3..987c5f6 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
@@ -50,7 +50,7 @@ public class WebClientWrapper {
                     return null;
                 }
             };
-            ctx.init(null, new TrustManager[] { tm }, null);
+            ctx.init(null, new TrustManager[]{tm}, null);
             SSLSocketFactory ssf = new SSLSocketFactory(ctx);
             ssf.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
             ClientConnectionManager ccm = base.getConnectionManager();

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ActivateTenantCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ActivateTenantCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ActivateTenantCommand.java
index 30b07c4..bf8cb9c 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ActivateTenantCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ActivateTenantCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -58,17 +58,17 @@ public class ActivateTenantCommand implements Command<StratosCommandContext> {
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
             log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String tenantDomain = args[0];
-			if (log.isDebugEnabled()) {
+        }
+        if (args != null && args.length == 1) {
+            String tenantDomain = args[0];
+            if (log.isDebugEnabled()) {
                 log.debug("Getting activate tenant info {}", tenantDomain);
-			}
-			RestCommandLineService.getInstance().activateTenant(tenantDomain);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            }
+            RestCommandLineService.getInstance().activateTenant(tenantDomain);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationPolicyCommand.java
index 0b580a3..bb761a3 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -39,7 +39,7 @@ public class AddApplicationPolicyCommand implements Command<StratosCommandContex
 
     private final Options options;
 
-    public AddApplicationPolicyCommand(){
+    public AddApplicationPolicyCommand() {
         options = constructOptions();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationSignupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationSignupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationSignupCommand.java
index 5cdf0e7..02512c7 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationSignupCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddApplicationSignupCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -52,7 +52,7 @@ public class AddApplicationSignupCommand implements Command<StratosCommandContex
 
     @Override
     public String getName() {
-    	return "add-application-signup";
+        return "add-application-signup";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddAutoscalingPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddAutoscalingPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddAutoscalingPolicyCommand.java
index 2927fb0..08a6fa7 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddAutoscalingPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddAutoscalingPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -41,7 +41,7 @@ public class AddAutoscalingPolicyCommand implements Command<StratosCommandContex
 
     private final Options options;
 
-    public AddAutoscalingPolicyCommand(){
+    public AddAutoscalingPolicyCommand() {
         options = constructOptions();
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeCommand.java
index dd0dfd9..c786e4e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -41,7 +41,7 @@ public class AddCartridgeCommand implements Command<StratosCommandContext> {
 
     private final Options options;
 
-    public AddCartridgeCommand(){
+    public AddCartridgeCommand() {
         options = constructOptions();
     }
 
@@ -82,8 +82,8 @@ public class AddCartridgeCommand implements Command<StratosCommandContext> {
 
             try {
                 commandLine = parser.parse(options, args);
-              //merge newly discovered options with previously discovered ones.
-              Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
+                //merge newly discovered options with previously discovered ones.
+                Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
 
                 if (log.isDebugEnabled()) {
                     log.debug("Cartridge deployment");

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeGroupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeGroupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeGroupCommand.java
index c7d5049..1ec34d1 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeGroupCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddCartridgeGroupCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDeploymentPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDeploymentPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDeploymentPolicyCommand.java
index 9b11adc..518e0c1 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDeploymentPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDeploymentPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -41,7 +41,7 @@ public class AddDeploymentPolicyCommand implements Command<StratosCommandContext
 
     private final Options options;
 
-    public AddDeploymentPolicyCommand(){
+    public AddDeploymentPolicyCommand() {
         options = constructOptions();
     }
 
@@ -82,8 +82,8 @@ public class AddDeploymentPolicyCommand implements Command<StratosCommandContext
 
             try {
                 commandLine = parser.parse(options, args);
-              //merge newly discovered options with previously discovered ones.
-              Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
+                //merge newly discovered options with previously discovered ones.
+                Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
 
                 if (log.isDebugEnabled()) {
                     log.debug("Deployment policy deployment");

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDomainMappingsCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDomainMappingsCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDomainMappingsCommand.java
index 31487cc..4c180ee 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDomainMappingsCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddDomainMappingsCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -94,11 +94,11 @@ public class AddDomainMappingsCommand implements Command<StratosCommandContext>
                 }
 
                 String applicationId = args[0];
-                if(applicationId!=null) {
+                if (applicationId != null) {
                     String resourceFileContent = CliUtils.readResource(resourcePath);
                     RestCommandLineService.getInstance().addDomainMappings(applicationId, resourceFileContent);
                     return CliConstants.COMMAND_SUCCESSFULL;
-                } else{
+                } else {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java
index 37aad3d..a8cbb78 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesClusterCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesHostCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesHostCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesHostCommand.java
index 212f5dc..d572976 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesHostCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddKubernetesHostCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -66,7 +66,7 @@ public class AddKubernetesHostCommand implements Command<StratosCommandContext>
 
     @Override
     public String getArgumentSyntax() {
-    	return null;
+        return null;
     }
 
     @Override
@@ -79,42 +79,42 @@ public class AddKubernetesHostCommand implements Command<StratosCommandContext>
         if (log.isDebugEnabled()) {
             log.debug("Executing command: ", getName());
         }
-        
+
         if ((args == null) || (args.length <= 0)) {
             context.getStratosApplication().printUsage(getName());
             return CliConstants.COMMAND_FAILED;
         }
-       			
+
         try {
             CommandLineParser parser = new GnuParser();
             CommandLine commandLine = parser.parse(options, args);
             //merge newly discovered options with previously discovered ones.
             Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
-            
-            if((opts.hasOption(CliConstants.RESOURCE_PATH)) && (opts.hasOption(CliConstants.CLUSTER_ID_OPTION))) {
-	               
+
+            if ((opts.hasOption(CliConstants.RESOURCE_PATH)) && (opts.hasOption(CliConstants.CLUSTER_ID_OPTION))) {
+
                 // get cluster id arg value
-            	String clusterId = opts.getOption(CliConstants.CLUSTER_ID_OPTION).getValue();
+                String clusterId = opts.getOption(CliConstants.CLUSTER_ID_OPTION).getValue();
                 if (clusterId == null) {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
-                
+
                 // get resource path arg value
-            	String resourcePath = opts.getOption(CliConstants.RESOURCE_PATH).getValue();
+                String resourcePath = opts.getOption(CliConstants.RESOURCE_PATH).getValue();
                 if (resourcePath == null) {
                     context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
                 String resourceFileContent = CliUtils.readResource(resourcePath);
-                
+
                 RestCommandLineService.getInstance().addKubernetesHost(resourceFileContent, clusterId);
                 return CliConstants.COMMAND_SUCCESSFULL;
             } else {
                 context.getStratosApplication().printUsage(getName());
                 return CliConstants.COMMAND_FAILED;
             }
-           
+
         } catch (ParseException e) {
             log.error("Error parsing arguments", e);
             System.out.println(e.getMessage());

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddNetworkPartitionCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddNetworkPartitionCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddNetworkPartitionCommand.java
index 538bfcc..5c17edb 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddNetworkPartitionCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddNetworkPartitionCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -42,7 +42,7 @@ public class AddNetworkPartitionCommand implements Command<StratosCommandContext
 
     private final Options options;
 
-    public AddNetworkPartitionCommand(){
+    public AddNetworkPartitionCommand() {
         options = constructOptions();
     }
 
@@ -56,6 +56,7 @@ public class AddNetworkPartitionCommand implements Command<StratosCommandContext
 
         return options;
     }
+
     /**
      * @return The name of the command
      */

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java
index 48a126f..b6283c2 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -28,6 +28,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.Option;
+
 import static org.apache.stratos.cli.utils.CliUtils.mergeOptionArrays;
 
 /**
@@ -39,7 +40,7 @@ public class AddTenantCommand implements Command<StratosCommandContext> {
 
     private final Options options;
 
-    public AddTenantCommand(){
+    public AddTenantCommand() {
         options = constructOptions();
     }
 
@@ -109,8 +110,8 @@ public class AddTenantCommand implements Command<StratosCommandContext> {
 
             try {
                 commandLine = parser.parse(options, args);
-              //merge newly discovered options with previously discovered ones.
-              Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
+                //merge newly discovered options with previously discovered ones.
+                Options opts = mergeOptionArrays(alreadyParsedOpts, commandLine.getOptions());
 
                 if (log.isDebugEnabled()) {
                     log.debug("Add tenant");

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddUserCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddUserCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddUserCommand.java
index e8a79d3..98d24ad 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddUserCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddUserCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -38,7 +38,7 @@ public class AddUserCommand implements Command<StratosCommandContext> {
 
     private final Options options;
 
-    public AddUserCommand(){
+    public AddUserCommand() {
         options = constructOptions();
     }
 
@@ -100,13 +100,13 @@ public class AddUserCommand implements Command<StratosCommandContext> {
         }
 
         if (args != null && args.length > 0) {
-            String userName= null;
-            String credential= null;
-            String role= null;
-            String firstName= null;
-            String lastName= null;
-            String email= null;
-            String profileName= null;
+            String userName = null;
+            String credential = null;
+            String role = null;
+            String firstName = null;
+            String lastName = null;
+            String email = null;
+            String profileName = null;
 
             final CommandLineParser parser = new GnuParser();
             CommandLine commandLine;
@@ -142,7 +142,8 @@ public class AddUserCommand implements Command<StratosCommandContext> {
                     if (log.isTraceEnabled()) {
                         log.trace("First name option is passed");
                     }
-                    firstName = opts.getOption(CliConstants.FIRST_NAME_OPTION).getValue();;
+                    firstName = opts.getOption(CliConstants.FIRST_NAME_OPTION).getValue();
+                    ;
                 }
                 if (opts.hasOption(CliConstants.LAST_NAME_OPTION)) {
                     if (log.isTraceEnabled()) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/CreateApplicationCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/CreateApplicationCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/CreateApplicationCommand.java
index fde51c5..d1057bf 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/CreateApplicationCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/CreateApplicationCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -41,7 +41,7 @@ public class CreateApplicationCommand implements Command<StratosCommandContext>
 
     private final Options options;
 
-    public CreateApplicationCommand(){
+    public CreateApplicationCommand() {
         options = constructOptions();
     }
 
@@ -57,7 +57,7 @@ public class CreateApplicationCommand implements Command<StratosCommandContext>
     }
 
     public String getName() {
-    	return "add-application";
+        return "add-application";
     }
 
     public String getDescription() {
@@ -98,7 +98,7 @@ public class CreateApplicationCommand implements Command<StratosCommandContext>
                 }
 
                 if (resourcePath == null) {
-                   context.getStratosApplication().printUsage(getName());
+                    context.getStratosApplication().printUsage(getName());
                     return CliConstants.COMMAND_FAILED;
                 }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeactivateTenantCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeactivateTenantCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeactivateTenantCommand.java
index f1a06b1..346a0a5 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeactivateTenantCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeactivateTenantCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -57,18 +57,18 @@ public class DeactivateTenantCommand implements Command<StratosCommandContext> {
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String id = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting deactivate tenant info {}", id);
-			}
-			RestCommandLineService.getInstance().deactivateTenant(id);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String id = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting deactivate tenant info {}", id);
+            }
+            RestCommandLineService.getInstance().deactivateTenant(id);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationCommand.java
index fd283a1..7558634 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -57,18 +57,18 @@ public class DeleteApplicationCommand implements Command<StratosCommandContext>
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String id = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting delete application id {}", id);
-			}
-			RestCommandLineService.getInstance().deleteApplication(id);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String id = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting delete application id {}", id);
+            }
+            RestCommandLineService.getInstance().deleteApplication(id);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationSignupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationSignupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationSignupCommand.java
index 89fb834..113b157 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationSignupCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteApplicationSignupCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -57,19 +57,19 @@ public class DeleteApplicationSignupCommand implements Command<StratosCommandCon
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String applicationId = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting delete application id {}", applicationId);
-			}
-			RestCommandLineService.getInstance().deleteApplicationSignup(applicationId);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String applicationId = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting delete application id {}", applicationId);
+            }
+            RestCommandLineService.getInstance().deleteApplicationSignup(applicationId);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteAutoScalingPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteAutoScalingPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteAutoScalingPolicyCommand.java
index a74354d..e79d861 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteAutoScalingPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteAutoScalingPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -57,18 +57,18 @@ public class DeleteAutoScalingPolicyCommand implements Command<StratosCommandCon
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String autoScalingPolicyId = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting delete application id {}", autoScalingPolicyId);
-			}
-			RestCommandLineService.getInstance().deleteAutoSclaingPolicy(autoScalingPolicyId);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String autoScalingPolicyId = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting delete application id {}", autoScalingPolicyId);
+            }
+            RestCommandLineService.getInstance().deleteAutoSclaingPolicy(autoScalingPolicyId);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteUserCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteUserCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteUserCommand.java
index 7c80f87..45699af 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteUserCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeleteUserCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -57,18 +57,18 @@ public class DeleteUserCommand implements Command<StratosCommandContext> {
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String userName = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting delete user info {}", userName);
-			}
-			RestCommandLineService.getInstance().deleteUser(userName);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String userName = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting delete user info {}", userName);
+            }
+            RestCommandLineService.getInstance().deleteUser(userName);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeployApplicationCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeployApplicationCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeployApplicationCommand.java
index c83dc8c..bcdd7f0 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeployApplicationCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DeployApplicationCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -39,7 +39,7 @@ public class DeployApplicationCommand implements Command<StratosCommandContext>
 
     private Options options;
 
-    public DeployApplicationCommand(){
+    public DeployApplicationCommand() {
         options = constructOptions();
     }
 
@@ -86,8 +86,8 @@ public class DeployApplicationCommand implements Command<StratosCommandContext>
         }
 
         if (args != null && args.length > 0) {
-            String applicationId= null;
-            String applicationPolicyId= null;
+            String applicationId = null;
+            String applicationPolicyId = null;
 
             final CommandLineParser parser = new GnuParser();
             CommandLine commandLine;
@@ -120,7 +120,7 @@ public class DeployApplicationCommand implements Command<StratosCommandContext>
                     return CliConstants.COMMAND_FAILED;
                 }
 
-                RestCommandLineService.getInstance().deployApplication(applicationId,applicationPolicyId);
+                RestCommandLineService.getInstance().deployApplication(applicationId, applicationPolicyId);
                 return CliConstants.COMMAND_SUCCESSFULL;
 
             } catch (ParseException e) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationCommand.java
index 4b7649c..8681013 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -34,38 +34,38 @@ import org.slf4j.LoggerFactory;
  */
 public class DescribeApplicationCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(DescribeApplicationCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(DescribeApplicationCommand.class);
 
-	public DescribeApplicationCommand() {
-	}
+    public DescribeApplicationCommand() {
+    }
 
-	public String getName() {
-		return "describe-application";
-	}
+    public String getName() {
+        return "describe-application";
+    }
 
-	public String getDescription() {
-		return "Describe application";
-	}
+    public String getDescription() {
+        return "Describe application";
+    }
 
-	public String getArgumentSyntax() {
-		return "[application-id]";
-	}
+    public String getArgumentSyntax() {
+        return "[application-id]";
+    }
 
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing command: ", getName());
-		}
-		if ((args == null) || (args.length == 0)) {
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing command: ", getName());
+        }
+        if ((args == null) || (args.length == 0)) {
             context.getStratosApplication().printUsage(getName());
             return CliConstants.COMMAND_FAILED;
-		} else {
+        } else {
             String applicationId = args[0];
             RestCommandLineService.getInstance().describeApplication(applicationId);
             return CliConstants.COMMAND_SUCCESSFULL;
-		}
-	}
+        }
+    }
 
-	public Options getOptions() {
-		return null;
-	}
+    public Options getOptions() {
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationPolicyCommand.java
index 4e65cdd..ab5f2cc 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationRuntimeCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationRuntimeCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationRuntimeCommand.java
index c11086b..dc64bdd 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationRuntimeCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationRuntimeCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationSignupCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationSignupCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationSignupCommand.java
index 84a4e1f..8b9d86b 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationSignupCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeApplicationSignupCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package org.apache.stratos.cli.commands;
@@ -34,38 +34,38 @@ import org.slf4j.LoggerFactory;
  */
 public class DescribeApplicationSignupCommand implements Command<StratosCommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(DescribeApplicationSignupCommand.class);
+    private static final Logger log = LoggerFactory.getLogger(DescribeApplicationSignupCommand.class);
 
-	public DescribeApplicationSignupCommand() {
-	}
+    public DescribeApplicationSignupCommand() {
+    }
 
-	public String getName() {
-		return "describe-application-signup";
-	}
+    public String getName() {
+        return "describe-application-signup";
+    }
 
-	public String getDescription() {
-		return "Describe application sign up";
-	}
+    public String getDescription() {
+        return "Describe application sign up";
+    }
 
-	public String getArgumentSyntax() {
-		return "[application-id]";
-	}
+    public String getArgumentSyntax() {
+        return "[application-id]";
+    }
 
-	public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Executing command: ", getName());
-		}
-		if ((args == null) || (args.length == 0)) {
+    public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Executing command: ", getName());
+        }
+        if ((args == null) || (args.length == 0)) {
             context.getStratosApplication().printUsage(getName());
             return CliConstants.COMMAND_FAILED;
-		} else {
+        } else {
             String applicationId = args[0];
             RestCommandLineService.getInstance().describeApplicationSignup(applicationId);
             return CliConstants.COMMAND_SUCCESSFULL;
-		}
-	}
+        }
+    }
 
-	public Options getOptions() {
-		return null;
-	}
+    public Options getOptions() {
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java
index 0f0c126..a37fbb1 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli.commands;
 
@@ -56,18 +56,18 @@ public class DescribeAutoScalingPolicyCommand implements Command<StratosCommandC
     @Override
     public int execute(StratosCommandContext context, String[] args, Option[] alreadyParsedOpts) throws CommandException {
         if (log.isDebugEnabled()) {
-			log.debug("Executing {} command...", getName());
-		}
-		if (args != null && args.length == 1) {
-			String id = args[0];
-			if (log.isDebugEnabled()) {
-				log.debug("Getting Autoscale policy info {}", id);
-			}
-			RestCommandLineService.getInstance().describeAutoScalingPolicy(id);
-			return CliConstants.COMMAND_SUCCESSFULL;
-		} else {
-			context.getStratosApplication().printUsage(getName());
-			return CliConstants.COMMAND_FAILED;
-		}
+            log.debug("Executing {} command...", getName());
+        }
+        if (args != null && args.length == 1) {
+            String id = args[0];
+            if (log.isDebugEnabled()) {
+                log.debug("Getting Autoscale policy info {}", id);
+            }
+            RestCommandLineService.getInstance().describeAutoScalingPolicy(id);
+            return CliConstants.COMMAND_SUCCESSFULL;
+        } else {
+            context.getStratosApplication().printUsage(getName());
+            return CliConstants.COMMAND_FAILED;
+        }
     }
 }


[10/12] stratos git commit: Keep only InvalidApplicationPolicyException to validation failure of app policy

Posted by la...@apache.org.
Keep only InvalidApplicationPolicyException to validation failure of app policy


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

Branch: refs/heads/master
Commit: dc0d23d3048fcecb80efa5e81de283b442fe86be
Parents: 661e8ad
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Thu Apr 30 10:41:50 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Thu Apr 30 10:41:50 2015 +0530

----------------------------------------------------------------------
 .../autoscaler/internal/AutoscalerServiceComponent.java      | 3 ++-
 .../apache/stratos/autoscaler/pojo/policy/PolicyManager.java | 8 +++++---
 .../autoscaler/services/impl/AutoscalerServiceImpl.java      | 2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/dc0d23d3/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServiceComponent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServiceComponent.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServiceComponent.java
index 0695aa4..10fd07d 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServiceComponent.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerServiceComponent.java
@@ -28,6 +28,7 @@ import org.apache.stratos.autoscaler.context.AutoscalerContext;
 import org.apache.stratos.autoscaler.event.receiver.health.AutoscalerHealthStatEventReceiver;
 import org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver;
 import org.apache.stratos.autoscaler.exception.AutoScalerException;
+import org.apache.stratos.autoscaler.exception.application.InvalidApplicationPolicyException;
 import org.apache.stratos.autoscaler.exception.policy.InvalidDeploymentPolicyException;
 import org.apache.stratos.autoscaler.exception.policy.InvalidPolicyException;
 import org.apache.stratos.autoscaler.pojo.policy.PolicyManager;
@@ -152,7 +153,7 @@ public class AutoscalerServiceComponent {
     }
 
     private void executeCoordinatorTasks() throws InvalidPolicyException,
-            InvalidDeploymentPolicyException {
+            InvalidDeploymentPolicyException, InvalidApplicationPolicyException {
 
         // Start topology receiver
         asTopologyReceiver = new AutoscalerTopologyEventReceiver();

http://git-wip-us.apache.org/repos/asf/stratos/blob/dc0d23d3/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
index 20c1a76..12e66ff 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
@@ -24,6 +24,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.autoscaler.exception.AutoScalerException;
 import org.apache.stratos.autoscaler.exception.AutoScalingPolicyAlreadyExistException;
+import org.apache.stratos.autoscaler.exception.application.InvalidApplicationPolicyException;
 import org.apache.stratos.autoscaler.exception.policy.InvalidDeploymentPolicyException;
 import org.apache.stratos.autoscaler.exception.policy.InvalidPolicyException;
 import org.apache.stratos.autoscaler.exception.policy.PolicyDoesNotExistException;
@@ -347,7 +348,7 @@ public class PolicyManager {
     }
 
 
-    public void addApplicationPolicy(ApplicationPolicy applicationPolicy) throws InvalidPolicyException {
+    public void addApplicationPolicy(ApplicationPolicy applicationPolicy) throws InvalidApplicationPolicyException {
         String applicationPolicyId = applicationPolicy.getId();
         if (log.isInfoEnabled()) {
             log.info(String.format("Adding application policy : [application-policy-id] %s", applicationPolicyId));
@@ -375,7 +376,8 @@ public class PolicyManager {
         return true;
     }
 
-    public void addApplicationPolicyToInformationModel(ApplicationPolicy applicationPolicy) throws InvalidPolicyException {
+    public void addApplicationPolicyToInformationModel(ApplicationPolicy applicationPolicy)
+            throws InvalidApplicationPolicyException {
         String applicationPolicyId = applicationPolicy.getId();
         if (!applicationPolicyListMap.containsKey(applicationPolicyId)) {
             if (log.isDebugEnabled()) {
@@ -385,7 +387,7 @@ public class PolicyManager {
         } else {
             String errMsg = "Application policy already exists : " + applicationPolicyId;
             log.error(errMsg);
-            throw new InvalidPolicyException(errMsg);
+            throw new InvalidApplicationPolicyException(errMsg);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/dc0d23d3/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
index 2844a88..527057b 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/services/impl/AutoscalerServiceImpl.java
@@ -726,7 +726,7 @@ public class AutoscalerServiceImpl implements AutoscalerService {
 
     @Override
     public void addApplicationPolicy(ApplicationPolicy applicationPolicy)
-            throws RemoteException, InvalidApplicationPolicyException, InvalidPolicyException {
+            throws RemoteException, InvalidApplicationPolicyException {
 
         // validating application policy
         AutoscalerUtil.validateApplicationPolicy(applicationPolicy);


[07/12] stratos git commit: Fix formatting issues in CC component

Posted by la...@apache.org.
Fix formatting issues in CC component


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/36b1f8f6
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/36b1f8f6
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/36b1f8f6

Branch: refs/heads/master
Commit: 36b1f8f6eb6200bff09b19d0cbd71afc29295b4a
Parents: 5ab5867
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Apr 29 23:28:59 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Apr 29 23:28:59 2015 +0530

----------------------------------------------------------------------
 .../apache/stratos/cloud/controller/domain/NetworkPartition.java   | 1 +
 .../cloud/controller/services/impl/CloudControllerServiceImpl.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/36b1f8f6/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
index 1c589fd..bec12b7 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
@@ -21,6 +21,7 @@ package org.apache.stratos.cloud.controller.domain;
 
 import java.io.Serializable;
 import java.util.Arrays;
+
 import org.apache.stratos.common.Properties;
 
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/36b1f8f6/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
index eee1f1c..9c21268 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/services/impl/CloudControllerServiceImpl.java
@@ -1188,7 +1188,7 @@ public class CloudControllerServiceImpl implements CloudControllerService {
         }
 
         try {
-            if(CloudControllerContext.getInstance().getKubernetesCluster(kubernetesCluster.getClusterId()) != null){
+            if (CloudControllerContext.getInstance().getKubernetesCluster(kubernetesCluster.getClusterId()) != null) {
                 throw new KubernetesClusterAlreadyExistsException("Kubernetes cluster already exists");
             }
         } catch (NonExistingKubernetesClusterException ignore) {


[04/12] stratos git commit: Formatting CLI code

Posted by la...@apache.org.
Formatting CLI code


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8b895d93
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8b895d93
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8b895d93

Branch: refs/heads/master
Commit: 8b895d93ed4d710f642fd1318e39f60a047c2bc1
Parents: e97d336
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Apr 29 23:23:52 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Apr 29 23:23:52 2015 +0530

----------------------------------------------------------------------
 .../src/main/assembly/src.xml                   |  32 +-
 .../java/org/apache/stratos/cli/CliTool.java    |  92 +++---
 .../java/org/apache/stratos/cli/Command.java    | 108 +++---
 .../org/apache/stratos/cli/CommandContext.java  | 140 ++++----
 .../stratos/cli/CommandLineApplication.java     | 330 ++++++++++---------
 .../apache/stratos/cli/CommandLineService.java  | 312 +++++++++---------
 .../apache/stratos/cli/GenericRestClient.java   |  32 +-
 .../main/java/org/apache/stratos/cli/Main.java  |   1 -
 .../java/org/apache/stratos/cli/RestClient.java |   2 +-
 .../stratos/cli/RestCommandLineService.java     | 128 +++----
 .../apache/stratos/cli/StratosApplication.java  |  68 ++--
 .../stratos/cli/StratosCommandContext.java      |  44 +--
 .../apache/stratos/cli/WebClientWrapper.java    |  34 +-
 .../cli/commands/ActivateTenantCommand.java     |  54 +--
 .../commands/AddApplicationPolicyCommand.java   |  34 +-
 .../commands/AddApplicationSignupCommand.java   |  34 +-
 .../commands/AddAutoscalingPolicyCommand.java   |  34 +-
 .../cli/commands/AddCartridgeCommand.java       |  38 +--
 .../cli/commands/AddCartridgeGroupCommand.java  |  32 +-
 .../commands/AddDeploymentPolicyCommand.java    |  38 +--
 .../cli/commands/AddDomainMappingsCommand.java  |  36 +-
 .../commands/AddKubernetesClusterCommand.java   |  32 +-
 .../cli/commands/AddKubernetesHostCommand.java  |  54 +--
 .../commands/AddNetworkPartitionCommand.java    |  35 +-
 .../stratos/cli/commands/AddTenantCommand.java  |  39 +--
 .../stratos/cli/commands/AddUserCommand.java    |  51 +--
 .../cli/commands/CreateApplicationCommand.java  |  38 +--
 .../cli/commands/DeactivateTenantCommand.java   |  58 ++--
 .../cli/commands/DeleteApplicationCommand.java  |  58 ++--
 .../DeleteApplicationSignupCommand.java         |  58 ++--
 .../DeleteAutoScalingPolicyCommand.java         |  58 ++--
 .../stratos/cli/commands/DeleteUserCommand.java |  58 ++--
 .../cli/commands/DeployApplicationCommand.java  |  40 +--
 .../commands/DescribeApplicationCommand.java    |  78 ++---
 .../DescribeApplicationPolicyCommand.java       |  32 +-
 .../DescribeApplicationRuntimeCommand.java      |  32 +-
 .../DescribeApplicationSignupCommand.java       |  78 ++---
 .../DescribeAutoScalingPolicyCommand.java       |  58 ++--
 .../cli/commands/DescribeCartridgeCommand.java  |  58 ++--
 .../commands/DescribeCartridgeGroupCommand.java |  78 ++---
 .../DescribeDeploymentPolicyCommand.java        |  58 ++--
 .../DescribeKubernetesClusterCommand.java       |  32 +-
 .../DescribeKubernetesMasterCommand.java        |  32 +-
 .../DescribeNetworkPartitionCommand.java        |  32 +-
 .../cli/commands/DescribeTenantCommand.java     |  33 +-
 .../stratos/cli/commands/ExitCommand.java       |  96 +++---
 .../stratos/cli/commands/HelpCommand.java       | 102 +++---
 .../stratos/cli/commands/InfoCommand.java       |  84 ++---
 .../ListApplicationPoliciesCommand.java         |  34 +-
 .../cli/commands/ListApplicationsCommand.java   |  32 +-
 .../commands/ListAutoscalePolicyCommand.java    |  32 +-
 .../commands/ListCartridgeGroupsCommand.java    |  84 ++---
 .../cli/commands/ListCartridgesCommand.java     |  84 ++---
 .../commands/ListDeploymentPoliciesCommand.java |  32 +-
 .../cli/commands/ListDomainMappingsCommand.java |  88 ++---
 .../commands/ListKubernetesClustersCommand.java |  84 ++---
 .../commands/ListKubernetesHostsCommand.java    |  56 ++--
 .../commands/ListNetworkPartitionCommand.java   |  32 +-
 .../ListPartialSearchTenantsCommand.java        |  38 +--
 .../stratos/cli/commands/ListTenants.java       |  34 +-
 .../apache/stratos/cli/commands/ListUsers.java  |  34 +-
 .../RemoveApplicationPolicyCommand.java         |  32 +-
 .../cli/commands/RemoveCartridgeCommand.java    |  58 ++--
 .../commands/RemoveCartridgeGroupCommand.java   |  32 +-
 .../commands/RemoveDeploymentPolicyCommand.java |  32 +-
 .../commands/RemoveDomainMappingsCommand.java   |  32 +-
 .../RemoveKubernetesClusterCommand.java         |  32 +-
 .../commands/RemoveKubernetesHostCommand.java   |  32 +-
 .../commands/RemoveNetworkPartitionCommand.java |  32 +-
 .../commands/SynchronizeArtifactsCommand.java   | 104 +++---
 .../commands/UndeployApplicationCommand.java    |  32 +-
 .../UpdateApplicationPolicyCommand.java         |  34 +-
 .../UpdateAutoscalingPolicyCommand.java         |  34 +-
 .../cli/commands/UpdateCartridgeCommand.java    |  34 +-
 .../commands/UpdateDeploymentPolicyCommand.java |  34 +-
 .../commands/UpdateKubernetesHostCommand.java   |  59 ++--
 .../commands/UpdateKubernetesMasterCommand.java |  51 +--
 .../commands/UpdateNetworkPartitionCommand.java |  34 +-
 .../cli/commands/UpdateTenantCommand.java       |  40 +--
 .../stratos/cli/commands/UpdateUserCommand.java |  48 +--
 .../stratos/cli/completer/CommandCompleter.java | 214 ++++++------
 .../cli/completer/StratosFileNameCompleter.java |  54 +--
 .../stratos/cli/exception/CommandException.java |  56 ++--
 .../stratos/cli/exception/ErrorWrapper.java     |  32 +-
 .../stratos/cli/exception/ExceptionMapper.java  |  32 +-
 .../apache/stratos/cli/utils/CliConstants.java  |  42 +--
 .../org/apache/stratos/cli/utils/CliUtils.java  | 176 +++++-----
 .../org/apache/stratos/cli/utils/RowMapper.java |  34 +-
 88 files changed, 2592 insertions(+), 2583 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/assembly/src.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/assembly/src.xml b/components/org.apache.stratos.cli/src/main/assembly/src.xml
index cfaa4da..3901d63 100644
--- a/components/org.apache.stratos.cli/src/main/assembly/src.xml
+++ b/components/org.apache.stratos.cli/src/main/assembly/src.xml
@@ -17,20 +17,20 @@
        under the License.
  -->
 <assembly
-	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
-	<id>bin</id>
-	<formats>
-		<format>jar</format>
-	</formats>
-	<includeBaseDirectory>false</includeBaseDirectory>
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>/</outputDirectory>
-			<useProjectArtifact>true</useProjectArtifact>
-			<unpack>true</unpack>
-			<scope>runtime</scope>
-		</dependencySet>
-	</dependencySets>
+        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+    <id>bin</id>
+    <formats>
+        <format>jar</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/</outputDirectory>
+            <useProjectArtifact>true</useProjectArtifact>
+            <unpack>true</unpack>
+            <scope>runtime</scope>
+        </dependencySet>
+    </dependencySets>
 </assembly>

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java
index 2175abf..52a99ea 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
@@ -30,37 +30,37 @@ import org.slf4j.LoggerFactory;
  */
 public class CliTool {
 
-	private static final Logger log = LoggerFactory.getLogger(CliTool.class);
+    private static final Logger log = LoggerFactory.getLogger(CliTool.class);
 
-	/**
-	 * Here is the place all the command line inputs get processed
-	 * 
-	 * @param arguments
-	 *            passed to CLI tool.
-	 */
-	void handleConsoleInputs(String[] arguments) {
-		if (log.isInfoEnabled()) {
-			log.info("Stratos CLI started...");
-		}
-		StratosApplication application = new StratosApplication(arguments);
-		application.start(arguments);
-	}
+    /**
+     * Here is the place all the command line inputs get processed
+     *
+     * @param arguments
+     *            passed to CLI tool.
+     */
+    void handleConsoleInputs(String[] arguments) {
+        if (log.isInfoEnabled()) {
+            log.info("Stratos CLI started...");
+        }
+        StratosApplication application = new StratosApplication(arguments);
+        application.start(arguments);
+    }
 
-	void createConfigDirectory() {
-		File stratosFile = new File(System.getProperty("user.home"), STRATOS_DIR);
-		if (stratosFile.exists()) {
-			if (log.isInfoEnabled()) {
-				log.info("Using directory: {}", stratosFile.getPath());
-			}
-		} else {
-			if (stratosFile.mkdir()) {
-				if (log.isInfoEnabled()) {
-					log.info("Created directory: {}", stratosFile.getPath());
-				}
-			} else if (log.isWarnEnabled()) {
-				log.warn("Failed to created directory: {}", stratosFile.getPath());
-			}
-		}
-	}
+    void createConfigDirectory() {
+        File stratosFile = new File(System.getProperty("user.home"), STRATOS_DIR);
+        if (stratosFile.exists()) {
+            if (log.isInfoEnabled()) {
+                log.info("Using directory: {}", stratosFile.getPath());
+            }
+        } else {
+            if (stratosFile.mkdir()) {
+                if (log.isInfoEnabled()) {
+                    log.info("Created directory: {}", stratosFile.getPath());
+                }
+            } else if (log.isWarnEnabled()) {
+                log.warn("Failed to created directory: {}", stratosFile.getPath());
+            }
+        }
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java
index f84f452..4877090 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
@@ -24,47 +24,47 @@ import org.apache.stratos.cli.exception.CommandException;
 
 public interface Command<T extends CommandContext> {
 
-	/**
-	 * @return The name of the command
-	 */
-	String getName();
+    /**
+     * @return The name of the command
+     */
+    String getName();
 
-	/**
-	 * Information about the command
-	 * 
-	 * @return The description of the command
-	 */
-	String getDescription();
+    /**
+     * Information about the command
+     *
+     * @return The description of the command
+     */
+    String getDescription();
 
-	/**
-	 * This should return the syntax required for the command.
-	 * 
-	 * Used to display help.
-	 * 
-	 * @return The syntax for this command
-	 */
-	String getArgumentSyntax();
+    /**
+     * This should return the syntax required for the command.
+     *
+     * Used to display help.
+     *
+     * @return The syntax for this command
+     */
+    String getArgumentSyntax();
 
-	/**
-	 * The options accepted by the command
-	 * 
-	 * @return The Options for the commands
-	 */
-	Options getOptions();
+    /**
+     * The options accepted by the command
+     *
+     * @return The Options for the commands
+     */
+    Options getOptions();
 
-	/**
-	 * Executing the commands. Returns a code
-	 * 
-	 * @param context
-	 *            The context assoicated with the Command Line Application
-	 * @param args
-	 *            The arguments for the command
-	 * @param alreadyParsedOpts
-	 *            Options parsed by any parent parsers.
-	 * @return The status code
-	 * @throws org.apache.stratos.cli.exception.CommandException
-	 *             if any errors occur when executing the command
-	 */
-	int execute(T context, String[] args, Option[] alreadyParsedOpts) throws CommandException;
+    /**
+     * Executing the commands. Returns a code
+     *
+     * @param context
+     *            The context assoicated with the Command Line Application
+     * @param args
+     *            The arguments for the command
+     * @param alreadyParsedOpts
+     *            Options parsed by any parent parsers.
+     * @return The status code
+     * @throws org.apache.stratos.cli.exception.CommandException
+     *             if any errors occur when executing the command
+     */
+    int execute(T context, String[] args, Option[] alreadyParsedOpts) throws CommandException;
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java
index cf677c4..01ad547 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
@@ -24,65 +24,65 @@ import java.util.Observable;
 
 public class CommandContext extends Observable {
 
-	/**
-	 * Properties for the context.
-	 */
-	private Map<String, Object> properties;
+    /**
+     * Properties for the context.
+     */
+    private Map<String, Object> properties;
 
-	/**
-	 * The application
-	 */
-	private final CommandLineApplication<? extends CommandContext> application;
+    /**
+     * The application
+     */
+    private final CommandLineApplication<? extends CommandContext> application;
 
-	public CommandContext(CommandLineApplication<? extends CommandContext> application) {
-		properties = new HashMap<String, Object>();
-		this.application = application;
-	}
+    public CommandContext(CommandLineApplication<? extends CommandContext> application) {
+        properties = new HashMap<String, Object>();
+        this.application = application;
+    }
 
-	public final CommandLineApplication<? extends CommandContext> getApplication() {
-		return application;
-	}
+    public final CommandLineApplication<? extends CommandContext> getApplication() {
+        return application;
+    }
 
-	/**
-	 * Set property in the context
-	 * 
-	 * @param key
-	 *            The key
-	 * @param o
-	 *            The value for the key
-	 * @return The previous value or null
-	 */
-	public Object put(String key, Object o) {
-		Object previous = properties.put(key, o);
-		setChanged();
-		notifyObservers();
-		return previous;
-	}
+    /**
+     * Set property in the context
+     *
+     * @param key
+     *            The key
+     * @param o
+     *            The value for the key
+     * @return The previous value or null
+     */
+    public Object put(String key, Object o) {
+        Object previous = properties.put(key, o);
+        setChanged();
+        notifyObservers();
+        return previous;
+    }
 
-	/**
-	 * Get property value from the context
-	 * 
-	 * @param key
-	 *            The key
-	 * @return The value
-	 */
-	public Object getObject(String key) {
-		return properties.get(key);
-	}
+    /**
+     * Get property value from the context
+     *
+     * @param key
+     *            The key
+     * @return The value
+     */
+    public Object getObject(String key) {
+        return properties.get(key);
+    }
 
-	/**
-	 * Get the string value, or null
-	 * 
-	 * @param key
-	 *            The key
-	 * @return The string value, or null.
-	 */
-	public String getString(String key) {
-		Object o = getObject(key);
-		if (o instanceof String) {
-			return (String) o;
-		}
-		return null;
-	}
+    /**
+     * Get the string value, or null
+     *
+     * @param key
+     *            The key
+     * @return The string value, or null.
+     */
+    public String getString(String key) {
+        Object o = getObject(key);
+        if (o instanceof String) {
+            return (String) o;
+        }
+        return null;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineApplication.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineApplication.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineApplication.java
index 44abad7..142f42f 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineApplication.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineApplication.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
@@ -30,13 +30,13 @@ import java.io.IOException;
 
 public abstract class CommandLineApplication<T extends CommandContext> {
 
-	private static final Logger log = LoggerFactory.getLogger(CommandLineApplication.class);
+    private static final Logger log = LoggerFactory.getLogger(CommandLineApplication.class);
 
-	protected ConsoleReader reader;
-	protected FileHistory history;
+    protected ConsoleReader reader;
+    protected FileHistory history;
     protected String username;
 
-	public CommandLineApplication(String[] args) {
+    public CommandLineApplication(String[] args) {
         if (args != null && args.length > 1) {
             username = args[1];
         }
@@ -44,22 +44,22 @@ public abstract class CommandLineApplication<T extends CommandContext> {
     }
 
     /**
-	 * Creates new jline ConsoleReader.
-	 * 
-	 * @return a jline ConsoleReader instance
-	 */
-	protected ConsoleReader createConsoleReader() {
-		ConsoleReader consoleReader = null;
-		try {
-			consoleReader = new ConsoleReader();
-			consoleReader.setPrompt(getPrompt());
-			history = new FileHistory(getHistoryFile(username));
-			consoleReader.setHistory(history);
-		} catch (IOException e) {
-			throw new IllegalStateException("Cannot create jline console reader", e);
-		}
-		return consoleReader;
-	}
+     * Creates new jline ConsoleReader.
+     *
+     * @return a jline ConsoleReader instance
+     */
+    protected ConsoleReader createConsoleReader() {
+        ConsoleReader consoleReader = null;
+        try {
+            consoleReader = new ConsoleReader();
+            consoleReader.setPrompt(getPrompt());
+            history = new FileHistory(getHistoryFile(username));
+            consoleReader.setHistory(history);
+        } catch (IOException e) {
+            throw new IllegalStateException("Cannot create jline console reader", e);
+        }
+        return consoleReader;
+    }
 
     protected ConsoleReader createConsoleReaderWhithoutArgs(String enteredUserName) {
         ConsoleReader consoleReader = null;
@@ -75,133 +75,135 @@ public abstract class CommandLineApplication<T extends CommandContext> {
         return consoleReader;
     }
 
-	public ConsoleReader getConsoleReader() {
-		return reader;
-	}
-
-	protected abstract String getPrompt();
-
-	/**
-	 * Get the history file for the Console Reader.
-	 * 
-	 * @return File for storing history
-	 */
-	protected abstract File getHistoryFile(String username);
-
-	public final void start(String[] args) {
-		Thread shutdownHookThread = new Thread("CLI Shutdown Hook") {
-			@Override
-			public void run() {
-				performDestroy();
-			}
-		};
-		Runtime.getRuntime().addShutdownHook(shutdownHookThread);
-		int returnCode = run(args);
-		if (log.isDebugEnabled()) {
-			log.debug("Exiting with error code {}", returnCode);
-		}
-		System.exit(returnCode);
-	}
-
-	protected abstract int run(String[] args);
-
-	protected void promptLoop() {
-		String line = null;
-		boolean exit = false;
-
-		try {
-			while (!exit && (reader != null && ((line = reader.readLine()) != null))) {
-				if ("".equals(line)) {
-					continue;
-				}
-				if (StringUtils.isNotBlank(line)) {
-					execute(line);
-					exit = CliConstants.EXIT_ACTION.equals(line.trim());
-				}
-			}
-		} catch (IOException e) {
-			throw new IllegalStateException("Error in reading line", e);
-		}
-	}
-
-	private int execute(String line) {
-		try {
-			if (log.isDebugEnabled()) {
-				log.debug("Executing command line: \"{}\"", line);
-			}
-			int returnCode = executeCommand(line);
-			if (log.isDebugEnabled()) {
-				log.debug("Command line executed \"{}\". Return code: {}", line, returnCode);
-			}
-			return returnCode;
-		} catch (RuntimeException e) {
-			if (log.isErrorEnabled()) {
-				log.error("Error executing command line: " + line, e);
-			}
-			return 1;
-		}
-	}
-
-	protected abstract int executeCommand(String line);
-
-	private void performDestroy() {
-		if (log.isDebugEnabled()) {
-			log.debug("Shutting down application... Invoking destroy methods");
-		}
-		if (history != null) {
-			try {
-				history.flush();
-			} catch (IOException e) {
-				if (log.isErrorEnabled()) {
-					log.error("Error flushing history.", e);
-				}
-			}
-		}
-		destroy();
-	}
-
-	/**
-	 * May override to perform action before destroying
-	 */
-	protected void destroy() {
-	};
-
-	public String getInput(String prompt) {
-		return getInput(prompt, null);
-	}
-
-	public String getInput(String prompt, Character mask) {
-		String line = null;
-		try {
-			reader.setPrompt(prompt + ": ");
-			while ((line = reader.readLine(mask)) != null) {
-				if ("".equals(line)) {
-					continue;
-				}
-				return line;
-			}
-		} catch (IOException e) {
-			throw new IllegalStateException("Error in reading line", e);
-		} finally {
-			reader.setPrompt(CliConstants.STRATOS_SHELL_PROMPT);
-		}
-		return line;
-	}
-	
-	/**
-	 * @return {@code true if user confirmed}
-	 */
-	public boolean getConfirmation(String prompt) {
-		prompt = prompt + " [yes/no]";
-
-		String input = "";
-		int tries = 0;
-		do {
-			tries++;
-			input = getInput(prompt);
-		} while (!"y".equals(input) && !"yes".equals(input) && !"n".equals(input) && !"no".equals(input) && tries < 3);
-
-		return "y".equals(input) || "yes".equals(input);
-	}
+    public ConsoleReader getConsoleReader() {
+        return reader;
+    }
+
+    protected abstract String getPrompt();
+
+    /**
+     * Get the history file for the Console Reader.
+     *
+     * @return File for storing history
+     */
+    protected abstract File getHistoryFile(String username);
+
+    public final void start(String[] args) {
+        Thread shutdownHookThread = new Thread("CLI Shutdown Hook") {
+            @Override
+            public void run() {
+                performDestroy();
+            }
+        };
+        Runtime.getRuntime().addShutdownHook(shutdownHookThread);
+        int returnCode = run(args);
+        if (log.isDebugEnabled()) {
+            log.debug("Exiting with error code {}", returnCode);
+        }
+        System.exit(returnCode);
+    }
+
+    protected abstract int run(String[] args);
+
+    protected void promptLoop() {
+        String line = null;
+        boolean exit = false;
+
+        try {
+            while (!exit && (reader != null && ((line = reader.readLine()) != null))) {
+                if ("".equals(line)) {
+                    continue;
+                }
+                if (StringUtils.isNotBlank(line)) {
+                    execute(line);
+                    exit = CliConstants.EXIT_ACTION.equals(line.trim());
+                }
+            }
+        } catch (IOException e) {
+            throw new IllegalStateException("Error in reading line", e);
+        }
+    }
+
+    private int execute(String line) {
+        try {
+            if (log.isDebugEnabled()) {
+                log.debug("Executing command line: \"{}\"", line);
+            }
+            int returnCode = executeCommand(line);
+            if (log.isDebugEnabled()) {
+                log.debug("Command line executed \"{}\". Return code: {}", line, returnCode);
+            }
+            return returnCode;
+        } catch (RuntimeException e) {
+            if (log.isErrorEnabled()) {
+                log.error("Error executing command line: " + line, e);
+            }
+            return 1;
+        }
+    }
+
+    protected abstract int executeCommand(String line);
+
+    private void performDestroy() {
+        if (log.isDebugEnabled()) {
+            log.debug("Shutting down application... Invoking destroy methods");
+        }
+        if (history != null) {
+            try {
+                history.flush();
+            } catch (IOException e) {
+                if (log.isErrorEnabled()) {
+                    log.error("Error flushing history.", e);
+                }
+            }
+        }
+        destroy();
+    }
+
+    /**
+     * May override to perform action before destroying
+     */
+    protected void destroy() {
+    }
+
+    ;
+
+    public String getInput(String prompt) {
+        return getInput(prompt, null);
+    }
+
+    public String getInput(String prompt, Character mask) {
+        String line = null;
+        try {
+            reader.setPrompt(prompt + ": ");
+            while ((line = reader.readLine(mask)) != null) {
+                if ("".equals(line)) {
+                    continue;
+                }
+                return line;
+            }
+        } catch (IOException e) {
+            throw new IllegalStateException("Error in reading line", e);
+        } finally {
+            reader.setPrompt(CliConstants.STRATOS_SHELL_PROMPT);
+        }
+        return line;
+    }
+
+    /**
+     * @return {@code true if user confirmed}
+     */
+    public boolean getConfirmation(String prompt) {
+        prompt = prompt + " [yes/no]";
+
+        String input = "";
+        int tries = 0;
+        do {
+            tries++;
+            input = getInput(prompt);
+        } while (!"y".equals(input) && !"yes".equals(input) && !"n".equals(input) && !"no".equals(input) && tries < 3);
+
+        return "y".equals(input) || "yes".equals(input);
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java
index fcdaf79..e6c86f2 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandLineService.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
@@ -40,27 +40,27 @@ import java.util.HashMap;
 
 public class CommandLineService {
 
-	private static final Logger log = LoggerFactory.getLogger(CommandLineService.class);
+    private static final Logger log = LoggerFactory.getLogger(CommandLineService.class);
+
+    private ApplicationManagementServiceStub stub;
 
-	private ApplicationManagementServiceStub stub;
+    private CommandLineService() {
+    }
 
-	private CommandLineService() {
-	}
+    private static class SingletonHolder {
+        private final static CommandLineService INSTANCE = new CommandLineService();
+    }
 
-	private static class SingletonHolder {
-		private final static CommandLineService INSTANCE = new CommandLineService();
-	}
+    public static CommandLineService getInstance() {
+        return SingletonHolder.INSTANCE;
+    }
 
-	public static CommandLineService getInstance() {
-		return SingletonHolder.INSTANCE;
-	}
-	
-	private void initializeApplicationManagementStub(String serverURL, String username, String password) throws AxisFault {
-		HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator();
+    private void initializeApplicationManagementStub(String serverURL, String username, String password) throws AxisFault {
+        HttpTransportProperties.Authenticator authenticator = new HttpTransportProperties.Authenticator();
         authenticator.setUsername(username);
         authenticator.setPassword(password);
         authenticator.setPreemptiveAuthentication(true);
-		
+
         ApplicationManagementServiceStub stub;
         ConfigurationContext configurationContext = null;
         try {
@@ -83,62 +83,62 @@ public class CommandLineService {
         this.stub = stub;
     }
 
-	public boolean login(String serverURL, String username, String password, boolean validateLogin) throws CommandException {
-		try {
-			// Following code will avoid validating certificate
-			SSLContext sc;
-			// Get SSL context
-			sc = SSLContext.getInstance("SSL");
-			// Create empty HostnameVerifier
-			HostnameVerifier hv = new HostnameVerifier() {
-				public boolean verify(String urlHostName, SSLSession session) {
-					return true;
-				}
-			};
-			// Create a trust manager that does not validate certificate
-			// chains
-			TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
-				public java.security.cert.X509Certificate[] getAcceptedIssuers() {
-					return null;
-				}
+    public boolean login(String serverURL, String username, String password, boolean validateLogin) throws CommandException {
+        try {
+            // Following code will avoid validating certificate
+            SSLContext sc;
+            // Get SSL context
+            sc = SSLContext.getInstance("SSL");
+            // Create empty HostnameVerifier
+            HostnameVerifier hv = new HostnameVerifier() {
+                public boolean verify(String urlHostName, SSLSession session) {
+                    return true;
+                }
+            };
+            // Create a trust manager that does not validate certificate
+            // chains
+            TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() {
+                public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+                    return null;
+                }
+
+                public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {
+                }
 
-				public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {
-				}
+                public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) {
+                }
+            }};
+            sc.init(null, trustAllCerts, new java.security.SecureRandom());
+            SSLContext.setDefault(sc);
+            HttpsURLConnection.setDefaultHostnameVerifier(hv);
+        } catch (Exception e) {
+            throw new RuntimeException("Error while authentication process!", e);
+        }
 
-				public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) {
-				}
-			} };
-			sc.init(null, trustAllCerts, new java.security.SecureRandom());
-			SSLContext.setDefault(sc);
-			HttpsURLConnection.setDefaultHostnameVerifier(hv);
-		} catch (Exception e) {
-			throw new RuntimeException("Error while authentication process!", e);
-		}
+        // Initialize Service Stub
+        try {
+            initializeApplicationManagementStub(serverURL, username, password);
+        } catch (AxisFault e) {
+            System.out.println("Error connecting to the back-end");
+            throw new CommandException(e);
+        }
 
-		// Initialize Service Stub
-		try {
-			initializeApplicationManagementStub(serverURL, username, password);
-		} catch (AxisFault e) {
-			System.out.println("Error connecting to the back-end");
-			throw new CommandException(e);
-		}
-		
-		try {
-			if (validateLogin) {
-				String tenantDomain = stub.getTenantDomain();
-				if (log.isDebugEnabled()) {
-					log.debug("Tenant Domain {}", tenantDomain);
-				}
-				return (tenantDomain != null);
-			} else {
-				// Just return true as we don't need to validate
-				return true;
-			}
-		} catch (RemoteException e) {
-			System.out.println("Authentication failed!");
-			throw new CommandException(e);
-		}
-	}
+        try {
+            if (validateLogin) {
+                String tenantDomain = stub.getTenantDomain();
+                if (log.isDebugEnabled()) {
+                    log.debug("Tenant Domain {}", tenantDomain);
+                }
+                return (tenantDomain != null);
+            } else {
+                // Just return true as we don't need to validate
+                return true;
+            }
+        } catch (RemoteException e) {
+            System.out.println("Authentication failed!");
+            throw new CommandException(e);
+        }
+    }
 
 //	public void listSubscribedCartridges(final boolean full) throws CommandException {
 //		try {
@@ -240,7 +240,7 @@ public class CommandLineService {
 //			handleException(e);
 //		}
 //	}
-	
+
 //	public void listAvailablePolicies() throws CommandException {
 //		try {
 //			PolicyDefinition[] policies = stub.getPolicyDefinitions();
@@ -320,64 +320,64 @@ public class CommandLineService {
 //        }
 //	}
 
-	public void unsubscribe(String alias) throws CommandException {
-		try {
-			stub.unsubscribe(alias);
-			System.out.println("You have successfully unsubscribed " + alias);
+    public void unsubscribe(String alias) throws CommandException {
+        try {
+            stub.unsubscribe(alias);
+            System.out.println("You have successfully unsubscribed " + alias);
         } catch (ApplicationManagementServiceADCExceptionException e) {
-        	handleException("cannot.unsubscribe", e);
+            handleException("cannot.unsubscribe", e);
         } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
-			handleException("notsubscribed.error", e, alias);
+            handleException("notsubscribed.error", e, alias);
+        } catch (RemoteException e) {
+            handleException(e);
+        }
+    }
+
+    public void sync(String alias) throws CommandException {
+        try {
+            System.out.format("Synchronizing repository for alias: %s%n", alias);
+            stub.synchronizeRepository(alias);
+        } catch (ApplicationManagementServiceADCExceptionException e) {
+            handleException("cannot.syncrepo", e);
         } catch (RemoteException e) {
-        	handleException(e);
+            handleException(e);
+        } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
+            handleException("notsubscribed.error", e, alias);
         }
-	}
+    }
 
-	public void sync(String alias) throws CommandException {
-		try {
-			System.out.format("Synchronizing repository for alias: %s%n", alias);
-			stub.synchronizeRepository(alias);
-		} catch (ApplicationManagementServiceADCExceptionException e) {
-			handleException("cannot.syncrepo", e);
-		} catch (RemoteException e) {
-			handleException(e);
-		} catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
-			handleException("notsubscribed.error", e, alias);
-		}
-	}
+    public String addDomainMapping(String domain, String alias) throws CommandException {
+        try {
+            return stub.addDomainMapping(domain, alias);
+        } catch (ApplicationManagementServiceADCExceptionException e) {
+            handleException("cannot.mapdomain", e);
+        } catch (RemoteException e) {
+            handleException(e);
+        } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
+            handleException("notsubscribed.error", e, alias);
+        } catch (ApplicationManagementServiceDomainMappingExistsExceptionException e) {
+            handleException("domainmapping.exists.error", e, domain, alias);
+        }
+        return null;
+    }
 
-	public String addDomainMapping(String domain, String alias) throws CommandException {
-		try {
-			return stub.addDomainMapping(domain, alias);
-		} catch (ApplicationManagementServiceADCExceptionException e) {
-			handleException("cannot.mapdomain", e);
-		} catch (RemoteException e) {
-			handleException(e);
-		} catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
-			handleException("notsubscribed.error", e, alias);
-		} catch (ApplicationManagementServiceDomainMappingExistsExceptionException e) {
-			handleException("domainmapping.exists.error", e, domain, alias);
-		}
-		return null;
-	}
+    public void removeDomainMapping(String alias) throws CommandException {
+        try {
+            stub.removeDomainMapping(alias);
+            System.out.format("Domain mapping removed for alias: %s.%n", alias);
+        } catch (ApplicationManagementServiceADCExceptionException e) {
+            handleException("cannot.removedomain", e);
+        } catch (RemoteException e) {
+            handleException(e);
+        } catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
+            handleException("notsubscribed.error", e, alias);
+        }
+    }
 
-	public void removeDomainMapping(String alias) throws CommandException {
-		try {
-			stub.removeDomainMapping(alias);
-			System.out.format("Domain mapping removed for alias: %s.%n", alias);
-		} catch (ApplicationManagementServiceADCExceptionException e) {
-			handleException("cannot.removedomain", e);
-		} catch (RemoteException e) {
-			handleException(e);
-		} catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
-			handleException("notsubscribed.error", e, alias);
-		}
-	}
+    public void subscribe(String cartridgeType, String alias, String policy, String externalRepoURL,
+                          boolean privateRepo, String username, String password, String dataCartridgeType, String dataCartridgeAlias)
+            throws CommandException {
 
-	public void subscribe(String cartridgeType, String alias, String policy, String externalRepoURL,
-			boolean privateRepo, String username, String password, String dataCartridgeType, String dataCartridgeAlias)
-			throws CommandException {
-		
 //		SubscriptionInfo subcriptionConnectInfo = null;
 //		if (StringUtils.isNotBlank(dataCartridgeType) && StringUtils.isNotBlank(dataCartridgeAlias)) {
 //			System.out.format("Subscribing to data cartridge %s with alias %s.%n", dataCartridgeType,
@@ -476,7 +476,7 @@ public class CommandLineService {
 //		} catch (ApplicationManagementServiceNotSubscribedExceptionException e) {
 //			handleException("notsubscribed.error", e, alias);
 //		}
-	}
+    }
 
 //	private String getAccessURLs(Cartridge cartridge) {
 //		String[] accessURLs = cartridge.getAccessURLs();
@@ -495,28 +495,28 @@ public class CommandLineService {
 //		return urlBuilder.toString();
 //	}
 
-	private void handleException(Exception e) throws CommandException {
-		if (log.isDebugEnabled()) {
-			log.debug("Displaying message from Exception {}\n{}", e.getClass(), e.getMessage());
-		}
-		// TODO: Fix handling error message.
-		// Sometimes the Axis2 stub throws only the RemoteException (an
-		// AxisFault)
-		// So, other exceptions won't come here.
-		String message = e.getMessage();
-		if (message == null || (message != null && message.contains("Exception"))) {
-			message = "Error executing command!";
-		}
-		log.error(message);
-		System.out.println(message);
-		throw new CommandException(message, e);
-	}
-    
+    private void handleException(Exception e) throws CommandException {
+        if (log.isDebugEnabled()) {
+            log.debug("Displaying message from Exception {}\n{}", e.getClass(), e.getMessage());
+        }
+        // TODO: Fix handling error message.
+        // Sometimes the Axis2 stub throws only the RemoteException (an
+        // AxisFault)
+        // So, other exceptions won't come here.
+        String message = e.getMessage();
+        if (message == null || (message != null && message.contains("Exception"))) {
+            message = "Error executing command!";
+        }
+        log.error(message);
+        System.out.println(message);
+        throw new CommandException(message, e);
+    }
+
     private void handleException(String key, Exception e, Object... args) throws CommandException {
-    	if (log.isDebugEnabled()) {
-    		log.debug("Displaying message for {}. Exception thrown is {}", key, e.getClass());
-    	}
-    	String message = CliUtils.getMessage(key, args);
+        if (log.isDebugEnabled()) {
+            log.debug("Displaying message for {}. Exception thrown is {}", key, e.getClass());
+        }
+        String message = CliUtils.getMessage(key, args);
         log.error(message);
         System.out.println(message);
         throw new CommandException(message, e);

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java
index 0c87c19..497c863 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Main.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Main.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Main.java
index d14ee07..887c1f7 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Main.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Main.java
@@ -25,7 +25,6 @@ package org.apache.stratos.cli;
 public class Main {
     /**
      * Main executable method used to call from CLI.
-     *
      */
     public static void main(final String[] args) {
         CliTool cliTool = new CliTool();

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
index c022804..439544b 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestClient.java
@@ -42,7 +42,7 @@ import java.lang.reflect.Type;
  * 1. doPost, doPut, doGet, doDelete
  * 2. deployEntity, updateEntity, getEntity, listEntity, deleteEntity
  * 3. executePost, executePut, executeGet, executeDelete
- *
+ * <p/>
  * All the status code handling happens at category #2
  */
 public class RestClient implements GenericRestClient {

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 8e891b2..7112fa1 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
@@ -85,7 +85,7 @@ public class RestCommandLineService {
     private static final String ENDPOINT_DEPLOY_APPLICATION = API_CONTEXT + "/applications/{applicationId}/deploy/{applicationPolicyId}";
     private static final String ENDPOINT_DEPLOY_NETWORK_PARTITION = API_CONTEXT + "/networkPartitions";
 
-    private static final String ENDPOINT_UNDEPLOY_KUBERNETES_CLUSTER= API_CONTEXT + "/kubernetesClusters/{id}";
+    private static final String ENDPOINT_UNDEPLOY_KUBERNETES_CLUSTER = API_CONTEXT + "/kubernetesClusters/{id}";
     private static final String ENDPOINT_UNDEPLOY_KUBERNETES_HOST = API_CONTEXT + "/kubernetesClusters/{kubernetesClusterId}/hosts/{id}";
     private static final String ENDPOINT_UNDEPLOY_SERVICE_GROUP = API_CONTEXT + "/cartridgeGroups/{id}";
     private static final String ENDPOINT_UNDEPLOY_APPLICATION = API_CONTEXT + "/applications/{id}/undeploy";
@@ -315,10 +315,10 @@ public class RestCommandLineService {
         try {
             Type listType = new TypeToken<ArrayList<CartridgeBean>>() {
             }.getType();
-            List<CartridgeBean> cartridgeList = (List<CartridgeBean>) restClient.listEntity(ENDPOINT_LIST_CARTRIDGES_BY_FILTER.replace("{filter}",filter),
+            List<CartridgeBean> cartridgeList = (List<CartridgeBean>) restClient.listEntity(ENDPOINT_LIST_CARTRIDGES_BY_FILTER.replace("{filter}", filter),
                     listType, "cartridges");
 
-            System.out.println("Test:"+ENDPOINT_LIST_CARTRIDGES_BY_FILTER.replace("{filter}",filter));
+            System.out.println("Test:" + ENDPOINT_LIST_CARTRIDGES_BY_FILTER.replace("{filter}", filter));
 
             if ((cartridgeList == null) || (cartridgeList.size() == 0)) {
                 System.out.println("No cartridges found");
@@ -371,7 +371,7 @@ public class RestCommandLineService {
                 public String[] getData(GroupBean cartridgeGroup) {
                     String[] data = new String[3];
                     data[0] = cartridgeGroup.getName();
-                    data[1] = cartridgeGroup.getCartridges()==null ? "" :String.valueOf(cartridgeGroup.getCartridges().size());
+                    data[1] = cartridgeGroup.getCartridges() == null ? "" : String.valueOf(cartridgeGroup.getCartridges().size());
                     data[2] = cartridgeGroup.getGroups() == null ? "0" : String.valueOf(cartridgeGroup.getGroups().size());
                     return data;
                 }
@@ -386,6 +386,7 @@ public class RestCommandLineService {
             printError(message, e);
         }
     }
+
     /**
      * Describe a cartridge
      * @param cartridgeType Type of the cartridge
@@ -400,8 +401,8 @@ public class RestCommandLineService {
                     listType, "cartridges");
 
             CartridgeBean cartridge = null;
-            for(CartridgeBean item : cartridgeList) {
-                if(item.getType().equals(cartridgeType)) {
+            for (CartridgeBean item : cartridgeList) {
+                if (item.getType().equals(cartridgeType)) {
                     cartridge = item;
                     break;
                 }
@@ -423,7 +424,7 @@ public class RestCommandLineService {
             System.out.println("Multi-Tenant: " + cartridge.isMultiTenant());
             System.out.println("Hostname: " + cartridge.getHost());
 
-            if(cartridge.getIaasProvider() != null) {
+            if (cartridge.getIaasProvider() != null) {
                 RowMapper<IaasProviderBean> cartridgeMapper = new RowMapper<IaasProviderBean>() {
                     public String[] getData(IaasProviderBean row) {
                         String[] data = new String[4];
@@ -517,8 +518,8 @@ public class RestCommandLineService {
                     listType, "tenant");
 
             TenantInfoBean tenant = null;
-            for(TenantInfoBean item : tenantList) {
-                if(item.getTenantDomain().equals(domainName)) {
+            for (TenantInfoBean item : tenantList) {
+                if (item.getTenantDomain().equals(domainName)) {
                     tenant = item;
                     break;
                 }
@@ -553,7 +554,7 @@ public class RestCommandLineService {
         try {
             Type listType = new TypeToken<ArrayList<TenantInfoBean>>() {
             }.getType();
-            List<TenantInfoBean> tenantList = (List<TenantInfoBean>) restClient.listEntity(ENDPOINT_LIST_TENANTS_BY_PARTIAL_DOMAIN.replace("{tenantDomain}",partialDomain),
+            List<TenantInfoBean> tenantList = (List<TenantInfoBean>) restClient.listEntity(ENDPOINT_LIST_TENANTS_BY_PARTIAL_DOMAIN.replace("{tenantDomain}", partialDomain),
                     listType, "tenants");
 
             if ((tenantList == null) || (tenantList.size() == 0)) {
@@ -595,7 +596,7 @@ public class RestCommandLineService {
      * @param email email
      * @throws CommandException
      */
-    public void updateTenant(int id,String admin, String firstName, String lastName, String password, String domain, String email)
+    public void updateTenant(int id, String admin, String firstName, String lastName, String password, String domain, String email)
             throws CommandException {
         DefaultHttpClient httpClient = new DefaultHttpClient();
         try {
@@ -620,10 +621,10 @@ public class RestCommandLineService {
             if (responseCode < 200 || responseCode >= 300) {
                 CliUtils.printError(response);
             } else {
-                System.out.println("Tenant updated successfully: "+domain);
+                System.out.println("Tenant updated successfully: " + domain);
             }
         } catch (Exception e) {
-            String message = "Could not update tenant: "+domain;
+            String message = "Could not update tenant: " + domain;
             printError(message, e);
         } finally {
             httpClient.getConnectionManager().shutdown();
@@ -712,10 +713,10 @@ public class RestCommandLineService {
             if (responseCode < 200 || responseCode >= 300) {
                 CliUtils.printError(response);
             } else {
-                System.out.println("User updated successfully: "+userName);
+                System.out.println("User updated successfully: " + userName);
             }
         } catch (Exception e) {
-            String message = "Could not update user: "+userName;
+            String message = "Could not update user: " + userName;
             printError(message, e);
         } finally {
             httpClient.getConnectionManager().shutdown();
@@ -803,7 +804,7 @@ public class RestCommandLineService {
             Gson gson = gsonBuilder.create();
 
             if (responseCode.equals(CliConstants.RESPONSE_OK)) {
-                System.out.println("You have successfully deactivated the tenant: " + tenantDomain );
+                System.out.println("You have successfully deactivated the tenant: " + tenantDomain);
                 return;
             } else {
                 String resultString = CliUtils.getHttpResponseString(response);
@@ -859,7 +860,7 @@ public class RestCommandLineService {
         try {
             Type listType = new TypeToken<ArrayList<TenantInfoBean>>() {
             }.getType();
-            List<TenantInfoBean> tenantInfoList = (List<TenantInfoBean>)restClient.listEntity(ENDPOINT_LIST_TENANTS,
+            List<TenantInfoBean> tenantInfoList = (List<TenantInfoBean>) restClient.listEntity(ENDPOINT_LIST_TENANTS,
                     listType, "tenants");
 
             if ((tenantInfoList == null) || (tenantInfoList.size() == 0)) {
@@ -1001,7 +1002,7 @@ public class RestCommandLineService {
             array = list.toArray(array);
 
             System.out.println("Applications found:");
-            CliUtils.printTable(array, rowMapper, "Application ID","Alias", "Status");
+            CliUtils.printTable(array, rowMapper, "Application ID", "Alias", "Status");
         } catch (Exception e) {
             String message = "Could not list applications";
             printError(message, e);
@@ -1119,7 +1120,7 @@ public class RestCommandLineService {
      * @param entityBody Kubernetes Cluster definition
      * @throws CommandException
      */
-    public void addKubernetesCluster(String entityBody) throws CommandException{
+    public void addKubernetesCluster(String entityBody) throws CommandException {
         restClient.deployEntity(ENDPOINT_DEPLOY_KUBERNETES_CLUSTER, entityBody, "kubernetes cluster");
     }
 
@@ -1127,7 +1128,7 @@ public class RestCommandLineService {
      * List Kubernetes Clusters
      * @throws CommandException
      */
-    public void listKubernetesClusters() throws CommandException{
+    public void listKubernetesClusters() throws CommandException {
         try {
             Type listType = new TypeToken<ArrayList<KubernetesClusterBean>>() {
             }.getType();
@@ -1161,7 +1162,7 @@ public class RestCommandLineService {
      * @param clusterId cluster id
      * @throws CommandException
      */
-    public void undeployKubernetesCluster(String clusterId) throws CommandException{
+    public void undeployKubernetesCluster(String clusterId) throws CommandException {
         restClient.undeployEntity(ENDPOINT_UNDEPLOY_KUBERNETES_CLUSTER, "kubernetes cluster", clusterId);
     }
 
@@ -1203,7 +1204,7 @@ public class RestCommandLineService {
      * @param clusterId cluster id
      * @throws CommandException
      */
-    public void listKubernetesHosts(String clusterId) throws CommandException{
+    public void listKubernetesHosts(String clusterId) throws CommandException {
         try {
             Type listType = new TypeToken<ArrayList<KubernetesHostBean>>() {
             }.getType();
@@ -1297,7 +1298,7 @@ public class RestCommandLineService {
      * @param resourceFileContent domain mapping definition
      * @throws CommandException
      */
-    public void addDomainMappings(String applicationId, String resourceFileContent) throws CommandException{
+    public void addDomainMappings(String applicationId, String resourceFileContent) throws CommandException {
         String endpoint = ENDPOINT_DOMAIN_MAPPINGS.replace("{applicationId}", applicationId);
         restClient.deployEntity(endpoint, resourceFileContent, "domain mappings");
     }
@@ -1307,7 +1308,7 @@ public class RestCommandLineService {
      * @param applicationId application id
      * @throws CommandException
      */
-    public void listDomainMappings(String applicationId) throws CommandException{
+    public void listDomainMappings(String applicationId) throws CommandException {
         try {
             Type listType = new TypeToken<ArrayList<DomainMappingBean>>() {
             }.getType();
@@ -1343,7 +1344,7 @@ public class RestCommandLineService {
      * @param applicationId application id
      * @throws CommandException
      */
-    public void removeDomainMappings(String applicationId) throws CommandException{
+    public void removeDomainMappings(String applicationId) throws CommandException {
         String endpoint = ENDPOINT_DOMAIN_MAPPINGS.replace("{applicationId}", applicationId);
         restClient.undeployEntity(endpoint, "domain mappings", applicationId);
     }
@@ -1354,7 +1355,7 @@ public class RestCommandLineService {
      * @param hostId host id
      * @throws CommandException
      */
-    public void undeployKubernetesHost(String clusterId, String hostId) throws CommandException{
+    public void undeployKubernetesHost(String clusterId, String hostId) throws CommandException {
         restClient.undeployEntity(ENDPOINT_UNDEPLOY_KUBERNETES_HOST.replace("{kubernetesClusterId}", clusterId), "kubernetes host", hostId);
     }
 
@@ -1364,7 +1365,7 @@ public class RestCommandLineService {
      * @param clusterId cluster id
      * @throws CommandException
      */
-    public void updateKubernetesMaster(String entityBody, String clusterId) throws CommandException{
+    public void updateKubernetesMaster(String entityBody, String clusterId) throws CommandException {
         System.out.println(ENDPOINT_UPDATE_KUBERNETES_MASTER.replace("{kubernetesClusterId}", clusterId));
         restClient.updateEntity(ENDPOINT_UPDATE_KUBERNETES_MASTER.replace("{kubernetesClusterId}", clusterId), entityBody, "kubernetes master");
     }
@@ -1376,7 +1377,7 @@ public class RestCommandLineService {
      * @param hostId host id
      * @throws CommandException
      */
-    public void updateKubernetesHost(String entityBody, String clusterId, String hostId) throws CommandException{
+    public void updateKubernetesHost(String entityBody, String clusterId, String hostId) throws CommandException {
         System.out.println((ENDPOINT_UPDATE_KUBERNETES_HOST.replace("{kubernetesClusterId}", clusterId)).replace("{minionId}", hostId));
         restClient.updateEntity((ENDPOINT_UPDATE_KUBERNETES_HOST.replace("{kubernetesClusterId}", clusterId)).replace("{minionId}", hostId), entityBody, "kubernetes host");
     }
@@ -1415,7 +1416,7 @@ public class RestCommandLineService {
      * @param entityBody cartridge group definition
      * @throws CommandException
      */
-    public void addCartridgeGroup(String entityBody) throws CommandException{
+    public void addCartridgeGroup(String entityBody) throws CommandException {
         restClient.deployEntity(ENDPOINT_DEPLOY_SERVICE_GROUP, entityBody, "cartridge group");
     }
 
@@ -1424,7 +1425,7 @@ public class RestCommandLineService {
      * @param groupDefinitionName cartridge group name
      * @throws CommandException
      */
-    public void undeployServiceGroup (String groupDefinitionName) throws CommandException {
+    public void undeployServiceGroup(String groupDefinitionName) throws CommandException {
         restClient.undeployEntity(ENDPOINT_UNDEPLOY_SERVICE_GROUP, "cartridge group", groupDefinitionName);
     }
 
@@ -1433,7 +1434,7 @@ public class RestCommandLineService {
      * @param groupDefinitionName cartridge group name
      * @throws CommandException
      */
-    public void describeServiceGroup (String groupDefinitionName) throws CommandException{
+    public void describeServiceGroup(String groupDefinitionName) throws CommandException {
         try {
             GroupBean bean = (GroupBean) restClient.listEntity(ENDPOINT_LIST_SERVICE_GROUP.replace("{groupDefinitionName}", groupDefinitionName),
                     GroupBean.class, "serviceGroup");
@@ -1456,7 +1457,7 @@ public class RestCommandLineService {
      * @param entityBody application definition
      * @throws CommandException
      */
-    public void addApplication (String entityBody) throws CommandException{
+    public void addApplication(String entityBody) throws CommandException {
         restClient.deployEntity(ENDPOINT_ADD_APPLICATION, entityBody, "application");
     }
 
@@ -1466,10 +1467,10 @@ public class RestCommandLineService {
      * @param applicationPolicyId application policy id
      * @throws CommandException
      */
-    public void deployApplication (String applicationId,String applicationPolicyId) throws CommandException{
+    public void deployApplication(String applicationId, String applicationPolicyId) throws CommandException {
         DefaultHttpClient httpClient = new DefaultHttpClient();
         try {
-            String url=(ENDPOINT_DEPLOY_APPLICATION.replace("{applicationId}", applicationId)).replace("{applicationPolicyId}",applicationPolicyId);
+            String url = (ENDPOINT_DEPLOY_APPLICATION.replace("{applicationId}", applicationId)).replace("{applicationPolicyId}", applicationPolicyId);
             HttpResponse response = restClient.doPost(httpClient, restClient.getBaseURL()
                     + url, "");
 
@@ -1505,7 +1506,7 @@ public class RestCommandLineService {
         DefaultHttpClient httpClient = new DefaultHttpClient();
         try {
             HttpResponse response = restClient.doPost(httpClient, restClient.getBaseURL()
-                    + ENDPOINT_UNDEPLOY_APPLICATION.replace("{id}",applicationId), "");
+                    + ENDPOINT_UNDEPLOY_APPLICATION.replace("{id}", applicationId), "");
 
             String responseCode = "" + response.getStatusLine().getStatusCode();
 
@@ -1534,7 +1535,7 @@ public class RestCommandLineService {
      * @throws CommandException
      * This method helps to remove applications
      */
-    public void deleteApplication (String applicationId) throws CommandException{
+    public void deleteApplication(String applicationId) throws CommandException {
         restClient.deleteEntity(ENDPOINT_REMOVE_APPLICATION.replace("{appId}", applicationId), applicationId,
                 "application");
     }
@@ -1544,7 +1545,7 @@ public class RestCommandLineService {
      * @param autoscalingPolicyId  autoscaling policy id
      * @throws CommandException
      */
-    public void deleteAutoSclaingPolicy(String autoscalingPolicyId) throws CommandException{
+    public void deleteAutoSclaingPolicy(String autoscalingPolicyId) throws CommandException {
         restClient.deleteEntity(ENDPOINT_REMOVE_AUTOSCALINGPOLICY.replace("{policyId}", autoscalingPolicyId), autoscalingPolicyId,
                 "Auto-scaling policy");
     }
@@ -1554,7 +1555,7 @@ public class RestCommandLineService {
      * @param applicationId application id
      * @throws CommandException
      */
-    public void describeApplication (String applicationId) throws CommandException{
+    public void describeApplication(String applicationId) throws CommandException {
         try {
             ApplicationBean application = (ApplicationBean) restClient
                     .getEntity(ENDPOINT_GET_APPLICATION, ApplicationBean.class, "{appId}", applicationId,
@@ -1578,7 +1579,7 @@ public class RestCommandLineService {
      * @param applicationId application id
      * @throws CommandException
      */
-    public void describeApplicationRuntime (String applicationId) throws CommandException{
+    public void describeApplicationRuntime(String applicationId) throws CommandException {
         try {
             ApplicationBean application = (ApplicationBean) restClient
                     .getEntity(ENDPOINT_GET_APPLICATION_RUNTIME, ApplicationBean.class, "{applicationId}", applicationId,
@@ -1603,7 +1604,7 @@ public class RestCommandLineService {
      * @param entityBody application signup definition
      * @throws CommandException
      */
-    public void addApplicationSignup (String entityBody, String applicationId) throws CommandException{
+    public void addApplicationSignup(String entityBody, String applicationId) throws CommandException {
         restClient.deployEntity(ENDPOINT_APPLICATION_SIGNUP.replace("{applicationId}", applicationId), entityBody, "application signup");
     }
 
@@ -1612,7 +1613,7 @@ public class RestCommandLineService {
      * @param applicationId application id
      * @throws CommandException
      */
-    public void describeApplicationSignup (String applicationId) throws CommandException{
+    public void describeApplicationSignup(String applicationId) throws CommandException {
         try {
             ApplicationSignUpBean bean = (ApplicationSignUpBean) restClient.listEntity(ENDPOINT_APPLICATION_SIGNUP.replace("{applicationId}", applicationId),
                     ApplicationSignUpBean.class, "applicationSignup");
@@ -1635,7 +1636,7 @@ public class RestCommandLineService {
      * @param applicationId application id
      * @throws CommandException
      */
-    public void deleteApplicationSignup (String applicationId) throws CommandException{
+    public void deleteApplicationSignup(String applicationId) throws CommandException {
         restClient.deleteEntity(ENDPOINT_APPLICATION_SIGNUP.replace("{applicationId}", applicationId), applicationId,
                 "application signup");
     }
@@ -1681,7 +1682,7 @@ public class RestCommandLineService {
      * @param networkPartitionId application id
      * @throws CommandException
      */
-    public void removeNetworkPartition (String networkPartitionId) throws CommandException{
+    public void removeNetworkPartition(String networkPartitionId) throws CommandException {
         restClient.deleteEntity(ENDPOINT_REMOVE_NETWORK_PARTITION.replace("{id}", networkPartitionId), networkPartitionId,
                 "network-partition");
     }
@@ -1706,7 +1707,8 @@ public class RestCommandLineService {
                 public String[] getData(NetworkPartitionBean partition) {
                     String[] data = new String[2];
                     data[0] = partition.getId();
-                    data[1] = String.valueOf(partition.getPartitions().size());;
+                    data[1] = String.valueOf(partition.getPartitions().size());
+                    ;
                     return data;
                 }
             };
@@ -1787,7 +1789,7 @@ public class RestCommandLineService {
      * @param deploymentPolicyId deployment policy definition
      * @throws CommandException
      */
-    public void deleteDeploymentPolicy(String deploymentPolicyId) throws CommandException{
+    public void deleteDeploymentPolicy(String deploymentPolicyId) throws CommandException {
         restClient.deleteEntity(ENDPOINT_REMOVE_DEPLOYMENT_POLICY.replace("{policyId}", deploymentPolicyId), deploymentPolicyId,
                 "deployment policy");
     }
@@ -1860,7 +1862,7 @@ public class RestCommandLineService {
             array = list.toArray(array);
 
             System.out.println("Application policies found:");
-            CliUtils.printTable(array, rowMapper, "ID", "No of network partitions","algorithm");
+            CliUtils.printTable(array, rowMapper, "ID", "No of network partitions", "algorithm");
         } catch (Exception e) {
             String message = "Could not list application policies";
             printError(message, e);
@@ -1872,7 +1874,7 @@ public class RestCommandLineService {
      * param applicationPolicyId application policy id
      * @throws CommandException
      */
-    public void deleteApplicationPolicy(String applicationPolicyId) throws CommandException{
+    public void deleteApplicationPolicy(String applicationPolicyId) throws CommandException {
         restClient.deleteEntity(ENDPOINT_REMOVE_APPLICATION_POLICY.replace("{policyId}", applicationPolicyId), applicationPolicyId,
                 "application policy");
     }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
index 188b5bd..9472a5c 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosApplication.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
@@ -201,13 +201,13 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
         command = new RemoveDomainMappingsCommand();
         commands.put(command.getName(), command);
 
-        command=new DeleteAutoScalingPolicyCommand();
+        command = new DeleteAutoScalingPolicyCommand();
         commands.put(command.getName(), command);
 
-        command=new AddNetworkPartitionCommand();
+        command = new AddNetworkPartitionCommand();
         commands.put(command.getName(), command);
 
-        command=new RemoveNetworkPartitionCommand();
+        command = new RemoveNetworkPartitionCommand();
         commands.put(command.getName(), command);
 
         command = new ListNetworkPartitionCommand();
@@ -223,16 +223,16 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
         commands.put(command.getName(), command);
 
         command = new DescribeTenantCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new ListPartialSearchTenantsCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new DescribeApplicationSignupCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new DeleteApplicationSignupCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new AddDeploymentPolicyCommand();
         commands.put(command.getName(), command);
@@ -271,25 +271,25 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
         commands.put(command.getName(), command);
 
         command = new DescribeApplicationSignupCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new DeleteApplicationSignupCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new AddApplicationPolicyCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new ListApplicationPoliciesCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new DescribeApplicationPolicyCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new RemoveApplicationPolicyCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         command = new UpdateApplicationPolicyCommand();
-        commands.put(command.getName(),command);
+        commands.put(command.getName(), command);
 
         if (logger.isDebugEnabled()) {
             logger.debug("Created {} commands for the application. {}", commands.size(), commands.keySet());
@@ -343,7 +343,7 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
             CommandLine commandLine;
             try {
                 // Must add all options. Otherwise actions cannot be performed directly by command line.
-            	// This is because the parser trips over unrecognised options.
+                // This is because the parser trips over unrecognised options.
                 Options allCommandOptions = new Options();
                 for (Command<StratosCommandContext> command : commands.values()) {
                     Options commandOptions = command.getOptions();
@@ -522,7 +522,7 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
             return CliConstants.COMMAND_FAILED;
         }
         try {
-        	return command.execute(context, actionArgs, new Option[0]);
+            return command.execute(context, actionArgs, new Option[0]);
         } catch (CommandException e) {
             if (logger.isErrorEnabled()) {
                 logger.error("Error executing command: " + action, e);
@@ -564,12 +564,12 @@ public class StratosApplication extends CommandLineApplication<StratosCommandCon
         int slashCount = StringUtils.countMatches(stratosURL, "/");
         int colonCount = StringUtils.countMatches(stratosURL, ":");
 
-        UrlValidator urlValidator = new UrlValidator(new String[] { "https" },UrlValidator.ALLOW_LOCAL_URLS);
+        UrlValidator urlValidator = new UrlValidator(new String[]{"https"}, UrlValidator.ALLOW_LOCAL_URLS);
 
         // port must be provided, so colonCount must be 2
         // context path must not be provided, so slashCount must not be >3
 
-        if (!urlValidator.isValid(stratosURL) || colonCount != 2 || slashCount >3) {
+        if (!urlValidator.isValid(stratosURL) || colonCount != 2 || slashCount > 3) {
             if (logger.isDebugEnabled()) {
                 logger.debug("Stratos Controller URL {} is not valid", stratosURL);
             }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8b895d93/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosCommandContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosCommandContext.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosCommandContext.java
index 8a8459c..0c9c364 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosCommandContext.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/StratosCommandContext.java
@@ -1,31 +1,31 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.cli;
 
 public class StratosCommandContext extends CommandContext {
 
-	public StratosCommandContext(StratosApplication application) {
-		super(application);
-	}
+    public StratosCommandContext(StratosApplication application) {
+        super(application);
+    }
 
-	public StratosApplication getStratosApplication() {
-		return (StratosApplication) getApplication();
-	}
+    public StratosApplication getStratosApplication() {
+        return (StratosApplication) getApplication();
+    }
 
 }


[12/12] stratos git commit: Improve error messages in rest API

Posted by la...@apache.org.
Improve error messages in rest API


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/3ae231b6
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/3ae231b6
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/3ae231b6

Branch: refs/heads/master
Commit: 3ae231b66364f206644af8a0209cfcfc78335e86
Parents: 5f94f7e
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Thu Apr 30 11:35:38 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Thu Apr 30 11:35:38 2015 +0530

----------------------------------------------------------------------
 .../org/apache/stratos/rest/endpoint/api/StratosApiV41.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/3ae231b6/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index a1a1505..40fb386 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -683,7 +683,8 @@ public class StratosApiV41 extends AbstractApi {
     public Response getApplications() throws RestAPIException {
         List<ApplicationBean> applicationDefinitions = StratosApiV41Utils.getApplications();
         if (applicationDefinitions == null || applicationDefinitions.isEmpty()) {
-            return Response.status(Response.Status.NOT_FOUND).build();
+            return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
+                    Response.Status.NOT_FOUND.getStatusCode(), "No applications found")).build();
         }
 
         ApplicationBean[] applicationDefinitionsArray = applicationDefinitions
@@ -707,7 +708,8 @@ public class StratosApiV41 extends AbstractApi {
             @PathParam("applicationId") String applicationId) throws RestAPIException {
         ApplicationBean applicationDefinition = StratosApiV41Utils.getApplication(applicationId);
         if (applicationDefinition == null) {
-            return Response.status(Response.Status.NOT_FOUND).build();
+            return Response.status(Response.Status.NOT_FOUND).entity(new ErrorResponseBean(
+                    Response.Status.NOT_FOUND.getStatusCode(), "Application not found")).build();
         }
         return Response.ok(applicationDefinition).build();
     }
@@ -734,7 +736,8 @@ public class StratosApiV41 extends AbstractApi {
                     String.format("Application deployed successfully: [application] %s", applicationId))).build();
         } catch (ApplicationAlreadyDeployedException e) {
 
-            return Response.status(Response.Status.CONFLICT).build();
+            return Response.status(Response.Status.CONFLICT).entity(new ErrorResponseBean(
+                    Response.Status.CONFLICT.getStatusCode(), "Application policy already deployed")).build();
         } catch (RestAPIException e) {
 
             throw e;


[08/12] stratos git commit: Fix messaging , CC, Kubs client formatting

Posted by la...@apache.org.
Fix messaging , CC, Kubs client formatting


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/8d4dcd22
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/8d4dcd22
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/8d4dcd22

Branch: refs/heads/master
Commit: 8d4dcd224f487f83a62edc553aaabeb6f5c72ad2
Parents: 36b1f8f
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Apr 29 23:31:28 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Apr 29 23:31:28 2015 +0530

----------------------------------------------------------------------
 .../controller/domain/NetworkPartition.java     |  4 +--
 .../kubernetes/client/rest/RestClient.java      |  4 +--
 components/org.apache.stratos.messaging/pom.xml |  3 +-
 .../broker/connect/amqp/AmqpTopicPublisher.java |  6 ++--
 .../messaging/domain/topology/Topology.java     |  8 ++---
 .../lifecycle/LifeCycleStateManager.java        |  2 +-
 .../CompleteTopologyMessageProcessor.java       |  4 +--
 .../messaging/test/AmqpSubscriberTest.java      |  4 +--
 .../messaging/test/MessageFilterTest.java       | 38 ++++++++++----------
 9 files changed, 37 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
index bec12b7..85b6179 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/domain/NetworkPartition.java
@@ -19,11 +19,11 @@
 
 package org.apache.stratos.cloud.controller.domain;
 
+import org.apache.stratos.common.Properties;
+
 import java.io.Serializable;
 import java.util.Arrays;
 
-import org.apache.stratos.common.Properties;
-
 
 /**
  * The model class for NetworkPartition definition.

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java b/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java
index 6de8a1f..271f38c 100644
--- a/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java
+++ b/components/org.apache.stratos.kubernetes.client/src/main/java/org/apache/stratos/kubernetes/client/rest/RestClient.java
@@ -42,7 +42,7 @@ public class RestClient {
     /**
      * Handle http post request. Return String
      *
-     * @param resourcePath This should be REST endpoint
+     * @param resourcePath    This should be REST endpoint
      * @param jsonParamString The json string which should be executed from the post request
      * @return The HttpResponse
      * @throws Exception if any errors occur when executing the request
@@ -68,7 +68,7 @@ public class RestClient {
      * @param resourcePath This should be REST endpoint
      * @return The HttpResponse
      * @throws org.apache.http.client.ClientProtocolException and IOException
-     *             if any errors occur when executing the request
+     *                                                        if any errors occur when executing the request
      */
     public HttpResponse doGet(URI resourcePath) throws Exception {
         HttpGet getRequest = null;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/pom.xml b/components/org.apache.stratos.messaging/pom.xml
index 7f9c244..f75f11c 100644
--- a/components/org.apache.stratos.messaging/pom.xml
+++ b/components/org.apache.stratos.messaging/pom.xml
@@ -17,7 +17,8 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <parent>
         <groupId>org.apache.stratos</groupId>

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java
index 3f75096..370dcf2 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicPublisher.java
@@ -95,9 +95,9 @@ public class AmqpTopicPublisher extends AmqpTopicConnector implements TopicPubli
                 }
                 // Try to reconnect
                 reconnect();
-            }finally {
+            } finally {
 
-                try{
+                try {
                     if (topicSession != null) {
                         topicSession.close();
                     }
@@ -105,7 +105,7 @@ public class AmqpTopicPublisher extends AmqpTopicConnector implements TopicPubli
                         topicPublisher.close();
                     }
 
-                }catch (JMSException e) {
+                } catch (JMSException e) {
                     message = "Error cleaning up pubisher";
                     log.error(message, e);
                     throw new MessagingException(message, e);

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java
index 3923d0e..2f929bf 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Topology.java
@@ -77,19 +77,19 @@ public class Topology implements Serializable {
         return this.serviceMap.containsKey(serviceName);
     }
 
-    public void addToCluterMap(Cluster cluster){
+    public void addToCluterMap(Cluster cluster) {
         this.clusterMap.put(cluster.getClusterId(), cluster);
     }
 
-    public void removeFromClusterMap(String cluserId){
+    public void removeFromClusterMap(String cluserId) {
         clusterMap.remove(cluserId);
     }
 
-    public Cluster getCluster(String clusterId){
+    public Cluster getCluster(String clusterId) {
         return this.clusterMap.get(clusterId);
     }
 
-    public boolean clusterExist(String clusterId){
+    public boolean clusterExist(String clusterId) {
         return clusterMap.get(clusterId) != null;
     }
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java
index fd09de5..40cff06 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java
@@ -128,7 +128,7 @@ public class LifeCycleStateManager<T extends LifeCycleState> implements Serializ
      */
     public T getPreviousState() {
         int index = stateStack.size() - 2;
-        if((index >= 0) && (index < stateStack.size())) {
+        if ((index >= 0) && (index < stateStack.size())) {
             return stateStack.get(index);
         }
         return null;

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java
index 6d60350..0317378 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/CompleteTopologyMessageProcessor.java
@@ -94,9 +94,9 @@ public class CompleteTopologyMessageProcessor extends MessageProcessor {
             for (Cluster cluster : service.getClusters()) {
                 if (TopologyClusterFilter.apply(cluster.getClusterId())) {
                     clustersToRemove.add(cluster);
-                }else{
+                } else {
                     // Add non filtered clusters to clusterId-cluster map
-                    if(!topology.clusterExist(cluster.getClusterId())){
+                    if (!topology.clusterExist(cluster.getClusterId())) {
                         topology.addToCluterMap(cluster);
                     }
                 }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java
index 3f69b9f..e9ab86d 100644
--- a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java
+++ b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/AmqpSubscriberTest.java
@@ -49,7 +49,7 @@ public class AmqpSubscriberTest {
     private BrokerService broker;
 
     @BeforeClass
-    public static void setUp(){
+    public static void setUp() {
         // Set jndi.properties.dir system property for initializing event receivers
         System.setProperty("jndi.properties.dir", getResourcesFolderPath());
     }
@@ -75,7 +75,7 @@ public class AmqpSubscriberTest {
             long time1 = System.currentTimeMillis();
             broker.start();
             long time2 = System.currentTimeMillis();
-            log.info(String.format("ActiveMQ started in %d sec", (time2 - time1)/1000));
+            log.info(String.format("ActiveMQ started in %d sec", (time2 - time1) / 1000));
         } catch (Exception e) {
             throw new RuntimeException("Could not start ActiveMQ", e);
         }

http://git-wip-us.apache.org/repos/asf/stratos/blob/8d4dcd22/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java
index 579bf5a..2ee08df 100755
--- a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java
+++ b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/test/MessageFilterTest.java
@@ -1,20 +1,20 @@
 /**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
-
- *  http://www.apache.org/licenses/LICENSE-2.0
-
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.stratos.messaging.test;
 
@@ -42,7 +42,7 @@ public class MessageFilterTest {
     public final void testFilterIncluded() {
         String filterName = "filter1";
         String validationError = "MessageFilter.included() method failed";
-        System.setProperty(filterName,  "property1=value1,value2|property2=value3,value4");
+        System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
         MessageFilter messageFilter = new MessageFilter(filterName);
         assertTrue(validationError, messageFilter.included("property1", "value1"));
         assertTrue(validationError, messageFilter.included("property1", "value2"));
@@ -55,7 +55,7 @@ public class MessageFilterTest {
     public final void testFilterExcluded() {
         String filterName = "filter2";
         String validationError = "MessageFilter.excluded() method failed";
-        System.setProperty(filterName,  "property1=value1,value2|property2=value3,value4");
+        System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
         MessageFilter messageFilter = new MessageFilter(filterName);
         assertFalse(validationError, messageFilter.excluded("property1", "value1"));
         assertFalse(validationError, messageFilter.excluded("property1", "value2"));
@@ -68,7 +68,7 @@ public class MessageFilterTest {
     public final void testFilterGetAllPropertyValues() {
         String filterName = "filter2";
         String validationError = "MessageFilter.getIncludedPropertyValues() method failed";
-        System.setProperty(filterName,  "property1=value1,value2|property2=value3,value4");
+        System.setProperty(filterName, "property1=value1,value2|property2=value3,value4");
         MessageFilter messageFilter = new MessageFilter(filterName);
 
         Collection<String> property1Values = messageFilter.getIncludedPropertyValues("property1");


[09/12] stratos git commit: Optimize imports in messaging component

Posted by la...@apache.org.
Optimize imports in messaging component


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/661e8ad8
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/661e8ad8
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/661e8ad8

Branch: refs/heads/master
Commit: 661e8ad88201cdfefc5463b7352625ba92066dcc
Parents: 8d4dcd2
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Apr 29 23:32:06 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Apr 29 23:32:06 2015 +0530

----------------------------------------------------------------------
 .../messaging/broker/connect/amqp/AmqpTopicSubscriber.java   | 4 +++-
 .../messaging/broker/connect/mqtt/MqttTopicPublisher.java    | 2 +-
 .../apache/stratos/messaging/domain/application/Group.java   | 5 ++++-
 .../messaging/domain/instance/ApplicationInstance.java       | 2 +-
 .../stratos/messaging/domain/instance/ClusterInstance.java   | 2 +-
 .../stratos/messaging/domain/instance/GroupInstance.java     | 2 +-
 .../apache/stratos/messaging/domain/topology/Cluster.java    | 2 +-
 .../org/apache/stratos/messaging/domain/topology/Member.java | 2 +-
 .../application/signup/ApplicationSignUpAddedEvent.java      | 1 -
 .../event/instance/notifier/ArtifactUpdatedEvent.java        | 2 --
 .../event/instance/status/InstanceActivatedEvent.java        | 2 --
 .../messaging/event/tenant/TenantSubscribedEvent.java        | 3 ++-
 .../messaging/event/topology/MemberActivatedEvent.java       | 8 ++------
 .../messaging/message/processor/MessageProcessor.java        | 1 -
 .../signup/ApplicationSignUpMessageProcessorChain.java       | 2 --
 .../cluster/status/ClusterStatusMessageProcessorChain.java   | 1 -
 .../instance/status/InstanceStatusMessageProcessorChain.java | 6 ------
 .../processor/tenant/TenantMessageProcessorChain.java        | 5 ++++-
 .../processor/topology/ClusterCreatedMessageProcessor.java   | 4 +++-
 .../processor/topology/MemberActivatedMessageProcessor.java  | 6 +-----
 .../processor/topology/MemberStartedMessageProcessor.java    | 6 +-----
 .../processor/topology/MemberSuspendedMessageProcessor.java  | 6 +-----
 .../cluster/status/ClusterStatusEventMessageListener.java    | 2 --
 .../cluster/status/ClusterStatusEventMessageQueue.java       | 1 -
 .../health/stat/HealthStatEventMessageDelegator.java         | 2 --
 .../receiver/health/stat/HealthStatEventMessageQueue.java    | 1 -
 .../instance/notifier/InstanceNotifierEventMessageQueue.java | 1 -
 .../instance/status/InstanceStatusEventMessageQueue.java     | 1 -
 .../message/receiver/tenant/TenantEventMessageQueue.java     | 1 -
 .../message/receiver/topology/TopologyEventMessageQueue.java | 1 -
 .../org/apache/stratos/messaging/util/MessagingUtil.java     | 2 +-
 .../messaging/topology/locking/TopologyLockingTest.java      | 2 +-
 32 files changed, 29 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicSubscriber.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicSubscriber.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicSubscriber.java
index 79d58a3..adc598b 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicSubscriber.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/amqp/AmqpTopicSubscriber.java
@@ -28,7 +28,9 @@ import org.apache.stratos.messaging.broker.connect.TopicSubscriber;
 import org.apache.stratos.messaging.broker.subscribe.MessageListener;
 import org.apache.stratos.messaging.domain.exception.MessagingException;
 
-import javax.jms.*;
+import javax.jms.Message;
+import javax.jms.Topic;
+import javax.jms.TopicSession;
 
 /**
  * AMQP topic subscriber.

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/mqtt/MqttTopicPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/mqtt/MqttTopicPublisher.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/mqtt/MqttTopicPublisher.java
index 486ea69..0c66334 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/mqtt/MqttTopicPublisher.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/broker/connect/mqtt/MqttTopicPublisher.java
@@ -24,7 +24,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.messaging.broker.connect.TopicPublisher;
 import org.apache.stratos.messaging.domain.exception.MessagingException;
 import org.apache.stratos.messaging.util.MessagingConstants;
-import org.eclipse.paho.client.mqttv3.*;
+import org.eclipse.paho.client.mqttv3.MqttMessage;
 
 /**
  * Mqtt topic connector

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/Group.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/Group.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/Group.java
index 2ba1fd5..4db77a9 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/Group.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/application/Group.java
@@ -21,7 +21,10 @@ package org.apache.stratos.messaging.domain.application;
 
 import org.apache.stratos.messaging.domain.instance.GroupInstance;
 
-import java.util.*;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.Stack;
 
 /**
  * Represents a Group/nested Group in an Application/Group

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ApplicationInstance.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ApplicationInstance.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ApplicationInstance.java
index a1185b0..b7d97a9 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ApplicationInstance.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ApplicationInstance.java
@@ -20,8 +20,8 @@
 package org.apache.stratos.messaging.domain.instance;
 
 import org.apache.stratos.messaging.domain.application.ApplicationStatus;
-import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateTransitionBehavior;
 import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager;
+import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateTransitionBehavior;
 
 import java.util.Stack;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ClusterInstance.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ClusterInstance.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ClusterInstance.java
index 588d95c..eb744ca 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ClusterInstance.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/ClusterInstance.java
@@ -20,8 +20,8 @@
 package org.apache.stratos.messaging.domain.instance;
 
 import org.apache.stratos.messaging.domain.topology.ClusterStatus;
-import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateTransitionBehavior;
 import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager;
+import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateTransitionBehavior;
 
 import java.util.Stack;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/GroupInstance.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/GroupInstance.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/GroupInstance.java
index a1b0026..9c20fd8 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/GroupInstance.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/instance/GroupInstance.java
@@ -20,8 +20,8 @@
 package org.apache.stratos.messaging.domain.instance;
 
 import org.apache.stratos.messaging.domain.application.GroupStatus;
-import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateTransitionBehavior;
 import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager;
+import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateTransitionBehavior;
 
 import java.util.Stack;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
index f82c5a3..babf38c 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Cluster.java
@@ -20,9 +20,9 @@
 package org.apache.stratos.messaging.domain.topology;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.stratos.messaging.adapters.MapAdapter;
 import org.apache.stratos.messaging.domain.instance.ClusterInstance;
 import org.apache.stratos.messaging.util.MessagingUtil;
-import org.apache.stratos.messaging.adapters.MapAdapter;
 
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
index 2c3529f..2242075 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/Member.java
@@ -20,8 +20,8 @@
 package org.apache.stratos.messaging.domain.topology;
 
 import org.apache.stratos.common.domain.LoadBalancingIPType;
-import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager;
 import org.apache.stratos.messaging.adapters.MapAdapter;
+import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateManager;
 import org.apache.stratos.messaging.domain.topology.lifecycle.LifeCycleStateTransitionBehavior;
 
 import javax.xml.bind.annotation.XmlRootElement;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/signup/ApplicationSignUpAddedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/signup/ApplicationSignUpAddedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/signup/ApplicationSignUpAddedEvent.java
index 543dd11..fec2b2e 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/signup/ApplicationSignUpAddedEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/application/signup/ApplicationSignUpAddedEvent.java
@@ -19,7 +19,6 @@
 
 package org.apache.stratos.messaging.event.application.signup;
 
-import org.apache.stratos.messaging.domain.application.signup.ArtifactRepository;
 import org.apache.stratos.messaging.event.Event;
 
 import java.io.Serializable;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/ArtifactUpdatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/ArtifactUpdatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/ArtifactUpdatedEvent.java
index fea2558..32e3153 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/ArtifactUpdatedEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/notifier/ArtifactUpdatedEvent.java
@@ -18,8 +18,6 @@
  */
 package org.apache.stratos.messaging.event.instance.notifier;
 
-import org.apache.stratos.messaging.event.tenant.TenantEvent;
-
 import java.io.Serializable;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java
index 3207a04..58c731a 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/instance/status/InstanceActivatedEvent.java
@@ -19,8 +19,6 @@
 
 package org.apache.stratos.messaging.event.instance.status;
 
-import org.apache.stratos.messaging.event.topology.TopologyEvent;
-
 import java.io.Serializable;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/tenant/TenantSubscribedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/tenant/TenantSubscribedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/tenant/TenantSubscribedEvent.java
index d89de12..3947738 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/tenant/TenantSubscribedEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/tenant/TenantSubscribedEvent.java
@@ -20,7 +20,8 @@
 package org.apache.stratos.messaging.event.tenant;
 
 import java.io.Serializable;
-import java.util.*;
+import java.util.Collections;
+import java.util.Set;
 
 /**
  * This event is fired when a tenant is subscribed to a service.

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/MemberActivatedEvent.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/MemberActivatedEvent.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/MemberActivatedEvent.java
index a14cd51..05c0ca8 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/MemberActivatedEvent.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/topology/MemberActivatedEvent.java
@@ -19,14 +19,10 @@
 
 package org.apache.stratos.messaging.event.topology;
 
-import java.io.Serializable;
-import java.util.*;
-
 import org.apache.stratos.messaging.domain.topology.Port;
 
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
+import java.io.Serializable;
+import java.util.*;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/MessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/MessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/MessageProcessor.java
index e44bcaf..64078d4 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/MessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/MessageProcessor.java
@@ -19,7 +19,6 @@
 
 package org.apache.stratos.messaging.message.processor;
 
-import org.apache.stratos.messaging.domain.topology.Topology;
 import org.apache.stratos.messaging.event.EventObservable;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/signup/ApplicationSignUpMessageProcessorChain.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/signup/ApplicationSignUpMessageProcessorChain.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/signup/ApplicationSignUpMessageProcessorChain.java
index 85be672..c1a63f7 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/signup/ApplicationSignUpMessageProcessorChain.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/application/signup/ApplicationSignUpMessageProcessorChain.java
@@ -25,8 +25,6 @@ import org.apache.stratos.messaging.listener.EventListener;
 import org.apache.stratos.messaging.listener.application.signup.ApplicationSignUpAddedEventListener;
 import org.apache.stratos.messaging.listener.application.signup.ApplicationSignUpRemovedEventListener;
 import org.apache.stratos.messaging.listener.application.signup.CompleteApplicationSignUpsEventListener;
-import org.apache.stratos.messaging.listener.domain.mapping.DomainMappingAddedEventListener;
-import org.apache.stratos.messaging.listener.domain.mapping.DomainMappingRemovedEventListener;
 import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/cluster/status/ClusterStatusMessageProcessorChain.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/cluster/status/ClusterStatusMessageProcessorChain.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/cluster/status/ClusterStatusMessageProcessorChain.java
index eabb620..720dcee 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/cluster/status/ClusterStatusMessageProcessorChain.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/cluster/status/ClusterStatusMessageProcessorChain.java
@@ -20,7 +20,6 @@ package org.apache.stratos.messaging.message.processor.cluster.status;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.event.cluster.status.ClusterStatusClusterCreatedEvent;
 import org.apache.stratos.messaging.listener.EventListener;
 import org.apache.stratos.messaging.listener.cluster.status.*;
 import org.apache.stratos.messaging.message.processor.MessageProcessorChain;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/instance/status/InstanceStatusMessageProcessorChain.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/instance/status/InstanceStatusMessageProcessorChain.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/instance/status/InstanceStatusMessageProcessorChain.java
index 8b493b8..8e6a7de 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/instance/status/InstanceStatusMessageProcessorChain.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/instance/status/InstanceStatusMessageProcessorChain.java
@@ -22,17 +22,11 @@ package org.apache.stratos.messaging.message.processor.instance.status;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.messaging.listener.EventListener;
-import org.apache.stratos.messaging.listener.instance.notifier.ArtifactUpdateEventListener;
-import org.apache.stratos.messaging.listener.instance.notifier.InstanceCleanupClusterEventListener;
-import org.apache.stratos.messaging.listener.instance.notifier.InstanceCleanupMemberEventListener;
 import org.apache.stratos.messaging.listener.instance.status.InstanceActivatedEventListener;
 import org.apache.stratos.messaging.listener.instance.status.InstanceMaintenanceListener;
 import org.apache.stratos.messaging.listener.instance.status.InstanceReadyToShutdownEventListener;
 import org.apache.stratos.messaging.listener.instance.status.InstanceStartedEventListener;
 import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
-import org.apache.stratos.messaging.message.processor.instance.notifier.ArtifactUpdateMessageProcessor;
-import org.apache.stratos.messaging.message.processor.instance.notifier.InstanceCleanupClusterNotifierMessageProcessor;
-import org.apache.stratos.messaging.message.processor.instance.notifier.InstanceCleanupMemberNotifierMessageProcessor;
 
 /**
  * Defines default instance notifier message processor chain.

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java
index 0382f4e..53c6085 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/tenant/TenantMessageProcessorChain.java
@@ -22,7 +22,10 @@ package org.apache.stratos.messaging.message.processor.tenant;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.messaging.listener.EventListener;
-import org.apache.stratos.messaging.listener.tenant.*;
+import org.apache.stratos.messaging.listener.tenant.CompleteTenantEventListener;
+import org.apache.stratos.messaging.listener.tenant.TenantCreatedEventListener;
+import org.apache.stratos.messaging.listener.tenant.TenantRemovedEventListener;
+import org.apache.stratos.messaging.listener.tenant.TenantUpdatedEventListener;
 import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterCreatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterCreatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterCreatedMessageProcessor.java
index 8a083cc..036fe19 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterCreatedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/ClusterCreatedMessageProcessor.java
@@ -20,7 +20,9 @@ package org.apache.stratos.messaging.message.processor.topology;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.domain.topology.*;
+import org.apache.stratos.messaging.domain.topology.Cluster;
+import org.apache.stratos.messaging.domain.topology.Service;
+import org.apache.stratos.messaging.domain.topology.Topology;
 import org.apache.stratos.messaging.event.topology.ClusterCreatedEvent;
 import org.apache.stratos.messaging.message.filter.topology.TopologyClusterFilter;
 import org.apache.stratos.messaging.message.filter.topology.TopologyServiceFilter;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberActivatedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberActivatedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberActivatedMessageProcessor.java
index cb83343..99ca9b8 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberActivatedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberActivatedMessageProcessor.java
@@ -20,11 +20,7 @@ package org.apache.stratos.messaging.message.processor.topology;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.domain.topology.Cluster;
-import org.apache.stratos.messaging.domain.topology.Member;
-import org.apache.stratos.messaging.domain.topology.MemberStatus;
-import org.apache.stratos.messaging.domain.topology.Service;
-import org.apache.stratos.messaging.domain.topology.Topology;
+import org.apache.stratos.messaging.domain.topology.*;
 import org.apache.stratos.messaging.event.topology.MemberActivatedEvent;
 import org.apache.stratos.messaging.message.filter.topology.TopologyClusterFilter;
 import org.apache.stratos.messaging.message.filter.topology.TopologyMemberFilter;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberStartedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberStartedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberStartedMessageProcessor.java
index 20e44f2..51345e9 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberStartedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberStartedMessageProcessor.java
@@ -20,11 +20,7 @@ package org.apache.stratos.messaging.message.processor.topology;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.domain.topology.Cluster;
-import org.apache.stratos.messaging.domain.topology.Member;
-import org.apache.stratos.messaging.domain.topology.MemberStatus;
-import org.apache.stratos.messaging.domain.topology.Service;
-import org.apache.stratos.messaging.domain.topology.Topology;
+import org.apache.stratos.messaging.domain.topology.*;
 import org.apache.stratos.messaging.event.topology.MemberStartedEvent;
 import org.apache.stratos.messaging.message.filter.topology.TopologyClusterFilter;
 import org.apache.stratos.messaging.message.filter.topology.TopologyMemberFilter;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberSuspendedMessageProcessor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberSuspendedMessageProcessor.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberSuspendedMessageProcessor.java
index 4e0021a..da56970 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberSuspendedMessageProcessor.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/processor/topology/MemberSuspendedMessageProcessor.java
@@ -20,11 +20,7 @@ package org.apache.stratos.messaging.message.processor.topology;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.messaging.domain.topology.Cluster;
-import org.apache.stratos.messaging.domain.topology.Member;
-import org.apache.stratos.messaging.domain.topology.MemberStatus;
-import org.apache.stratos.messaging.domain.topology.Service;
-import org.apache.stratos.messaging.domain.topology.Topology;
+import org.apache.stratos.messaging.domain.topology.*;
 import org.apache.stratos.messaging.event.topology.MemberSuspendedEvent;
 import org.apache.stratos.messaging.message.filter.topology.TopologyClusterFilter;
 import org.apache.stratos.messaging.message.filter.topology.TopologyMemberFilter;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageListener.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageListener.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageListener.java
index 8df6277..2abfc71 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageListener.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageListener.java
@@ -24,8 +24,6 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.messaging.broker.subscribe.MessageListener;
 import org.apache.stratos.messaging.domain.Message;
 
-import javax.jms.JMSException;
-
 /**
  * Implements functionality for receiving text based event messages from the
  * instance notifier

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageQueue.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageQueue.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageQueue.java
index 4441a54..a0f2878 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageQueue.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/cluster/status/ClusterStatusEventMessageQueue.java
@@ -21,7 +21,6 @@ package org.apache.stratos.messaging.message.receiver.cluster.status;
 
 import org.apache.stratos.messaging.domain.Message;
 
-import javax.jms.TextMessage;
 import java.util.concurrent.LinkedBlockingQueue;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageDelegator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageDelegator.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageDelegator.java
index 58f5a76..2cde2a9 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageDelegator.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageDelegator.java
@@ -26,8 +26,6 @@ import org.apache.stratos.messaging.listener.EventListener;
 import org.apache.stratos.messaging.message.processor.MessageProcessorChain;
 import org.apache.stratos.messaging.message.processor.health.stat.HealthStatMessageProcessorChain;
 
-import javax.jms.TextMessage;
-
 
 /**
  * Implements logic for processing health stat event messages based on a given

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageQueue.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageQueue.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageQueue.java
index 7ed9b09..387c614 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageQueue.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/health/stat/HealthStatEventMessageQueue.java
@@ -22,7 +22,6 @@ package org.apache.stratos.messaging.message.receiver.health.stat;
 
 import org.apache.stratos.messaging.domain.Message;
 
-import javax.jms.TextMessage;
 import java.util.concurrent.LinkedBlockingQueue;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/notifier/InstanceNotifierEventMessageQueue.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/notifier/InstanceNotifierEventMessageQueue.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/notifier/InstanceNotifierEventMessageQueue.java
index e22edf8..bd23400 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/notifier/InstanceNotifierEventMessageQueue.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/notifier/InstanceNotifierEventMessageQueue.java
@@ -21,7 +21,6 @@ package org.apache.stratos.messaging.message.receiver.instance.notifier;
 
 import org.apache.stratos.messaging.domain.Message;
 
-import javax.jms.TextMessage;
 import java.util.concurrent.LinkedBlockingQueue;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/status/InstanceStatusEventMessageQueue.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/status/InstanceStatusEventMessageQueue.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/status/InstanceStatusEventMessageQueue.java
index 1e67815..93802a4 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/status/InstanceStatusEventMessageQueue.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/instance/status/InstanceStatusEventMessageQueue.java
@@ -21,7 +21,6 @@ package org.apache.stratos.messaging.message.receiver.instance.status;
 
 import org.apache.stratos.messaging.domain.Message;
 
-import javax.jms.TextMessage;
 import java.util.concurrent.LinkedBlockingQueue;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/tenant/TenantEventMessageQueue.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/tenant/TenantEventMessageQueue.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/tenant/TenantEventMessageQueue.java
index 112473b..f0788e2 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/tenant/TenantEventMessageQueue.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/tenant/TenantEventMessageQueue.java
@@ -21,7 +21,6 @@ package org.apache.stratos.messaging.message.receiver.tenant;
 
 import org.apache.stratos.messaging.domain.Message;
 
-import javax.jms.TextMessage;
 import java.util.concurrent.LinkedBlockingQueue;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyEventMessageQueue.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyEventMessageQueue.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyEventMessageQueue.java
index 1e6b8fa..59d2871 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyEventMessageQueue.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/message/receiver/topology/TopologyEventMessageQueue.java
@@ -21,7 +21,6 @@ package org.apache.stratos.messaging.message.receiver.topology;
 
 import org.apache.stratos.messaging.domain.Message;
 
-import javax.jms.TextMessage;
 import java.util.concurrent.LinkedBlockingQueue;
 
 /**

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/MessagingUtil.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/MessagingUtil.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/MessagingUtil.java
index 158950f..c4bfb9d 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/MessagingUtil.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/util/MessagingUtil.java
@@ -19,11 +19,11 @@
 package org.apache.stratos.messaging.util;
 
 import com.google.gson.Gson;
+import org.apache.commons.lang.math.NumberUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.stratos.messaging.event.Event;
 import org.apache.stratos.messaging.message.JsonMessage;
-import org.apache.commons.lang.math.NumberUtils;
 
 import java.io.File;
 import java.io.FileInputStream;

http://git-wip-us.apache.org/repos/asf/stratos/blob/661e8ad8/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
index a3c6950..2fd3cfc 100644
--- a/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
+++ b/components/org.apache.stratos.messaging/src/test/java/org/apache/stratos/messaging/topology/locking/TopologyLockingTest.java
@@ -19,7 +19,7 @@
 
 package org.apache.stratos.messaging.topology.locking;
 
-import org.apache.stratos.messaging.domain.topology.*;
+import org.apache.stratos.messaging.domain.topology.Topology;
 
 public class TopologyLockingTest {
 


[05/12] stratos git commit: Organize imports in cli tool

Posted by la...@apache.org.
Organize imports in cli tool


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/4e4fcce4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/4e4fcce4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/4e4fcce4

Branch: refs/heads/master
Commit: 4e4fcce4a112a57c02386e2c020dee21838f320a
Parents: 8b895d9
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Apr 29 23:27:02 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Apr 29 23:27:02 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/cli/CliTool.java    |   9 +-
 .../java/org/apache/stratos/cli/Command.java    |  14 +-
 .../org/apache/stratos/cli/CommandContext.java  |  12 +-
 .../apache/stratos/cli/GenericRestClient.java   |  13 +-
 .../stratos/cli/RestCommandLineService.java     | 151 ++++++++++++++-----
 .../apache/stratos/cli/WebClientWrapper.java    |  13 +-
 .../stratos/cli/commands/AddTenantCommand.java  |   2 -
 .../DescribeAutoScalingPolicyCommand.java       |   3 +-
 .../cli/commands/DescribeCartridgeCommand.java  |   3 +-
 .../DescribeDeploymentPolicyCommand.java        |   3 +-
 .../cli/commands/DescribeTenantCommand.java     |   3 +-
 .../stratos/cli/commands/ExitCommand.java       |   4 +-
 .../stratos/cli/commands/HelpCommand.java       |   4 +-
 .../cli/commands/ListCartridgesCommand.java     |   6 +-
 .../RemoveKubernetesClusterCommand.java         |   3 +-
 .../stratos/cli/completer/CommandCompleter.java |  14 +-
 .../cli/completer/StratosFileNameCompleter.java |   7 +-
 .../stratos/cli/exception/ExceptionMapper.java  |   2 -
 .../org/apache/stratos/cli/utils/CliUtils.java  |   1 +
 19 files changed, 159 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java
index 52a99ea..3a3cfb2 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CliTool.java
@@ -18,12 +18,12 @@
  */
 package org.apache.stratos.cli;
 
-import static org.apache.stratos.cli.utils.CliConstants.STRATOS_DIR;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import static org.apache.stratos.cli.utils.CliConstants.STRATOS_DIR;
 
 /**
  * This class is used for input the commands through CLITool, command prompt.
@@ -35,8 +35,7 @@ public class CliTool {
     /**
      * Here is the place all the command line inputs get processed
      *
-     * @param arguments
-     *            passed to CLI tool.
+     * @param arguments passed to CLI tool.
      */
     void handleConsoleInputs(String[] arguments) {
         if (log.isInfoEnabled()) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java
index 4877090..dc100c5 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/Command.java
@@ -38,7 +38,7 @@ public interface Command<T extends CommandContext> {
 
     /**
      * This should return the syntax required for the command.
-     *
+     * <p/>
      * Used to display help.
      *
      * @return The syntax for this command
@@ -55,15 +55,11 @@ public interface Command<T extends CommandContext> {
     /**
      * Executing the commands. Returns a code
      *
-     * @param context
-     *            The context assoicated with the Command Line Application
-     * @param args
-     *            The arguments for the command
-     * @param alreadyParsedOpts
-     *            Options parsed by any parent parsers.
+     * @param context           The context assoicated with the Command Line Application
+     * @param args              The arguments for the command
+     * @param alreadyParsedOpts Options parsed by any parent parsers.
      * @return The status code
-     * @throws org.apache.stratos.cli.exception.CommandException
-     *             if any errors occur when executing the command
+     * @throws org.apache.stratos.cli.exception.CommandException if any errors occur when executing the command
      */
     int execute(T context, String[] args, Option[] alreadyParsedOpts) throws CommandException;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java
index 01ad547..2df5756 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/CommandContext.java
@@ -46,10 +46,8 @@ public class CommandContext extends Observable {
     /**
      * Set property in the context
      *
-     * @param key
-     *            The key
-     * @param o
-     *            The value for the key
+     * @param key The key
+     * @param o   The value for the key
      * @return The previous value or null
      */
     public Object put(String key, Object o) {
@@ -62,8 +60,7 @@ public class CommandContext extends Observable {
     /**
      * Get property value from the context
      *
-     * @param key
-     *            The key
+     * @param key The key
      * @return The value
      */
     public Object getObject(String key) {
@@ -73,8 +70,7 @@ public class CommandContext extends Observable {
     /**
      * Get the string value, or null
      *
-     * @param key
-     *            The key
+     * @param key The key
      * @return The string value, or null.
      */
     public String getString(String key) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java
index 497c863..157a46e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/GenericRestClient.java
@@ -28,24 +28,21 @@ public interface GenericRestClient {
     /**
      * Handle http post request. Return String
      *
-     * @param resourcePath
-     *              This should be REST endpoint
-     * @param jsonParamString
-     *              The json string which should be executed from the post request
+     * @param resourcePath    This should be REST endpoint
+     * @param jsonParamString The json string which should be executed from the post request
      * @return The HttpResponse
      * @throws org.apache.http.client.ClientProtocolException and IOException
-     *             if any errors occur when executing the request
+     *                                                        if any errors occur when executing the request
      */
     public HttpResponse doPost(DefaultHttpClient httpClient, String resourcePath, String jsonParamString) throws Exception;
 
     /**
      * Handle http get request. Return String
      *
-     * @param resourcePath
-     *              This should be REST endpoint
+     * @param resourcePath This should be REST endpoint
      * @return The HttpResponse
      * @throws org.apache.http.client.ClientProtocolException and IOException
-     *             if any errors occur when executing the request
+     *                                                        if any errors occur when executing the request
      */
     public HttpResponse doGet(DefaultHttpClient httpClient, String resourcePath) throws Exception;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
index 7112fa1..2e5127f 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java
@@ -152,9 +152,10 @@ public class RestCommandLineService {
 
     /**
      * Authenticate and login to stratos server.
-     * @param serverURL URL of the server
-     * @param username username
-     * @param password password
+     *
+     * @param serverURL     URL of the server
+     * @param username      username
+     * @param password      password
      * @param validateLogin validate login
      * @return boolean
      * @throws Exception
@@ -238,9 +239,10 @@ public class RestCommandLineService {
 
     /**
      * Initialize the rest client and set username and password of the user
+     *
      * @param serverURL server URL
-     * @param username username
-     * @param password password
+     * @param username  username
+     * @param password  password
      * @throws AxisFault
      */
     private void initializeRestClient(String serverURL, String username, String password) throws AxisFault {
@@ -267,6 +269,7 @@ public class RestCommandLineService {
 
     /**
      * List available cartridges
+     *
      * @throws CommandException
      */
     public void listCartridges() throws CommandException {
@@ -308,6 +311,7 @@ public class RestCommandLineService {
 
     /**
      * List cartridges By Filter
+     *
      * @param filter cartridge-type
      * @throws CommandException
      */
@@ -353,6 +357,7 @@ public class RestCommandLineService {
 
     /**
      * List cartridge groups
+     *
      * @throws CommandException
      */
     public void listCartridgeGroups() throws CommandException {
@@ -389,6 +394,7 @@ public class RestCommandLineService {
 
     /**
      * Describe a cartridge
+     *
      * @param cartridgeType Type of the cartridge
      * @throws CommandException
      */
@@ -464,12 +470,13 @@ public class RestCommandLineService {
 
     /**
      * Add new tenant
-     * @param admin username
+     *
+     * @param admin     username
      * @param firstName first name
-     * @param lastName last name
-     * @param password password
-     * @param domain domain name
-     * @param email email
+     * @param lastName  last name
+     * @param password  password
+     * @param domain    domain name
+     * @param email     email
      * @throws CommandException
      */
     public void addTenant(String admin, String firstName, String lastName, String password, String domain, String email)
@@ -507,6 +514,7 @@ public class RestCommandLineService {
 
     /**
      * Describe a tenant
+     *
      * @param domainName domain name
      * @throws org.apache.stratos.cli.exception.CommandException
      */
@@ -547,6 +555,7 @@ public class RestCommandLineService {
 
     /**
      * List tenants by a partial domain search
+     *
      * @param partialDomain Part of the domain name
      * @throws org.apache.stratos.cli.exception.CommandException
      */
@@ -587,13 +596,14 @@ public class RestCommandLineService {
 
     /**
      * Update an existing tenant
-     * @param id tenant id
-     * @param admin username
+     *
+     * @param id        tenant id
+     * @param admin     username
      * @param firstName first name
-     * @param lastName last name
-     * @param password password
-     * @param domain domain name
-     * @param email email
+     * @param lastName  last name
+     * @param password  password
+     * @param domain    domain name
+     * @param email     email
      * @throws CommandException
      */
     public void updateTenant(int id, String admin, String firstName, String lastName, String password, String domain, String email)
@@ -633,12 +643,13 @@ public class RestCommandLineService {
 
     /**
      * Add user
-     * @param userName username
-     * @param credential password
-     * @param role user role
-     * @param firstName first name
-     * @param lastName last name
-     * @param email email
+     *
+     * @param userName    username
+     * @param credential  password
+     * @param role        user role
+     * @param firstName   first name
+     * @param lastName    last name
+     * @param email       email
      * @param profileName profile name
      * @throws CommandException
      */
@@ -679,12 +690,13 @@ public class RestCommandLineService {
 
     /**
      * Update user
-     * @param userName username
-     * @param credential password
-     * @param role user role
-     * @param firstName first name
-     * @param lastName last name
-     * @param email email
+     *
+     * @param userName    username
+     * @param credential  password
+     * @param role        user role
+     * @param firstName   first name
+     * @param lastName    last name
+     * @param email       email
      * @param profileName profile name
      * @throws CommandException
      */
@@ -725,6 +737,7 @@ public class RestCommandLineService {
 
     /**
      * Delete tenant
+     *
      * @param tenantDomain domain name of the tenant
      * @throws CommandException
      */
@@ -757,6 +770,7 @@ public class RestCommandLineService {
 
     /**
      * Delete user
+     *
      * @param userName username
      * @throws CommandException
      */
@@ -789,6 +803,7 @@ public class RestCommandLineService {
 
     /**
      * Deactivate tenant
+     *
      * @param tenantDomain domain name of the tenant
      * @throws CommandException
      */
@@ -822,6 +837,7 @@ public class RestCommandLineService {
 
     /**
      * Activate tenant
+     *
      * @param tenantDomain domain name of the tenant
      * @throws CommandException
      */
@@ -854,6 +870,7 @@ public class RestCommandLineService {
 
     /**
      * List tenants
+     *
      * @throws CommandException
      */
     public void listTenants() throws CommandException {
@@ -893,6 +910,7 @@ public class RestCommandLineService {
 
     /**
      * List all users
+     *
      * @throws CommandException
      */
     public void listAllUsers() throws CommandException {
@@ -929,6 +947,7 @@ public class RestCommandLineService {
 
     /**
      * Add cartridge
+     *
      * @param cartridgeDefinition cartridge definition
      * @throws CommandException
      */
@@ -938,6 +957,7 @@ public class RestCommandLineService {
 
     /**
      * Update cartridge
+     *
      * @param cartridgeDefinition cartridge definition
      * @throws CommandException
      */
@@ -947,6 +967,7 @@ public class RestCommandLineService {
 
     /**
      * Undeploy cartridge
+     *
      * @param cartridgeId cartridge Id
      * @throws CommandException
      */
@@ -956,6 +977,7 @@ public class RestCommandLineService {
 
     /**
      * Deploy autoscaling policy
+     *
      * @param autoScalingPolicy autoscaling policy definition
      * @throws CommandException
      */
@@ -965,6 +987,7 @@ public class RestCommandLineService {
 
     /**
      * Update autoscaling policy
+     *
      * @param autoScalingPolicy autoscaling policy definition
      * @throws CommandException
      */
@@ -974,6 +997,7 @@ public class RestCommandLineService {
 
     /**
      * List applications
+     *
      * @throws CommandException
      */
     public void listApplications() throws CommandException {
@@ -1011,6 +1035,7 @@ public class RestCommandLineService {
 
     /**
      * List autoscaling policies
+     *
      * @throws CommandException
      */
     public void listAutoscalingPolicies() throws CommandException {
@@ -1048,6 +1073,7 @@ public class RestCommandLineService {
 
     /**
      * Describe deployment policy
+     *
      * @param deploymentPolicyId deployment policy id
      * @throws CommandException
      */
@@ -1071,6 +1097,7 @@ public class RestCommandLineService {
 
     /**
      * Describe application policy
+     *
      * @param applicationPolicyId application policy id
      * @throws CommandException
      */
@@ -1094,6 +1121,7 @@ public class RestCommandLineService {
 
     /**
      * Describe autoscaling policy
+     *
      * @param autoscalingPolicyId application policy id
      * @throws CommandException
      */
@@ -1117,6 +1145,7 @@ public class RestCommandLineService {
 
     /**
      * Add Kubernetes Cluster
+     *
      * @param entityBody Kubernetes Cluster definition
      * @throws CommandException
      */
@@ -1126,6 +1155,7 @@ public class RestCommandLineService {
 
     /**
      * List Kubernetes Clusters
+     *
      * @throws CommandException
      */
     public void listKubernetesClusters() throws CommandException {
@@ -1159,6 +1189,7 @@ public class RestCommandLineService {
 
     /**
      * Undeploy Kubernetes Cluster
+     *
      * @param clusterId cluster id
      * @throws CommandException
      */
@@ -1168,8 +1199,9 @@ public class RestCommandLineService {
 
     /**
      * Add Kubernetes Host
+     *
      * @param entityBody kubernetes host definition
-     * @param clusterId cluster id
+     * @param clusterId  cluster id
      * @throws CommandException
      */
     public void addKubernetesHost(String entityBody, String clusterId) throws CommandException {
@@ -1201,6 +1233,7 @@ public class RestCommandLineService {
 
     /**
      * List Kubernetes Hosts
+     *
      * @param clusterId cluster id
      * @throws CommandException
      */
@@ -1242,6 +1275,7 @@ public class RestCommandLineService {
 
     /**
      * Get the master of a Kubernetes Cluster
+     *
      * @param clusterId cluster id
      * @throws CommandException
      */
@@ -1268,6 +1302,7 @@ public class RestCommandLineService {
 
     /**
      * Describe a Kubernetes cluster
+     *
      * @param clusterId cluster id
      * @throws CommandException
      */
@@ -1294,7 +1329,8 @@ public class RestCommandLineService {
 
     /**
      * Add Domain mappings
-     * @param applicationId application id
+     *
+     * @param applicationId       application id
      * @param resourceFileContent domain mapping definition
      * @throws CommandException
      */
@@ -1305,6 +1341,7 @@ public class RestCommandLineService {
 
     /**
      * List domain mappings
+     *
      * @param applicationId application id
      * @throws CommandException
      */
@@ -1341,6 +1378,7 @@ public class RestCommandLineService {
 
     /**
      * Remove Domain Mappings
+     *
      * @param applicationId application id
      * @throws CommandException
      */
@@ -1351,8 +1389,9 @@ public class RestCommandLineService {
 
     /**
      * Undeploy Kubernetes Host
+     *
      * @param clusterId cluster id
-     * @param hostId host id
+     * @param hostId    host id
      * @throws CommandException
      */
     public void undeployKubernetesHost(String clusterId, String hostId) throws CommandException {
@@ -1361,8 +1400,9 @@ public class RestCommandLineService {
 
     /**
      * Update Kubernetes Master
+     *
      * @param entityBody Kubernetes master definition
-     * @param clusterId cluster id
+     * @param clusterId  cluster id
      * @throws CommandException
      */
     public void updateKubernetesMaster(String entityBody, String clusterId) throws CommandException {
@@ -1372,9 +1412,10 @@ public class RestCommandLineService {
 
     /**
      * Update Kubernetes Host
+     *
      * @param entityBody Kubernetes host definition
-     * @param clusterId cluster id
-     * @param hostId host id
+     * @param clusterId  cluster id
+     * @param hostId     host id
      * @throws CommandException
      */
     public void updateKubernetesHost(String entityBody, String clusterId, String hostId) throws CommandException {
@@ -1384,6 +1425,7 @@ public class RestCommandLineService {
 
     /**
      * Synchronize artifacts
+     *
      * @param cartridgeAlias alias of the cartridge
      * @throws CommandException
      */
@@ -1413,6 +1455,7 @@ public class RestCommandLineService {
 
     /**
      * Add cartridge group
+     *
      * @param entityBody cartridge group definition
      * @throws CommandException
      */
@@ -1422,6 +1465,7 @@ public class RestCommandLineService {
 
     /**
      * Undeploy Cartridge group
+     *
      * @param groupDefinitionName cartridge group name
      * @throws CommandException
      */
@@ -1431,6 +1475,7 @@ public class RestCommandLineService {
 
     /**
      * Describe service group
+     *
      * @param groupDefinitionName cartridge group name
      * @throws CommandException
      */
@@ -1454,6 +1499,7 @@ public class RestCommandLineService {
 
     /**
      * Add application
+     *
      * @param entityBody application definition
      * @throws CommandException
      */
@@ -1463,7 +1509,8 @@ public class RestCommandLineService {
 
     /**
      * Deploy application
-     * @param applicationId application id
+     *
+     * @param applicationId       application id
      * @param applicationPolicyId application policy id
      * @throws CommandException
      */
@@ -1499,6 +1546,7 @@ public class RestCommandLineService {
 
     /**
      * Undeploy application
+     *
      * @param applicationId application id
      * @throws CommandException
      */
@@ -1531,9 +1579,9 @@ public class RestCommandLineService {
 
     /**
      * Remove application
-     * @param applicationId  application id
-     * @throws CommandException
-     * This method helps to remove applications
+     *
+     * @param applicationId application id
+     * @throws CommandException This method helps to remove applications
      */
     public void deleteApplication(String applicationId) throws CommandException {
         restClient.deleteEntity(ENDPOINT_REMOVE_APPLICATION.replace("{appId}", applicationId), applicationId,
@@ -1542,7 +1590,8 @@ public class RestCommandLineService {
 
     /**
      * Delete autoscaling policy
-     * @param autoscalingPolicyId  autoscaling policy id
+     *
+     * @param autoscalingPolicyId autoscaling policy id
      * @throws CommandException
      */
     public void deleteAutoSclaingPolicy(String autoscalingPolicyId) throws CommandException {
@@ -1552,6 +1601,7 @@ public class RestCommandLineService {
 
     /**
      * Describe application
+     *
      * @param applicationId application id
      * @throws CommandException
      */
@@ -1576,6 +1626,7 @@ public class RestCommandLineService {
 
     /**
      * Describe application runtime
+     *
      * @param applicationId application id
      * @throws CommandException
      */
@@ -1600,8 +1651,9 @@ public class RestCommandLineService {
 
     /**
      * Add application signup
+     *
      * @param applicationId application id
-     * @param entityBody application signup definition
+     * @param entityBody    application signup definition
      * @throws CommandException
      */
     public void addApplicationSignup(String entityBody, String applicationId) throws CommandException {
@@ -1610,6 +1662,7 @@ public class RestCommandLineService {
 
     /**
      * Describe application signup
+     *
      * @param applicationId application id
      * @throws CommandException
      */
@@ -1633,6 +1686,7 @@ public class RestCommandLineService {
 
     /**
      * Delete application signup
+     *
      * @param applicationId application id
      * @throws CommandException
      */
@@ -1643,6 +1697,7 @@ public class RestCommandLineService {
 
     /**
      * Handle exception
+     *
      * @throws CommandException
      */
     private void handleException(String key, Exception e, Object... args) throws CommandException {
@@ -1658,8 +1713,9 @@ public class RestCommandLineService {
 
     /**
      * Print error on console and log
+     *
      * @param message message
-     * @param e exception
+     * @param e       exception
      */
     private void printError(String message, Throwable e) {
         // CLI console only get system output
@@ -1670,6 +1726,7 @@ public class RestCommandLineService {
 
     /**
      * Add network partitions
+     *
      * @param networkPartitionDefinition network partition definition
      * @throws CommandException
      */
@@ -1679,6 +1736,7 @@ public class RestCommandLineService {
 
     /**
      * Remove network partition
+     *
      * @param networkPartitionId application id
      * @throws CommandException
      */
@@ -1689,6 +1747,7 @@ public class RestCommandLineService {
 
     /**
      * List network partitions
+     *
      * @throws CommandException
      */
     public void listNetworkPartitions() throws CommandException {
@@ -1726,6 +1785,7 @@ public class RestCommandLineService {
 
     /**
      * Update network partitions
+     *
      * @param networkPartitionDefinition network partition definition
      * @throws CommandException
      */
@@ -1735,6 +1795,7 @@ public class RestCommandLineService {
 
     /**
      * Describe a network partition
+     *
      * @param partitionId partition id
      * @throws CommandException
      */
@@ -1759,6 +1820,7 @@ public class RestCommandLineService {
 
     /**
      * Deploy deployment policy
+     *
      * @param deploymentPolicy deployment policy definition
      * @throws CommandException
      */
@@ -1768,6 +1830,7 @@ public class RestCommandLineService {
 
     /**
      * Deploy application policy
+     *
      * @param applicationPolicy application policy definition
      * @throws CommandException
      */
@@ -1777,6 +1840,7 @@ public class RestCommandLineService {
 
     /**
      * Update deployment policy
+     *
      * @param deploymentPolicy deployment policy definition
      * @throws CommandException
      */
@@ -1786,6 +1850,7 @@ public class RestCommandLineService {
 
     /**
      * Delete deployment policy
+     *
      * @param deploymentPolicyId deployment policy definition
      * @throws CommandException
      */
@@ -1796,6 +1861,7 @@ public class RestCommandLineService {
 
     /**
      * List deployment policies
+     *
      * @throws CommandException
      */
     public void listDeploymentPolicies() throws CommandException {
@@ -1833,6 +1899,7 @@ public class RestCommandLineService {
 
     /**
      * List application policies
+     *
      * @throws CommandException
      */
     public void listApplicationPolicies() throws CommandException {
@@ -1872,6 +1939,7 @@ public class RestCommandLineService {
     /**
      * Delete application policy
      * param applicationPolicyId application policy id
+     *
      * @throws CommandException
      */
     public void deleteApplicationPolicy(String applicationPolicyId) throws CommandException {
@@ -1881,6 +1949,7 @@ public class RestCommandLineService {
 
     /**
      * Update application policy
+     *
      * @param applicationPolicy application policy definition
      * @throws CommandException
      */

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java
index 987c5f6..6c5d0b9 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/WebClientWrapper.java
@@ -18,13 +18,6 @@
  */
 package org.apache.stratos.cli;
 
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
 import org.apache.http.client.HttpClient;
 import org.apache.http.conn.ClientConnectionManager;
 import org.apache.http.conn.scheme.Scheme;
@@ -32,6 +25,12 @@ import org.apache.http.conn.scheme.SchemeRegistry;
 import org.apache.http.conn.ssl.SSLSocketFactory;
 import org.apache.http.impl.client.DefaultHttpClient;
 
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
 public class WebClientWrapper {
 
     public static HttpClient wrapClient(HttpClient base) {

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java
index b6283c2..17f50cc 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/AddTenantCommand.java
@@ -26,8 +26,6 @@ import org.apache.stratos.cli.exception.CommandException;
 import org.apache.stratos.cli.utils.CliConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.Option;
 
 import static org.apache.stratos.cli.utils.CliUtils.mergeOptionArrays;
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java
index a37fbb1..bacc726 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeAutoScalingPolicyCommand.java
@@ -18,7 +18,8 @@
  */
 package org.apache.stratos.cli.commands;
 
-import org.apache.commons.cli.*;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
 import org.apache.stratos.cli.Command;
 import org.apache.stratos.cli.RestCommandLineService;
 import org.apache.stratos.cli.StratosCommandContext;

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java
index 323a736..31038d7 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeCartridgeCommand.java
@@ -18,7 +18,8 @@
  */
 package org.apache.stratos.cli.commands;
 
-import org.apache.commons.cli.*;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
 import org.apache.stratos.cli.Command;
 import org.apache.stratos.cli.RestCommandLineService;
 import org.apache.stratos.cli.StratosCommandContext;

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java
index b209c2e..c339c30 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeDeploymentPolicyCommand.java
@@ -18,7 +18,8 @@
  */
 package org.apache.stratos.cli.commands;
 
-import org.apache.commons.cli.*;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
 import org.apache.stratos.cli.Command;
 import org.apache.stratos.cli.RestCommandLineService;
 import org.apache.stratos.cli.StratosCommandContext;

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java
index 3217c94..14087fb 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/DescribeTenantCommand.java
@@ -29,7 +29,8 @@ import org.apache.stratos.cli.utils.CliConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**nant
+/**
+ * nant
  * Describe te command.
  */
 public class DescribeTenantCommand implements Command<StratosCommandContext> {

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java
index 03b83d2..bc65a5b 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ExitCommand.java
@@ -20,12 +20,12 @@ package org.apache.stratos.cli.commands;
 
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.stratos.cli.Command;
 import org.apache.stratos.cli.StratosCommandContext;
 import org.apache.stratos.cli.exception.CommandException;
 import org.apache.stratos.cli.utils.CliConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Exit from stratos client tool

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java
index 082270f..e2e7c67 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/HelpCommand.java
@@ -20,12 +20,12 @@ package org.apache.stratos.cli.commands;
 
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.stratos.cli.Command;
 import org.apache.stratos.cli.StratosCommandContext;
 import org.apache.stratos.cli.exception.CommandException;
 import org.apache.stratos.cli.utils.CliConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Help for commands

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java
index d1c82ea..3f6b95e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/ListCartridgesCommand.java
@@ -20,13 +20,13 @@ package org.apache.stratos.cli.commands;
 
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
-import org.apache.stratos.cli.RestCommandLineService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.stratos.cli.Command;
+import org.apache.stratos.cli.RestCommandLineService;
 import org.apache.stratos.cli.StratosCommandContext;
 import org.apache.stratos.cli.exception.CommandException;
 import org.apache.stratos.cli.utils.CliConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * List available cartridges

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java
index 8024edb..336ca0e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/commands/RemoveKubernetesClusterCommand.java
@@ -19,7 +19,8 @@
 
 package org.apache.stratos.cli.commands;
 
-import org.apache.commons.cli.*;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
 import org.apache.stratos.cli.Command;
 import org.apache.stratos.cli.RestCommandLineService;
 import org.apache.stratos.cli.StratosCommandContext;

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java
index 777b9f3..1e58d24 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/CommandCompleter.java
@@ -18,27 +18,21 @@
  */
 package org.apache.stratos.cli.completer;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import jline.console.completer.ArgumentCompleter;
 import jline.console.completer.Completer;
-import jline.console.completer.FileNameCompleter;
 import jline.console.completer.StringsCompleter;
-
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.text.StrTokenizer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.stratos.cli.Command;
 import org.apache.stratos.cli.StratosApplication;
 import org.apache.stratos.cli.StratosCommandContext;
 import org.apache.stratos.cli.utils.CliConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.*;
 
 public class CommandCompleter implements Completer {
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java
index ce98b48..f99455e 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/completer/StratosFileNameCompleter.java
@@ -1,11 +1,10 @@
 package org.apache.stratos.cli.completer;
 
-import java.io.File;
-import java.util.List;
-
+import jline.console.completer.FileNameCompleter;
 import org.apache.stratos.cli.utils.CliConstants;
 
-import jline.console.completer.FileNameCompleter;
+import java.io.File;
+import java.util.List;
 
 public class StratosFileNameCompleter extends FileNameCompleter {
 

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java
index 97c769e..de8d384 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/exception/ExceptionMapper.java
@@ -21,8 +21,6 @@ package org.apache.stratos.cli.exception;
 
 /**
  * To map RestApiException of back-end.
- *
- *
  */
 public class ExceptionMapper {
     @Override

http://git-wip-us.apache.org/repos/asf/stratos/blob/4e4fcce4/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java
index b10ffb6..64aab97 100644
--- a/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java
+++ b/components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/utils/CliUtils.java
@@ -128,6 +128,7 @@ public class CliUtils {
 
     /**
      * Extract HTTP response body as a string
+     *
      * @param response
      * @return
      */