connectors/__init__.py
branch#2476
changeset 2006 c4ba142bf3fb
parent 2001 bcbd41efd846
child 2007 ef2d479f564f
--- a/connectors/__init__.py	Wed May 09 11:16:27 2018 +0200
+++ b/connectors/__init__.py	Wed May 09 15:09:54 2018 +0200
@@ -36,12 +36,6 @@
 def _GetLocalConnectorClassFactory(name):
     return lambda: getattr(__import__(name, globals(), locals()), name + "_connector_factory")
 
-def _GetLocalConnectorClassDialog(name):
-    return lambda: getattr(__import__(name, globals(), locals()), name + "_connector_dialog")
-
-def _GetLocalConnectorURITypes(name):
-    return lambda: getattr(__import__(name, globals(), locals()), "URITypes", None)
-
 
 connectors = {name:
               _GetLocalConnectorClassFactory(name)
@@ -49,12 +43,6 @@
               if (path.isdir(path.join(_base_path, name)) and
                   not name.startswith("__"))}
 
-connectors_dialog = {name:
-                     {"function":_GetLocalConnectorClassDialog(name), "URITypes": _GetLocalConnectorURITypes(name)}
-                     for name in listdir(_base_path)
-                     if (path.isdir(path.join(_base_path, name)) and
-                         not name.startswith("__"))}
-
 
 def ConnectorFactory(uri, confnodesroot):
     """
@@ -80,22 +68,3 @@
     # import module according to uri type
     connectorclass = connectors[servicetype]()
     return connectorclass(uri, confnodesroot)
-
-
-def ConnectorDialog(type, confnodesroot):
-    if type not in connectors_dialog:
-        return None
-
-    connectorclass = connectors_dialog[type]["function"]()
-    return connectorclass(confnodesroot)
-
-def GetConnectorFromURI(uri):
-    typeOfConnector = None
-    for t in connectors_dialog:
-        connectorTypes = connectors_dialog[t]["URITypes"]()
-        if connectorTypes and uri in connectorTypes:
-            typeOfConnector = t
-            break
-
-    return typeOfConnector
-