Module EDPluginTestPluginFactory
[hide private]
[frames] | no frames]

Source Code for Module EDPluginTestPluginFactory

 1  # 
 2  #    Project: The EDNA Kernel 
 3  #             http://www.edna-site.org 
 4  # 
 5  #    File: "$Id$" 
 6  # 
 7  #    Copyright (C) 2008-2009 European Synchrotron Radiation Facility 
 8  #                            Grenoble, France 
 9  # 
10  #    Principal author: Olof Svensson (svensson@esrf.fr)  
11  # 
12  #    Contributing author: Karl Levik (karl.levik@diamond.ac.uk) 
13  # 
14  #    This program is free software: you can redistribute it and/or modify 
15  #    it under the terms of the GNU Lesser General Public License as published 
16  #    by the Free Software Foundation, either version 3 of the License, or 
17  #    (at your option) any later version. 
18  # 
19  #    This program is distributed in the hope that it will be useful, 
20  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
21  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
22  #    GNU Lesser General Public License for more details. 
23  # 
24  #    You should have received a copy of the GNU General Public License 
25  #    and the GNU Lesser General Public License  along with this program.   
26  #    If not, see <http://www.gnu.org/licenses/>. 
27  # 
28   
29  from EDPlugin import EDPlugin 
30   
31  from XSDataCommon import XSDataString 
32   
33 -class EDPluginTestPluginFactory( EDPlugin ):
34
35 - def __init__( self ):
36 EDPlugin.__init__( self ) 37 self.setXSDataInputClass( XSDataString ) 38 self.setXSDataInputClass( XSDataString, "value1" ) 39 self.setXSDataInputClass( XSDataString, "value2" )
40
41 - def getTestValue( self ):
42 return "TestReturnValue"
43
44 - def process( self, _edPlugin=None ):
45 pyListKeyValues = self.getListOfDataInputKeys() 46 for pyStrKey in pyListKeyValues: 47 if ( pyStrKey == self.getDefaultInputDataKey() ): 48 self.setDataOutput( self.getDataInput( pyStrKey ) ) 49 else: 50 self.setDataOutput( self.getDataInput( pyStrKey ), pyStrKey )
51