Source Code Cross Referenced for ChannelRenderingBuffer.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » 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 » uPortal_rel 2 6 1 GA » org.jasig.portal 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright 2001 The JA-SIG Collaborative.  All rights reserved.
002:         *  See license distributed with this file and
003:         *  available online at http://www.uportal.org/license.html
004:         */
005:
006:        package org.jasig.portal;
007:
008:        import java.util.Hashtable;
009:
010:        import org.apache.commons.logging.Log;
011:        import org.apache.commons.logging.LogFactory;
012:        import org.jasig.portal.utils.SAX2BufferImpl;
013:        import org.xml.sax.Attributes;
014:        import org.xml.sax.ContentHandler;
015:        import org.xml.sax.SAXException;
016:        import org.xml.sax.XMLReader;
017:
018:        /**
019:         * Channel Rendering buffer allows portal to accumulate a list
020:         * of all channels that will have to be rendered. This is done
021:         * by accumulating layout content (full page content minus content
022:         * provided by the channels).
023:         * The entire document is accumulated in a buffer. Information about
024:         * channel elements is passed to a ChannelManager. Once the end of the
025:         * document is reached, the entire buffer is released to a provided
026:         * Document Handler.
027:         *
028:         * @author Peter Kharchenko
029:         * @version $Revision: 34807 $
030:         */
031:        public class ChannelRenderingBuffer extends SAX2BufferImpl {
032:
033:            private static final Log log = LogFactory
034:                    .getLog(ChannelRenderingBuffer.class);
035:
036:            protected ChannelManager cm;
037:
038:            // information about the current channel
039:            private boolean insideChannelElement = false;
040:            private Hashtable params;
041:            private String channelClassName;
042:            private String channelSubscribeId;
043:            private String channelPublishId;
044:            private long timeOut;
045:            boolean ccaching;
046:
047:            /**
048:             * Default constructor.
049:             * @param chanman the channel manager
050:             */
051:            public ChannelRenderingBuffer(ChannelManager chanman) {
052:                super ();
053:                ccaching = false;
054:                this .cm = chanman;
055:                this .startBuffering();
056:                this .setContentHandler(null);
057:            }
058:
059:            public ChannelRenderingBuffer(ContentHandler ch,
060:                    ChannelManager chanman) {
061:                super (ch);
062:                ccaching = false;
063:                this .cm = chanman;
064:                this .startBuffering();
065:                this .setContentHandler(null);
066:            }
067:
068:            public ChannelRenderingBuffer(XMLReader parent,
069:                    ChannelManager chanman) {
070:                super (parent);
071:                ccaching = false;
072:                this .cm = chanman;
073:                this .startBuffering();
074:                this .setContentHandler(null);
075:            }
076:
077:            public ChannelRenderingBuffer(ChannelManager chanman,
078:                    boolean ccaching) {
079:                this (chanman);
080:                this .setCharacterCaching(ccaching);
081:            }
082:
083:            public ChannelRenderingBuffer(ContentHandler ch,
084:                    ChannelManager chanman, boolean ccaching) {
085:                this (ch, chanman);
086:                this .setCharacterCaching(ccaching);
087:            }
088:
089:            public ChannelRenderingBuffer(XMLReader parent,
090:                    ChannelManager chanman, boolean ccaching) {
091:                this (parent, chanman);
092:                this .setCharacterCaching(ccaching);
093:            }
094:
095:            public void setCharacterCaching(boolean setting) {
096:                this .ccaching = setting;
097:            }
098:
099:            public void startDocument() throws SAXException {
100:                insideChannelElement = false;
101:                super .startDocument();
102:            }
103:
104:            public void endDocument() throws SAXException {
105:                cm.commitToRenderingChannelSet();
106:                super .endDocument();
107:            }
108:
109:            public void startElement(String url, String localName,
110:                    String qName, Attributes atts) throws SAXException {
111:                if (!insideChannelElement) {
112:                    // recognizing "channel"
113:                    if (qName.equals("channel")) {
114:                        insideChannelElement = true;
115:
116:                        // get class attribute
117:                        channelClassName = atts.getValue("class");
118:                        channelSubscribeId = atts.getValue("ID");
119:                        channelPublishId = atts.getValue("chanID");
120:                        timeOut = java.lang.Long.parseLong(atts
121:                                .getValue("timeout"));
122:                        params = new Hashtable();
123:                    }
124:                } else if (qName.equals("parameter")) {
125:                    params.put(atts.getValue("name"), atts.getValue("value"));
126:                }
127:
128:                super .startElement(url, localName, qName, atts);
129:            }
130:
131:            public void endElement(String url, String localName, String qName)
132:                    throws SAXException {
133:                if (insideChannelElement) {
134:                    if (qName.equals("channel")) {
135:                        try {
136:                            cm.startChannelRendering(channelSubscribeId);
137:                        } catch (PortalException pe) {
138:                            log
139:                                    .error("ChannelRenderingBuffer::endElement() : unable to start rendering channel! (channelSubscribeId=\""
140:                                            + channelSubscribeId + "\")");
141:                        }
142:                        insideChannelElement = false;
143:                    }
144:                }
145:                super.endElement(url, localName, qName);
146:            }
147:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.