2020-11-28 15:13:54 +01:00
|
|
|
from abc import ABC, abstractmethod
|
2021-03-29 08:56:18 +02:00
|
|
|
from datetime import datetime
|
2020-11-28 15:13:54 +01:00
|
|
|
|
|
|
|
|
2021-03-14 16:20:29 +01:00
|
|
|
class ApplicationEnvironmentABC(ABC):
|
2020-11-28 15:13:54 +01:00
|
|
|
|
|
|
|
@abstractmethod
|
2021-03-14 16:20:29 +01:00
|
|
|
def __init__(self):
|
|
|
|
"""
|
|
|
|
ABC of application environment
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
2020-11-28 15:13:54 +01:00
|
|
|
@property
|
|
|
|
@abstractmethod
|
2020-11-29 17:29:16 +01:00
|
|
|
def environment_name(self) -> str: pass
|
2021-03-14 16:20:29 +01:00
|
|
|
|
2020-11-28 15:13:54 +01:00
|
|
|
@environment_name.setter
|
|
|
|
@abstractmethod
|
2020-11-29 17:29:16 +01:00
|
|
|
def environment_name(self, environment_name: str): pass
|
2021-03-14 16:20:29 +01:00
|
|
|
|
2020-11-28 15:13:54 +01:00
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def application_name(self) -> str: pass
|
2021-03-14 16:20:29 +01:00
|
|
|
|
2020-11-28 15:13:54 +01:00
|
|
|
@application_name.setter
|
|
|
|
@abstractmethod
|
|
|
|
def application_name(self, application_name: str): pass
|
2021-03-14 16:20:29 +01:00
|
|
|
|
2020-11-28 15:13:54 +01:00
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def customer(self) -> str: pass
|
2021-03-14 16:20:29 +01:00
|
|
|
|
2020-11-28 15:13:54 +01:00
|
|
|
@customer.setter
|
|
|
|
@abstractmethod
|
|
|
|
def customer(self, customer: str): pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def content_root_path(self) -> str: pass
|
|
|
|
|
|
|
|
@content_root_path.setter
|
|
|
|
@abstractmethod
|
|
|
|
def content_root_path(self, content_root_path: str): pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def host_name(self) -> str: pass
|
2021-03-29 08:56:18 +02:00
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def start_time(self) -> datetime: pass
|
|
|
|
|
|
|
|
@start_time.setter
|
|
|
|
@abstractmethod
|
|
|
|
def start_time(self, start_time: datetime): pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def end_time(self): pass
|
|
|
|
|
|
|
|
@end_time.setter
|
|
|
|
@abstractmethod
|
|
|
|
def end_time(self, end_time: datetime): pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def date_time_now(self) -> datetime: pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def working_directory(self) -> str: pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def runtime_directory(self) -> str: pass
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def set_runtime_directory(self, runtime_directory: str):
|
|
|
|
"""
|
|
|
|
Sets the current runtime directory
|
|
|
|
:param runtime_directory:
|
|
|
|
:return:
|
|
|
|
"""
|
|
|
|
pass
|