public CompanyDepartmentJobRoleViewModel(ISetupService <CompanyDepartmentJobRole> _service, IEventAggregator _eventAggregator)
            : base(new CompanyDepartmentJobRoleService())
        {
            modelName = "Coy Dept Job Role";
            Initialize();

            eventAggregator                 = _eventAggregator;
            companyService                  = new CompanyService();
            departmentService               = new DepartmentService();
            jobRoleService                  = new JobRoleService();
            companyDepartmentService        = new CompanyDepartmentService();
            companyDepartmentJobRoleService = new CompanyDepartmentJobRoleService();

            //LoadAllCompaniesCompleted();
            //companyService.LoadAll();

            //LoadAllJobRolesCompleted();
            //jobRoleService.LoadAll();

            base.addSelector    = cdjr => cdjr.Company.Id == Model.Company.Id && cdjr.Department.Id == Model.Department.Id && cdjr.JobRole.Id == Model.JobRole.Id;
            base.modifySelector = cdjr => cdjr.Company.Id == Model.Company.Id && cdjr.Department.Id == Model.Department.Id && cdjr.JobRole.Id == Model.JobRole.Id && cdjr.Id != Model.Id;

            //eventAggregator.GetEvent<SetupEvent>().Subscribe(OnInitialise);

            OnInitialise("");
        }
        public ExecuteRecipeAction(
            IOrchardServices orchardServices,
            ISetupService setupService,
            ShellSettings shellSettings,
            IEnumerable <IRecipeExecutionStep> recipeExecutionSteps,
            IRecipeParser recipeParser,
            IRecipeExecutor recipeExecutor,
            IDatabaseManager databaseManager,
            ISweepGenerator sweepGenerator,
            IRecipeStepQueue recipeStepQueue,
            IRepository <RecipeStepResultRecord> recipeStepResultRepository)
        {
            _orchardServices            = orchardServices;
            _setupService               = setupService;
            _shellSettings              = shellSettings;
            _recipeExecutionSteps       = recipeExecutionSteps;
            _recipeParser               = recipeParser;
            _recipeExecutor             = recipeExecutor;
            _databaseManager            = databaseManager;
            _sweepGenerator             = sweepGenerator;
            _recipeStepQueue            = recipeStepQueue;
            _recipeStepResultRepository = recipeStepResultRepository;

            RecipeExecutionTimeout = 600;
        }
Example #3
0
        public ExecuteRecipeAction(
            IOrchardServices orchardServices,
            ISetupService setupService,
            ShellSettings shellSettings,
            IEnumerable<IRecipeExecutionStep> recipeExecutionSteps,
            IRecipeParser recipeParser,
            IRecipeExecutor recipeExecutor,
            IDatabaseManager databaseManager,
            ISweepGenerator sweepGenerator,
            IRecipeStepQueue recipeStepQueue,
            IRepository<RecipeStepResultRecord> recipeStepResultRepository)
        {
            _orchardServices = orchardServices;
            _setupService = setupService;
            _shellSettings = shellSettings;
            _recipeExecutionSteps = recipeExecutionSteps;
            _recipeParser = recipeParser;
            _recipeExecutor = recipeExecutor;
            _databaseManager = databaseManager;
            _sweepGenerator = sweepGenerator;
            _recipeStepQueue = recipeStepQueue;
            _recipeStepResultRepository = recipeStepResultRepository;

            RecipeExecutionTimeout = 600;
        }
