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 <[email protected]> Authored: Wed Apr 29 23:27:02 2015 +0530 Committer: Lahiru Sandaruwan <[email protected]> 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 */
