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=48affdb5a85990f3ac5e192fd42748df73b247c1;hb=d4d0578c8c9dd7428cd04b2164bb1338cf0e04cd;hp=7009757a1857365293d0077aa2f0e2c4cdd77c30;hpb=7a3b9a150bbd8f6e7110b61fd85594e1a3fb9c53;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 7009757a1..48affdb5a 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 @@ -27,9 +27,14 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", LIST_AGENTS_SERVICE : "listAgents.service", LIST_MODULES_SERVICE : "listModulesDescriptors.service", GET_EXECUTION_DESC_SERVICE : "getExecutionDescriptor.service", + GET_SLC_EXECUTION_SERVICE : "getSlcExecution.service", RELOAD_BUNDLE_SERVICE : "reloadBundle.service", AMQ_SERVICE : "amq", + LIST_MODULAR_DISTRIB_SERVICE : "listModularDistributions.service", + INSTALL_MODULE_SERVICE : "installModule.service", + UNINSTALL_MODULE_SERVICE : "uninstallModule.service", + /** * Standard Request getter * @param serviceName {String} The name of the service to call (without base context) @@ -184,9 +189,9 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", return request; }, - buildGetAttachmentUrl : function(attachmentId, contentType){ + 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; + + "?uuid=" + attachmentId + "&contentType=" + contentType + "&name=" + name; }, /** @@ -203,7 +208,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 + ); + }, + + getInstallModuleService : function(){ + return org.argeo.slc.ria.SlcApi.DEFAULT_CONTEXT +"/"+ org.argeo.slc.ria.SlcApi.INSTALL_MODULE_SERVICE; + }, + + /** + * Load a result test + * @param resultId {String} Id of the test result to load + * @param fireReloadEventType {String} Whether query should trigger a ReloadEvent + * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update + * @return {qx.io.remote.Request} + */ + getUninstallModuleService : function(moduleName, moduleVersion, fireReloadEventType, iLoadStatusables){ + var request = org.argeo.slc.ria.SlcApi.getServiceRequest( + org.argeo.slc.ria.SlcApi.UNINSTALL_MODULE_SERVICE, + fireReloadEventType, + iLoadStatusables + ); + request.setParameter("name", moduleName); + request.setParameter("version", moduleVersion); + return request; + }, + + /** * New SlcExecution * @param agentId {String} Agent id target @@ -224,6 +266,15 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", return req; }, + getSlcExecutionService :function(executionMessageId, fireReloadEventType, iLoadStatusables){ + var request = org.argeo.slc.ria.SlcApi.getServiceRequest( + org.argeo.slc.ria.SlcApi.GET_SLC_EXECUTION_SERVICE, + fireReloadEventType, + iLoadStatusables + ); + request.setParameter("uuid", executionMessageId); + return request; + }, /** * List currently available agents queues.