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
|
|
|
|
2016-09-21 11:47:47 +03: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__()
|
2016-09-21 11:47:47 +03:00
|
|
|
self.custom_map = dict()
|
|
|
|
self.configuration_manager = None
|
|
|
|
self.message_manager = None
|
2016-03-23 17:15:27 +02:00
|
|
|
self.logger = None
|
2016-09-21 11:47:47 +03:00
|
|
|
self.plugin_manager = None
|
|
|
|
self.task_manager = None
|
|
|
|
self.response_queue = None
|
2016-03-23 17:15:27 +02:00
|
|
|
self.registration = None
|
2016-09-21 11:47:47 +03:00
|
|
|
self.event_manager = None
|
|
|
|
self.execution_manager = None
|
|
|
|
self.db_service = None
|
2016-06-20 17:35:59 +03:00
|
|
|
self.messenger = None
|
2016-04-05 18:47:05 +03:00
|
|
|
self.scheduler = None
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-02-25 01:46:27 +02:00
|
|
|
@staticmethod
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_instance():
|
|
|
|
return scope_instance
|
2016-02-25 01:46:27 +02:00
|
|
|
|
|
|
|
@staticmethod
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_instance(scope_obj):
|
|
|
|
global scope_instance
|
|
|
|
scope_instance = scope_obj
|
2016-02-25 01:46:27 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_custom_map(self):
|
|
|
|
return self.custom_map
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def put_custom_map(self, name, value):
|
|
|
|
self.custom_map[str(name)] = value
|
2016-02-21 03:32:22 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_custom_param(self, name):
|
|
|
|
return self.custom_map[str(name)]
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_configuration_manager(self):
|
|
|
|
return self.configuration_manager
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_configuration_manager(self, configuration_manager):
|
|
|
|
self.configuration_manager = configuration_manager
|
2016-02-21 03:32:22 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_logger(self):
|
2016-02-21 03:32:22 +02:00
|
|
|
return self.logger
|
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_logger(self, logger):
|
2016-02-21 03:32:22 +02:00
|
|
|
self.logger = logger
|
2016-03-01 12:41:55 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_message_manager(self):
|
|
|
|
return self.message_manager
|
2016-03-01 12:41:55 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_message_manager(self, message_manager):
|
|
|
|
self.message_manager = message_manager
|
2016-03-02 15:45:36 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_plugin_manager(self):
|
|
|
|
return self.plugin_manager
|
2016-03-02 15:45:36 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_plugin_manager(self, plugin_manager):
|
|
|
|
self.plugin_manager = plugin_manager
|
2016-03-02 15:45:36 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_task_manager(self):
|
|
|
|
return self.task_manager
|
2016-03-02 15:45:36 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_task_manager(self, task_manager):
|
|
|
|
self.task_manager = task_manager
|
2016-03-02 17:20:42 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_response_queue(self):
|
|
|
|
return self.response_queue
|
2016-03-02 17:20:42 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_response_queue(self, response_queue):
|
|
|
|
self.response_queue = response_queue
|
2016-03-04 19:23:21 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_registration(self):
|
2016-03-04 19:23:21 +02:00
|
|
|
return self.registration
|
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_registration(self, registration):
|
2016-03-23 17:15:27 +02:00
|
|
|
self.registration = registration
|
2016-03-04 19:24:43 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_event_manager(self):
|
|
|
|
return self.event_manager
|
2016-03-04 18:01:47 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_event_manager(self, event_manager):
|
|
|
|
self.event_manager = event_manager
|
2016-03-14 10:55:28 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_execution_manager(self):
|
|
|
|
return self.execution_manager
|
2016-03-11 17:33:22 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_execution_manager(self, execution_manager):
|
|
|
|
self.execution_manager = execution_manager
|
2016-03-14 10:58:18 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_db_service(self):
|
|
|
|
return self.db_service
|
2016-03-14 10:55:28 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_sb_service(self, db_service):
|
|
|
|
self.db_service = db_service
|
2016-03-18 18:38:33 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def get_messenger(self):
|
2016-06-20 17:35:59 +03:00
|
|
|
return self.messenger
|
2016-03-18 18:38:33 +02:00
|
|
|
|
2016-09-21 11:47:47 +03:00
|
|
|
def set_messenger(self, messenger):
|
2016-06-20 17:35:59 +03:00
|
|
|
self.messenger = messenger
|
2016-04-05 18:47:05 +03:00
|
|
|
|
|
|
|
def set_scheduler(self, scheduler):
|
|
|
|
self.scheduler = scheduler
|
|
|
|
|
|
|
|
def get_scheduler(self):
|
2016-06-27 17:21:10 +03:00
|
|
|
return self.scheduler
|