    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.

##

AbstractContainer()

##

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

##

AbstractContainer

     public AbstractContainer()

##

resourceModified

     public void resourceModified(StructureChangedEvent evt)

  This handles the `RESOURCE_MODIFIED` kind of events.

  Parameters:
    evt - The StructureChangeEvent.

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.

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.

attributeChanged

     public void attributeChanged(AttributeChangedEvent evt)

  Gets called when a property changes.

  Parameters:
    evt - The AttributeChangeEvent describing the change.

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.

enumerateResourceIdentifiers

     public Enumeration enumerateResourceIdentifiers()

updateDefaultChildAttributes

     protected ResourceContext updateDefaultChildAttributes(Hashtable attrs)

  Ask our frames to update default child attributes.

  Parameters:
    attrs - A hashtable.

lookup

     public abstract ResourceReference lookup(String name)

  Lookup a children in the container.

  Parameters:
    name - The name of the children to lookup.
  Throws: InvalidResourceException
    If the container could not restore the resource from its store.

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.

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.

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