summaryrefslogtreecommitdiff
path: root/resources/boot/SC/InstantiateItem.xml
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2012-06-04 15:37:34 +0200
committerAndrew Branson <andrew.branson@cern.ch>2012-06-04 15:37:34 +0200
commit388a76a73c8a8131c7af8df2ba03cf16511c8ea5 (patch)
tree473206237625785b7828dd73c7e7be8b184bfba0 /resources/boot/SC/InstantiateItem.xml
parenteac30db6329f05cc7cf2a35613497e357b4db3aa (diff)
Mavenized
Diffstat (limited to 'resources/boot/SC/InstantiateItem.xml')
-rw-r--r--resources/boot/SC/InstantiateItem.xml28
1 files changed, 0 insertions, 28 deletions
diff --git a/resources/boot/SC/InstantiateItem.xml b/resources/boot/SC/InstantiateItem.xml
deleted file mode 100644
index 4e80e9d..0000000
--- a/resources/boot/SC/InstantiateItem.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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);
-
- // 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 params = new Array(2);
- params[0] = name;
- params[1] = domPath;
-
- try {
- agent.execute(item, "CreateItemFromDescription", params);
- } catch (e) {
- throw "Could not create "+name+": "+e.message;
- }
-
- // If this script is running in the Cristal GUI, open the new item.
- var tree = Packages.com.c2kernel.gui.MainFrame.treeBrowser;
- if (tree != null)
- tree.push(new DomainPath(domPath+"/"+name));
-
- ]]></script>
-</cristalscript>