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; + } } }
