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%2Fexecution%2FModule.js;fp=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2Fexecution%2FModule.js;h=0000000000000000000000000000000000000000;hb=9e3b34f5cfbf0551d804a1ea7e5d793707293d35;hp=5a3dd2d0de783c44f2839699411493f9a1d5bc3d;hpb=3e24f32c95b5ac3ec7fcae7000c4a8cfb857d514;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 deleted file mode 100644 index 5a3dd2d0d..000000000 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Module.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Wrapper for ExecutionModule server object - */ -qx.Class.define("org.argeo.slc.ria.execution.Module", { - - extend : qx.core.Object, - - properties : { - /** - * The name of the module - */ - name : { - check : "String", - init : "" - }, - /** - * The version of the module - */ - version : { - check : "String", - init : "" - }, - /** - * All execution flows registered by their name - */ - executionFlows : { - check : "Map" - }, - /** - * All execution specs registered by their name - */ - executionSpecs : { - check : "Map" - }, - /** - * XML description (castor) - */ - xmlNode : { - apply : "_applyXmlNode" - } - }, - - statics : { - XPATH_NAME : "slc:execution-module-descriptor/slc:name", - XPATH_VERSION : "slc:execution-module-descriptor/slc:version", - XPATH_EXECUTION_FLOWS : "slc:execution-module-descriptor/slc:execution-flows/slc:execution-flow-descriptor", - XPATH_EXECUTION_SPECS : "slc:execution-module-descriptor/slc:execution-specs/slc:default-execution-spec" - }, - - construct : function(){ - this.base(arguments); - this.setExecutionFlows({}); - this.setExecutionSpecs({}); - }, - - members : { - /** - * Add an execution flow to this module - * @param executionFlow {org.argeo.slc.ria.execution.Flow} An instance of execution.Flow - */ - addExecutionFlow : function(executionFlow){ - var spec = this.getExecutionSpecByName(executionFlow.getExecutionSpecName()); - if(spec){ - executionFlow.setExecutionSpec(spec); - }else{ - this.error("Warning, reference to an unknown ExecutionSpec : "+executionFlow.getExecutionSpecName()); - } - this.getExecutionFlows()[executionFlow.getName()] = executionFlow; - }, - - /** - * Add an execution Spec to this module - * @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]; - }, - - /** - * An xml node containing the castor mapped description of this object - * @param xmlNode {Node} - */ - _applyXmlNode : function(xmlNode){ - // Parse now - this.setName(org.argeo.ria.util.Element.getSingleNodeText(xmlNode, this.self(arguments).XPATH_NAME)); - this.setVersion(org.argeo.ria.util.Element.getSingleNodeText(xmlNode, this.self(arguments).XPATH_VERSION)); - // 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.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