2020-11-26 18:58:08 +01:00
|
|
|
from abc import abstractmethod, ABC
|
2020-11-25 21:41:45 +01:00
|
|
|
from collections import Callable
|
2020-11-26 18:58:08 +01:00
|
|
|
from typing import Type
|
2020-11-25 21:41:45 +01:00
|
|
|
|
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
|
|
|
|
|
|
|
|
2020-11-26 18:58:08 +01:00
|
|
|
class ConfigurationBase(ABC):
|
2020-11-25 21:41:45 +01:00
|
|
|
|
|
|
|
@abstractmethod
|
2020-11-26 18:58:08 +01:00
|
|
|
def __init__(self): pass
|
2020-11-25 21:41:45 +01:00
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def add_config_by_type(self, key_type: type, value: object): pass
|
|
|
|
|
|
|
|
@abstractmethod
|
2020-11-26 18:58:08 +01:00
|
|
|
def get_config_by_type(self, search_type: Type[ConfigurationModelBase]) -> Callable[ConfigurationModelBase]: pass
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def create(self): pass
|