01: /*
02: * @(#)init.java 1.3 05/01/14
03: *
04: * Copyright (c) 2001-2003 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.mail;
10:
11: import pnuts.lang.Runtime;
12: import pnuts.lang.Package;
13: import pnuts.lang.Context;
14: import pnuts.ext.ModuleBase;
15:
16: public class init extends ModuleBase {
17:
18: static String[] files = { "pnuts/mail/folder", "pnuts/mail/mail" };
19:
20: static String[][] functions = {
21: { "listMailFolders", "openMailStore", "openMailFolder",
22: "getMessages", "FETCH_ENVELOPE", "FETCH_FLAGS",
23: "FETCH_CONTENT_INFO" },
24: { "sendEmail", "emailAddress", "mimepart",
25: "setMailCharset", "attachText", "attachFile",
26: "attachURL" } };
27:
28: static String[] requiredModules = { "pnuts.lib" };
29:
30: protected String[] getRequiredModules() {
31: return requiredModules;
32: }
33:
34: public Object execute(Context context) {
35: for (int i = 0; i < files.length; i++) {
36: autoload(functions[i], files[i], context);
37: }
38: return null;
39: }
40: }
|