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=afb6f5e92b2635cc204ca1e0da23c582ff65d556;hpb=251729be65752136e2892d175e7840df83812af1;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 afb6f5e92..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 @@ -20,15 +20,21 @@ 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", 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) @@ -183,6 +189,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,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 @@ -218,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.