]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js
MonitorPerspective implementation
[gpl/argeo-slc.git] / server / org.argeo.slc.ria / src / argeo-ria-lib / slc / class / org / argeo / slc / ria / SlcApi.js
index e2bdefb1ac4961cbcd570d6fdd17aee706c77ac3..b5604d4d59d2763358d5a237267f4764ed4a6379 100644 (file)
@@ -20,7 +20,9 @@ qx.Class.define("org.argeo.slc.ria.SlcApi",
        COPY_COLLECTION_TO_COLL_SERVICE : "copyCollectionToCollection.service",\r
        LIST_RESULTS_SERVICE : "listResultAttributes.service",\r
        GET_RESULT_SERVICE : "getResult.service",\r
+       GET_ATTACHEMENT_SERVICE : "getAttachment.service",\r
        LIST_SLCEXEC_SERVICE : "listSlcExecutions.service",\r
+       NEW_SLCEXEC_SERVICE : "newSlcExecution.service",\r
        \r
        LIST_AGENTS_SERVICE : "listAgents.service",\r
        LIST_MODULES_SERVICE : "listModulesDescriptors.service",\r
@@ -28,6 +30,9 @@ qx.Class.define("org.argeo.slc.ria.SlcApi",
        RELOAD_BUNDLE_SERVICE : "reloadBundle.service",\r
        AMQ_SERVICE : "amq",\r
        \r
+       LIST_MODULAR_DISTRIB_SERVICE : "listModularDistributions.service",\r
+       UPLOAD_MODULAR_DISTRIB_SERVICE : "uploadModularDistrib.service",\r
+       \r
        /**\r
         * Standard Request getter\r
         * @param serviceName {String} The name of the service to call (without base context)\r
@@ -182,6 +187,11 @@ qx.Class.define("org.argeo.slc.ria.SlcApi",
                return request;\r
        },\r
 \r
+       buildGetAttachmentUrl : function(attachmentId, contentType, name){\r
+               return org.argeo.slc.ria.SlcApi.DEFAULT_CONTEXT + "/" + org.argeo.slc.ria.SlcApi.GET_ATTACHEMENT_SERVICE\r
+                       + "?uuid=" + attachmentId + "&contentType=" + contentType + "&name=" + name;\r
+       },\r
+       \r
        /**\r
         * List currently registered SlcExecutions.\r
         * @param fireReloadEventType {String} Event type to trigger (optionnal)\r
@@ -196,6 +206,44 @@ qx.Class.define("org.argeo.slc.ria.SlcApi",
                );\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
+       getListModularDistributionsService:function(fireReloadEventType, iLoadStatusables){\r
+               return org.argeo.slc.ria.SlcApi.getServiceRequest(\r
+                       org.argeo.slc.ria.SlcApi.LIST_MODULAR_DISTRIB_SERVICE,\r
+                       fireReloadEventType,\r
+                       iLoadStatusables\r
+               );\r
+       },\r
+       \r
+       getUploadModularDistributionsService : function(){\r
+               return org.argeo.slc.ria.SlcApi.UPLOAD_MODULAR_DISTRIB_SERVICE;\r
+       },\r
+\r
+       /**\r
+        * New SlcExecution\r
+        * @param agentId {String} Agent id target\r
+        * @param xmlDescription {String} XML of the Slc Execution\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
+       getNewSlcExecutionService:function(agentId, xmlDescription, fireReloadEventType, iLoadStatusables){\r
+               var req = org.argeo.slc.ria.SlcApi.getServiceRequest(\r
+                       org.argeo.slc.ria.SlcApi.NEW_SLCEXEC_SERVICE + "?slc_agentId="+agentId,\r
+                       fireReloadEventType,\r
+                       iLoadStatusables\r
+               );\r
+               req.setMethod("POST");\r
+               //req.setRequestHeader("Content-Type", "text/xml");\r
+               req.setData("body=" + encodeURIComponent(xmlDescription));\r
+               return req;\r
+       },\r
+       \r
        \r
        /**\r
         * List currently available agents queues.\r
@@ -235,12 +283,13 @@ qx.Class.define("org.argeo.slc.ria.SlcApi",
         * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update \r
         * @return {qx.io.remote.Request}\r
         */\r
-       getLoadExecutionDescriptorService : function(moduleName, moduleVersion, fireReloadEventType, iLoadStatusables){\r
+       getLoadExecutionDescriptorService : function(agentId,moduleName, moduleVersion, fireReloadEventType, iLoadStatusables){\r
                var req = org.argeo.slc.ria.SlcApi.getServiceRequest(\r
                        org.argeo.slc.ria.SlcApi.GET_EXECUTION_DESC_SERVICE,\r
                        fireReloadEventType,\r
                        iLoadStatusables\r
                ); \r
+               req.setParameter("agentId", agentId);\r
                req.setParameter("moduleName", moduleName);\r
                req.setParameter("version", moduleVersion);\r
                return req;\r