Source Code Cross Referenced for CreateRuleSet.java in  » Portal » Open-Portal » com » sun » portal » rewriter » test » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » com.sun.portal.rewriter.test.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.sun.portal.rewriter.test.util;
002:
003:        import com.sun.portal.rewriter.rom.InvalidXMLException;
004:        import com.sun.portal.rewriter.rom.Rule;
005:        import com.sun.portal.rewriter.rom.RuleSet;
006:        import com.sun.portal.rewriter.rom.RuleSetManager;
007:
008:        public class CreateRuleSet {
009:            private static final String end = "</RuleSet>";
010:
011:            private static String getStart() {
012:                return Rule.XML_HEADER + "<RuleSet id=\"test_ruleset"
013:                        + Math.round(Math.random() * 100000) + "\">";
014:            }//getStart()
015:
016:            public static RuleSet withJSVariableRules(String aXMLString)
017:                    throws InvalidXMLException {
018:                String xml = getStart() + "	<JSRules>" + aXMLString
019:                        + "</JSRules>" + end;
020:                return RuleSetManager.create(xml);
021:            }//withJSVariableRules()
022:
023:            public static RuleSet withJSFunctionRules(String aXMLString)
024:                    throws InvalidXMLException {
025:                String xml = getStart() + "<JSRules>" + aXMLString
026:                        + "</JSRules>" + end;
027:                return RuleSetManager.create(xml);
028:            }//withJSFunctionRules()
029:
030:            public static RuleSet withHTMLAttributeRules(String aXMLString)
031:                    throws InvalidXMLException {
032:                String xml = getStart() + "<HTMLRules>" + aXMLString
033:                        + "</HTMLRules>" + end;
034:                return RuleSetManager.create(xml);
035:            }//withHTMLAttributeRules()
036:
037:            public static RuleSet withXMLAttributeRules(String aXMLString)
038:                    throws InvalidXMLException {
039:                String xml = getStart() + "<XMLRules>" + aXMLString
040:                        + "</XMLRules>" + end;
041:                return RuleSetManager.create(xml);
042:            }//withXMLAttributeRules()
043:
044:            public static RuleSet withXMLTagTextRules(String aXMLString)
045:                    throws InvalidXMLException {
046:                String xml = getStart() + "<XMLRules>" + aXMLString
047:                        + "</XMLRules>" + end;
048:                return RuleSetManager.create(xml);
049:            }//withHTMLAttributeRules()
050:
051:            public static RuleSet withXMLAttTagTextRules(String aAttRules,
052:                    String aTagTextRules) throws InvalidXMLException {
053:                String xml = getStart() + "<XMLRules>" + aAttRules
054:                        + aTagTextRules + "</XMLRules>" + end;
055:                return RuleSetManager.create(xml);
056:            }//withHTMLAttributeRules()
057:
058:            public static RuleSet emptyRuleSet() throws InvalidXMLException {
059:                String xml = getStart() + end;
060:                return RuleSetManager.create(xml);
061:            }//emptyRuleSet()
062:
063:            public static RuleSet withHTMLAttJSVarRules(String htmlAtt,
064:                    String jsVar) throws InvalidXMLException {
065:                String xml = getStart() + "<HTMLRules>" + htmlAtt
066:                        + "</HTMLRules>" + "<JSRules>" + jsVar + "</JSRules>"
067:                        + end;
068:                return RuleSetManager.create(xml);
069:            }//withHTMLAttJSVarRules()
070:
071:            public static RuleSet withHTMLAttJSFunRules(String htmlAtt,
072:                    String jsFun) throws InvalidXMLException {
073:                String xml = getStart() + "<HTMLRules>" + htmlAtt
074:                        + "</HTMLRules>" + "<JSRules>" + jsFun + "</JSRules>"
075:                        + end;
076:                return RuleSetManager.create(xml);
077:            }//withHTMLAttJSFunRules()
078:
079:            public static RuleSet withHTMLJSTokenJSVarJSFunRules(
080:                    String htmlJSToken, String jsVar, String jsFun)
081:                    throws InvalidXMLException {
082:                String xml = getStart() + "<HTMLRules>" + htmlJSToken
083:                        + "</HTMLRules>" + "<JSRules>" + jsVar + jsFun
084:                        + "</JSRules>" + end;
085:                return RuleSetManager.create(xml);
086:            }//withHTMLJSTokenJSVarJSFunRules()
087:
088:            public static RuleSet withHTMLAttJSTokenJSVarJSFunRules(
089:                    String htmlAtt, String htmlJSToken, String jsVar,
090:                    String jsFun) throws InvalidXMLException {
091:                String xml = getStart() + "<HTMLRules>" + htmlJSToken + htmlAtt
092:                        + "</HTMLRules>" + "<JSRules>" + jsVar + jsFun
093:                        + "</JSRules>" + end;
094:                return RuleSetManager.create(xml);
095:            }//withHTMLJSTokenJSVarJSFunRules()
096:
097:            public static RuleSet withHTMLAttJSVarJSFunRules(String htmlAtt,
098:                    String jsVar, String jsFun) throws InvalidXMLException {
099:                String xml = getStart() + "<HTMLRules>" + htmlAtt
100:                        + "</HTMLRules>" + "<JSRules>" + jsVar + jsFun
101:                        + "</JSRules>" + end;
102:                return RuleSetManager.create(xml);
103:            }//withHTMLAttJSVarJSFunRules()
104:
105:            public static RuleSet withHTMLAttHTMLJSTokenJSVar(String htmlAtt,
106:                    String htmlJSToken, String jsVar)
107:                    throws InvalidXMLException {
108:                String xml = getStart() + "<HTMLRules>" + htmlAtt + htmlJSToken
109:                        + "</HTMLRules>" + "<JSRules>" + jsVar + "</JSRules>"
110:                        + end;
111:                return RuleSetManager.create(xml);
112:            }//withHTMLAttJSVarJSFunRules()
113:
114:            public static RuleSet withHTMLAppletAttRules(
115:                    String htmlAppletRules, String htmlAttRules)
116:                    throws InvalidXMLException {
117:                String xml = getStart() + "<HTMLRules>" + htmlAppletRules
118:                        + htmlAttRules + "</HTMLRules>" + end;
119:                return RuleSetManager.create(xml);
120:            }//withHTMLAppletAttRules()
121:
122:            public static RuleSet withHTMLAppletAttJSFunRules(
123:                    String htmlAppletRules, String htmlAttRules, String jsFun)
124:                    throws InvalidXMLException {
125:                String xml = getStart() + "<HTMLRules>" + htmlAppletRules
126:                        + htmlAttRules + "</HTMLRules>" + "<JSRules>" + jsFun
127:                        + "</JSRules>" + end;
128:                return RuleSetManager.create(xml);
129:            }//withHTMLAppletAttRules()
130:
131:            public static RuleSet withHTMLAppletAttJSVarJSFunRules(
132:                    String htmlAppletRules, String htmlAttRules, String jsVar,
133:                    String jsFun) throws InvalidXMLException {
134:                String xml = getStart() + "<HTMLRules>" + htmlAppletRules
135:                        + htmlAttRules + "</HTMLRules>" + "<JSRules>" + jsVar
136:                        + jsFun + "</JSRules>" + end;
137:                return RuleSetManager.create(xml);
138:            }//withHTMLAppletAttJSVarJSFunRules()
139:
140:            public static RuleSet withHTMLFormAttRules(String htmlFormRules,
141:                    String htmlAttRules) throws InvalidXMLException {
142:                String xml = getStart() + "<HTMLRules>" + htmlFormRules
143:                        + htmlAttRules + "</HTMLRules>" + end;
144:                return RuleSetManager.create(xml);
145:            }//withHTMLFormAttRules()
146:
147:            public static RuleSet withHTMLAppletFormAttRules(
148:                    String htmlAppletRules, String htmlFormRules,
149:                    String htmlAttRules) throws InvalidXMLException {
150:                String xml = getStart() + "<HTMLRules>" + htmlAppletRules
151:                        + htmlFormRules + htmlAttRules + "</HTMLRules>" + end;
152:                return RuleSetManager.create(xml);
153:            }//withHTMLFormAttRules()
154:
155:            public static RuleSet withHTMLFormJSRules(String htmlFormRules,
156:                    String jsRules) throws InvalidXMLException {
157:                String xml = getStart() + "<HTMLRules>" + htmlFormRules
158:                        + "</HTMLRules>" + "<JSRules>" + jsRules + "</JSRules>"
159:                        + end;
160:                return RuleSetManager.create(xml);
161:            }//withHTMLFormAttRules()
162:        }//class RuleSetHelper
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.