source: TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/dal/interfaceeditordbclient.py @ 5238

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/dal/interfaceeditordbclient.py@5238
Revision 5238, 2.4 KB checked in by cbyrom, 11 years ago (diff)

Add code to retrieve repository info by name - and add appropriate tests.

  • Property svn:executable set to *
Line 
1'''
2 Interface for clients providing data access for the web app editor
3 
4 @author: C Byrom, Tessella Apr 2009
5'''
6
7class InterfaceEditorDataClient(object):
8
9       
10    def createProviderInfo(self, providerInfo):
11        '''
12        Create a new change request in DB
13        @param providerInfo: ProviderInfo object with which to create the new
14        provider info record
15        @return ProviderInfo, fileName: object with any new data from the creation in + filename
16        '''
17        raise NotImplementedError("This is an interface class and this method has not " + \
18                                  "been implemented yet")
19   
20   
21    def updateProviderInfo(self, providerInfo):
22        '''
23        Update the input ProviderInfo
24        @param providerInfo: ProviderInfo object to update
25        @return ProviderInfo object with the updated data in
26        '''
27        raise NotImplementedError("This is an interface class and this method has not " + \
28                                  "been implemented yet")
29       
30       
31    def deleteProviderInfo(self, providerName):
32        '''
33        Delete the input providerInfo from the backend data file
34        @param providerName: Name of provider to delete
35        @return True if successful, False otherwise
36        '''
37        raise NotImplementedError("This is an interface class and this method has not " + \
38                                  "been implemented yet")
39 
40 
41    def getProviderInfo(self, providerInfoName):
42        '''
43        Get the provider info details for the specified name
44        @param providerInfoName: name of the provider info to retrieve
45        '''
46        raise NotImplementedError("This is an interface class and this method has not " + \
47                                  "been implemented yet")
48
49               
50    def getRepositoryInfo(self, providerInfoName, repositoryInfoName):
51        '''
52        Get the repository info object for the specified provider and repository name
53        @param providerInfoName: name of the provider info to retrieve
54        @param repositoryInfoName: name of the repository info to retrieve
55        @raise ValueError: if repository info with name not found
56        @return RepositoryInfo object with the requested data
57        '''
58        raise NotImplementedError("This is an interface class and this method has not " + \
59                                  "been implemented yet")
Note: See TracBrowser for help on using the repository browser.