]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Module.js
Remove unused stuff
[gpl/argeo-slc.git] / server / org.argeo.slc.ria / src / argeo-ria-lib / slc / class / org / argeo / slc / ria / execution / Module.js
diff --git a/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Module.js b/server/org.argeo.slc.ria/src/argeo-ria-lib/slc/class/org/argeo/slc/ria/execution/Module.js
deleted file mode 100644 (file)
index 5ce6579..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/**\r
- * Wrapper for ExecutionModule server object\r
- */\r
-qx.Class.define("org.argeo.slc.ria.execution.Module", {\r
-       \r
-       extend : qx.core.Object,\r
-       \r
-       properties : {\r
-               /**\r
-                * The name of the module\r
-                */\r
-               name : {\r
-                       check : "String",\r
-                       init : ""\r
-               },\r
-               label : {\r
-                       check : "String",\r
-                       init : ""                       \r
-               },\r
-               description : {\r
-                       check : "String",\r
-                       init : ""                       \r
-               },\r
-               /**\r
-                * The version of the module\r
-                */\r
-               version : {\r
-                       check : "String",\r
-                       init : ""\r
-               },\r
-               /**\r
-                * All execution flows registered by their name\r
-                */\r
-               executionFlows : {\r
-                       check : "Map"\r
-               },\r
-               /**\r
-                * All execution specs registered by their name\r
-                */\r
-               executionSpecs : {\r
-                       check : "Map"\r
-               },\r
-               /**\r
-                * XML description (castor)\r
-                */\r
-               xmlNode : {\r
-                       apply : "_applyXmlNode"\r
-               }\r
-       },\r
-       \r
-       statics : {\r
-               XPATH_ROOT : "slc:execution-module-descriptor",         \r
-               XPATH_NAME : "slc:name",\r
-               XPATH_LABEL : "slc:label",\r
-               XPATH_DESCRIPTION : "slc:description",\r
-               XPATH_VERSION : "slc:version",\r
-               XPATH_EXECUTION_FLOWS : "slc:execution-flows/slc:execution-flow-descriptor",\r
-               XPATH_EXECUTION_SPECS : "slc:execution-specs/slc:default-execution-spec"\r
-       },\r
-       \r
-       construct : function(){\r
-               this.base(arguments);\r
-               this.setExecutionFlows({});\r
-               this.setExecutionSpecs({});\r
-       },\r
-       \r
-       members : {\r
-               /**\r
-                * Add an execution flow to this module\r
-                * @param executionFlow {org.argeo.slc.ria.execution.Flow} An instance of execution.Flow\r
-                */\r
-               addExecutionFlow : function(executionFlow){\r
-                       var spec = this.getExecutionSpecByName(executionFlow.getExecutionSpecName());\r
-                       if(spec){\r
-                               executionFlow.setExecutionSpec(spec);\r
-                       }else{\r
-                               this.error("Warning, reference to an unknown ExecutionSpec : "+executionFlow.getExecutionSpecName());\r
-                       }\r
-                       this.getExecutionFlows()[executionFlow.getName()] = executionFlow;\r
-               },\r
-               \r
-               /**\r
-                * Add an execution Spec to this module\r
-                * @param executionSpec {org.argeo.slc.ria.execution.Spec} An instance of ExecutionSpec\r
-                */\r
-               addExecutionSpec : function(executionSpec){\r
-                       this.getExecutionSpecs()[executionSpec.getName()] = executionSpec;\r
-               },\r
-               /**\r
-                * Find an execution spec by its name\r
-                * @param name {String} Name of the spec\r
-                * @return {org.argeo.slc.ria.execution.Spec} The spec\r
-                */\r
-               getExecutionSpecByName : function(name){\r
-                       return this.getExecutionSpecs()[name];\r
-               },\r
-               \r
-               /**\r
-                * Find an execution flow by its name\r
-                * @param name {String} name of the flow\r
-                * @return {org.argeo.slc.ria.execution.Flow} The flow\r
-                */\r
-               getExecutionFlowByName : function(name){\r
-                       return this.getExecutionFlows()[name];\r
-               },\r
-               \r
-               moduleDataToXml : function(){\r
-                       var xmlData = '<slc:module-name>'+this.getName()+'</slc:module-name>';\r
-                       xmlData += '<slc:module-version>'+this.getVersion()+'</slc:module-version>';\r
-                       return xmlData;\r
-               },\r
-               \r
-               /**\r
-                * An xml node containing the castor mapped description of this object\r
-                * @param xmlNode {Node}\r
-                */\r
-               _applyXmlNode : function(xmlNode){\r
-                       var appendRoot = "";\r
-                       if(xmlNode.nodeName != this.self(arguments).XPATH_ROOT){\r
-                               appendRoot = this.self(arguments).XPATH_ROOT+"/";\r
-                       }\r
-                       // Parse now                    \r
-                       this.setName(org.argeo.ria.util.Element.getSingleNodeText(xmlNode, appendRoot + this.self(arguments).XPATH_NAME) || "Not Found");\r
-                       this.setVersion(org.argeo.ria.util.Element.getSingleNodeText(xmlNode, appendRoot + this.self(arguments).XPATH_VERSION));\r
-                       this.setLabel(org.argeo.ria.util.Element.getSingleNodeText(xmlNode, appendRoot + this.self(arguments).XPATH_LABEL) || this.getName());\r
-                       this.setDescription(org.argeo.ria.util.Element.getSingleNodeText(xmlNode, appendRoot + this.self(arguments).XPATH_DESCRIPTION) || "");\r
-                       \r
-                       // Parse Specs first\r
-                       var specs = org.argeo.ria.util.Element.selectNodes(xmlNode, appendRoot + this.self(arguments).XPATH_EXECUTION_SPECS);\r
-                       if(specs){\r
-                               for(i=0; i< specs.length;i++){\r
-                                       var execSpec = new org.argeo.slc.ria.execution.Spec();\r
-                                       execSpec.setXmlNode(specs[i]);\r
-                                       this.addExecutionSpec(execSpec);\r
-                               }\r
-                       }\r
-                               // Now parse Flows : to do AFTER specs\r
-                       var flows = org.argeo.ria.util.Element.selectNodes(xmlNode, appendRoot + this.self(arguments).XPATH_EXECUTION_FLOWS);\r
-                       if(flows){\r
-                               for(var i=0;i<flows.length;i++){\r
-                                       var execFlow = new org.argeo.slc.ria.execution.Flow();\r
-                                       execFlow.setXmlNode(flows[i]);\r
-                                       this.addExecutionFlow(execFlow);\r
-                               }\r
-                       }\r
-               }\r
-               \r
-       }       \r
-       \r
-});
\ No newline at end of file