Пример #1
0
 def _listAll(self):
     appList = self._appService.getAll()
     
     if 1 > len(appList):
         print('There are no registered applications.')
         print()
         usage = 'To add application, Usage:\n  $ {0} {1} {2} APP_NAME --description "Application description"'
         setAction = IoC.resolve(SetAction)
         
         print(usage.format(setAction.app.getAppName(), setAction.name, self.name))
     else:
         print('{0:<20} {1:<60}'.format('NAME', 'DESCRIPTION'))
         print('{0:-<20} {1:-<60}'.format('',''))
     
     for app in appList:
         print('{0:<20} {1:<60}'.format(app.Name, app.Description[:60]))
Пример #2
0
 def _appService(self):
     if not self._appService_:
         self._appService_ = IoC.resolve(ApplicationService)
     return self._appService_
Пример #3
0
 def _settingService(self):
     if not self._settingService_:
         self._settingService_ = IoC.resolve(SettingDataService)
     return self._settingService_
Пример #4
0
 def _settingService(self):
     if not self._settingService_:
         self._settingService_ = IoC.resolve(SettingTemplateService)
     return self._settingService_