All Packages Class Hierarchy This Package Previous Next Index
Class w3c.tools.store.SampleContainer
java.lang.Object
|
+----w3c.tools.store.AttributeHolder
|
+----w3c.tools.store.Resource
|
+----w3c.tools.store.SampleContainer
- public abstract class SampleContainer
- extends Resource
- implements ContainerInterface, ResourceStoreHolder
A raw container class, taht is itself a resource.
This class implements the ContainerInterface by relying solely on the
ResourceStore interface.
-
children
-
-
manager
-
-
SampleContainer(String, ResourceStoreManager, File)
-
-
acceptStoreUnload(ResourceStore)
- ResourceStoreHolder implementation - Get rid of our store.
-
acquireChildren()
- Acquire the resource store.
-
delete()
- Delete this Resource instance, and remove it from its store.
-
delete(String)
-
-
enumerateResourceIdentifiers()
-
-
enumerateResourceIdentifiers(boolean)
- Enumerate the name (ie identifiers) of our children.
-
getDefaultAttributes()
-
-
getResourceStore(ResourceStoreHolder)
- ContainerInterface implementation - Hold underlying resource store.
-
hasResourceStore()
- ContainerInterface implementation - Do we manage a store ?
-
lookup(String)
-
-
notifyStoreShutdown(ResourceStore)
- ResourceStoreHolder implementation - Shutdown our associated store.
-
notifyStoreStabilize(ResourceStore)
- ResourceStoreHolder implementation - Save our store.
-
registerResource(String, Resource, Hashtable)
-
children
protected ResourceStore children
manager
protected ResourceStoreManager manager
SampleContainer
public SampleContainer(String id,
ResourceStoreManager manager,
File repository)
getDefaultAttributes
protected abstract Hashtable getDefaultAttributes()
acquireChildren
protected final synchronized void acquireChildren()
- Acquire the resource store.
Should only be called from a synchronized method.
acceptStoreUnload
public synchronized boolean acceptStoreUnload(ResourceStore store)
- ResourceStoreHolder implementation - Get rid of our store.
The resource store manager has decided that our store hasn't been
used enough in the past to be worth keeping around.
We can still defer this operation by returning false
in case a user is editing the store for example.
- Parameters:
- store - The store that to be freed.
- Returns:
- A boolean true if the resource store has been
shutdown properly, false otherwise.
notifyStoreShutdown
public synchronized void notifyStoreShutdown(ResourceStore store)
- ResourceStoreHolder implementation - Shutdown our associated store.
- Parameters:
- store - The store to shutdown.
notifyStoreStabilize
public void notifyStoreStabilize(ResourceStore store)
- ResourceStoreHolder implementation - Save our store.
Our store has probably been modified recently, save it.
- Parameters:
- store - The store to save.
- Returns:
- A boolean true if success.
hasResourceStore
public boolean hasResourceStore()
- ContainerInterface implementation - Do we manage a store ?
- Returns:
- Always true.
getResourceStore
public synchronized ResourceStore getResourceStore(ResourceStoreHolder h)
- ContainerInterface implementation - Hold underlying resource store.
- Parameters:
- h - The resource store holder.
- Returns:
- A pointer to our underlying store.
enumerateResourceIdentifiers
public synchronized Enumeration enumerateResourceIdentifiers(boolean all)
- Enumerate the name (ie identifiers) of our children.
- Parameters:
- all - Should all resources be listed.
- Returns:
- An enumeration, providing one element per child, which is
the name of the child, as a String.
enumerateResourceIdentifiers
public Enumeration enumerateResourceIdentifiers()
lookup
public synchronized Resource lookup(String name) throws InvalidResourceException
delete
public synchronized void delete()
- Delete this Resource instance, and remove it from its store.
- Overrides:
- delete in class Resource
delete
public synchronized void delete(String name)
registerResource
public synchronized void registerResource(String id,
Resource resource,
Hashtable defs)
All Packages Class Hierarchy This Package Previous Next Index