Ahenk/opt/ahenk/base/scope.py

116 lines
3 KiB
Python
Raw Normal View History

2016-02-29 10:48:00 +02:00
#!/usr/bin/python3
2016-02-21 03:24:54 +02:00
# -*- coding: utf-8 -*-
2016-02-21 03:32:22 +02:00
# @author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
2016-02-21 03:24:54 +02:00
class Scope(object):
"""docstring for Scope"""
2016-02-25 01:46:27 +02:00
scope_instance = None
2016-02-25 01:46:27 +02:00
2016-02-21 03:24:54 +02:00
def __init__(self):
super(Scope, self).__init__()
self.custom_map = dict()
self.configuration_manager = None
self.message_manager = None
self.logger = None
self.plugin_manager = None
self.task_manager = None
self.response_queue = None
self.registration = None
self.event_manager = None
self.execution_manager = None
self.db_service = None
self.messenger = None
self.scheduler = None
2016-02-21 03:24:54 +02:00
2016-02-25 01:46:27 +02:00
@staticmethod
def get_instance():
return scope_instance
2016-02-25 01:46:27 +02:00
@staticmethod
def set_instance(scope_obj):
global scope_instance
scope_instance = scope_obj
2016-02-25 01:46:27 +02:00
def get_custom_map(self):
return self.custom_map
2016-02-21 03:24:54 +02:00
def put_custom_map(self, name, value):
self.custom_map[str(name)] = value
2016-02-21 03:32:22 +02:00
def get_custom_param(self, name):
return self.custom_map[str(name)]
2016-02-21 03:24:54 +02:00
def get_configuration_manager(self):
return self.configuration_manager
2016-02-21 03:24:54 +02:00
def set_configuration_manager(self, configuration_manager):
self.configuration_manager = configuration_manager
2016-02-21 03:32:22 +02:00
def get_logger(self):
2016-02-21 03:32:22 +02:00
return self.logger
def set_logger(self, logger):
2016-02-21 03:32:22 +02:00
self.logger = logger
2016-03-01 12:41:55 +02:00
def get_message_manager(self):
return self.message_manager
2016-03-01 12:41:55 +02:00
def set_message_manager(self, message_manager):
self.message_manager = message_manager
2016-03-02 15:45:36 +02:00
def get_plugin_manager(self):
return self.plugin_manager
2016-03-02 15:45:36 +02:00
def set_plugin_manager(self, plugin_manager):
self.plugin_manager = plugin_manager
2016-03-02 15:45:36 +02:00
def get_task_manager(self):
return self.task_manager
2016-03-02 15:45:36 +02:00
def set_task_manager(self, task_manager):
self.task_manager = task_manager
def get_response_queue(self):
return self.response_queue
def set_response_queue(self, response_queue):
self.response_queue = response_queue
def get_registration(self):
return self.registration
def set_registration(self, registration):
self.registration = registration
2016-03-04 19:24:43 +02:00
def get_event_manager(self):
return self.event_manager
2016-03-04 18:01:47 +02:00
def set_event_manager(self, event_manager):
self.event_manager = event_manager
2016-03-14 10:55:28 +02:00
def get_execution_manager(self):
return self.execution_manager
2016-03-11 17:33:22 +02:00
def set_execution_manager(self, execution_manager):
self.execution_manager = execution_manager
2016-03-14 10:58:18 +02:00
def get_db_service(self):
return self.db_service
2016-03-14 10:55:28 +02:00
def set_sb_service(self, db_service):
self.db_service = db_service
2016-03-18 18:38:33 +02:00
def get_messenger(self):
return self.messenger
2016-03-18 18:38:33 +02:00
def set_messenger(self, messenger):
self.messenger = messenger
def set_scheduler(self, scheduler):
self.scheduler = scheduler
def get_scheduler(self):
2016-06-27 17:21:10 +03:00
return self.scheduler