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-03-23 17:15:27 +02:00
|
|
|
scopeInstance = 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.customMap = {}
|
2016-03-23 17:15:27 +02:00
|
|
|
self.configurationManager = None
|
|
|
|
self.messageManager = None
|
|
|
|
self.logger = None
|
|
|
|
self.pluginManager = None
|
|
|
|
self.taskManager = None
|
|
|
|
self.responseQueue = None
|
|
|
|
self.registration = None
|
|
|
|
self.eventManager = None
|
|
|
|
self.executionManager = None
|
|
|
|
self.dbService = None
|
|
|
|
self.messager = None
|
2016-02-21 03:24:54 +02:00
|
|
|
|
2016-02-25 01:46:27 +02:00
|
|
|
@staticmethod
|
|
|
|
def getInstance():
|
|
|
|
return scopeInstance
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def setInstance(scopeObj):
|
|
|
|
global scopeInstance
|
|
|
|
scopeInstance = scopeObj
|
|
|
|
|
2016-02-21 03:24:54 +02:00
|
|
|
def getCustomMap(self):
|
|
|
|
return self.customMap
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def putCustomMap(self, name, value):
|
|
|
|
self.custom[str(name)] = value
|
2016-02-21 03:32:22 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def getCustomParam(self, name):
|
2016-02-21 03:32:22 +02:00
|
|
|
return self.customMap[str(name)]
|
2016-02-21 03:24:54 +02:00
|
|
|
|
|
|
|
def getConfigurationManager(self):
|
|
|
|
return self.configurationManager
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setConfigurationManager(self, configurationManager):
|
2016-02-21 03:24:54 +02:00
|
|
|
self.configurationManager = configurationManager
|
2016-02-21 03:32:22 +02:00
|
|
|
|
|
|
|
def getLogger(self):
|
|
|
|
return self.logger
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setLogger(self, logger):
|
2016-02-21 03:32:22 +02:00
|
|
|
self.logger = logger
|
2016-03-01 12:41:55 +02:00
|
|
|
|
|
|
|
def getMessageManager(self):
|
|
|
|
return self.messageManager
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setMessageManager(self, messageManager):
|
2016-03-01 12:41:55 +02:00
|
|
|
self.messageManager = messageManager
|
2016-03-02 15:45:36 +02:00
|
|
|
|
|
|
|
def getPluginManager(self):
|
|
|
|
return self.pluginManager
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setPluginManager(self, pluginManager):
|
2016-03-02 15:45:36 +02:00
|
|
|
self.pluginManager = pluginManager
|
|
|
|
|
|
|
|
def getTaskManager(self):
|
2016-03-14 17:42:17 +02:00
|
|
|
return self.taskManager
|
2016-03-02 15:45:36 +02:00
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setTaskManager(self, taskManager):
|
2016-03-02 15:45:36 +02:00
|
|
|
self.taskManager = taskManager
|
2016-03-02 17:20:42 +02:00
|
|
|
|
|
|
|
def getResponseQueue(self):
|
|
|
|
return self.responseQueue
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setResponseQueue(self, responseQueue):
|
|
|
|
self.responseQueue = responseQueue
|
2016-03-04 19:23:21 +02:00
|
|
|
|
|
|
|
def getRegistration(self):
|
|
|
|
return self.registration
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setRegistration(self, registration):
|
|
|
|
self.registration = registration
|
2016-03-04 19:24:43 +02:00
|
|
|
|
2016-03-04 18:01:47 +02:00
|
|
|
def getEventManager(self):
|
|
|
|
return self.eventManager
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setEventManager(self, eventManager):
|
|
|
|
self.eventManager = eventManager
|
2016-03-14 10:55:28 +02:00
|
|
|
|
2016-03-11 17:33:22 +02:00
|
|
|
def getExecutionManager(self):
|
|
|
|
return self.executionManager
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setExecutionManager(self, executionManager):
|
|
|
|
self.executionManager = executionManager
|
2016-03-14 10:58:18 +02:00
|
|
|
|
2016-03-14 10:55:28 +02:00
|
|
|
def getDbService(self):
|
|
|
|
return self.dbService
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setDbService(self, dbService):
|
2016-03-14 10:55:28 +02:00
|
|
|
self.dbService = dbService
|
2016-03-18 18:38:33 +02:00
|
|
|
|
|
|
|
def getMessager(self):
|
|
|
|
return self.messager
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
def setMessager(self, messager):
|
2016-03-18 18:38:33 +02:00
|
|
|
self.messager = messager
|