Skip to content
Snippets Groups Projects
Commit a48076e1 authored by Stefano Borini's avatar Stefano Borini
Browse files

Updated interfaces

parent 8de25d3a
No related branches found
No related tags found
1 merge request!130Safer plugin import - 2
from envisage.api import Plugin from envisage.api import Plugin
from traits.api import Interface, String, Instance, Type from traits.api import Interface, Str, Instance, Type
class IDataSourceFactory(Interface): class IDataSourceFactory(Interface):
...@@ -8,22 +8,30 @@ class IDataSourceFactory(Interface): ...@@ -8,22 +8,30 @@ class IDataSourceFactory(Interface):
Refer to the BaseDataSourceFactory for documentation. Refer to the BaseDataSourceFactory for documentation.
""" """
id = String() id = Str()
name = String() name = Str()
data_source_class = Type( data_source_class = Type(
"force_bdss.data_sources.base_data_source.BaseDataSource" "force_bdss.data_sources.base_data_source.BaseDataSource",
allow_none=False
) )
model_class = Type( model_class = Type(
"force_bdss.data_sources.base_data_source_model.BaseDataSourceModel" "force_bdss.data_sources.base_data_source_model.BaseDataSourceModel",
allow_none=False
) )
plugin = Instance(Plugin) plugin = Instance(Plugin, allow_none=False)
def create_data_source(self): def get_data_source_class(self):
"""""" pass
def create_model(self, model_data=None): def get_model_class(self):
"""""" pass
def get_name(self):
pass
def get_identifier(self):
pass
from traits.api import Interface, String, Instance, Type from traits.api import Interface, Str, Instance, Type
from envisage.plugin import Plugin from envisage.plugin import Plugin
...@@ -8,29 +8,51 @@ class IMCOFactory(Interface): ...@@ -8,29 +8,51 @@ class IMCOFactory(Interface):
Refer to BaseMCOFactory for documentation Refer to BaseMCOFactory for documentation
""" """
id = String() id = Str()
name = String() name = Str()
optimizer_class = Type( optimizer_class = Type(
"force_bdss.mco.base_mco.BaseMCO" "force_bdss.mco.base_mco.BaseMCO",
allow_none=False
) )
model_class = Type( model_class = Type(
"force_bdss.mco.base_mco_communicator.BaseMCOCommunicator" "force_bdss.mco.base_mco_communicator.BaseMCOCommunicator",
allow_none=False
) )
communicator_class = Type( communicator_class = Type(
"force_bdss.mco.base_mco_model.BaseMCOModel" "force_bdss.mco.base_mco_model.BaseMCOModel",
allow_none=False
) )
plugin = Instance(Plugin) plugin = Instance(Plugin, allow_none=False)
def get_model_class(self):
pass
def get_communicator_class(self):
pass
def get_optimizer_class(self):
pass
def get_identifier(self):
pass
def get_name(self):
pass
def create_optimizer(self): def create_optimizer(self):
"""""" pass
def create_model(self, model_data=None): def create_model(self):
"""""" pass
def create_communicator(self): def create_communicator(self):
"""""" pass
def parameter_factories(self):
pass
...@@ -16,18 +16,32 @@ class INotificationListenerFactory(Interface): ...@@ -16,18 +16,32 @@ class INotificationListenerFactory(Interface):
listener_class = Type( listener_class = Type(
"force_bdss.notification_listeners" "force_bdss.notification_listeners"
".base_notification_listener.BaseNotificationListener" ".base_notification_listener.BaseNotificationListener",
allow_none=False,
) )
model_class = Type( model_class = Type(
"force_bdss.notification_listeners" "force_bdss.notification_listeners"
".base_notification_listener_model.BaseNotificationListenerModel" ".base_notification_listener_model.BaseNotificationListenerModel",
allow_none=False
) )
plugin = Instance(Plugin) plugin = Instance(Plugin, allow_none=False)
def get_name(self):
pass
def get_identifier(self):
pass
def get_model_class(self):
pass
def get_listener_class(self):
pass
def create_listener(self): def create_listener(self):
"""""" pass
def create_model(self, model_data=None): def create_model(self):
"""""" pass
from traits.api import Interface, String, Instance, Type from traits.api import Interface, Str, Instance, Type
from envisage.plugin import Plugin from envisage.plugin import Plugin
...@@ -8,15 +8,26 @@ class IUIHooksFactory(Interface): ...@@ -8,15 +8,26 @@ class IUIHooksFactory(Interface):
Refer to the BaseUIHooksFactory for documentation. Refer to the BaseUIHooksFactory for documentation.
""" """
id = String() id = Str()
name = String() name = Str()
ui_hooks_manager_class = Type( ui_hooks_manager_class = Type(
"force_bdss.ui_hooks.base_ui_hooks_manager.BaseUIHooksManager" "force_bdss.ui_hooks.base_ui_hooks_manager.BaseUIHooksManager",
allow_none=False
) )
plugin = Instance(Plugin) plugin = Instance(Plugin, allow_none=False)
def get_ui_hooks_manager_class(self):
pass
def get_name(self):
pass
def get_identifier(self):
pass
def create_hook_manager(self): def create_ui_hooks_manager(self):
"""""" pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment