X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=server%2Forg.argeo.slc.ria%2Fsrc%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2FSlcApi.js;h=d69830da20e692960bdd1b513f33be06aca711d5;hb=e0be1cede09ad3163fd389e327191cac8ccea575;hp=e2bdefb1ac4961cbcd570d6fdd17aee706c77ac3;hpb=7d09d24d6c54c8abf6e849dabd26c6f297fc9166;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 e2bdefb1a..d69830da2 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", @@ -182,6 +184,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 +203,27 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", ); }, + + /** + * 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. @@ -235,12 +263,13 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update * @return {qx.io.remote.Request} */ - getLoadExecutionDescriptorService : function(moduleName, moduleVersion, fireReloadEventType, iLoadStatusables){ + getLoadExecutionDescriptorService : function(agentId,moduleName, moduleVersion, fireReloadEventType, iLoadStatusables){ var req = org.argeo.slc.ria.SlcApi.getServiceRequest( org.argeo.slc.ria.SlcApi.GET_EXECUTION_DESC_SERVICE, fireReloadEventType, iLoadStatusables ); + req.setParameter("agentId", agentId); req.setParameter("moduleName", moduleName); req.setParameter("version", moduleVersion); return req;