View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/filemanager/common/src/java/org/astrogrid/filemanager/common/FileManagerConfigMock.java,v $</cvs:source>
3    * <cvs:author>$Author: jdt $</cvs:author>
4    * <cvs:date>$Date: 2005/01/13 17:23:15 $</cvs:date>
5    * <cvs:version>$Revision: 1.3 $</cvs:version>
6    * <cvs:log>
7    *   $Log: FileManagerConfigMock.java,v $
8    *   Revision 1.3  2005/01/13 17:23:15  jdt
9    *   merges from dave-dev-200412201250
10   *
11   *   Revision 1.2.4.1  2005/01/12 13:16:27  dave
12   *   Changed tabs to spaces ...
13   *
14   *   Revision 1.2  2004/11/25 00:20:27  jdt
15   *   Merge from dave-dev-200410061224-200411221626
16   *
17   *   Revision 1.1.2.3  2004/11/05 02:23:45  dave
18   *   Refactored identifiers are properties ...
19   *
20   *   Revision 1.1.2.2  2004/11/04 02:33:38  dave
21   *   Refactored test to include multiple filestores ...
22   *
23   *   Revision 1.1.2.1  2004/10/21 21:08:52  dave
24   *   Added config interface and mock implementation.
25   *   Partial implementation of data import into FileStore via direct URL transfer.
26   *
27   * </cvs:log>
28   *
29   */
30  package org.astrogrid.filemanager.common ;
31  
32  import org.apache.commons.logging.Log ;
33  import org.apache.commons.logging.LogFactory ;
34  
35  import org.astrogrid.store.Ivorn ;
36  
37  import org.astrogrid.filemanager.common.exception.FileManagerServiceException ;
38  
39  /***
40   * Mock implementation of the FileManager configuration.
41   *
42   */
43  public class FileManagerConfigMock
44      implements FileManagerConfig
45      {
46      /***
47       * Our debug logger.
48       *
49       */
50      private static Log log = LogFactory.getLog(FileManagerConfigMock.class);
51  
52      /***
53       * Our manager ivorn.
54       *
55       */
56      private Ivorn filemanager ;
57  
58      /***
59       * Our default FileStore Ivorn.
60       *
61       */
62      private Ivorn filestore ;
63  
64      /***
65       * Public constructor.
66       *
67       */
68      public FileManagerConfigMock(Ivorn filemanager, Ivorn filestore)
69          {
70          this.filemanager = filemanager ;
71          this.filestore   = filestore ;
72          }
73  
74      /***
75       * Get the manager ivorn.
76       * @throws FileManagerServiceException If unable to read the configuration.
77       *
78       */
79      public Ivorn getFileManagerIvorn()
80          {
81          return this.filemanager ;
82          }
83  
84      /***
85       * Get the default FileStore Ivorn.
86       * @throws FileManagerServiceException
87       *
88       */
89      public Ivorn getFileStoreIvorn()
90          {
91          return this.filestore ;
92          }
93  
94      }