2020-11-25 21:41:45 +01:00
|
|
|
from abc import abstractmethod
|
|
|
|
from collections import Callable
|
|
|
|
|
2020-11-26 10:45:02 +01:00
|
|
|
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
2020-11-25 21:41:45 +01:00
|
|
|
from sh_edraft.service.base.service_base import ServiceBase
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigurationBase(ServiceBase):
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def __init__(self):
|
|
|
|
ServiceBase.__init__(self)
|
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
2020-11-26 10:45:02 +01:00
|
|
|
def config(self) -> dict[type, object]: pass
|
2020-11-25 21:41:45 +01:00
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def add_config_by_type(self, key_type: type, value: object): pass
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def get_config_by_type(self, search_type: ConfigurationModelBase) -> Callable[ConfigurationModelBase]: pass
|