Example #4
0
        /// <summary>
        /// Sets up a tenant.
        /// </summary>
        /// <param name="setupService">The setup service.</param>
        /// <param name="setupOptions">The tenant setup options.</param>
        /// <param name="shellSettings">The tenant shell settings.</param>
        /// <returns>
        /// Returns <c>true</c> if successfully setup.
        /// </returns>
        public async Task <bool> SetupTenantAsync(ISetupService setupService, TenantSetupOptions setupOptions, ShellSettings shellSettings)
        {
            var setupContext = await GetSetupContextAsync(setupOptions, setupService, shellSettings);

            _logger.LogInformation("AutoSetup is initializing the site");

            await setupService.SetupAsync(setupContext);

            if (setupContext.Errors.Count == 0)
            {
                _logger.LogInformation($"AutoSetup successfully provisioned the site {setupOptions.SiteName}");

                return(true);
            }

            var stringBuilder = new StringBuilder();

            foreach (var error in setupContext.Errors)
            {
                stringBuilder.AppendLine($"{error.Key} : '{error.Value}'");
            }

            _logger.LogError("AutoSetup failed installing the site '{SiteName}' with errors: {Errors}", setupOptions.SiteName, stringBuilder);

            return(false);
        }
		public HomeController(ILog logger, IConfigurationService configurationService, IUrlBuilder urlBuilder, ISetupService setupService, IRoutingService routingService)
			: base(logger, configurationService)
		{
			this.urlBuilder = urlBuilder;
			this.setupService = setupService;
			this.routingService = routingService;
		}
Example #6
0
 public CreateAndSetUpTenantTask(IShellSettingsManager shellSettingsManager, IShellHost shellHost, ISetupService setupService, IClock clock, IWorkflowExpressionEvaluator expressionEvaluator, IWorkflowScriptEvaluator scriptEvaluator, IUpdateModelAccessor updateModelAccessor, IStringLocalizer <CreateAndSetUpTenantTask> localizer)
     : base(shellSettingsManager, shellHost, expressionEvaluator, scriptEvaluator, localizer)
 {
     SetupService         = setupService;
     _clock               = clock;
     _updateModelAccessor = updateModelAccessor;
 }
Example #7
0
 public HomeController(ILog logger, IConfigurationService configurationService, IUrlBuilder urlBuilder, ISetupService setupService, IRoutingService routingService)
     : base(logger, configurationService)
 {
     this.urlBuilder     = urlBuilder;
     this.setupService   = setupService;
     this.routingService = routingService;
 }
        public ApiController(
            IShellHost shellHost,
            ShellSettings currentShellSettings,
            IAuthorizationService authorizationService,
            IShellSettingsManager shellSettingsManager,
            IEnumerable <DatabaseProvider> databaseProviders,
            IDataProtectionProvider dataProtectorProvider,
            ISetupService setupService,
            IClock clock,
            INotifier notifier,
            IEnumerable <IRecipeHarvester> recipeHarvesters,
            IStringLocalizer <AdminController> stringLocalizer,
            IHtmlLocalizer <AdminController> htmlLocalizer)
        {
            _dataProtectorProvider = dataProtectorProvider;
            _setupService          = setupService;
            _clock                = clock;
            _recipeHarvesters     = recipeHarvesters;
            _shellHost            = shellHost;
            _authorizationService = authorizationService;
            _shellSettingsManager = shellSettingsManager;
            _databaseProviders    = databaseProviders;
            _currentShellSettings = currentShellSettings;
            _notifier             = notifier;

            S = stringLocalizer;
            H = htmlLocalizer;
        }
        public IntelligentTaggingController(
            IWebUtilWrapper webUtil,
            ISitecoreDataWrapper dataWrapper,
            IIntelligentTaggingSettings settings,
            ISetupInformationFactory setupFactory,
            ISetupService setupService,
            IContentSearchWrapper contentSearch,
            INaturalLanguageClassifierService naturalLanguageClassifier,
            IContentService contentService,
            IContentSearchService contentSearchService,
            IClassifierFactory classifierFactory)
        {
            WebUtil                   = webUtil;
            DataWrapper               = dataWrapper;
            Settings                  = settings;
            SetupFactory              = setupFactory;
            SetupService              = setupService;
            ContentSearch             = contentSearch;
            NaturalLanguageClassifier = naturalLanguageClassifier;
            ContentService            = contentService;
            ContentSearchService      = contentSearchService;
            ClassifierFactory         = classifierFactory;

            Id       = WebUtil.GetQueryString("id");
            Language = WebUtil.GetQueryString("language");
            Database = WebUtil.GetQueryString("db");
        }
Example #10
0
 public SetupController(
     ISetupService setupService,
     ShellSettings shellSettings)
 {
     _setupService  = setupService;
     _shellSettings = shellSettings;
 }
