X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2Fexecution%2FModule.js;h=5e5343184368d91f5dddb95960414b59a2972033;hb=e3ae72208feba2b542520878574d49ac16917573;hp=bd5c4c815f2049a4f47835409d40b2987aa2ee7f;hpb=b07b5d7a34c6954b702a5d9ce8b8926b2a6a1191;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Module.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Module.js index bd5c4c815..5e5343184 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Module.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Module.js @@ -1,7 +1,7 @@ /** * Wrapper for ExecutionModule server object */ -qx.Class.define("org.argeo.slc.ria.module.ExecutionModule", { +qx.Class.define("org.argeo.slc.ria.execution.Module", { extend : qx.core.Object, @@ -46,15 +46,17 @@ qx.Class.define("org.argeo.slc.ria.module.ExecutionModule", { XPATH_NAME : "slc:execution-module-descriptor/slc:name", XPATH_VERSION : "slc:execution-module-descriptor/slc:version", XPATH_EXECUTION_FLOWS : "slc:execution-module-descriptor/slc:executionFlows/slc:execution-flow-descriptor", - XPATH_EXECUTION_SPECS : "slc:execution-module-descriptor/slc:executionSpecs/slc:simple-execution-spec" + XPATH_EXECUTION_SPECS : "slc:execution-module-descriptor/slc:executionSpecs/slc:default-execution-spec" }, - construct : function(){}, + construct : function(){ + this.base(arguments); + }, members : { /** * Add an execution flow to this module - * @param executionFlow {org.argeo.slc.ria.module.ExecutionFlow} + * @param executionFlow {org.argeo.slc.ria.execution.Flow} An instance of execution.Flow */ addExecutionFlow : function(executionFlow){ var spec = this.getExecutionSpecByName(executionFlow.getExecutionSpecName()); @@ -68,16 +70,25 @@ qx.Class.define("org.argeo.slc.ria.module.ExecutionModule", { /** * Add an execution Spec to this module - * @param executionSpec {org.argeo.slc.ria.module.ExecutionSpec} + * @param executionSpec {org.argeo.slc.ria.execution.Spec} An instance of ExecutionSpec */ addExecutionSpec : function(executionSpec){ this.getExecutionSpecs()[executionSpec.getName()] = executionSpec; }, - + /** + * Find an execution spec by its name + * @param name {String} Name of the spec + * @return {org.argeo.slc.ria.execution.Spec} The spec + */ getExecutionSpecByName : function(name){ return this.getExecutionSpecs()[name]; }, + /** + * Find an execution flow by its name + * @param name {String} name of the flow + * @return {org.argeo.slc.ria.execution.Flow} The flow + */ getExecutionFlowByName : function(name){ return this.getExecutionFlows()[name]; }, @@ -93,14 +104,14 @@ qx.Class.define("org.argeo.slc.ria.module.ExecutionModule", { // Parse Specs first var specs = org.argeo.ria.util.Element.selectNodes(xmlNode, this.self(arguments).XPATH_EXECUTION_SPECS); for(i=0; i< specs.length;i++){ - var execSpec = new org.argeo.slc.ria.module.ExecutionSpec(); + var execSpec = new org.argeo.slc.ria.execution.Spec(); execSpec.setXmlNode(specs[i]); this.addExecutionSpec(execSpec); } // Now parse Flows : to do AFTER specs var flows = org.argeo.ria.util.Element.selectNodes(xmlNode, this.self(arguments).XPATH_EXECUTION_FLOWS); for(var i=0;i