Kris McQueen
0105aec338
Always set the response type on the command object so that the correct output is generated. Add both Strings and Longs to the login response (domainId and userId will be the Longs). Use the correct method name for ListSystemVMsCmd.
2010-09-29 17:32:19 -07:00
Kris McQueen
da660f2575
Change session parameters to be their actual type (domainId and userId are saved to the session as Longs and not Strings)
2010-09-29 15:18:43 -07:00
Kris McQueen
95a7f20a0a
Adding in XML response serializing. Now the new API framework supports both XML and JSON responses the way the old framework did.
2010-09-28 17:36:27 -07:00
Kris McQueen
848ce60097
Merging master into 2.1.refactor, resolve the merge conflicts as best I can. New commands related to extracting template/iso/volume and related to instance groups were refactored to the new API framework.
2010-09-28 15:47:14 -07:00
Kris McQueen
62257d4021
Fix serializing async job responses by writing a custom adapter for ResponseObjects. Improve exception handling when calling async commands (the job still needs to complete, but with FAILED status).
2010-09-24 13:52:35 -07:00
Kris McQueen
2a4ddac41a
Change getResponse() to return a ResponseObject so that the caller can choose how to serialize. This in in preparation for serializing the async commands to the database with class information and deserializing them into the ResponseObject itself when queryAsyncJobResult is called. Once the ResponseObject is deserialized, the proper string can be returned to the caller.
...
The previous behavior had the JSON response from the command embedded into the queryAsyncJobResult response as a string rather than a JSON object which prevented the client from being able to read the response. With this new behavior an actual JSON object should be returned which can then be parsed on the client side.
2010-09-23 17:34:28 -07:00
Kris McQueen
e31f89e6a9
Set up accountId in the AsyncJob since it's needed for proper validation when querying the job status.
2010-09-21 18:26:34 -07:00
Kris McQueen
3f6a438d92
Refactoring the AsyncJobManager to queue jobs appropriately if there is a need to synchronize execution on an object, e.g. a router. API developers can now call command.synchronizeCommand(String, Long) to force the command to be synchronized on a particular object type [the string arg] with a particular id [the long arg]. When synchronizeCommand() is invoked, an exception maybe thrown by the framework (AsyncCommandQueued exception) to force the business logic to abort. The command will then be queued and invoked at the appropriate time. The synchronizeCommand() is re-entrant and will be a no-op if the command has already been queued and is now ready for execution.
2010-09-16 19:05:06 -07:00
Kris McQueen
dbb2897626
Unexposed parameters can now be assigned to commands. This are for internal use of the command, and will be serialized/deserialized during execution/response phases, but will not be accepted as part of the API request. Also create a DB utility file for the API to use which delegates requests to the DAOs. Mostly this utility class will look up objects by ID, and it allows the removal of similar methods from ManagementServer, thereby reducing some of the clutter in ManagementServer.
2010-09-14 14:54:04 -07:00
Kris McQueen
f4caf145c3
Refactoring dispatching API commands from the scheduled async job. Instead of calling an executor, the dispatcher invokes the method on the manager directly. After the command is executed the response is serialized to the async job table so it can be queried later. Also serialize a response for async create commands that includes the id of the object being created.
2010-09-13 18:28:19 -07:00
Kris McQueen
a8112f65de
When using session based authentication, we now store the parameters in the session as part of the login processing, instead of returning those parameters so that the caller has to update the session. Authentication now throws an exception on failure and the caught exception is where the session is invalidated.
2010-09-13 17:04:11 -07:00
Kris McQueen
449d1f3acf
working through some compilation errors that have arisen due to all the API refactoring...
2010-09-13 14:46:23 -07:00
Alex Huang
b250b985ec
changes
2010-08-18 12:19:22 -07:00
Manuel Amador (Rudd-O)
ac730ec496
Branch 2.1.refactor committed
2010-08-11 09:13:42 -07:00
Manuel Amador (Rudd-O)
05c020e1f6
Source code committed
2010-08-11 09:13:29 -07:00