Example #11
0
 public ApiController(
     IShellHost shellHost,
     ShellSettings currentShellSettings,
     IAuthorizationService authorizationService,
     IShellSettingsManager shellSettingsManager,
     IDataProtectionProvider dataProtectorProvider,
     ISetupService setupService,
     IClock clock,
     IEmailAddressValidator emailAddressValidator,
     IFeatureProfilesService featureProfilesService,
     IOptions <IdentityOptions> identityOptions,
     IEnumerable <DatabaseProvider> databaseProviders,
     IStringLocalizer <AdminController> stringLocalizer)
 {
     _shellHost             = shellHost;
     _currentShellSettings  = currentShellSettings;
     _authorizationService  = authorizationService;
     _dataProtectorProvider = dataProtectorProvider;
     _shellSettingsManager  = shellSettingsManager;
     _setupService          = setupService;
     _clock = clock;
     _emailAddressValidator  = emailAddressValidator;
     _featureProfilesService = featureProfilesService;
     _identityOptions        = identityOptions.Value;
     _databaseProviders      = databaseProviders;
     S = stringLocalizer;
 }
Example #12
0
 public HomeController(Lazy<IDispatcher> dispatcher,
     Lazy<IMap> mapper,
     ISetupService setupService)
 {
     _dispatcher = dispatcher;
     _mapper = mapper;
     _setupService = setupService;
 }
Example #13
0
        public SetupController(ISetupService setupService,
            ShellSettings shellSettings)
        {
            _setupService = setupService;
            _shellSettings = shellSettings;

            T = NullLocalizer.Instance;
        }
        public SetupController(ISetupService setupService,
                               ShellSettings shellSettings)
        {
            _setupService  = setupService;
            _shellSettings = shellSettings;

            T = NullLocalizer.Instance;
        }
Example #15
0
        public LocationViewModel(ISetupService <Location> _service)
            : base(_service)
        {
            modelName = "Location";
            Initialize();

            base.addSelector    = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase);
            base.modifySelector = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase) && l.Id != Model.Id;
        }
Example #16
0
        public PeriodTypeViewModel(ISetupService <PeriodType> _service)
            : base(_service)
        {
            modelName = "Period Type";
            Initialize();

            base.addSelector    = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase);
            base.modifySelector = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase) && l.Id != Model.Id;
        }
Example #17
0
 public SetupController(
     ISetupService setupService,
     EngineSettings engineSettings,
     IProjectReader projectReader)
 {
     _setupService   = setupService;
     _engineSettings = engineSettings;
     _projectReader  = projectReader;
 }
Example #18
0
 public SettingsController(
     ISetupService setupService,
     IEnumerable<DatabaseProvider> databaseProviders,
     IClock clock)
 {
     _setupService = setupService;
     _databaseProviders = databaseProviders;
     _clock = clock;
 }
Example #19
0
        public ManageRightViewModel(ISetupService <Right> _service)
            : base(_service)
        {
            modelName = "Right";
            Initialize();

            base.addSelector    = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase);
            base.modifySelector = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase) && l.Id != Model.Id;
        }
Example #20
0
 public ResourceIssueController()
 {
     _iResourceService            = new ResourceService();
     _iResourceIssue              = new ResourceIssueService();
     _iSetupService               = new SetupService();
     _iResourceAuthorService      = new ResourceAuthorService();
     _iResourcePublicationService = new ResourcePublicationService();
     rModel = new ReturnMessageModel();
 }
Example #21
0
        public SetupController(
            ISetupService setupService,
            ShellSettings shellSettings,
            IStringLocalizer <SetupController> t)
        {
            _setupService  = setupService;
            _shellSettings = shellSettings;

            T = t;
        }
Example #22
0
        public SetupController(
            ISetupService setupService,
            ShellSettings shellSettings,
            IStringLocalizer<SetupController> t)
        {
            _setupService = setupService;
            _shellSettings = shellSettings;

            T = t;
        }
Example #23
0
        public JobRoleViewModel(ISetupService <JobRole> _service) : base(_service)
        {
            modelName = "Job Role";
            Initialize();

            IsLoggedInUserHasRight = Utility.LoggedInUser.Role.UserRight.CanSetupJobRole;

            base.addSelector    = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase);
            base.modifySelector = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase) && l.Id != Model.Id;
        }
