Source Code Cross Referenced for Page.java in  » Web-Framework » SiteMesh » com » opensymphony » module » sitemesh » 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 Framework » SiteMesh » com.opensymphony.module.sitemesh 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Title:        Page
003:         * Description:
004:         *
005:         * This software is published under the terms of the OpenSymphony Software
006:         * License version 1.1, of which a copy has been included with this
007:         * distribution in the LICENSE.txt file.
008:         */
009:
010:        package com.opensymphony.module.sitemesh;
011:
012:        import javax.servlet.http.HttpServletRequest;
013:        import java.io.IOException;
014:        import java.io.Writer;
015:        import java.util.Map;
016:
017:        /**
018:         * The Page object wraps the contents of the original (undecorated) page.
019:         *
020:         * <p>The original data in its entirity can be written using the writePage()
021:         * methods. It may also contain a set of properties - these vary among
022:         * different {@link com.opensymphony.module.sitemesh.PageParser} implementations.</p>
023:         *
024:         * <p>Typically a Page is no use to a {@link com.opensymphony.module.sitemesh.Decorator} as it needs
025:         * specific details relevant to the content-type of that page (<i>e.g.</i> HTML
026:         * pages). The appropriate {@link com.opensymphony.module.sitemesh.PageParser} is responsible
027:         * for returning extended implementations of pages such as {@link com.opensymphony.module.sitemesh.HTMLPage}
028:         * which are of more use to the Decorator. New media types (<i>e.g.</i> WML) could
029:         * be added to the system by extending Page and implementing an appropriate PageParser.</p>
030:         *
031:         * @author <a href="mailto:joe@truemesh.com">Joe Walnes</a>
032:         * @version $Revision: 1.4 $
033:         */
034:        public interface Page {
035:            /**
036:             * Write the entire contents of the <code>Page</code>, in the format before
037:             * it was parsed, to the <code>Writer</code>.
038:             *
039:             * @param out Writer to write to.
040:             * @exception java.io.IOException Rethrown if cannot write to writer.
041:             */
042:            void writePage(Writer out) throws IOException;
043:
044:            /**
045:             * Convenience method to return the contents of the <code>Page</code> in its original format.
046:             *
047:             * @since 2.1.1
048:             * @see #writePage(java.io.Writer)
049:             */
050:            String getPage();
051:
052:            /**
053:             * Write the contents of the <code>&lt;body&gt;</code> tag.
054:             */
055:            void writeBody(Writer out) throws IOException;
056:
057:            /**
058:             * Convenience method to return the contents of the <code>&lt;body&gt;</code> tag.
059:             *
060:             * @since 2.1.1
061:             * @see #writeBody(java.io.Writer)
062:             */
063:            String getBody();
064:
065:            /**
066:             * Get the Title of the document
067:             */
068:            String getTitle();
069:
070:            /**
071:             * Length of the <code>Page</code>, in the format before
072:             * it was parsed.
073:             *
074:             * @return Length of page data (in number of bytes).
075:             */
076:            int getContentLength();
077:
078:            /**
079:             * Get a property embedded into the <code>Page</code> as a <code>String</code>.
080:             *
081:             * @param name Name of property
082:             * @return Property value
083:             */
084:            String getProperty(String name);
085:
086:            /**
087:             * Get a property embedded into the <code>Page</code> as an <code>int</code>.
088:             * Returns 0 if property not specified or not valid number.
089:             *
090:             * @param name Name of property
091:             * @return Property value
092:             */
093:            int getIntProperty(String name);
094:
095:            /**
096:             * Get a property embedded into the <code>Page</code> as a <code>long</code>.
097:             * Returns 0L if property not specified or not valid number.
098:             *
099:             * @param name Name of property
100:             * @return Property value
101:             */
102:            long getLongProperty(String name);
103:
104:            /**
105:             * Get a property embedded into the <code>Page</code> as a <code>boolean</code>.
106:             * Returns true if value starts with '1', 't' or 'y' (case-insensitive) -
107:             * otherwise returns false.
108:             *
109:             * @param name Name of property
110:             * @return Property value
111:             */
112:            boolean getBooleanProperty(String name);
113:
114:            /**
115:             * Determine whether a property embedded into the <code>Page</code> has been set.
116:             *
117:             * @param name Name of property
118:             * @return Whether it has been set
119:             */
120:            boolean isPropertySet(String name);
121:
122:            /**
123:             * Get all available property keys for the <code>Page</code>.
124:             *
125:             * @return Property keys
126:             */
127:            String[] getPropertyKeys();
128:
129:            /**
130:             * Get a <code>Map</code> representing all the properties in the <code>Page</code>.
131:             *
132:             * @return Properties map
133:             */
134:            Map getProperties();
135:
136:            /**
137:             * Return the request of the original page.
138:             */
139:            HttpServletRequest getRequest();
140:
141:            /**
142:             * Create snapshot of Request. Subsequent modifications to the request by
143:             * the servlet container will not be returned by {@link #getRequest()}
144:             */
145:            void setRequest(HttpServletRequest request);
146:
147:            /**
148:             * Manually add a property to page.
149:             */
150:            void addProperty(String name, String value);
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.