Source Code Cross Referenced for DynamicResource.java in  » Swing-Library » wings3 » org » wings » resource » 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 » Swing Library » wings3 » org.wings.resource 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2000,2005 wingS development team.
003:         *
004:         * This file is part of wingS (http://wingsframework.org).
005:         *
006:         * wingS is free software; you can redistribute it and/or modify
007:         * it under the terms of the GNU Lesser General Public License
008:         * as published by the Free Software Foundation; either version 2.1
009:         * of the License, or (at your option) any later version.
010:         *
011:         * Please see COPYING for the complete licence.
012:         */
013:        package org.wings.resource;
014:
015:        import java.util.Collection;
016:        import java.util.Set;
017:
018:        import org.apache.commons.logging.Log;
019:        import org.apache.commons.logging.LogFactory;
020:        import org.wings.RequestURL;
021:        import org.wings.Resource;
022:        import org.wings.SFrame;
023:        import org.wings.SimpleURL;
024:        import org.wings.externalizer.ExternalizeManager;
025:        import org.wings.session.PropertyService;
026:        import org.wings.session.SessionManager;
027:
028:        /**
029:         * Dynamic Resources are web resources representing rendered components
030:         * and are individually loaded by Browsers as different 'files'.
031:         * Dynamic Resources include therefore frames, cascading stylesheets or
032:         * script files. The externalizer gives them a uniqe name.
033:         * The resources may change in the consequence of some internal change of
034:         * the components. This invalidation process yields a new 'version', called
035:         * epoch here. The epoch is part of the externalized name.
036:         */
037:        public abstract class DynamicResource extends Resource {
038:            private final transient static Log log = LogFactory
039:                    .getLog(DynamicResource.class);
040:
041:            /**
042:             * The frame, to which this resource belongs.
043:             */
044:            private SFrame frame;
045:
046:            private PropertyService propertyService;
047:
048:            protected DynamicResource(String extension, String mimeType) {
049:                super (extension, mimeType);
050:            }
051:
052:            public DynamicResource(SFrame frame) {
053:                this (frame, "", "");
054:            }
055:
056:            public DynamicResource(SFrame frame, String extension,
057:                    String mimeType) {
058:                super (extension, mimeType);
059:                this .frame = frame;
060:            }
061:
062:            /**
063:             * Return the frame, to which this resource belongs.
064:             */
065:            public final SFrame getFrame() {
066:                return frame;
067:            }
068:
069:            public String getId() {
070:                if (id == null) {
071:                    ExternalizeManager ext = SessionManager.getSession()
072:                            .getExternalizeManager();
073:                    id = ext.getId(ext.externalize(this ));
074:                    log.debug("new " + getClass().getName() + " with id " + id);
075:                }
076:                return id;
077:            }
078:
079:            public SimpleURL getURL() {
080:                RequestURL requestURL = (RequestURL) SessionManager
081:                        .getSession().getProperty("request.url");
082:                if (requestURL != null) {
083:                    requestURL = (RequestURL) requestURL.clone();
084:                    requestURL.setResource(getId());
085:                }
086:                return requestURL;
087:            }
088:
089:            public String toString() {
090:                return getId() + " " + getFrame().getEventEpoch();
091:            }
092:
093:            /**
094:             * Get additional http-headers.
095:             * Returns <tt>null</tt>, if there are no additional headers to be set.
096:             *
097:             * @return Set of {@link java.util.Map.Entry} (key-value pairs)
098:             */
099:            public Collection<HttpHeader> getHeaders() {
100:                return null;
101:            }
102:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.