]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/python/oils/system.py
Merge branch 'master' of git.evergreen-ils.org:Evergreen-DocBook into doc_consolidati...
[Evergreen.git] / Open-ILS / src / python / oils / system.py
1 # -----------------------------------------------------------------------
2 # Copyright (C) 2007  Georgia Public Library Service
3 # Bill Erickson <billserickson@gmail.com>
4
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 # -----------------------------------------------------------------------
15
16 import osrf.log
17 import osrf.system
18 from oils.utils.idl import IDLParser
19 from oils.utils.csedit import oilsLoadCSEditor
20
21 class System(object):
22
23     @staticmethod
24     def connect(**kwargs):
25         """
26         Connects to the OpenSRF network, parses the IDL, and loads the CSEditor.
27         """
28
29         osrf.system.System.connect(**kwargs)
30         IDLParser.parse()
31         oilsLoadCSEditor()
32
33     @staticmethod
34     def remote_connect(**kwargs):
35         """
36         Connects to the OpenSRF network, parses the IDL, and loads the CSEditor.
37
38         This version of connect does not talk to opensrf.settings, which means
39         it also does not connect to the OpenSRF cache.
40         """
41
42         osrf.system.System.net_connect(**kwargs)
43         IDLParser.parse()
44         oilsLoadCSEditor()