X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2FSlcApi.js;h=1bab2a46e30b40e0674df66d0bb02db45c2651cb;hb=9fa32e016b61bccc61ae7aff9c70beec9e68f9e6;hp=82486cf56fdd7f24412a080c84d2c899f5fbd355;hpb=fbb37515d94515993468c998516fe8341189ef84;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js index 82486cf56..1bab2a46e 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcApi.js @@ -19,6 +19,10 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", LIST_COLLECTIONS_SERVICE : "listCollectionRefs.service", LIST_RESULTS_SERVICE : "listResultAttributes.service", GET_RESULT_SERVICE : "getResult.service", + LIST_SLCEXEC_SERVICE : "listSlcExecutions.service", + + LIST_AGENTS_SERVICE : "listAgents.service", + AMQ_SERVICE : "amq", /** * Standard Request getter @@ -124,6 +128,56 @@ qx.Class.define("org.argeo.slc.ria.SlcApi", ); request.setParameter("uuid", resultId); return request; + }, + + /** + * 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} + */ + getListSlcExecutionsService:function(fireReloadEventType, iLoadStatusables){ + return org.argeo.slc.ria.SlcApi.getServiceRequest( + org.argeo.slc.ria.SlcApi.LIST_SLCEXEC_SERVICE, + fireReloadEventType, + iLoadStatusables + ); + }, + + + /** + * List currently available agents queues. + * @param fireReloadEventType {String} Event type to trigger (optionnal) + * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update + * @return {qx.io.remote.Request} + */ + getListAgentsService:function(fireReloadEventType, iLoadStatusables){ + return org.argeo.slc.ria.SlcApi.getServiceRequest( + org.argeo.slc.ria.SlcApi.LIST_AGENTS_SERVICE, + fireReloadEventType, + iLoadStatusables + ); + }, + + /** + * Send a JMS message to the AMQ_CONTEXT + * @param destination {String} The destination queue, in the form "topic://destination" + * @param message {org.argeo.slc.ria.SlcExecutionMessage} The message object + * @param iLoadStatusables {org.argeo.ria.components.ILoadStatusables[]} Gui parts to update + */ + getSendAmqMessageRequest : function(destination, message, iLoadStatusables){ + var serviceManager = org.argeo.ria.remote.RequestManager.getInstance(); + var request = serviceManager.getRequest( + org.argeo.slc.ria.SlcApi.DEFAULT_CONTEXT+"/"+org.argeo.slc.ria.SlcApi.AMQ_SERVICE, + "POST", + "text/plain", + null, + iLoadStatusables + ); + request.setParameter("destination", destination); + request.setParameter("message", message.toXml()); + request.setParameter("type", "send"); + return request; } }