Exemple #1
0
class ConfigProxy(puremvc.patterns.proxy.Proxy):
    NAME = "ConfigProxy"

    def __init__(self):
        super(ConfigProxy, self).__init__(ConfigProxy.NAME)
        self.cfgService = ConfigService()

    def getSvnConfig(self):
        return self.cfgService.getConfig(enum.CFG_SVN_SECTION)

    def saveSvnConfig(self,cfg):
        self.cfgService.setConfig(enum.CFG_SVN_SECTION,cfg)
Exemple #2
0
def config(binder):
    # config service
    config_service = ConfigService()
    binder.bind(IConfigService, config_service)
    assert isinstance(config_service, IConfigService)

    # logger service
    logger_service = LoggerService()
    binder.bind(ILoggerService, logger_service)
    assert isinstance(logger_service, ILoggerService)

    # Email service
    email_service = EmailService()
    binder.bind(IEmailService, email_service)
    assert isinstance(email_service, IEmailService)

    # destination service
    destination_service = DestinationService()
    binder.bind(IDestinationService, destination_service)
    assert isinstance(destination_service, IDestinationService)

    # Cloud Storage Service
    cloud_storage_service = CloudStorageService()
    binder.bind(ICloudStorageService, cloud_storage_service)
    assert isinstance(cloud_storage_service, ICloudStorageService)

    # Processing Service
    processing_service = ProcessingService()
    binder.bind(IProcessingService, processing_service)
    assert isinstance(processing_service, IProcessingService)
Exemple #3
0
 def __init__(self):
     super(ConfigProxy, self).__init__(ConfigProxy.NAME)
     self.cfgService = ConfigService()