X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=server%2Forg.argeo.slc.ria%2Fsrc%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2FSlcApi.js;h=b5604d4d59d2763358d5a237267f4764ed4a6379;hb=096964f665fc3b0e3d233b498b8b30823ae5fa36;hp=e598db51eb83bc3508a62de6e0ccb44d9d263c6a;hpb=cebfbf8efbf6a6b99a543bd309d2976478123989;p=gpl%2Fargeo-slc.git diff --git a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js index e598db51e..b5604d4d5 100644 --- a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js +++ b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js @@ -20,7 +20,9 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", COPY_COLLECTION_TO_COLL_SERVICE : "copyCollectionToCollection.service", LIST_RESULTS_SERVICE : "listResultAttributes.service", GET_RESULT_SERVICE : "getResult.service", + GET_ATTACHEMENT_SERVICE : "getAttachment.service", LIST_SLCEXEC_SERVICE : "listSlcExecutions.service", + NEW_SLCEXEC_SERVICE : "newSlcExecution.service", LIST_AGENTS_SERVICE : "listAgents.service", LIST_MODULES_SERVICE : "listModulesDescriptors.service", @@ -28,6 +30,9 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", RELOAD_BUNDLE_SERVICE : "reloadBundle.service", AMQ_SERVICE : "amq", + LIST_MODULAR_DISTRIB_SERVICE : "listModularDistributions.service", + UPLOAD_MODULAR_DISTRIB_SERVICE : "uploadModularDistrib.service", + /** * Standard Request getter * @param serviceName {String} The name of the service to call (without base context) @@ -182,6 +187,11 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", return request; }, + buildGetAttachmentUrl : function(attachmentId, contentType, name){ + return org.argeo.slc.ria.SlcApi.DEFAULT_CONTEXT + "/" + org.argeo.slc.ria.SlcApi.GET_ATTACHEMENT_SERVICE + + "?uuid=" + attachmentId + "&contentType=" + contentType + "&name=" + name; + }, + /** * List currently registered SlcExecutions. * @param fireReloadEventType {String} Event type to trigger (optionnal) @@ -196,6 +206,44 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", ); }, + /** + * List currently registered SlcExecutions. + * @param fireReloadEventType {String} Event type to trigger (optionnal) + * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update + * @return {qx.io.remote.Request} + */ + getListModularDistributionsService:function(fireReloadEventType, iLoadStatusables){ + return org.argeo.slc.ria.SlcApi.getServiceRequest( + org.argeo.slc.ria.SlcApi.LIST_MODULAR_DISTRIB_SERVICE, + fireReloadEventType, + iLoadStatusables + ); + }, + + getUploadModularDistributionsService : function(){ + return org.argeo.slc.ria.SlcApi.UPLOAD_MODULAR_DISTRIB_SERVICE; + }, + + /** + * New SlcExecution + * @param agentId {String} Agent id target + * @param xmlDescription {String} XML of the Slc Execution + * @param fireReloadEventType {String} Event type to trigger (optionnal) + * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update + * @return {qx.io.remote.Request} + */ + getNewSlcExecutionService:function(agentId, xmlDescription, fireReloadEventType, iLoadStatusables){ + var req = org.argeo.slc.ria.SlcApi.getServiceRequest( + org.argeo.slc.ria.SlcApi.NEW_SLCEXEC_SERVICE + "?slc_agentId="+agentId, + fireReloadEventType, + iLoadStatusables + ); + req.setMethod("POST"); + //req.setRequestHeader("Content-Type", "text/xml"); + req.setData("body=" + encodeURIComponent(xmlDescription)); + return req; + }, + /** * List currently available agents queues.