View Javadoc

1   /*
2    *
3    * <cvs:source>$Source: /devel/astrogrid/filestore/server/src/java/org/astrogrid/filestore/server/repository/Repository.java,v $</cvs:source>
4    * <cvs:author>$Author: dave $</cvs:author>
5    * <cvs:date>$Date: 2004/08/27 22:43:15 $</cvs:date>
6    * <cvs:version>$Revision: 1.4 $</cvs:version>
7    * <cvs:log>
8    *   $Log: Repository.java,v $
9    *   Revision 1.4  2004/08/27 22:43:15  dave
10   *   Updated filestore and myspace to report file size correctly.
11   *
12   *   Revision 1.3.38.1  2004/08/26 19:06:50  dave
13   *   Modified filestore to return file size in properties.
14   *
15   *   Revision 1.3  2004/07/23 09:11:16  dave
16   *   Merged development branch, dave-dev-200407221513, into HEAD
17   *
18   *   Revision 1.2.12.1  2004/07/23 02:10:58  dave
19   *   Added IvornFactory and IvornParser
20   *
21   *   Revision 1.2  2004/07/14 13:50:29  dave
22   *   Merged development branch, dave-dev-200406301228, into HEAD
23   *
24   *   Revision 1.1.2.2  2004/07/14 10:34:08  dave
25   *   Reafctored server to use array of properties
26   *
27   *   Revision 1.1.2.1  2004/07/12 14:39:03  dave
28   *   Added server repository classes
29   *
30   *   Revision 1.1.2.1  2004/07/08 07:31:30  dave
31   *   Added container impl and tests
32   *
33   * </cvs:log>
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  	}