cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [34/51] [partial] Reformat all source code. Added checkstyle to check the source code
Date Wed, 20 Nov 2013 15:35:21 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java
index 71c8f26..ecd33ac 100644
--- a/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java
@@ -47,8 +47,7 @@ public class CreateProjectCmd extends BaseAsyncCreateCmd {
     @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account who will be Admin for the project")
     private String accountName;
 
-    @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class,
-            description = "domain ID of the account owning a project")
+    @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a project")
     private Long domainId;
 
     @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the project")
@@ -61,7 +60,6 @@ public class CreateProjectCmd extends BaseAsyncCreateCmd {
     // ///////////////// Accessors ///////////////////////
     // ///////////////////////////////////////////////////
 
-
     public String getAccountName() {
         if (accountName != null) {
             return accountName;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java
index c3208fb..1b87ac6 100644
--- a/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java
@@ -32,7 +32,7 @@ import com.cloud.event.EventTypes;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.projects.Project;
 
-@APICommand(name = "deleteProject", description="Deletes a project", responseObject=SuccessResponse.class, since="3.0.0")
+@APICommand(name = "deleteProject", description = "Deletes a project", responseObject = SuccessResponse.class, since = "3.0.0")
 public class DeleteProjectCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(DeleteProjectCmd.class.getName());
 
@@ -42,15 +42,13 @@ public class DeleteProjectCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ProjectResponse.class,
-            required=true, description="id of the project to be deleted")
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to be deleted")
     private Long id;
 
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
 
-
     public Long geId() {
         return id;
     }
@@ -65,7 +63,7 @@ public class DeleteProjectCmd extends BaseAsyncCmd {
     /////////////////////////////////////////////////////
 
     @Override
-    public void execute(){
+    public void execute() {
         CallContext.current().setEventDetails("Project Id: " + id);
         boolean result = _projectService.deleteProject(id);
         if (result) {
@@ -83,12 +81,12 @@ public class DeleteProjectCmd extends BaseAsyncCmd {
 
     @Override
     public String getEventDescription() {
-        return  "Deleting project: " + id;
+        return "Deleting project: " + id;
     }
 
     @Override
     public long getEntityOwnerId() {
-        Project project= _projectService.getProject(id);
+        Project project = _projectService.getProject(id);
         //verify input parameters
         if (project == null) {
             throw new InvalidParameterValueException("Unable to find project by id " + id);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java
index 46eb4fd..ba3fc19 100644
--- a/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java
@@ -39,8 +39,7 @@ public class DeleteProjectInvitationCmd extends BaseAsyncCmd {
     // ///////////////////////////////////////////////////
     // ////////////// API parameters /////////////////////
     // ///////////////////////////////////////////////////
-    @Parameter(name = ApiConstants.ID, type=CommandType.UUID, entityType=ProjectInvitationResponse.class,
-            required = true, description = "id of the invitation")
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectInvitationResponse.class, required = true, description = "id of the invitation")
     private Long id;
 
     // ///////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java
index 6e8b2da..41d0975 100644
--- a/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java
@@ -25,7 +25,10 @@ import org.apache.cloudstack.api.response.ProjectInvitationResponse;
 import org.apache.cloudstack.api.response.ProjectResponse;
 import org.apache.log4j.Logger;
 
-@APICommand(name = "listProjectInvitations", description = "Lists projects and provides detailed information for listed projects", responseObject = ProjectInvitationResponse.class, since = "3.0.0")
+@APICommand(name = "listProjectInvitations",
+            description = "Lists projects and provides detailed information for listed projects",
+            responseObject = ProjectInvitationResponse.class,
+            since = "3.0.0")
 public class ListProjectInvitationsCmd extends BaseListAccountResourcesCmd {
     public static final Logger s_logger = Logger.getLogger(ListProjectInvitationsCmd.class.getName());
     private static final String s_name = "listprojectinvitationsresponse";
@@ -33,18 +36,18 @@ public class ListProjectInvitationsCmd extends BaseListAccountResourcesCmd {
     // ///////////////////////////////////////////////////
     // ////////////// API parameters /////////////////////
     // ///////////////////////////////////////////////////
-    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class,
-            description = "list by project id")
+    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "list by project id")
     private Long projectId;
 
-    @Parameter(name = ApiConstants.ACTIVE_ONLY, type = CommandType.BOOLEAN, description = "if true, list only active invitations - having Pending state and ones that are not timed out yet")
+    @Parameter(name = ApiConstants.ACTIVE_ONLY,
+               type = CommandType.BOOLEAN,
+               description = "if true, list only active invitations - having Pending state and ones that are not timed out yet")
     private boolean activeOnly;
 
     @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list invitations by state")
     private String state;
 
-    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType=ProjectInvitationResponse.class,
-            description = "list invitations by id")
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectInvitationResponse.class, description = "list invitations by id")
     private Long id;
 
     // ///////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java
index 08cef10..99d5421 100644
--- a/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java
@@ -31,7 +31,7 @@ import org.apache.log4j.Logger;
 
 import com.cloud.exception.InvalidParameterValueException;
 
-@APICommand(name = "listProjects", description="Lists projects and provides detailed information for listed projects", responseObject=ProjectResponse.class, since="3.0.0")
+@APICommand(name = "listProjects", description = "Lists projects and provides detailed information for listed projects", responseObject = ProjectResponse.class, since = "3.0.0")
 public class ListProjectsCmd extends BaseListAccountResourcesCmd {
     public static final Logger s_logger = Logger.getLogger(ListProjectsCmd.class.getName());
     private static final String s_name = "listprojectsresponse";
@@ -40,17 +40,16 @@ public class ListProjectsCmd extends BaseListAccountResourcesCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ProjectResponse.class,
-            description="list projects by project ID")
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "list projects by project ID")
     private Long id;
 
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list projects by name")
+    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list projects by name")
     private String name;
 
-    @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="list projects by display text")
+    @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "list projects by display text")
     private String displayText;
 
-    @Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="list projects by state")
+    @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list projects by state")
     private String state;
 
     @Parameter(name = ApiConstants.TAGS, type = CommandType.MAP, description = "List projects by tags (key/value pairs)")
@@ -72,7 +71,6 @@ public class ListProjectsCmd extends BaseListAccountResourcesCmd {
         return displayText;
     }
 
-
     public String getState() {
         return state;
     }
@@ -89,7 +87,7 @@ public class ListProjectsCmd extends BaseListAccountResourcesCmd {
             Collection<?> servicesCollection = tags.values();
             Iterator<?> iter = servicesCollection.iterator();
             while (iter.hasNext()) {
-                HashMap<String, String> services = (HashMap<String, String>) iter.next();
+                HashMap<String, String> services = (HashMap<String, String>)iter.next();
                 String key = services.get("key");
                 String value = services.get("value");
                 if (value == null) {
@@ -106,7 +104,7 @@ public class ListProjectsCmd extends BaseListAccountResourcesCmd {
     /////////////////////////////////////////////////////
 
     @Override
-    public void execute(){
+    public void execute() {
         ListResponse<ProjectResponse> response = _queryService.listProjects(this);
         response.setResponseName(getCommandName());
         this.setResponseObject(response);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java
index b5e59ce..c1d073a 100644
--- a/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java
@@ -33,7 +33,7 @@ import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.projects.Project;
 
-@APICommand(name = "suspendProject", description="Suspends a project", responseObject=ProjectResponse.class, since="3.0.0")
+@APICommand(name = "suspendProject", description = "Suspends a project", responseObject = ProjectResponse.class, since = "3.0.0")
 public class SuspendProjectCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(SuspendProjectCmd.class.getName());
 
@@ -43,15 +43,13 @@ public class SuspendProjectCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ProjectResponse.class,
-            required=true, description="id of the project to be suspended")
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to be suspended")
     private Long id;
 
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
 
-
     public Long geId() {
         return id;
     }
@@ -66,7 +64,7 @@ public class SuspendProjectCmd extends BaseAsyncCmd {
     /////////////////////////////////////////////////////
 
     @Override
-    public void execute() throws ConcurrentOperationException, ResourceUnavailableException{
+    public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
         CallContext.current().setEventDetails("Project Id: " + id);
         Project project = _projectService.suspendProject(id);
         if (project != null) {
@@ -85,12 +83,12 @@ public class SuspendProjectCmd extends BaseAsyncCmd {
 
     @Override
     public String getEventDescription() {
-        return  "Suspending project: " + id;
+        return "Suspending project: " + id;
     }
 
     @Override
     public long getEntityOwnerId() {
-        Project project= _projectService.getProject(id);
+        Project project = _projectService.getProject(id);
         //verify input parameters
         if (project == null) {
             throw new InvalidParameterValueException("Unable to find project by id " + id);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java
index ac7de8d..e02ef67 100644
--- a/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java
@@ -32,7 +32,7 @@ import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.projects.Project;
 
-@APICommand(name = "updateProject", description="Updates a project", responseObject=ProjectResponse.class, since="3.0.0")
+@APICommand(name = "updateProject", description = "Updates a project", responseObject = ProjectResponse.class, since = "3.0.0")
 public class UpdateProjectCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(UpdateProjectCmd.class.getName());
 
@@ -42,14 +42,13 @@ public class UpdateProjectCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ProjectResponse.class,
-            required=true, description="id of the project to be modified")
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to be modified")
     private Long id;
 
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="new Admin account for the project")
+    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "new Admin account for the project")
     private String accountName;
 
-    @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="display text of the project")
+    @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "display text of the project")
     private String displayText;
 
     /////////////////////////////////////////////////////
@@ -75,7 +74,7 @@ public class UpdateProjectCmd extends BaseAsyncCmd {
 
     @Override
     public long getEntityOwnerId() {
-        Project project= _projectService.getProject(id);
+        Project project = _projectService.getProject(id);
         //verify input parameters
         if (project == null) {
             throw new InvalidParameterValueException("Unable to find project by id " + id);
@@ -84,14 +83,13 @@ public class UpdateProjectCmd extends BaseAsyncCmd {
         return _projectService.getProjectOwner(id).getId();
     }
 
-
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
 
     @Override
-    public void execute() throws ResourceAllocationException{
-        CallContext.current().setEventDetails("Project id: "+ getId());
+    public void execute() throws ResourceAllocationException {
+        CallContext.current().setEventDetails("Project id: " + getId());
         Project project = _projectService.updateProject(getId(), getDisplayText(), getAccountName());
         if (project != null) {
             ProjectResponse response = _responseGenerator.createProjectResponse(project);
@@ -109,6 +107,6 @@ public class UpdateProjectCmd extends BaseAsyncCmd {
 
     @Override
     public String getEventDescription() {
-        return  "Updating project: " + id;
+        return "Updating project: " + id;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java
index 3ce8890..3b8131f 100644
--- a/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java
@@ -39,8 +39,7 @@ public class UpdateProjectInvitationCmd extends BaseAsyncCmd {
     // ///////////////////////////////////////////////////
     // ////////////// API parameters /////////////////////
     // ///////////////////////////////////////////////////
-    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class,
-            required = true, description = "id of the project to join")
+    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to join")
     private Long projectId;
 
     @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account that is joining the project")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/region/ListRegionsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ListRegionsCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ListRegionsCmd.java
index 07f93a4..f4af27f 100644
--- a/api/src/org/apache/cloudstack/api/command/user/region/ListRegionsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/region/ListRegionsCmd.java
@@ -31,24 +31,25 @@ import org.apache.cloudstack.region.Region;
 import org.apache.cloudstack.region.RegionService;
 import org.apache.log4j.Logger;
 
-@APICommand(name = "listRegions", description="Lists Regions", responseObject=RegionResponse.class)
+@APICommand(name = "listRegions", description = "Lists Regions", responseObject = RegionResponse.class)
 public class ListRegionsCmd extends BaseListCmd {
-	public static final Logger s_logger = Logger.getLogger(ListRegionsCmd.class.getName());
-	
+    public static final Logger s_logger = Logger.getLogger(ListRegionsCmd.class.getName());
+
     private static final String s_name = "listregionsresponse";
 
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.INTEGER, description="List Region by region ID.")
+    @Parameter(name = ApiConstants.ID, type = CommandType.INTEGER, description = "List Region by region ID.")
     private Integer id;
 
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="List Region by region name.")
+    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List Region by region name.")
     private String name;
-    
-    @Inject RegionService _regionService;
-    
+
+    @Inject
+    RegionService _regionService;
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -60,7 +61,7 @@ public class ListRegionsCmd extends BaseListCmd {
     public String getName() {
         return name;
     }
-    
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -71,14 +72,14 @@ public class ListRegionsCmd extends BaseListCmd {
     }
 
     @Override
-    public void execute(){
+    public void execute() {
         List<? extends Region> result = _regionService.listRegions(this);
         ListResponse<RegionResponse> response = new ListResponse<RegionResponse>();
         List<RegionResponse> regionResponses = new ArrayList<RegionResponse>();
         for (Region region : result) {
-        	RegionResponse regionResponse = _responseGenerator.createRegionResponse(region);
-        	regionResponse.setObjectName("region");
-        	regionResponses.add(regionResponse);
+            RegionResponse regionResponse = _responseGenerator.createRegionResponse(region);
+            regionResponse.setObjectName("region");
+            regionResponses.add(regionResponse);
         }
 
         response.setResponses(regionResponses);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java
index f09eef9..aedbe4a 100644
--- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java
@@ -43,33 +43,42 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-@APICommand(name = "assignToGlobalLoadBalancerRule", description="Assign load balancer rule or list of load " +
-        "balancer rules to a global load balancer rules.", responseObject=SuccessResponse.class)
+@APICommand(name = "assignToGlobalLoadBalancerRule",
+            description = "Assign load balancer rule or list of load " + "balancer rules to a global load balancer rules.",
+            responseObject = SuccessResponse.class)
 public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
 
     public static final Logger s_logger = Logger.getLogger(AssignToGlobalLoadBalancerRuleCmd.class.getName());
 
     private static final String s_name = "assigntogloballoadbalancerruleresponse";
 
-    @Inject public EntityManager _entityMgr;
+    @Inject
+    public EntityManager _entityMgr;
 
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = GlobalLoadBalancerResponse.class,
-            required=true, description="the ID of the global load balancer rule")
+    @Parameter(name = ApiConstants.ID,
+               type = CommandType.UUID,
+               entityType = GlobalLoadBalancerResponse.class,
+               required = true,
+               description = "the ID of the global load balancer rule")
     private Long id;
 
-    @Parameter(name=ApiConstants.LOAD_BALANCER_RULE_LIST, type=CommandType.LIST, collectionType=CommandType.UUID,
-            entityType = FirewallRuleResponse.class, required=true, description="the list load balancer rules that " +
-            "will be assigned to gloabal load balacner rule")
+    @Parameter(name = ApiConstants.LOAD_BALANCER_RULE_LIST,
+               type = CommandType.LIST,
+               collectionType = CommandType.UUID,
+               entityType = FirewallRuleResponse.class,
+               required = true,
+               description = "the list load balancer rules that " + "will be assigned to gloabal load balacner rule")
     private List<Long> loadBalancerRulesIds;
 
-    @Parameter(name=ApiConstants.GSLB_LBRULE_WEIGHT_MAP, type= CommandType.MAP,
-            description = "Map of LB rule id's and corresponding weights (between 1-100) in the GSLB rule, if not specified weight of " +
-                    "a LB rule is defaulted to 1. Specified as 'gslblbruleweightsmap[0].loadbalancerid=UUID" +
-                    "&gslblbruleweightsmap[0].weight=10'", required=false)
+    @Parameter(name = ApiConstants.GSLB_LBRULE_WEIGHT_MAP,
+               type = CommandType.MAP,
+               description = "Map of LB rule id's and corresponding weights (between 1-100) in the GSLB rule, if not specified weight of "
+                             + "a LB rule is defaulted to 1. Specified as 'gslblbruleweightsmap[0].loadbalancerid=UUID" + "&gslblbruleweightsmap[0].weight=10'",
+               required = false)
     private Map gslbLbRuleWieghtMap;
 
     /////////////////////////////////////////////////////
@@ -85,7 +94,7 @@ public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     }
 
     public Map<Long, Long> getLoadBalancerRuleWeightMap() {
-        Map <Long, Long> lbRuleWeightMap = new HashMap<Long, Long>();
+        Map<Long, Long> lbRuleWeightMap = new HashMap<Long, Long>();
 
         if (gslbLbRuleWieghtMap == null || gslbLbRuleWieghtMap.isEmpty()) {
             return null;
@@ -94,7 +103,7 @@ public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
         Collection lbruleWeightsCollection = gslbLbRuleWieghtMap.values();
         Iterator iter = lbruleWeightsCollection.iterator();
         while (iter.hasNext()) {
-            HashMap<String, String> map = (HashMap<String, String>) iter.next();
+            HashMap<String, String> map = (HashMap<String, String>)iter.next();
             Long weight;
             LoadBalancer lbrule = _entityMgr.findByUuid(LoadBalancer.class, map.get("loadbalancerid"));
             if (lbrule == null) {
@@ -128,8 +137,7 @@ public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
 
     @Override
     public long getEntityOwnerId() {
-        GlobalLoadBalancerRule globalLoadBalancerRule = _entityMgr.findById(GlobalLoadBalancerRule.class,
-                getGlobalLoadBalancerRuleId());
+        GlobalLoadBalancerRule globalLoadBalancerRule = _entityMgr.findById(GlobalLoadBalancerRule.class, getGlobalLoadBalancerRuleId());
         if (globalLoadBalancerRule == null) {
             return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked
         }
@@ -143,14 +151,12 @@ public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
 
     @Override
     public String getEventDescription() {
-        return "assign load balancer rules " + StringUtils.join(getLoadBalancerRulesIds(), ",") +
-                " to global load balancer rule " + getGlobalLoadBalancerRuleId();
+        return "assign load balancer rules " + StringUtils.join(getLoadBalancerRulesIds(), ",") + " to global load balancer rule " + getGlobalLoadBalancerRuleId();
     }
 
     @Override
-    public void execute(){
-        CallContext.current().setEventDetails("Global Load balancer rule Id: "+ getGlobalLoadBalancerRuleId()+ " VmIds: "
-                + StringUtils.join(getLoadBalancerRulesIds(), ","));
+    public void execute() {
+        CallContext.current().setEventDetails("Global Load balancer rule Id: " + getGlobalLoadBalancerRuleId() + " VmIds: " + StringUtils.join(getLoadBalancerRulesIds(), ","));
         boolean result = _gslbService.assignToGlobalLoadBalancerRule(this);
         if (result) {
             SuccessResponse response = new SuccessResponse(getCommandName());
@@ -168,7 +174,7 @@ public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     @Override
     public Long getSyncObjId() {
         GlobalLoadBalancerRule gslb = _gslbService.findById(id);
-        if(gslb == null){
+        if (gslb == null) {
             throw new InvalidParameterValueException("Unable to find load balancer rule: " + id);
         }
         return gslb.getId();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java
index 57b227d..d67dd0d 100644
--- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java
@@ -33,8 +33,7 @@ import org.apache.log4j.Logger;
 
 import javax.inject.Inject;
 
-@APICommand(name = "createGlobalLoadBalancerRule", description="Creates a global load balancer rule",
-        responseObject=GlobalLoadBalancerResponse.class)
+@APICommand(name = "createGlobalLoadBalancerRule", description = "Creates a global load balancer rule", responseObject = GlobalLoadBalancerResponse.class)
 public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd {
 
     public static final Logger s_logger = Logger.getLogger(CreateGlobalLoadBalancerRuleCmd.class.getName());
@@ -45,32 +44,44 @@ public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="name of the load balancer rule")
+    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the load balancer rule")
     private String globalLoadBalancerRuleName;
 
-    @Parameter(name=ApiConstants.DESCRIPTION, type=CommandType.STRING, description="the description of the load balancer rule", length=4096)
+    @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "the description of the load balancer rule", length = 4096)
     private String description;
 
-    @Parameter(name=ApiConstants.REGION_ID, type=CommandType.INTEGER, entityType = RegionResponse.class, required=true, description="region where the global load balancer is going to be created.")
+    @Parameter(name = ApiConstants.REGION_ID,
+               type = CommandType.INTEGER,
+               entityType = RegionResponse.class,
+               required = true,
+               description = "region where the global load balancer is going to be created.")
     private Integer regionId;
 
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="the account associated with the global load balancer. Must be used with the domainId parameter.")
+    @Parameter(name = ApiConstants.ACCOUNT,
+               type = CommandType.STRING,
+               description = "the account associated with the global load balancer. Must be used with the domainId parameter.")
     private String accountName;
 
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class, description="the domain ID associated with the load balancer")
+    @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "the domain ID associated with the load balancer")
     private Long domainId;
 
-    @Parameter(name=ApiConstants.GSLB_LB_METHOD, type=CommandType.STRING, required=false, description="load balancer algorithm (roundrobin, leastconn, proximity) " +
-            "that method is used to distribute traffic across the zones participating in global server load balancing, if not specified defaults to 'round robin'")
+    @Parameter(name = ApiConstants.GSLB_LB_METHOD,
+               type = CommandType.STRING,
+               required = false,
+               description = "load balancer algorithm (roundrobin, leastconn, proximity) "
+                             + "that method is used to distribute traffic across the zones participating in global server load balancing, if not specified defaults to 'round robin'")
     private String algorithm;
 
-    @Parameter(name=ApiConstants.GSLB_STICKY_SESSION_METHOD, type=CommandType.STRING, required=false, description="session sticky method (sourceip) if not specified defaults to sourceip")
+    @Parameter(name = ApiConstants.GSLB_STICKY_SESSION_METHOD,
+               type = CommandType.STRING,
+               required = false,
+               description = "session sticky method (sourceip) if not specified defaults to sourceip")
     private String stickyMethod;
 
-    @Parameter(name=ApiConstants.GSLB_SERVICE_DOMAIN_NAME, type = CommandType.STRING, required = true, description = "domain name for the GSLB service.")
+    @Parameter(name = ApiConstants.GSLB_SERVICE_DOMAIN_NAME, type = CommandType.STRING, required = true, description = "domain name for the GSLB service.")
     private String serviceDomainName;
 
-    @Parameter(name=ApiConstants.GSLB_SERVICE_TYPE, type = CommandType.STRING, required = true, description = "GSLB service type (tcp, udp)")
+    @Parameter(name = ApiConstants.GSLB_SERVICE_TYPE, type = CommandType.STRING, required = true, description = "GSLB service type (tcp, udp)")
     private String serviceType;
 
     /////////////////////////////////////////////////////
@@ -151,7 +162,7 @@ public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd {
         } catch (Exception ex) {
             s_logger.warn("Exception: ", ex);
             throw new ServerApiException(ApiErrorCode.PARAM_ERROR, ex.getMessage());
-        }finally {
+        } finally {
 
         }
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java
index 6608660..4401a5d 100644
--- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java
@@ -31,7 +31,7 @@ import org.apache.log4j.Logger;
 
 import javax.inject.Inject;
 
-@APICommand(name = "deleteGlobalLoadBalancerRule", description="Deletes a global load balancer rule.", responseObject=SuccessResponse.class)
+@APICommand(name = "deleteGlobalLoadBalancerRule", description = "Deletes a global load balancer rule.", responseObject = SuccessResponse.class)
 public class DeleteGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
 
     public static final Logger s_logger = Logger.getLogger(DeleteGlobalLoadBalancerRuleCmd.class.getName());
@@ -42,10 +42,13 @@ public class DeleteGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, required=true, description="the ID of the global load balancer rule")
+    @Parameter(name = ApiConstants.ID,
+               type = CommandType.UUID,
+               entityType = GlobalLoadBalancerResponse.class,
+               required = true,
+               description = "the ID of the global load balancer rule")
     private Long id;
 
-
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -83,11 +86,11 @@ public class DeleteGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
 
     @Override
     public String getEventDescription() {
-        return  "deleting global load balancer rule: " + getGlobalLoadBalancerId();
+        return "deleting global load balancer rule: " + getGlobalLoadBalancerId();
     }
 
     @Override
-    public void execute(){
+    public void execute() {
         CallContext.current().setEventDetails("Deleting global Load balancer rule Id: " + getGlobalLoadBalancerId());
         boolean result = _gslbService.deleteGlobalLoadBalancerRule(this);
         if (result) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java
index d75de57..ab62a41 100644
--- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java
@@ -78,7 +78,7 @@ public class ListGlobalLoadBalancerRuleCmd extends BaseListTaggedResourcesCmd {
         ListResponse<GlobalLoadBalancerResponse> gslbRuleResponse = new ListResponse<GlobalLoadBalancerResponse>();
         List<GlobalLoadBalancerResponse> gslbResponses = new ArrayList<GlobalLoadBalancerResponse>();
         if (globalLoadBalancers != null) {
-            for (GlobalLoadBalancerRule gslbRule: globalLoadBalancers) {
+            for (GlobalLoadBalancerRule gslbRule : globalLoadBalancers) {
                 GlobalLoadBalancerResponse gslbResponse = _responseGenerator.createGlobalLoadBalancerResponse(gslbRule);
                 gslbResponse.setObjectName("globalloadbalancerrule");
                 gslbResponses.add(gslbResponse);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java
index ff71f67..2374a5d 100644
--- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java
@@ -36,8 +36,9 @@ import javax.inject.Inject;
 
 import java.util.List;
 
-@APICommand(name = "removeFromGlobalLoadBalancerRule", description="Removes a load balancer rule association with" +
-        " global load balancer rule", responseObject=SuccessResponse.class)
+@APICommand(name = "removeFromGlobalLoadBalancerRule",
+            description = "Removes a load balancer rule association with" + " global load balancer rule",
+            responseObject = SuccessResponse.class)
 public class RemoveFromGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(RemoveFromGlobalLoadBalancerRuleCmd.class.getName());
 
@@ -47,13 +48,15 @@ public class RemoveFromGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = GlobalLoadBalancerResponse.class,
-            required=true, description="The ID of the load balancer rule")
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, required = true, description = "The ID of the load balancer rule")
     private Long id;
 
-    @Parameter(name=ApiConstants.LOAD_BALANCER_RULE_LIST, type=CommandType.LIST, collectionType=CommandType.UUID,
-            entityType = FirewallRuleResponse.class, required=true, description="the list load balancer rules that "
-            + "will be assigned to gloabal load balacner rule")
+    @Parameter(name = ApiConstants.LOAD_BALANCER_RULE_LIST,
+               type = CommandType.LIST,
+               collectionType = CommandType.UUID,
+               entityType = FirewallRuleResponse.class,
+               required = true,
+               description = "the list load balancer rules that " + "will be assigned to gloabal load balacner rule")
     private List<Long> loadBalancerRulesIds;
 
     /////////////////////////////////////////////////////
@@ -67,6 +70,7 @@ public class RemoveFromGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     public List<Long> getLoadBalancerRulesIds() {
         return loadBalancerRulesIds;
     }
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -95,14 +99,12 @@ public class RemoveFromGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
 
     @Override
     public String getEventDescription() {
-        return  "removing load balancer rules:" + StringUtils.join(getLoadBalancerRulesIds(), ",") +
-                " from global load balancer: " + getGlobalLoadBalancerRuleId();
+        return "removing load balancer rules:" + StringUtils.join(getLoadBalancerRulesIds(), ",") + " from global load balancer: " + getGlobalLoadBalancerRuleId();
     }
 
     @Override
-    public void execute(){
-        CallContext.current().setEventDetails("Global Load balancer rule Id: "+ getGlobalLoadBalancerRuleId()+ " VmIds: "
-                + StringUtils.join(getLoadBalancerRulesIds(), ","));
+    public void execute() {
+        CallContext.current().setEventDetails("Global Load balancer rule Id: " + getGlobalLoadBalancerRuleId() + " VmIds: " + StringUtils.join(getLoadBalancerRulesIds(), ","));
         boolean result = _gslbService.removeFromGlobalLoadBalancerRule(this);
         if (result) {
             SuccessResponse response = new SuccessResponse(getCommandName());
@@ -120,7 +122,7 @@ public class RemoveFromGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     @Override
     public Long getSyncObjId() {
         GlobalLoadBalancerRule gslb = _gslbService.findById(id);
-        if(gslb == null){
+        if (gslb == null) {
             throw new InvalidParameterValueException("Unable to find load balancer rule: " + id);
         }
         return gslb.getId();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java
index 6d76413..015d97d 100644
--- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java
@@ -28,7 +28,7 @@ import org.apache.log4j.Logger;
 
 import javax.inject.Inject;
 
-@APICommand(name = "updateGlobalLoadBalancerRule", description = "update global load balancer rules.", responseObject=GlobalLoadBalancerResponse.class)
+@APICommand(name = "updateGlobalLoadBalancerRule", description = "update global load balancer rules.", responseObject = GlobalLoadBalancerResponse.class)
 public class UpdateGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(GlobalLoadBalancerResponse.class.getName());
 
@@ -38,18 +38,27 @@ public class UpdateGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
     // ////////////// API parameters /////////////////////
     // ///////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = GlobalLoadBalancerResponse.class,
-            required=true, description="the ID of the global load balancer rule")
+    @Parameter(name = ApiConstants.ID,
+               type = CommandType.UUID,
+               entityType = GlobalLoadBalancerResponse.class,
+               required = true,
+               description = "the ID of the global load balancer rule")
     private Long id;
 
-    @Parameter(name=ApiConstants.DESCRIPTION, type=CommandType.STRING, description="the description of the load balancer rule", length=4096)
+    @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "the description of the load balancer rule", length = 4096)
     private String description;
 
-    @Parameter(name=ApiConstants.GSLB_LB_METHOD, type=CommandType.STRING, required=false, description="load balancer algorithm (roundrobin, leastconn, proximity) " +
-            "that is used to distributed traffic across the zones participating in global server load balancing, if not specified defaults to 'round robin'")
+    @Parameter(name = ApiConstants.GSLB_LB_METHOD,
+               type = CommandType.STRING,
+               required = false,
+               description = "load balancer algorithm (roundrobin, leastconn, proximity) "
+                             + "that is used to distributed traffic across the zones participating in global server load balancing, if not specified defaults to 'round robin'")
     private String algorithm;
 
-    @Parameter(name=ApiConstants.GSLB_STICKY_SESSION_METHOD, type=CommandType.STRING, required=false, description="session sticky method (sourceip) if not specified defaults to sourceip")
+    @Parameter(name = ApiConstants.GSLB_STICKY_SESSION_METHOD,
+               type = CommandType.STRING,
+               required = false,
+               description = "session sticky method (sourceip) if not specified defaults to sourceip")
     private String stickyMethod;
 
     // ///////////////////////////////////////////////////
@@ -99,7 +108,7 @@ public class UpdateGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
 
     @Override
     public void execute() {
-        org.apache.cloudstack.context.CallContext.current().setEventDetails("Global Load balancer Id: "+getId());
+        org.apache.cloudstack.context.CallContext.current().setEventDetails("Global Load balancer Id: " + getId());
         GlobalLoadBalancerRule gslbRule = _gslbService.updateGlobalLoadBalancerRule(this);
         if (gslbRule != null) {
             GlobalLoadBalancerResponse response = _responseGenerator.createGlobalLoadBalancerResponse(gslbRule);
@@ -117,6 +126,6 @@ public class UpdateGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
 
     @Override
     public String getEventDescription() {
-        return  "updating global load balancer rule";
+        return "updating global load balancer rule";
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java
index 716addb..181f804 100644
--- a/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java
@@ -30,7 +30,7 @@ import org.apache.log4j.Logger;
 
 import com.cloud.user.Account;
 
-@APICommand(name = "getCloudIdentifier", description="Retrieves a cloud identifier.", responseObject=CloudIdentifierResponse.class)
+@APICommand(name = "getCloudIdentifier", description = "Retrieves a cloud identifier.", responseObject = CloudIdentifierResponse.class)
 public class GetCloudIdentifierCmd extends BaseCmd {
     public static final Logger s_logger = Logger.getLogger(GetCloudIdentifierCmd.class.getName());
     private static final String s_name = "getcloudidentifierresponse";
@@ -39,8 +39,7 @@ public class GetCloudIdentifierCmd extends BaseCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.USER_ID, type=CommandType.UUID, entityType = UserResponse.class,
-            required=true, description="the user ID for the cloud identifier")
+    @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, required = true, description = "the user ID for the cloud identifier")
     private Long userid;
 
     /////////////////////////////////////////////////////
@@ -65,7 +64,7 @@ public class GetCloudIdentifierCmd extends BaseCmd {
     }
 
     @Override
-    public void execute(){
+    public void execute() {
         ArrayList<String> result = _mgr.getCloudIdentifierResponse(userid);
         CloudIdentifierResponse response = new CloudIdentifierResponse();
         if (result != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java
index fffd3ad..a2c84de 100644
--- a/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java
@@ -45,8 +45,7 @@ public class ListHypervisorsCmd extends BaseCmd {
     // ////////////// API parameters /////////////////////
     // ///////////////////////////////////////////////////
 
-    @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class,
-            description = "the zone id for listing hypervisors.")
+    @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the zone id for listing hypervisors.")
     private Long zoneId;
 
     // ///////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java
index 4d5d4f4..6c35387 100644
--- a/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java
@@ -30,7 +30,7 @@ import org.apache.log4j.Logger;
 import com.cloud.configuration.ResourceLimit;
 import com.cloud.configuration.Resource.ResourceOwnerType;
 
-@APICommand(name = "listResourceLimits", description="Lists resource limits.", responseObject=ResourceLimitResponse.class)
+@APICommand(name = "listResourceLimits", description = "Lists resource limits.", responseObject = ResourceLimitResponse.class)
 public class ListResourceLimitsCmd extends BaseListProjectAndAccountResourcesCmd {
     public static final Logger s_logger = Logger.getLogger(ListResourceLimitsCmd.class.getName());
 
@@ -40,22 +40,19 @@ public class ListResourceLimitsCmd extends BaseListProjectAndAccountResourcesCmd
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="Lists resource limits by ID.")
+    @Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "Lists resource limits by ID.")
     private Long id;
 
-    @Parameter(name=ApiConstants.RESOURCE_TYPE, type=CommandType.INTEGER, description="Type of resource to update. Values are 0, 1, 2, 3, and 4." +
-    		                                                                            "0 - Instance. Number of instances a user can create. " +
-                                                                                        "1 - IP. Number of public IP addresses an account can own. " +
-                                                                                        "2 - Volume. Number of disk volumes an account can own." +
-                                                                                        "3 - Snapshot. Number of snapshots an account can own." +
-                                                                                        "4 - Template. Number of templates an account can register/create." +
-                                                                                        "5 - Project. Number of projects an account can own." +
-                                                                                        "6 - Network. Number of networks an account can own." +
-                                                                                        "7 - VPC. Number of VPC an account can own." +
-                                                                                        "8 - CPU. Number of CPU an account can allocate for his resources." +
-                                                                                        "9 - Memory. Amount of RAM an account can allocate for his resources." +
-                                                                                        "10 - Primary Storage. Amount of Primary storage an account can allocate for his resoruces." +
-                                                                                        "11 - Secondary Storage. Amount of Secondary storage an account can allocate for his resources.")
+    @Parameter(name = ApiConstants.RESOURCE_TYPE,
+               type = CommandType.INTEGER,
+               description = "Type of resource to update. Values are 0, 1, 2, 3, and 4." + "0 - Instance. Number of instances a user can create. "
+                             + "1 - IP. Number of public IP addresses an account can own. " + "2 - Volume. Number of disk volumes an account can own."
+                             + "3 - Snapshot. Number of snapshots an account can own." + "4 - Template. Number of templates an account can register/create."
+                             + "5 - Project. Number of projects an account can own." + "6 - Network. Number of networks an account can own."
+                             + "7 - VPC. Number of VPC an account can own." + "8 - CPU. Number of CPU an account can allocate for his resources."
+                             + "9 - Memory. Amount of RAM an account can allocate for his resources."
+                             + "10 - Primary Storage. Amount of Primary storage an account can allocate for his resoruces."
+                             + "11 - Secondary Storage. Amount of Secondary storage an account can allocate for his resources.")
     private Integer resourceType;
 
     /////////////////////////////////////////////////////
@@ -80,8 +77,9 @@ public class ListResourceLimitsCmd extends BaseListProjectAndAccountResourcesCmd
     }
 
     @Override
-    public void execute(){
-        List<? extends ResourceLimit> result = _resourceLimitService.searchForLimits(id, finalyzeAccountId(this.getAccountName(), this.getDomainId(), this.getProjectId(), false), this.getDomainId(), resourceType, this.getStartIndex(), this.getPageSizeVal());
+    public void execute() {
+        List<? extends ResourceLimit> result = _resourceLimitService.searchForLimits(id, finalyzeAccountId(this.getAccountName(), this.getDomainId(), this.getProjectId(), false),
+            this.getDomainId(), resourceType, this.getStartIndex(), this.getPageSizeVal());
         ListResponse<ResourceLimitResponse> response = new ListResponse<ResourceLimitResponse>();
         List<ResourceLimitResponse> limitResponses = new ArrayList<ResourceLimitResponse>();
         for (ResourceLimit limit : result) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java
index 9c726d1..351181a 100644
--- a/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java
@@ -36,41 +36,39 @@ import org.apache.log4j.Logger;
 import com.cloud.configuration.ResourceCount;
 import com.cloud.user.Account;
 
-@APICommand(name = "updateResourceCount", description="Recalculate and update resource count for an account or domain.", responseObject=ResourceCountResponse.class)
+@APICommand(name = "updateResourceCount", description = "Recalculate and update resource count for an account or domain.", responseObject = ResourceCountResponse.class)
 public class UpdateResourceCountCmd extends BaseCmd {
     public static final Logger s_logger = Logger.getLogger(UpdateResourceCountCmd.class.getName());
 
     private static final String s_name = "updateresourcecountresponse";
 
-
     /////////////////////////////////////////////////////
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="Update resource count for a specified account. Must be used with the domainId parameter.")
+    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Update resource count for a specified account. Must be used with the domainId parameter.")
     private String accountName;
 
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class,
-            required=true, description="If account parameter specified then updates resource counts for a specified account in this domain else update resource counts for all accounts & child domains in specified domain.")
+    @Parameter(name = ApiConstants.DOMAIN_ID,
+               type = CommandType.UUID,
+               entityType = DomainResponse.class,
+               required = true,
+               description = "If account parameter specified then updates resource counts for a specified account in this domain else update resource counts for all accounts & child domains in specified domain.")
     private Long domainId;
 
-    @Parameter(name=ApiConstants.RESOURCE_TYPE, type=CommandType.INTEGER, description=  "Type of resource to update. If specifies valid values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11. If not specified will update all resource counts" +
-                                                                                        "0 - Instance. Number of instances a user can create. " +
-                                                                                        "1 - IP. Number of public IP addresses a user can own. " +
-                                                                                        "2 - Volume. Number of disk volumes a user can create." +
-                                                                                        "3 - Snapshot. Number of snapshots a user can create." +
-                                                                                        "4 - Template. Number of templates that a user can register/create." +
-                                                                                        "5 - Project. Number of projects that a user can create." +
-                                                                                        "6 - Network. Number of guest network a user can create." +
-                                                                                        "7 - VPC. Number of VPC a user can create." +
-                                                                                        "8 - CPU. Total number of CPU cores a user can use." +
-                                                                                        "9 - Memory. Total Memory (in MB) a user can use." +
-                                                                                        "10 - PrimaryStorage. Total primary storage space (in GiB) a user can use." +
-                                                                                        "11 - SecondaryStorage. Total secondary storage space (in GiB) a user can use." )
+    @Parameter(name = ApiConstants.RESOURCE_TYPE,
+               type = CommandType.INTEGER,
+               description = "Type of resource to update. If specifies valid values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11. If not specified will update all resource counts"
+                             + "0 - Instance. Number of instances a user can create. " + "1 - IP. Number of public IP addresses a user can own. "
+                             + "2 - Volume. Number of disk volumes a user can create." + "3 - Snapshot. Number of snapshots a user can create."
+                             + "4 - Template. Number of templates that a user can register/create." + "5 - Project. Number of projects that a user can create."
+                             + "6 - Network. Number of guest network a user can create." + "7 - VPC. Number of VPC a user can create."
+                             + "8 - CPU. Total number of CPU cores a user can use." + "9 - Memory. Total Memory (in MB) a user can use."
+                             + "10 - PrimaryStorage. Total primary storage space (in GiB) a user can use."
+                             + "11 - SecondaryStorage. Total secondary storage space (in GiB) a user can use.")
     private Integer resourceType;
 
-    @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class,
-            description="Update resource limits for project")
+    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Update resource limits for project")
     private Long projectId;
 
     /////////////////////////////////////////////////////
@@ -118,10 +116,11 @@ public class UpdateResourceCountCmd extends BaseCmd {
     }
 
     @Override
-    public void execute(){
-        List<? extends ResourceCount> result = _resourceLimitService.recalculateResourceCount(finalyzeAccountId(accountName, domainId, projectId, true), getDomainId(), getResourceType());
+    public void execute() {
+        List<? extends ResourceCount> result = _resourceLimitService.recalculateResourceCount(finalyzeAccountId(accountName, domainId, projectId, true), getDomainId(),
+            getResourceType());
 
-        if ((result != null) && (result.size()>0)){
+        if ((result != null) && (result.size() > 0)) {
             ListResponse<ResourceCountResponse> response = new ListResponse<ResourceCountResponse>();
             List<ResourceCountResponse> countResponses = new ArrayList<ResourceCountResponse>();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java
index 4a5b345..f29b828 100644
--- a/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java
@@ -31,7 +31,7 @@ import org.apache.log4j.Logger;
 
 import com.cloud.configuration.ResourceLimit;
 
-@APICommand(name = "updateResourceLimit", description="Updates resource limits for an account or domain.", responseObject=ResourceLimitResponse.class)
+@APICommand(name = "updateResourceLimit", description = "Updates resource limits for an account or domain.", responseObject = ResourceLimitResponse.class)
 public class UpdateResourceLimitCmd extends BaseCmd {
     public static final Logger s_logger = Logger.getLogger(UpdateResourceLimitCmd.class.getName());
 
@@ -41,31 +41,31 @@ public class UpdateResourceLimitCmd extends BaseCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="Update resource for a specified account. Must be used with the domainId parameter.")
+    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Update resource for a specified account. Must be used with the domainId parameter.")
     private String accountName;
 
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class,
-            description="Update resource limits for all accounts in specified domain. If used with the account parameter, updates resource limits for a specified account in specified domain.")
+    @Parameter(name = ApiConstants.DOMAIN_ID,
+               type = CommandType.UUID,
+               entityType = DomainResponse.class,
+               description = "Update resource limits for all accounts in specified domain. If used with the account parameter, updates resource limits for a specified account in specified domain.")
     private Long domainId;
 
-    @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class,
-            description="Update resource limits for project")
+    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Update resource limits for project")
     private Long projectId;
 
-    @Parameter(name=ApiConstants.MAX, type=CommandType.LONG, description="  Maximum resource limit.")
+    @Parameter(name = ApiConstants.MAX, type = CommandType.LONG, description = "  Maximum resource limit.")
     private Long max;
 
-    @Parameter(name=ApiConstants.RESOURCE_TYPE, type=CommandType.INTEGER, required=true, description="Type of resource to update. Values are 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 and 11. 0 - Instance. Number of instances a user can create. " +
-                                                                                        "1 - IP. Number of public IP addresses a user can own. " +
-                                                                                        "2 - Volume. Number of disk volumes a user can create." +
-                                                                                        "3 - Snapshot. Number of snapshots a user can create." +
-                                                                                        "4 - Template. Number of templates that a user can register/create." +
-                                                                                        "6 - Network. Number of guest network a user can create." +
-                                                                                        "7 - VPC. Number of VPC a user can create." +
-                                                                                        "8 - CPU. Total number of CPU cores a user can use." +
-                                                                                        "9 - Memory. Total Memory (in MB) a user can use." +
-                                                                                        "10 - PrimaryStorage. Total primary storage space (in GiB) a user can use." +
-                                                                                        "11 - SecondaryStorage. Total secondary storage space (in GiB) a user can use." )
+    @Parameter(name = ApiConstants.RESOURCE_TYPE,
+               type = CommandType.INTEGER,
+               required = true,
+               description = "Type of resource to update. Values are 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 and 11. 0 - Instance. Number of instances a user can create. "
+                             + "1 - IP. Number of public IP addresses a user can own. " + "2 - Volume. Number of disk volumes a user can create."
+                             + "3 - Snapshot. Number of snapshots a user can create." + "4 - Template. Number of templates that a user can register/create."
+                             + "6 - Network. Number of guest network a user can create." + "7 - VPC. Number of VPC a user can create."
+                             + "8 - CPU. Total number of CPU cores a user can use." + "9 - Memory. Total Memory (in MB) a user can use."
+                             + "10 - PrimaryStorage. Total primary storage space (in GiB) a user can use."
+                             + "11 - SecondaryStorage. Total secondary storage space (in GiB) a user can use.")
     private Integer resourceType;
 
     /////////////////////////////////////////////////////
@@ -104,9 +104,9 @@ public class UpdateResourceLimitCmd extends BaseCmd {
     }
 
     @Override
-    public void execute(){
+    public void execute() {
         ResourceLimit result = _resourceLimitService.updateResourceLimit(finalyzeAccountId(accountName, domainId, projectId, true), getDomainId(), resourceType, max);
-        if (result != null || (result == null && max != null && max.longValue() == -1L)){
+        if (result != null || (result == null && max != null && max.longValue() == -1L)) {
             ResourceLimitResponse response = _responseGenerator.createResourceLimitResponse(result);
             response.setResponseName(getCommandName());
             this.setResponseObject(response);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java
index 49a42ec..d10c37e 100644
--- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java
@@ -42,7 +42,10 @@ import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.network.security.SecurityRule;
 import com.cloud.utils.StringUtils;
 
-@APICommand(name = "authorizeSecurityGroupEgress", responseObject = SecurityGroupRuleResponse.class, description = "Authorizes a particular egress rule for this security group", since="3.0.0")
+@APICommand(name = "authorizeSecurityGroupEgress",
+            responseObject = SecurityGroupRuleResponse.class,
+            description = "Authorizes a particular egress rule for this security group",
+            since = "3.0.0")
 @SuppressWarnings("rawtypes")
 public class AuthorizeSecurityGroupEgressCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(AuthorizeSecurityGroupIngressCmd.class.getName());
@@ -68,25 +71,33 @@ public class AuthorizeSecurityGroupEgressCmd extends BaseAsyncCmd {
     @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this icmp message")
     private Integer icmpCode;
 
-    @Parameter(name=ApiConstants.CIDR_LIST, type=CommandType.LIST, collectionType=CommandType.STRING, description="the cidr list associated")
+    @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the cidr list associated")
     private List<String> cidrList;
 
     @Parameter(name = ApiConstants.USER_SECURITY_GROUP_LIST, type = CommandType.MAP, description = "user to security group mapping")
     private Map userSecurityGroupList;
 
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, description="an optional domainId for the security group. If the account parameter is used, domainId must also be used.", entityType = DomainResponse.class)
+    @Parameter(name = ApiConstants.DOMAIN_ID,
+               type = CommandType.UUID,
+               description = "an optional domainId for the security group. If the account parameter is used, domainId must also be used.",
+               entityType = DomainResponse.class)
     private Long domainId;
 
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="an optional account for the security group. Must be used with domainId.")
+    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the security group. Must be used with domainId.")
     private String accountName;
 
-    @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, description="an optional project of the security group", entityType=ProjectResponse.class)
+    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "an optional project of the security group", entityType = ProjectResponse.class)
     private Long projectId;
 
-    @Parameter(name=ApiConstants.SECURITY_GROUP_ID, type=CommandType.UUID, description="The ID of the security group. Mutually exclusive with securityGroupName parameter", entityType=SecurityGroupResponse.class)
+    @Parameter(name = ApiConstants.SECURITY_GROUP_ID,
+               type = CommandType.UUID,
+               description = "The ID of the security group. Mutually exclusive with securityGroupName parameter",
+               entityType = SecurityGroupResponse.class)
     private Long securityGroupId;
 
-    @Parameter(name=ApiConstants.SECURITY_GROUP_NAME, type=CommandType.STRING, description="The name of the security group. Mutually exclusive with securityGroupName parameter")
+    @Parameter(name = ApiConstants.SECURITY_GROUP_NAME,
+               type = CommandType.STRING,
+               description = "The name of the security group. Mutually exclusive with securityGroupName parameter")
     private String securityGroupName;
 
     /////////////////////////////////////////////////////
@@ -184,15 +195,15 @@ public class AuthorizeSecurityGroupEgressCmd extends BaseAsyncCmd {
             Collection userGroupCollection = getUserSecurityGroupList().values();
             Iterator iter = userGroupCollection.iterator();
 
-            HashMap userGroup = (HashMap) iter.next();
-            String group = (String) userGroup.get("group");
-            String authorizedAccountName = (String) userGroup.get("account");
+            HashMap userGroup = (HashMap)iter.next();
+            String group = (String)userGroup.get("group");
+            String authorizedAccountName = (String)userGroup.get("account");
             sb.append(group + "/" + authorizedAccountName);
 
             while (iter.hasNext()) {
-                userGroup = (HashMap) iter.next();
-                group = (String) userGroup.get("group");
-                authorizedAccountName = (String) userGroup.get("account");
+                userGroup = (HashMap)iter.next();
+                group = (String)userGroup.get("group");
+                authorizedAccountName = (String)userGroup.get("account");
                 sb.append(", " + group + "/" + authorizedAccountName);
             }
         } else if (getCidrList() != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java
index d700c88..9f01dd6 100644
--- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java
@@ -69,25 +69,33 @@ public class AuthorizeSecurityGroupIngressCmd extends BaseAsyncCmd {
     @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this icmp message")
     private Integer icmpCode;
 
-    @Parameter(name=ApiConstants.CIDR_LIST, type=CommandType.LIST, collectionType=CommandType.STRING, description="the cidr list associated")
+    @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the cidr list associated")
     private List<String> cidrList;
 
     @Parameter(name = ApiConstants.USER_SECURITY_GROUP_LIST, type = CommandType.MAP, description = "user to security group mapping")
     private Map userSecurityGroupList;
 
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, description="an optional domainId for the security group. If the account parameter is used, domainId must also be used.", entityType = DomainResponse.class)
+    @Parameter(name = ApiConstants.DOMAIN_ID,
+               type = CommandType.UUID,
+               description = "an optional domainId for the security group. If the account parameter is used, domainId must also be used.",
+               entityType = DomainResponse.class)
     private Long domainId;
 
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="an optional account for the security group. Must be used with domainId.")
+    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the security group. Must be used with domainId.")
     private String accountName;
 
-    @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, description="an optional project of the security group", entityType=ProjectResponse.class)
+    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "an optional project of the security group", entityType = ProjectResponse.class)
     private Long projectId;
 
-    @Parameter(name=ApiConstants.SECURITY_GROUP_ID, type=CommandType.UUID, description="The ID of the security group. Mutually exclusive with securityGroupName parameter", entityType=SecurityGroupResponse.class)
+    @Parameter(name = ApiConstants.SECURITY_GROUP_ID,
+               type = CommandType.UUID,
+               description = "The ID of the security group. Mutually exclusive with securityGroupName parameter",
+               entityType = SecurityGroupResponse.class)
     private Long securityGroupId;
 
-    @Parameter(name=ApiConstants.SECURITY_GROUP_NAME, type=CommandType.STRING, description="The name of the security group. Mutually exclusive with securityGroupName parameter")
+    @Parameter(name = ApiConstants.SECURITY_GROUP_NAME,
+               type = CommandType.STRING,
+               description = "The name of the security group. Mutually exclusive with securityGroupName parameter")
     private String securityGroupName;
 
     /////////////////////////////////////////////////////
@@ -185,15 +193,15 @@ public class AuthorizeSecurityGroupIngressCmd extends BaseAsyncCmd {
             Collection userGroupCollection = getUserSecurityGroupList().values();
             Iterator iter = userGroupCollection.iterator();
 
-            HashMap userGroup = (HashMap) iter.next();
-            String group = (String) userGroup.get("group");
-            String authorizedAccountName = (String) userGroup.get("account");
+            HashMap userGroup = (HashMap)iter.next();
+            String group = (String)userGroup.get("group");
+            String authorizedAccountName = (String)userGroup.get("account");
             sb.append(group + "/" + authorizedAccountName);
 
             while (iter.hasNext()) {
-                userGroup = (HashMap) iter.next();
-                group = (String) userGroup.get("group");
-                authorizedAccountName = (String) userGroup.get("account");
+                userGroup = (HashMap)iter.next();
+                group = (String)userGroup.get("group");
+                authorizedAccountName = (String)userGroup.get("account");
                 sb.append(", " + group + "/" + authorizedAccountName);
             }
         } else if (getCidrList() != null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d627446/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java
index 2d7396e..00b235a 100644
--- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java
@@ -45,7 +45,10 @@ public class CreateSecurityGroupCmd extends BaseCmd {
     @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the security group. Must be used with domainId.")
     private String accountName;
 
-    @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, description = "an optional domainId for the security group. If the account parameter is used, domainId must also be used.", entityType = DomainResponse.class)
+    @Parameter(name = ApiConstants.DOMAIN_ID,
+               type = CommandType.UUID,
+               description = "an optional domainId for the security group. If the account parameter is used, domainId must also be used.",
+               entityType = DomainResponse.class)
     private Long domainId;
 
     @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "the description of the security group")
@@ -54,7 +57,7 @@ public class CreateSecurityGroupCmd extends BaseCmd {
     @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the security group")
     private String securityGroupName;
 
-    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "Create security group for project", entityType=ProjectResponse.class)
+    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "Create security group for project", entityType = ProjectResponse.class)
     private Long projectId;
 
     // ///////////////////////////////////////////////////


Mime
View raw message