Example #24
0
        public JobRoleLevelViewModel(ISetupService <Level> _service)
            : base(_service)
        {
            modelName = "Job Level";
            Initialize();

            base.addSelector    = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase);
            base.modifySelector = l => l.Name.Equals(Model.Name, StringComparison.OrdinalIgnoreCase) && l.Id != Model.Id;

            //IsLoggedInUserHasRight = Utility.LoggedInUser.Role.PersonRight.CanSetupStockCategory;
        }
Example #25
0
 public SetupController(
     ISetupService setupService,
     IConfiguration config,
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> singInManager)
 {
     _setupService  = setupService;
     _config        = config;
     _userManager   = userManager;
     _signInManager = singInManager;
 }
Example #26
0
        public MetricsViewModel(IMetricBaseService <Metrics> _service, ISetupService <CompanyDepartmentJobRole> _cdjrService, ISetupService <MetricsPerspective> _metricsPerspectiveService, IEventAggregator _eventAggregator)
            : base(_service)
        {
            cdjrService               = _cdjrService;
            departmentService         = new DepartmentService();
            metricsPerspectiveService = _metricsPerspectiveService;

            Initialise();

            OnInitialise("");
        }
 public void Setup()
 {
     SearchService        = Substitute.For <IImageSearchService>();
     DataWrapper          = Substitute.For <ISitecoreDataWrapper>();
     WebUtil              = Substitute.For <IWebUtilWrapper>();
     MediaSearchFactory   = Substitute.For <ICognitiveImageSearchFactory>();
     SetAltTagsAllFactory = Substitute.For <ISetAltTagsAllFactory>();
     ImageAnalysisFactory = Substitute.For <ICognitiveImageAnalysisFactory>();
     AnalyzeAllFactory    = Substitute.For <IAnalyzeAllFactory>();
     SetupService         = Substitute.For <ISetupService>();
 }
 public HomeController(
     IClock clock,
     ISmtpService smtpService,
     ISetupService setupService,
     IShellSettingsManager shellSettingsManager)
 {
     _clock                = clock;
     _smtpService          = smtpService;
     _setupService         = setupService;
     _shellSettingsManager = shellSettingsManager;
 }
        public SetupController(
            INotifier notifier, 
            ISetupService setupService, 
            IViewsBackgroundCompilation viewsBackgroundCompilation) {
            _viewsBackgroundCompilation = viewsBackgroundCompilation;
            _notifier = notifier;
            _setupService = setupService;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
Example #30
0
        public SetupController(
            ILogger <SetupController> logger,
            IOptions <AppOptions> appOptions,
            ISetupService setupService,
            IGraphAuthProvider graphAuthProvider) : base(logger, appOptions)
        {
            Guard.Against.Null(setupService, "SetupController_Constructor" + nameof(setupService));
            Guard.Against.Null(graphAuthProvider, "SetupController_Constructor" + nameof(graphAuthProvider));

            _setupService      = setupService;
            _graphAuthProvider = graphAuthProvider;
        }
        public SetupController(
            INotifier notifier,
            ISetupService setupService,
            IViewsBackgroundCompilation viewsBackgroundCompilation)
        {
            _viewsBackgroundCompilation = viewsBackgroundCompilation;
            _notifier     = notifier;
            _setupService = setupService;

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
Example #32
0
        public SetupController(
            ISetupService setupService,
            ShellSettings shellSettings,
            IEnumerable <DatabaseProvider> databaseProviders,
            IStringLocalizer <SetupController> t)
        {
            _setupService      = setupService;
            _shellSettings     = shellSettings;
            _databaseProviders = databaseProviders;

            T = t;
        }
Example #33
0
 public AccountController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IEmailSender emailSender,
     ILogger <AccountController> logger,
     ISetupService setupService)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _emailSender   = emailSender;
     _logger        = logger;
     _setupService  = setupService;
 }
Example #34
0
        public SetupController(
              INotifier notifier,
              ISetupService setupService,
              IViewsBackgroundCompilation viewsBackgroundCompilation,
              ShellSettings shellSettings)
        {
            _viewsBackgroundCompilation = viewsBackgroundCompilation;
            _shellSettings = shellSettings;
            _notifier = notifier;
            _setupService = setupService;

            Logger = NullLogger.Instance;
        }
