1 /*
2 * <cvs:source>$Source: /devel/astrogrid/mySpace/client/src/java/org/astrogrid/store/tree/Container.java,v $</cvs:source>
3 * <cvs:author>$Author: clq2 $</cvs:author>
4 * <cvs:date>$Date: 2004/11/17 16:22:53 $</cvs:date>
5 * <cvs:version>$Revision: 1.2 $</cvs:version>
6 * <cvs:log>
7 * $Log: Container.java,v $
8 * Revision 1.2 2004/11/17 16:22:53 clq2
9 * nww-itn07-704
10 *
11 * Revision 1.1.2.2 2004/11/16 17:27:58 nw
12 * tidied imports
13 *
14 * Revision 1.1.2.1 2004/11/16 16:47:28 nw
15 * copied aladinAdapter interfaces into a neutrally-named package.
16 * deprecated original interfaces.
17 * javadoc
18 *
19 * Revision 1.2 2004/09/28 10:24:19 dave
20 * Added AladinAdapter interfaces and mock implementation.
21 *
22 * Revision 1.1.2.2 2004/09/27 22:46:53 dave
23 * Added AdapterFile interface, with input and output stream API.
24 *
25 * Revision 1.1.2.1 2004/09/24 01:36:18 dave
26 * Refactored File as Node and Container ...
27 *
28 * Revision 1.1.2.2 2004/09/24 01:12:09 dave
29 * Added initial test for child nodes.
30 *
31 * Revision 1.1.2.1 2004/09/23 16:32:01 dave
32 * Added better Exception handling ....
33 * Added initial mock container ....
34 * Added initial root container tests ...
35 *
36 * </cvs:log>
37 *
38 */
39 package org.astrogrid.store.tree;
40
41 import java.util.Collection;
42
43 /***
44 * Representation of a container in an Astrogrid Store.
45 *
46 */
47 public interface Container
48 extends Node
49 {
50 /***
51 * Get a list (collection) of the current child nodes.
52 * Note, you cannot add a child node by adding a node to the collection.
53 * @return An unmodifiable collection of Node(s) for the child nodes.
54 *
55 */
56 public Collection getChildNodes() ;
57
58 /***
59 * Add a child to a container.
60 * @param name The container name.
61 * @throws TreeClientDuplicateException If the container already exists.
62 * @throws TreeClientServiceException If the service is unable to handle the request.
63 *
64 */
65 public Container addContainer(String name)
66 throws TreeClientServiceException, TreeClientDuplicateException ;
67
68 /***
69 * Add a file to this container.
70 * @param name The file name.
71 * @throws TreeClientDuplicateException If the file already exists.
72 * @throws TreeClientServiceException If the service is unable to handle the request.
73 *
74 */
75 public File addFile(String name)
76 throws TreeClientServiceException, TreeClientDuplicateException ;
77
78 }