2020-11-26 18:58:08 +01:00
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
from datetime import datetime
|
|
|
|
|
2021-03-03 10:47:52 +01:00
|
|
|
from cpl.configuration.configuration_abc import ConfigurationABC
|
2020-11-26 18:58:08 +01:00
|
|
|
|
|
|
|
|
2021-03-03 10:47:52 +01:00
|
|
|
class ApplicationRuntimeABC(ABC):
|
2020-11-26 18:58:08 +01:00
|
|
|
|
|
|
|
@abstractmethod
|
2021-03-14 16:57:20 +01:00
|
|
|
def __init__(self):
|
|
|
|
"""
|
|
|
|
ABC for application runtime
|
|
|
|
"""
|
|
|
|
pass
|
2020-11-26 18:58:08 +01:00
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
2021-03-03 10:47:52 +01:00
|
|
|
def configuration(self) -> ConfigurationABC: pass
|
2020-11-26 18:58:08 +01: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
|
2021-03-04 07:09:08 +01:00
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def working_directory(self) -> str: pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
@abstractmethod
|
|
|
|
def runtime_directory(self) -> str: pass
|
|
|
|
|
|
|
|
@abstractmethod
|
2021-03-14 16:57:20 +01:00
|
|
|
def set_runtime_directory(self, runtime_directory: str):
|
|
|
|
"""
|
|
|
|
Sets the current runtime directory
|
|
|
|
:param runtime_directory:
|
|
|
|
:return:
|
|
|
|
"""
|
|
|
|
pass
|