All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.tools.resources.AbstractContainer

java.lang.Object
   |
   +----org.w3c.tools.resources.AttributeHolder
           |
           +----org.w3c.tools.resources.Resource
                   |
                   +----org.w3c.tools.resources.FramedResource
                           |
                           +----org.w3c.tools.resources.AbstractContainer

public abstract class AbstractContainer
extends FramedResource
implements ContainerInterface, StructureChangedListener, AttributeChangedListener
The top level class for Resource Container.


Constructor Index

 o AbstractContainer()

Method Index

 o attributeChanged(AttributeChangedEvent)
Gets called when a property changes.
 o createDefaultResource(String)
Create a default child resource in that container.
 o delete(String)
Remove a child resource from that container.
 o enumerateResourceIdentifiers()
 o enumerateResourceIdentifiers(boolean)
Enumerate children resource identifiers.
 o lookup(String)
Lookup a children in the container.
 o registerResource(String, Resource, Hashtable)
Initialize and register the given resource within that container.
 o resourceCreated(StructureChangedEvent)
A new resource has been created in some space.
 o resourceModified(StructureChangedEvent)
This handles the RESOURCE_MODIFIED kind of events.
 o resourceRemoved(StructureChangedEvent)
A resource is about to be removed This handles the RESOURCE_REMOVED kind of events.
 o resourceUnloaded(StructureChangedEvent)
A resource is about to be unloaded This handles the RESOURCE_UNLOADED kind of events.
 o updateDefaultChildAttributes(Hashtable)
Ask our frames to update default child attributes.

Constructors

 o AbstractContainer
 public AbstractContainer()

Methods

 o resourceModified
 public void resourceModified(StructureChangedEvent evt)
This handles the RESOURCE_MODIFIED kind of events.

Parameters:
evt - The StructureChangeEvent.
 o resourceCreated
 public void resourceCreated(StructureChangedEvent evt)
A new resource has been created in some space. This handles the RESOURCE_CREATED kind of events.

Parameters:
evt - The event describing the change.
 o resourceRemoved
 public void resourceRemoved(StructureChangedEvent evt)
A resource is about to be removed This handles the RESOURCE_REMOVED kind of events.

Parameters:
evt - The event describing the change.
 o resourceUnloaded
 public void resourceUnloaded(StructureChangedEvent evt)
A resource is about to be unloaded This handles the RESOURCE_UNLOADED kind of events.

Parameters:
evt - The event describing the change.
 o attributeChanged
 public void attributeChanged(AttributeChangedEvent evt)
Gets called when a property changes.

Parameters:
evt - The AttributeChangeEvent describing the change.
 o enumerateResourceIdentifiers
 public abstract Enumeration enumerateResourceIdentifiers(boolean all)
Enumerate children resource identifiers.

Parameters:
all - Should all resources be enumerated ? Resources are often created on demand only, this flag allows the caller to tell the container about wether it is interested only in already created resources, or in all resources (even the one that have not yet been created).
Returns:
An String enumeration, one element per child.
 o enumerateResourceIdentifiers
 public Enumeration enumerateResourceIdentifiers()
 o updateDefaultChildAttributes
 protected ResourceContext updateDefaultChildAttributes(Hashtable attrs)
Ask our frames to update default child attributes.

Parameters:
attrs - A hashtable.
 o lookup
 public abstract ResourceReference lookup(String name)
Lookup a children in the container.

Parameters:
name - The name of the children to lookup. the resource from its store.
 o delete
 public abstract void delete(String name) throws MultipleLockException
Remove a child resource from that container.

Parameters:
name - The name of the child to remove.
Throws: MultipleLockException
If someone else has locked the resource.
 o createDefaultResource
 public abstract ResourceReference createDefaultResource(String name)
Create a default child resource in that container. This method is called by the editor to add a default resource in the container under the given name. The meaning of default is left up to the container here.

Parameters:
name - The identifier for the new resource.
 o registerResource
 public abstract void registerResource(String name,
                                       Resource resource,
                                       Hashtable defs) throws InvalidResourceException
Initialize and register the given resource within that container.

Parameters:
name - The identifier for the resource.
resource - An unitialized resource instance.
defs - A default set of init attribute values (may be null).
Throws: InvalidResourceException
If an error occurs during the registration.

All Packages  Class Hierarchy  This Package  Previous  Next  Index