diff --git a/force_bdss/notification_listeners/base_notification_listener_factory.py b/force_bdss/notification_listeners/base_notification_listener_factory.py index 08e2b59f90f2518d99445ffd09568e23e1b84045..0dfff5b74220f50c54b134c8f45cd77f19c4e203 100644 --- a/force_bdss/notification_listeners/base_notification_listener_factory.py +++ b/force_bdss/notification_listeners/base_notification_listener_factory.py @@ -48,3 +48,10 @@ class BaseNotificationListenerFactory(ABCHasStrictTraits): model_data: dict Data to use to fill the model. """ + + @abc.abstractmethod + def create_ui_hook_manager(self): + """Creates an instance of the hook manager + The hook manager contains a set of methods that are applicable in + various moments of the UI application lifetime. + """ diff --git a/force_bdss/notification_listeners/base_ui_hook_manager.py b/force_bdss/notification_listeners/base_ui_hook_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..d9e66d5f7c0d485ad668f327be9573e82954db09 --- /dev/null +++ b/force_bdss/notification_listeners/base_ui_hook_manager.py @@ -0,0 +1,11 @@ +import abc +from traits.api import ABCHasStrictTraits + + +class BaseUIHookManager(ABCHasStrictTraits): + @abc.abstractmethod + def before_execution(self, application, model): + """Hook that is called before execution of a given model. + Gives a chance to alter the model before the temporary file is created + with its contents and the calculation invoked. + """