01: // ContainerInterface.java
02: // $Id: ContainerInterface.java,v 1.4 2000/08/16 21:37:51 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1996.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.tools.resources;
07:
08: import java.util.Enumeration;
09: import java.util.Hashtable;
10:
11: public interface ContainerInterface {
12:
13: /**
14: * Enumerate children resource identifiers.
15: * @param all Should all resources be enumerated ? Resources are often
16: * created on demand only, this flag allows the caller to tell the
17: * container about wether it is interested only in already created
18: * resources, or in all resources (even the one that have not yet been
19: * created).
20: * @return An String enumeration, one element per child.
21: */
22:
23: public Enumeration enumerateResourceIdentifiers(boolean all);
24:
25: /**
26: * Lookup a children in the container.
27: * @param name The name of the children to lookup.
28: * the resource from its store.
29: */
30:
31: public ResourceReference lookup(String name);
32:
33: /**
34: * Remove a child resource from that container.
35: * @param name The name of the child to remove.
36: * @exception MultipleLockException If somone else has locked the
37: * resource.
38: */
39:
40: public void delete(String name) throws MultipleLockException;
41:
42: /**
43: * Initialize and register the given resource within that container.
44: * @param name The identifier for the resource.
45: * @param resource An unitialized resource instance.
46: * @param defs A default set of init attribute values (may be
47: * <strong>null</strong>).
48: * @exception InvalidResourceException If an error occurs during the
49: * registration.
50: */
51:
52: public void registerResource(String name, Resource resource,
53: Hashtable defs) throws InvalidResourceException;
54:
55: }
|