Example #35
0
 public HomeController(
     IShellSettingsManager shellSettingsManager,
     IShellHost shellHost,
     ISmtpService smtpService,
     ISetupService setupService,
     IClock clock)
 {
     _shellSettingsManager = shellSettingsManager;
     _shellHost            = shellHost;
     _smtpService          = smtpService;
     _setupService         = setupService;
     _clock = clock;
 }
Example #36
0
        public MetricRatingViewModel(IMetricBaseService <MetricRating> _service, ISetupService <RatingType> _ratingTypeService, ISetupService <Infrastructure.MangoService.Rating> _ratingService, ISetupService <CompanyDepartmentJobRole> _cdjrService, IEventAggregator _eventAggregator)
            : base(_service)
        {
            cdjrService       = _cdjrService;
            ratingService     = _ratingService;
            ratingTypeService = _ratingTypeService;

            Initialise();

            //_eventAggregator.GetEvent<SetupEvent>().Subscribe(OnInitialise);

            OnInitialise("");
        }
Example #37
0
        public PeriodViewModelBase(ISetupService <Period> _service, IEventAggregator _eventAggregator)
            : base(_service)
        {
            periodTypeService = new PeriodTypeService();
            //LoadAllPeriodTypeCompleted();
            //periodTypeService.LoadAll();

            //PopulateYears(yearStartsFrom);

            //_eventAggregator.GetEvent<SetupEvent>().Subscribe(OnInitialise);

            OnInitialise("");
        }
Example #38
0
        public DefaultApplication(ILogger logger,
            IDispatcher dispatcher,
            IResourceStringProvider resourceProvider,
            ISetupService setupService)
        {
            if (logger == null) throw new ArgumentNullException(nameof(logger));
            if (dispatcher == null) throw new ArgumentNullException(nameof(dispatcher));
            if (resourceProvider == null) throw new ArgumentNullException(nameof(resourceProvider));
            if (setupService == null) throw new ArgumentNullException(nameof(setupService));

            _logger = logger;
            _dispatcher = dispatcher;
            _resourceProvider = resourceProvider;
            _setupService = setupService;
        }
        public ApplicationIntegration(string name, string root)
        {
            _name = name;
            _root = root;
            var container = new WindsorContainer();
            container.Install(new DatabaseServiceInstaller());

            container.Register(Component.For<ILogger>().ImplementedBy<ConsoleLogger>().IsDefault());

            _siteService = container.Resolve<ISiteService>();
            _setupService = container.Resolve<ISetupService>();
            _crawlService = container.Resolve<ICrawlService>();

            _crawler = new Crawler(_crawlService, container.Resolve<ILogger>());
        }
Example #40
0
        public SetupController(
            INotifier notifier,
            ISetupService setupService,
            IViewsBackgroundCompilation viewsBackgroundCompilation,
            ShellSettings shellSettings) {

            _viewsBackgroundCompilation = viewsBackgroundCompilation;
            _shellSettings = shellSettings;
            _notifier = notifier;
            _setupService = setupService;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
            RecipeExecutionTimeout = 600;
        }
Example #41
0
 public SetupCommand(ISetupService setupService, IRecipeHarvester recipeHarvester)
 {
     _setupService = setupService;
     _recipeHarvester = recipeHarvester;
 }
Example #42
0
 public HomeController(ISiteService siteService, ISetupService setup)
 {
     _siteService = siteService;
     _setup = setup;
 }
 public RoutingService(ISetupService setupService, IPageService pageService, ILog logger)
 {
     this.setupService = setupService;
     this.pageService = pageService;
     this.logger = logger;
 }
Example #44
0
 public SetupController(INotifier notifier, ISetupService setupService, IAppDataFolder appDataFolder) {
     _appDataFolder = appDataFolder;
     _notifier = notifier;
     _setupService = setupService;
     T = NullLocalizer.Instance;
 }
Example #45
0
 public SetupCommand(ISetupService setupService)
 {
     _setupService = setupService;
 }
Example #46
0
		protected internal SetupController(ISetupService setupService, IUserService userService)
		{
			_setupService = setupService;
			_userService = userService;
		}