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=7d4a647b824ae9132de2d4759ac6afc4f39f92b5;hpb=3e8c204b6086cb5fde52c36ec5cd04a775fad4a1;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 7d4a647b8..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,6 +20,7 @@ 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", @@ -29,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) @@ -183,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) @@ -197,6 +206,23 @@ 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 @@ -213,7 +239,7 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", iLoadStatusables ); req.setMethod("POST"); - req.setRequestHeader("Content-Type", "text/xml"); + //req.setRequestHeader("Content-Type", "text/xml"); req.setData("body=" + encodeURIComponent(xmlDescription)); return req; },