Source Code Cross Referenced for RewriteContext.java in  » Web-Server » Brazil » sunlabs » brazil » template » 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 » Web Server » Brazil » sunlabs.brazil.template 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * RewriteContext.java
003:         *
004:         * Brazil project web application Framework,
005:         * export version: 1.1 
006:         * Copyright (c) 1999-2000 Sun Microsystems, Inc.
007:         *
008:         * Sun Public License Notice
009:         *
010:         * The contents of this file are subject to the Sun Public License Version 
011:         * 1.0 (the "License"). You may not use this file except in compliance with 
012:         * the License. A copy of the License is included as the file "license.terms",
013:         * and also available at http://www.sun.com/
014:         * 
015:         * The Original Code is from:
016:         *    Brazil project web application Framework release 1.1.
017:         * The Initial Developer of the Original Code is: cstevens.
018:         * Portions created by cstevens are Copyright (C) Sun Microsystems, Inc.
019:         * All Rights Reserved.
020:         * 
021:         * Contributor(s): cstevens, suhler.
022:         *
023:         * Version:  1.8
024:         * Created by cstevens on 99/09/29
025:         * Last modified by suhler on 00/07/06 15:48:56
026:         */
027:
028:        package sunlabs.brazil.template;
029:
030:        import sunlabs.brazil.server.Server;
031:        import sunlabs.brazil.server.Request;
032:        import sunlabs.brazil.handler.HtmlRewriter;
033:        import java.util.Properties;
034:        import java.util.Vector;
035:
036:        /**
037:         * A variant containing instance variables that may be referenced by
038:         * rewriting filters.  Every implementation of the template class
039:         * may define methods of the form:
040:         * <code>tag_<i>xxx</i></code>
041:         * or
042:         * <code>tag_slash_<i>xxx</i></code>
043:         * which will get called when the corrosponding HTML entity
044:         * <code>&lt;xxx ...&gt;</code>
045:         * or
046:         * <code>&lt;/xxx ...&gt;</code>
047:         * is found in the content being filtered.
048:         * <p>
049:         * An instance of this class is passed to each <code>tag</code>
050:         * method, permitting introspection of the current filtering context.
051:         *
052:         * @version %V% RewriteContext.java
053:         */
054:
055:        public class RewriteContext extends HtmlRewriter {
056:            /**
057:             * The server object, as passed to a handler's init method.
058:             */
059:            public Server server; // The server, containing properties.
060:            /**
061:             * The prefix to use for locating keys in the server or request properties
062:             * objects, as passed to a handler's init method.
063:             */
064:            public String prefix; // The prefix for this template.
065:            /**
066:             * The Request object, as passed to a handler's respond method.
067:             */
068:            public Request request; // The current request
069:            /**
070:             * A unique <b>session id</b>, if available.
071:             */
072:            public String sessionId; // The session ID (if any)
073:            /**
074:             * Application specific placeholder.
075:             */
076:            Object[] args; // app. specific extra stuff
077:
078:            TemplateRunner runner;
079:            Vector templates;
080:
081:            public RewriteContext(Server server, String prefix,
082:                    Request request, String content, String sessionId,
083:                    TemplateRunner runner, Vector templates) {
084:                super (content);
085:
086:                this .server = server;
087:                this .prefix = prefix;
088:                this .request = request;
089:                this .sessionId = sessionId;
090:                this .runner = runner;
091:                this .templates = templates;
092:                this .args = new Object[] { this  };
093:            }
094:
095:            /**
096:             * Invoke a template on this token, if any template is interested in this
097:             * token.  The template may consume more than just this token, if it
098:             * wants.
099:             */
100:            public void process() {
101:                runner.process(this);
102:            }
103:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.