cloudstack/server/test/com/cloud
gabrascher 48888e7405 The goal of this PR is to review com.cloud.api.ApiServer class, with the
following actions:

Removed “_” in beginning of global variables names:
Variables was changed from “_<variablename>” to “<variablename>”, as
this convension (private veriables with “_”) 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 accessible (“setAccessible(true)”). Thus, there is no reason for
handleAsyncJobPublishEvent be a private 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 springer), they were changed to non static.

With that, calls from com.cloud.api.ApiServlet.ApiServlet() that used
static methods from ApiServer, was 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
included in the interface (org.apache.cloudstack.api.ApiServerService,
interface implemented by class ApiServer).

However, com.cloud.api.ApiServer.isEncodeApiResponse() was keept static,
as its call hierarchy would have to be changed (more than planed for
this PR).
2016-04-12 15:46:07 -03: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 The goal of this PR is to review com.cloud.api.ApiServer class, with the 2016-04-12 15:46:07 -03: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-5863: Add unit tests for take volume snapshot 2015-09-10 08:01:33 +02: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 Merge pull request #1007 from ustcweizhou/dedicated-ip-for-domain 2015-11-29 09:39:25 +01:00