01: /*
02: * @(#)init.java 1.3 05/01/14
03: *
04: * Copyright (c) 2003,2004 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * See the file "LICENSE.txt" for information on usage and redistribution
07: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
08: */
09: package pnuts.xml;
10:
11: import pnuts.lang.Context;
12: import pnuts.ext.ModuleBase;
13: import pnuts.lang.Package;
14:
15: /**
16: * Initialization of the pnuts.xml module
17: */
18: public class init extends ModuleBase {
19:
20: static String[] javaFunctions = { "nodeAccess", "nodeEdit",
21: "element", "defineTags", "newDocument", "writeDocument",
22: "traverseDocument", "readDocument", "transformXSL",
23: "parseXML", "selectSingleNode", "selectNodeList" };
24:
25: static String[] files = {};
26:
27: static String[][] functions = { { "openSOAPConnection",
28: "createSOAPMessage", "sendSOAPMessage" } };
29:
30: static String[] requiredModules = { "pnuts.lib" };
31:
32: protected String[] getRequiredModules() {
33: return requiredModules;
34: }
35:
36: protected String getPrefix() {
37: return "org";
38: }
39:
40: public Object execute(Context context) {
41: for (int i = 0; i < javaFunctions.length; i++) {
42: autoloadFunction(javaFunctions[i], context);
43: }
44:
45: for (int i = 0; i < files.length; i++) {
46: autoload(functions[i], files[i], context);
47: }
48:
49: return null;
50: }
51: }
|