01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.rewriter.rom;
06:
07: import com.sun.portal.rewriter.engines.LanguageConstants;
08:
09: /**
10: * Core interface which enforces what all the rule objects should implement, it
11: * also contain all the constants related to JavaObject ---> XML mapping
12: *
13: * @version 1.0 12/15/2001
14: * @author Nagendra Kumar Raja, Nagendra.Raja@sun.com
15: */
16: public interface Rule {
17: public abstract String toXML();
18:
19: //public static final String RULESET_DTD_FILE_NAME = "RuleSetV62.dtd";
20: public static final String RULESET_DTD_FILE_NAME = "RuleSet.dtd";
21:
22: public static final String XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
23: + "<!DOCTYPE RuleSet SYSTEM \"jar://rewriter.jar/resources/"
24: + RULESET_DTD_FILE_NAME + "\">\n";
25:
26: //Tag Names
27: //RuleSet
28: public static final String RULESET = LanguageConstants.NAME_SPACE
29: + "RuleSet";
30:
31: //Common
32: public static final String ATTRIBUTE = LanguageConstants.NAME_SPACE
33: + "Attribute";
34: public static final String TAGTEXT = LanguageConstants.NAME_SPACE
35: + "TagText";
36:
37: //HTMLRules
38: public static final String HTMLRULES = LanguageConstants.NAME_SPACE
39: + "HTMLRules";
40: public static final String FORM = LanguageConstants.NAME_SPACE
41: + "Form";
42: public static final String APPLET = LanguageConstants.NAME_SPACE
43: + "Applet";
44:
45: //JSRules
46: public static final String JSRULES = LanguageConstants.NAME_SPACE
47: + "JSRules";
48: public static final String VARIABLE = LanguageConstants.NAME_SPACE
49: + "Variable";
50: public static final String FUNCTION = LanguageConstants.NAME_SPACE
51: + "Function";
52:
53: public static final String XMLRULES = LanguageConstants.NAME_SPACE
54: + "XMLRules";
55:
56: //Atribute Names
57: public static final String ID = "id";
58: public static final String EXTENDS = "extends";
59: public static final String TYPE = "type";
60: public static final String SOURCE = "source";
61: public static final String NAME = "name";
62: public static final String ATTRIBUTE_PATTERNS = "attributePatterns";
63: public static final String VALUE_PATTERNS = "valuePatterns";
64: public static final String PARAM_PATTERNS = "paramPatterns";
65: public static final String CODE = "code";
66: public static final String PARAM = "param";
67: public static final String TAG = "tag";
68: public static final String FIELD = "field";
69:
70: //Attribute values
71: public static final String NONE = "none";
72: public static final String URL = "URL";
73: public static final String EXPRESSION = "EXPRESSION";
74: public static final String DHTML = "DHTML";
75: public static final String DJS = "DJS";
76: public static final String SYSTEM = "SYSTEM";
77:
78: public static final RuleCollection[] EMPTY_RULE_COLLECTION_ARRAY = new RuleCollection[0];
79:
80: }//interface Rule
|