Source Code Cross Referenced for AbstractContainer.java in  » Web-Server » Jigsaw » org » w3c » tools » resources » 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 » Jigsaw » org.w3c.tools.resources 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // ContainerInterfaceImpl.java
002:        // $Id: AbstractContainer.java,v 1.8 2002/06/26 17:27:43 ylafon Exp $
003:        // (c) COPYRIGHT MIT and INRIA, 1996.
004:        // Please first read the full copyright statement in file COPYRIGHT.html
005:
006:        package org.w3c.tools.resources;
007:
008:        import java.util.Enumeration;
009:        import java.util.Hashtable;
010:        import org.w3c.tools.resources.event.AttributeChangedEvent;
011:        import org.w3c.tools.resources.event.AttributeChangedListener;
012:        import org.w3c.tools.resources.event.StructureChangedEvent;
013:        import org.w3c.tools.resources.event.StructureChangedListener;
014:
015:        /**
016:         * The top level class for Resource Container.
017:         */
018:        public abstract class AbstractContainer extends FramedResource
019:                implements  ContainerInterface, StructureChangedListener,
020:                AttributeChangedListener {
021:
022:            public static String ur = "url".intern();
023:
024:            /**
025:             * This handles the <code>RESOURCE_MODIFIED</code> kind of events.
026:             * @param evt The StructureChangeEvent.
027:             */
028:
029:            public void resourceModified(StructureChangedEvent evt) {
030:                if (debugEvent)
031:                    displayEvent(this , evt);
032:            }
033:
034:            /**
035:             * A new resource has been created in some space.
036:             * This handles the <code>RESOURCE_CREATED</code> kind of events.
037:             * @param evt The event describing the change.
038:             */
039:
040:            public void resourceCreated(StructureChangedEvent evt) {
041:                if (debugEvent)
042:                    displayEvent(this , evt);
043:            }
044:
045:            /**
046:             * A resource is about to be removed
047:             * This handles the <code>RESOURCE_REMOVED</code> kind of events.
048:             * @param evt The event describing the change.
049:             */
050:
051:            public void resourceRemoved(StructureChangedEvent evt) {
052:                if (debugEvent)
053:                    displayEvent(this , evt);
054:            }
055:
056:            /**
057:             * A resource is about to be unloaded
058:             * This handles the <code>RESOURCE_UNLOADED</code> kind of events.
059:             * @param evt The event describing the change.
060:             */
061:
062:            public void resourceUnloaded(StructureChangedEvent evt) {
063:                // don't display event here, because the resource is about
064:                // to be unloaded.
065:            }
066:
067:            /**
068:             * Gets called when a property changes.
069:             * @param evt The AttributeChangeEvent describing the change.
070:             */
071:
072:            public void attributeChanged(AttributeChangedEvent evt) {
073:                if (debugEvent)
074:                    displayEvent(this , evt);
075:            }
076:
077:            /**
078:             * Enumerate children resource identifiers.
079:             * @param all Should all resources be enumerated ? Resources are often
080:             * created on demand only, this flag allows the caller to tell the 
081:             * container about wether it is interested only in already created
082:             * resources, or in all resources (even the one that have not yet been
083:             * created).
084:             * @return An String enumeration, one element per child.
085:             */
086:
087:            abstract public Enumeration enumerateResourceIdentifiers(boolean all);
088:
089:            public Enumeration enumerateResourceIdentifiers() {
090:                return enumerateResourceIdentifiers(true);
091:            }
092:
093:            /**
094:             * Ask our frames to update default child attributes.
095:             * @param attrs A hashtable.
096:             */
097:            protected ResourceContext updateDefaultChildAttributes(
098:                    Hashtable attrs) {
099:                ResourceFrame frames[] = getFrames();
100:                if (frames != null) {
101:                    for (int i = 0; i < frames.length; i++) {
102:                        if (frames[i] == null)
103:                            continue;
104:                        frames[i].updateDefaultChildAttributes(attrs);
105:                    }
106:                }
107:                return (ResourceContext) attrs.get(co);
108:            }
109:
110:            /**
111:             * Lookup a children in the container.
112:             * @param name The name of the children to lookup.
113:             * the resource from its store.
114:             */
115:
116:            abstract public ResourceReference lookup(String name);
117:
118:            /**
119:             * Remove a child resource from that container.
120:             * @param name The name of the child to remove.
121:             * @exception MultipleLockException If someone else
122:             * has locked the resource.
123:             */
124:
125:            abstract public void delete(String name)
126:                    throws MultipleLockException;
127:
128:            /**
129:             * Create a default child resource in that container.
130:             * This method is called by the editor to add a default resource
131:             * in the container under the given name. The meaning of <em>default</em>
132:             * is left up to the container here.
133:             * @param name The identifier for the new resource.
134:             */
135:            abstract public ResourceReference createDefaultResource(String name);
136:
137:            /**
138:             * Initialize and register the given resource within that container.
139:             * @param name The identifier for the resource.
140:             * @param resource An unitialized resource instance.
141:             * @param defs A default set of init attribute values (may be
142:             * <strong>null</strong>).
143:             * @exception InvalidResourceException If an error occurs during the
144:             * registration.
145:             */
146:
147:            abstract public void registerResource(String name,
148:                    Resource resource, Hashtable defs)
149:                    throws InvalidResourceException;
150:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.