cloudstack/server/test/com/cloud
Will Stevens 08f2ec5044 Merge pull request #1263 from rafaelweingartner/lrg-cs-hackday-018
Removed unused code from com.cloud.api.ApiServer**Removed \_ from variables names**: private variables with \_ at the beginning is common in C++ but not in Java.

**Removed unused code from ApiServer:**
- com.cloud.api.ApiServer.getPluggableServices(): unused method;
- com.cloud.api.ApiServer.getApiAccessCheckers(): unused method;

**Methods and variables access level reviewed:**
- com.cloud.api.ApiServer.handleAsyncJobPublishEvent(String, String ,Object): this method was private but the annotation @MessageHandler requests public methods, as can be seen in org.apache.cloudstack.framework.messagebus.MessageDispatcher.buildHandlerMethodCache(Class\<?\>), which searches methods with the @MessageHandler annotation and changes
it to be accessible (setAccessible(true)). Thus, there is no reason for handleAsyncJobPublishEvent be a private method and lead some other dev to wrong conclusions about the use of the method;
- Global variables and methods called just by this class (ApiServer) were changed to private.

**Changed variables and methods from static to non-static (if possible):** as some variables/methods are used just by one object of this class, instantiated by Spring, they were changed to non-static.

With that, calls from com.cloud.api.ApiServlet.ApiServlet() that used static methods from ApiServer, were changed from ApiServer.\<staticMethodName\> to \_apiServer.\<methodName\> that refers to the org.apache.cloudstack.api.ApiServerService interface. Thus, methods com.cloud.api.ApiServer.getJSONContentType() and com.cloud.api.ApiServer.isSecureSessionCookieEnabled() had to be added in the interface (org.apache.cloudstack.api.ApiServerService, interface implemented by class ApiServer).

* pr/1263:
  The goal of this PR is to review com.cloud.api.ApiServer class, with the following actions:

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-04-18 08:34:53 -04:00
..
alert Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
api Merge pull request #1263 from rafaelweingartner/lrg-cs-hackday-018 2016-04-18 08:34:53 -04:00
capacity All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
configuration CLOUDSTACK-8958: add dedicated ips to domain (account for now) 2015-11-16 10:17:40 +01:00
consoleproxy CLOUDSTACK-8623: CPVM fails to start after MS is restarted during its initial start-up process 2015-07-14 10:56:05 +05:30
event rats 2015-11-28 21:20:07 +01:00
ha CLOUDSTACK-8656: tests ignoring exceptions 2015-11-16 18:36:24 +01:00
keystore Reformatted all of the code. 2013-11-21 06:15:26 -08:00
metadata Resource metadata: by default, all metadata is set with display=true (meaning that the detail is avaialble for display to the regular user). If admin wants to set a specific detail to be false, he has to specify it explicitly in addResourceDetail command 2014-02-10 12:05:59 -08:00
network Merge release branch 4.6 to master 2015-12-07 21:36:36 +01:00
projects Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
resource Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
resourcelimit Reformatted all of the code. 2013-11-21 06:15:26 -08:00
server CLOUDSTACK-8868: use same method to generate passwords for system/guest vms 2015-11-17 16:05:46 +05:30
servlet test for escapeHTML 2014-05-02 21:19:49 +02:00
snapshot All Checkstyle problems corrected 2013-12-12 12:26:07 -08:00
storage CLOUDSTACK-9252: Add missing licence header 2016-02-08 21:46:38 -03:00
template CLOUDSTACK-8687: Unit tests for validating the prepare template functionality. 2015-08-19 10:06:54 +05:30
user Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
vm CLOUDSTACK-9051: reprogram network as a part of vm nic ip update 2015-11-30 09:20:26 +01:00
vpc CLOUDSTACK-9245 - Deletes ACL items when destroying the VPC or deleting the ACL itself 2016-01-22 12:49:48 +01:00