1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 package org.astrogrid.filestore.server.repository ;
37
38 import org.astrogrid.filestore.common.file.FileProperty ;
39 import org.astrogrid.filestore.common.file.FileProperties ;
40 import org.astrogrid.filestore.common.exception.FileStoreException ;
41 import org.astrogrid.filestore.common.exception.FileStoreNotFoundException ;
42 import org.astrogrid.filestore.common.exception.FileStoreIdentifierException ;
43 import org.astrogrid.filestore.common.exception.FileStoreTransferException ;
44 import org.astrogrid.filestore.common.exception.FileStoreServiceException ;
45
46 /***
47 * Public interface for a file Repository.
48 *
49 */
50 public interface Repository
51 {
52 /***
53 * Create a new container.
54 * @param properties The FileProperties describing the imported data.
55 * @return A new file container.
56 * @throws FileStoreServiceException if unable handle the request.
57 *
58 */
59 public RepositoryContainer create(FileProperties properties)
60 throws FileStoreServiceException ;
61
62 /***
63 * Locate an existing container.
64 * @param ident The identifier of the container.
65 * @return The file container, if it exists.
66 * @throws FileStoreIdentifierException if the identifier is null or not valid.
67 * @throws FileStoreNotFoundException if unable to locate the file.
68 * @throws FileStoreServiceException if unable handle the request.
69 *
70 */
71 public RepositoryContainer load(String ident)
72 throws FileStoreServiceException, FileStoreNotFoundException, FileStoreIdentifierException ;
73
74 /***
75 * Duplicate (copy) an existing container.
76 * @param ident The identifier of the container.
77 * @return The new file container.
78 * @throws FileStoreTransferException If unable to transfer the data.
79 * @throws FileStoreIdentifierException if the identifier is null or not valid.
80 * @throws FileStoreNotFoundException if unable to locate the file.
81 * @throws FileStoreServiceException if unable handle the request.
82 *
83 */
84 public RepositoryContainer duplicate(String ident)
85 throws FileStoreServiceException, FileStoreNotFoundException, FileStoreIdentifierException, FileStoreTransferException ;
86
87 }