Source Code Cross Referenced for WindowResult.java in  » Portal » jboss-portal-2.6.4 » org » jboss » portal » theme » page » 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 » jboss portal 2.6.4 » org.jboss.portal.theme.page 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /******************************************************************************
002:         * JBoss, a division of Red Hat                                               *
003:         * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
004:         * contributors as indicated by the @authors tag. See the                     *
005:         * copyright.txt in the distribution for a full listing of                    *
006:         * individual contributors.                                                   *
007:         *                                                                            *
008:         * This is free software; you can redistribute it and/or modify it            *
009:         * under the terms of the GNU Lesser General Public License as                *
010:         * published by the Free Software Foundation; either version 2.1 of           *
011:         * the License, or (at your option) any later version.                        *
012:         *                                                                            *
013:         * This software is distributed in the hope that it will be useful,           *
014:         * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
015:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
016:         * Lesser General Public License for more details.                            *
017:         *                                                                            *
018:         * You should have received a copy of the GNU Lesser General Public           *
019:         * License along with this software; if not, write to the Free                *
020:         * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
021:         * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
022:         ******************************************************************************/package org.jboss.portal.theme.page;
023:
024:        import org.jboss.portal.Mode;
025:        import org.jboss.portal.WindowState;
026:        import org.jboss.portal.theme.render.renderer.ActionRendererContext;
027:
028:        import java.util.Collection;
029:        import java.util.Collections;
030:        import java.util.Map;
031:
032:        /**
033:         * The window result represent the generated content of a window. It contains several kind of data : <li> <ul>the window
034:         * title</ul> <ul>the window content</ul> <ul>a map of actions available for the window</ul> </li>
035:         *
036:         * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
037:         * @version $Revision: 8784 $
038:         */
039:        public class WindowResult {
040:
041:            /** . */
042:            private String title;
043:
044:            /** . */
045:            private String content;
046:
047:            /** . */
048:            private Map actions;
049:
050:            /** . */
051:            private final String headerContent;
052:
053:            /** . */
054:            private Map properties;
055:
056:            /** . */
057:            private final WindowState windowState;
058:
059:            /** . */
060:            private final Mode mode;
061:
062:            /**
063:             * Create a new WindowResult with the information about the renderered portlet. <p>A window result contains the the
064:             * rendered markup fragment of the portlet, the title, a map of action urls to trigger mode and state changes, and
065:             * the properties that were set as portlet response properties.</p>
066:             *
067:             * @param title            the title to be displayed for this portlet in the rendered page
068:             * @param content          the rendered markup fragment of the portlet
069:             * @param actions          a map of actions possible for this portlet
070:             * @param windowProperties the properties for this window
071:             * @param headerChars      content that needs to be injected into the header
072:             * @see WindowResult.Action
073:             */
074:            public WindowResult(String title, String content, Map actions,
075:                    Map windowProperties, String headerChars,
076:                    WindowState windowState, Mode mode) {
077:                this .title = title;
078:                this .content = content;
079:                this .actions = actions;
080:                this .headerContent = headerChars;
081:                this .properties = windowProperties;
082:                this .windowState = windowState;
083:                this .mode = mode;
084:            }
085:
086:            public String getTitle() {
087:                return title;
088:            }
089:
090:            public String getContent() {
091:                return content;
092:            }
093:
094:            public String getHeaderContent() {
095:                return headerContent;
096:            }
097:
098:            public Mode getMode() {
099:                return mode;
100:            }
101:
102:            public WindowState getWindowState() {
103:                return windowState;
104:            }
105:
106:            public Collection getTriggerableActions(String familyName) {
107:                return (Collection) actions.get(familyName);
108:            }
109:
110:            public Map getProperties() {
111:                return properties;
112:            }
113:
114:            /**
115:             * Represents an action that can be triggered.
116:             * <p/>
117:             * todo : add more stuff
118:             *
119:             * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
120:             */
121:            public static class Action implements  ActionRendererContext {
122:                /** The origin of the action. */
123:                private final String name;
124:
125:                /** The origin of the action. */
126:                private final String family;
127:
128:                /** The action url. */
129:                private final String url;
130:
131:                /** Enabled or not. */
132:                private final boolean enabled;
133:
134:                public Action(String name, String family, String url,
135:                        boolean enabled) {
136:                    this .name = name;
137:                    this .family = family;
138:                    this .url = url;
139:                    this .enabled = enabled;
140:                }
141:
142:                public String getName() {
143:                    return name;
144:                }
145:
146:                public String getFamily() {
147:                    return family;
148:                }
149:
150:                public String getURL() {
151:                    return url;
152:                }
153:
154:                public boolean isEnabled() {
155:                    return enabled;
156:                }
157:
158:                public String getProperty(String name) {
159:                    return null;
160:                }
161:
162:                public Map getProperties() {
163:                    return Collections.EMPTY_MAP;
164:                }
165:            }
166:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.