]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js
Splitted the LauncherApplet into two different applets. The first one is a generic...
[gpl/argeo-slc.git] / org.argeo.slc.webapp / src / main / webapp / argeo-ria-lib / slc / class / org / argeo / slc / ria / SlcApi.js
index 82486cf56fdd7f24412a080c84d2c899f5fbd355..1bab2a46e30b40e0674df66d0bb02db45c2651cb 100644 (file)
@@ -19,6 +19,10 @@ qx.Class.define("org.argeo.slc.ria.SlcApi",
        LIST_COLLECTIONS_SERVICE : "listCollectionRefs.service",\r
        LIST_RESULTS_SERVICE : "listResultAttributes.service",\r
        GET_RESULT_SERVICE : "getResult.service",\r
+       LIST_SLCEXEC_SERVICE : "listSlcExecutions.service",\r
+       \r
+       LIST_AGENTS_SERVICE : "listAgents.service",     \r
+       AMQ_SERVICE : "amq",\r
        \r
        /**\r
         * Standard Request getter\r
@@ -124,6 +128,56 @@ qx.Class.define("org.argeo.slc.ria.SlcApi",
                );\r
                request.setParameter("uuid", resultId);\r
                return request;\r
+       },\r
+\r
+       /**\r
+        * List currently registered SlcExecutions.\r
+        * @param fireReloadEventType {String} Event type to trigger (optionnal)\r
+        * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update \r
+        * @return {qx.io.remote.Request}\r
+        */\r
+       getListSlcExecutionsService:function(fireReloadEventType, iLoadStatusables){\r
+               return org.argeo.slc.ria.SlcApi.getServiceRequest(\r
+                       org.argeo.slc.ria.SlcApi.LIST_SLCEXEC_SERVICE,\r
+                       fireReloadEventType,\r
+                       iLoadStatusables\r
+               );\r
+       },\r
+       \r
+       \r
+       /**\r
+        * List currently available agents queues.\r
+        * @param fireReloadEventType {String} Event type to trigger (optionnal)\r
+        * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update \r
+        * @return {qx.io.remote.Request}\r
+        */\r
+       getListAgentsService:function(fireReloadEventType, iLoadStatusables){\r
+               return org.argeo.slc.ria.SlcApi.getServiceRequest(\r
+                       org.argeo.slc.ria.SlcApi.LIST_AGENTS_SERVICE,\r
+                       fireReloadEventType,\r
+                       iLoadStatusables\r
+               );\r
+       },\r
+       \r
+       /**\r
+        * Send a JMS message to the AMQ_CONTEXT\r
+        * @param destination {String} The destination queue, in the form "topic://destination" \r
+        * @param message {org.argeo.slc.ria.SlcExecutionMessage} The message object\r
+        * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update\r
+        */\r
+       getSendAmqMessageRequest : function(destination, message, iLoadStatusables){\r
+               var serviceManager = org.argeo.ria.remote.RequestManager.getInstance();\r
+               var request = serviceManager.getRequest(\r
+                       org.argeo.slc.ria.SlcApi.DEFAULT_CONTEXT+"/"+org.argeo.slc.ria.SlcApi.AMQ_SERVICE,\r
+                       "POST",\r
+                       "text/plain",\r
+                       null,\r
+                       iLoadStatusables\r
+               );\r
+               request.setParameter("destination", destination);\r
+               request.setParameter("message", message.toXml());\r
+               request.setParameter("type", "send");\r
+               return request;\r
        }\r
        \r
   }\r