summaryrefslogtreecommitdiff
path: root/src/main/resources/boot/SC
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-03-06 16:46:11 +0100
committerAndrew Branson <andrew.branson@cern.ch>2014-03-06 16:46:11 +0100
commit20aab0c365e87cdefadbb2c5c9325c530761a320 (patch)
treea2be0f99bdc2659602f59fca31d058317543f298 /src/main/resources/boot/SC
parentb602cedddd7a22243d4507a98711517d249e8dc6 (diff)
New ModuleFactory - not finished yet. Can collect module info but not
export. Contents collection to be added. Pretty-printed XML - an example module should be easy to read.
Diffstat (limited to 'src/main/resources/boot/SC')
-rw-r--r--src/main/resources/boot/SC/InstantiateItem.xml33
-rw-r--r--src/main/resources/boot/SC/LocalObjectDefCreator.xml2
-rw-r--r--src/main/resources/boot/SC/New.xml2
-rw-r--r--src/main/resources/boot/SC/SetWorkflow.xml2
4 files changed, 20 insertions, 19 deletions
diff --git a/src/main/resources/boot/SC/InstantiateItem.xml b/src/main/resources/boot/SC/InstantiateItem.xml
index 1ad7b6c..d4920f4 100644
--- a/src/main/resources/boot/SC/InstantiateItem.xml
+++ b/src/main/resources/boot/SC/InstantiateItem.xml
@@ -1,14 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<cristalscript>
- <output name="errors" type="com.c2kernel.scripting.ErrorInfo"/>
- <script language="javascript" name="InstantiateItem"><![CDATA[
- importClass(Packages.com.c2kernel.lookup.DomainPath);
-
+<cristalscript>
+ <output name="errors" type="com.c2kernel.scripting.ErrorInfo" />
+ <script language="javascript" name="InstantiateItem"><![CDATA[
+ importClass(Packages.com.c2kernel.lookup.DomainPath);
+
// Get parameters from outcome
var name = job.getOutcome().getField("ObjectName");
var folder = job.getOutcome().getField("SubFolder");
- var domPath = "/" + (folder != null?folder:"");
- // Create new Item
+ var root = job.getActPropString("Root");
+ var domPath = (root != null?root:"") + "/" + (folder != null?folder:"");
+
+ // Create new Item
var params = new Array(2);
params[0] = name;
params[1] = domPath;
@@ -18,11 +19,11 @@
} catch (e) {
throw "Could not create "+name+": "+e.message;
}
-
- // If this script is running in the Cristal GUI, open the new item.
- //try {
- // Packages.com.c2kernel.gui.MainFrame.treeBrowser.push(new DomainPath(domPath+"/"+name));
- //} catch (e) { }
-
- ]]></script>
-</cristalscript>
+
+ // If this script is running in the Cristal GUI, open the new item.
+ //try {
+ // Packages.com.c2kernel.gui.MainFrame.treeBrowser.push(new DomainPath(domPath+"/"+name));
+ //} catch (e) { }
+
+ ]]></script>
+</cristalscript> \ No newline at end of file
diff --git a/src/main/resources/boot/SC/LocalObjectDefCreator.xml b/src/main/resources/boot/SC/LocalObjectDefCreator.xml
index d47789d..de082dc 100644
--- a/src/main/resources/boot/SC/LocalObjectDefCreator.xml
+++ b/src/main/resources/boot/SC/LocalObjectDefCreator.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<cristalscript>
- <output name="errors" type="com.c2kernel.scripting.ErrorInfo"/>
+ <output name="errors" type="com.c2kernel.scripting.ErrorInfo" />
<script language="javascript" name="LocalObjectDefCreator"><![CDATA[
importClass(Packages.com.c2kernel.process.Gateway);
importClass(Packages.com.c2kernel.process.Bootstrap);
diff --git a/src/main/resources/boot/SC/New.xml b/src/main/resources/boot/SC/New.xml
index a07a7b9..385f410 100644
--- a/src/main/resources/boot/SC/New.xml
+++ b/src/main/resources/boot/SC/New.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<cristalscript>
- <output name="errors" type="com.c2kernel.scripting.ErrorInfo"/>
+ <output name="errors" type="com.c2kernel.scripting.ErrorInfo" />
<script language="javascript" name=""><![CDATA[
]]></script>
diff --git a/src/main/resources/boot/SC/SetWorkflow.xml b/src/main/resources/boot/SC/SetWorkflow.xml
index 684b813..704d732 100644
--- a/src/main/resources/boot/SC/SetWorkflow.xml
+++ b/src/main/resources/boot/SC/SetWorkflow.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<cristalscript>
- <output name="errors" type="com.c2kernel.scripting.ErrorInfo"/>
+ <output name="errors" type="com.c2kernel.scripting.ErrorInfo" />
<script language="javascript" name="SetWorkflow"><![CDATA[
importClass(Packages.com.c2kernel.lookup.DomainPath);