001: package migration.modules.rules;
002:
003: public class TestDataSource implements DataSource {
004:
005: public static final String[] SAMPLE_APPLET_ARRAY = {
006: "/NetMailServlet NetMail.class *", //0
007: "/NetFileApplet rp.class *", //1
008: "/NetletConfig SServer.class configURL", }; // 2
009:
010: public static final String[] SAMPLE_ATTRIBUTE_ARRAY = {
011: "/ATTRNetMailServlet val1 *", //0
012: "/ATTRNetFileApplet val2 *", //1
013: "/ATTRNetletConfig val3 *" }; // 2
014:
015: public static final String[] SAMPLE_FORM_ARRAY = {
016: "/some_dir/some.html * * url1, url3, url4",
017: "*/some.html * * url1, url3, url4",
018: "/some_dir/* * * url1, url3, url4",
019: "* form1 * url1, url3, url4", "* form2 * none",
020: "* form* * url1, url3, url4",
021: "* * iplanet* url1, url3, url4", "* * iplanet1 url1",
022: "* * *3 url3, url4", "* * iplanet2 *|*|none",
023: "* * iplanet* *|*|*| url2", };
024:
025: public static final String[] SAMPLE_JS_TOKEN_ARRAY = { "onAbort",
026: "onBlur", "onChange", "onClick", "onDblClick", "onError",
027: "onFocus", "onKeyDown", "onKeyPress", "onKeyUp", "onLoad",
028: "onMouseDown", "onMouseMove", "onMouseOut", "onMouseOver",
029: "onMouseUp", "onReset", "onSelect", "onSubmit", "onUnload", };
030:
031: public static final String[] SAMPLE_JS_VARIABLES_SIMPLE = {
032: "imgsrc", "location.href", "_fr.location", "mf.location",
033: "parent.location", "self.location", "g_szUserBase",
034: "g_szPublicFolderUrl", "g_szExWebDir", "szViewClassURL",
035: "g_szVirtualRoot", "g_szBaseURL", "g_szURL", };
036:
037: public static final String[] SAMPLE_JS_EXPRESSION_VARIABLE_ARRAY = {
038: "location", "surf_form_URL", };
039:
040: public static final String[] SAMPLE_JS_DHTML_VARIABLE_ARRAY = {
041: "__inbox__", "__drafts__", "__sent__", "__all__",
042: "__calendar__", "__todo__", "__meetings__", "__trash__",
043: "__discuss__", "__search__", "__arrow__" };
044:
045: public static final String[] SAMPLE_JS_SIMPLE_FUNCTION_ARRAY = {
046: "openURL:y", "openAppURL:y", "openNewWindow:y",
047: "parent.openNewWindow:y", "window.open:y",
048: "netletConfigOpen:y,y", "netletWinOpen:y", };
049:
050: public static final String[] SAMPLE_JS_EXPRESSION_FUNCTION_ARRAY = SAMPLE_JS_SIMPLE_FUNCTION_ARRAY;
051:
052: //public static final String[] SAMPLE_ATTRIBUTE_ARRAY=SAMPLE_JS_TOKEN_ARRAY;
053: public static final String[] SAMPLE_JS_DHTML_FUNCTION_ARRAY = {
054: "document.write:y", "document.writeln:y", };
055:
056: public String[] getHTMLAppletData() {
057: return SAMPLE_APPLET_ARRAY;
058: }
059:
060: public String[] getHTMLFormData() {
061: return SAMPLE_FORM_ARRAY;
062: }
063:
064: public String[] getHTMLAttributeData() {
065: // System.out.println("Entered attribute part...");
066: return SAMPLE_ATTRIBUTE_ARRAY;
067: }
068:
069: public String[] getXMLAttributeData() {
070: // System.out.println("Entered XML attribute part..."+SAMPLE_JS_TOKEN_ARRAY.toString());
071: return SAMPLE_ATTRIBUTE_ARRAY;
072: }
073:
074: public String[] getXMLTextStringData() {
075: //System.out.println("Entered XML textstring part...");
076: return SAMPLE_ATTRIBUTE_ARRAY;
077: }
078:
079: public String[] getHTMLJSTokenData() {
080: return SAMPLE_JS_TOKEN_ARRAY;
081: }
082:
083: public String[] getJSURLVariablesData() {
084: return SAMPLE_JS_VARIABLES_SIMPLE;
085: }
086:
087: public String[] getJSExpressionVariablesData() {
088: return SAMPLE_JS_EXPRESSION_VARIABLE_ARRAY;
089: }
090:
091: public String[] getJSDHTMLVariablesData() {
092: return SAMPLE_JS_DHTML_VARIABLE_ARRAY;
093: }
094:
095: public String[] getJSURLFunctionParamsData() {
096: return SAMPLE_JS_SIMPLE_FUNCTION_ARRAY;
097: }
098:
099: public String[] getJSExpressionFunctionParamsData() {
100: return SAMPLE_JS_EXPRESSION_FUNCTION_ARRAY;
101: }
102:
103: public String[] getJSDHTMLFunctionParamsData() {
104: return SAMPLE_JS_DHTML_FUNCTION_ARRAY;
105: }
106:
107: public String[] getJSDJSVariablesData() {
108: return new String[0];
109: }
110:
111: public String[] getJSDJSFunctionParamsData() {
112: return new String[0];
113: }
114:
115: public String[] getJSSystemVariablesData() {
116: return SAMPLE_JS_DHTML_FUNCTION_ARRAY;
117: }
118: }
|