Esempio n. 1
0
 /// <summary>
 /// Initialize a new instance of the <see cref="App"/> class.
 /// </summary>
 /// <param name="appResourcesService">A service with access to local resources.</param>
 /// <param name="logger">A logger from the built in LoggingFactory.</param>
 /// <param name="dataService">A service with access to data storage.</param>
 /// <param name="processService">A service with access to the process.</param>
 /// <param name="pdfService">A service with access to the PDF generator.</param>
 /// <param name="profileService">A service with access to profile information.</param>
 /// <param name="registerService">A service with access to register information.</param>
 /// <param name="prefillService">A service with access to prefill mechanisms.</param>
 /// <param name="instanceService">A service with access to instances</param>
 /// <param name="settings">General settings</param>
 /// <param name="textService">A service with access to text</param>
 /// <param name="httpContextAccessor">A context accessor</param>
 public App(
     IAppResources appResourcesService,
     ILogger <App> logger,
     IData dataService,
     IProcess processService,
     IPDF pdfService,
     IProfile profileService,
     IRegister registerService,
     IPrefill prefillService,
     IInstance instanceService,
     IOptions <GeneralSettings> settings,
     IText textService,
     IHttpContextAccessor httpContextAccessor) : base(
         appResourcesService,
         logger,
         dataService,
         processService,
         pdfService,
         prefillService,
         instanceService,
         registerService,
         settings,
         profileService,
         textService,
         httpContextAccessor)
 {
     _logger              = logger;
     _instanceService     = instanceService;
     _httpContextAccessor = httpContextAccessor;
 }
Esempio n. 2
0
 /// <summary>
 /// Initialize a new instance of <see cref="AppBase"/> class with the given services.
 /// </summary>
 /// <param name="resourceService">The service giving access to local resources.</param>
 /// <param name="logger">A logging service.</param>
 /// <param name="dataService">The service giving access to data.</param>
 /// <param name="processService">The service giving access the App process.</param>
 /// <param name="pdfService">The service giving access to the PDF generator.</param>
 /// <param name="prefillService">The service giving access to prefill mechanisms.</param>
 /// <param name="instanceService">The service giving access to instance data</param>
 /// <param name="registerService">The service giving access to register data</param>
 /// <param name="settings">the general settings</param>
 /// <param name="profileService">the profile service</param>
 /// <param name="textService">The text service</param>
 /// <param name="httpContextAccessor">the httpContextAccessor</param>
 /// <param name="eFormidlingClient">The eFormidling client</param>
 /// <param name="appSettings">The appsettings</param>
 protected AppBase(
     IAppResources resourceService,
     ILogger <AppBase> logger,
     IData dataService,
     IProcess processService,
     IPDF pdfService,
     IPrefill prefillService,
     IInstance instanceService,
     IRegister registerService,
     IOptions <GeneralSettings> settings,
     IProfile profileService,
     IText textService,
     IHttpContextAccessor httpContextAccessor,
     IEFormidlingClient eFormidlingClient = null,
     IOptions <AppSettings> appSettings   = null)
 {
     _appMetadata         = resourceService.GetApplication();
     _resourceService     = resourceService;
     _logger              = logger;
     _dataService         = dataService;
     _processService      = processService;
     _pdfService          = pdfService;
     _prefillService      = prefillService;
     _instanceService     = instanceService;
     _registerService     = registerService;
     _userHelper          = new UserHelper(profileService, registerService, settings);
     _profileService      = profileService;
     _textService         = textService;
     _httpContextAccessor = httpContextAccessor;
     _appSettings         = appSettings?.Value;
     _eFormidlingClient   = eFormidlingClient;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InstancesController"/> class
 /// </summary>
 public InstancesController(
     ILogger <InstancesController> logger,
     IRegister registerService,
     IInstance instanceService,
     IData dataService,
     IAppResources appResourcesService,
     IAltinnApp altinnApp,
     IProcess processService,
     IPDP pdp,
     IEvents eventsService,
     IOptions <AppSettings> appSettings,
     IPrefill prefillService)
 {
     _logger              = logger;
     _instanceService     = instanceService;
     _dataService         = dataService;
     _appResourcesService = appResourcesService;
     _registerService     = registerService;
     _altinnApp           = altinnApp;
     _processService      = processService;
     _pdp            = pdp;
     _eventsService  = eventsService;
     _appSettings    = appSettings.Value;
     _prefillService = prefillService;
 }
Esempio n. 4
0
 /// <summary>
 /// Initialize a new instance of the <see cref="App"/> class.
 /// </summary>
 /// <param name="appResourcesService">A service with access to local resources.</param>
 /// <param name="logger">A logger from the built in LoggingFactory.</param>
 /// <param name="dataService">A service with access to data storage.</param>
 /// <param name="processService">A service with access to the process.</param>
 /// <param name="pdfService">A service with access to the PDF generator.</param>
 /// <param name="profileService">A service with access to profile information.</param>
 /// <param name="registerService">A service with access to register information.</param>
 /// <param name="prefillService">A service with access to prefill mechanisms.</param>
 /// <param name="instanceService">A service with access to instances</param>
 /// <param name="settings">General settings</param>
 /// <param name="textService">A service with access to text</param>
 /// <param name="httpContextAccessor">A context accessor</param>
 public App(
     IAppResources appResourcesService,
     ILogger <App> logger,
     IData dataService,
     IProcess processService,
     IPDF pdfService,
     IProfile profileService,
     IRegister registerService,
     IPrefill prefillService,
     IInstance instanceService,
     IOptions <GeneralSettings> settings,
     IText textService,
     IHttpContextAccessor httpContextAccessor) : base(
         appResourcesService,
         logger,
         dataService,
         processService,
         pdfService,
         prefillService,
         instanceService,
         registerService,
         settings,
         profileService,
         textService,
         httpContextAccessor)
 {
     _logger                = logger;
     _validationHandler     = new ValidationHandler(httpContextAccessor);
     _dataProcessingHandler = new DataProcessingHandler();
     _instantiationHandler  = new InstantiationHandler(profileService, registerService);
     _pdfHandler            = new PdfHandler();
 }
 public AltinnApp(
     IAppResources appResourcesService,
     ILogger <AltinnApp> logger,
     IData dataService,
     IProcess processService,
     IPDF pdfService,
     IPrefill prefillService,
     IInstance instanceService) : base(appResourcesService, logger, dataService, processService, pdfService, prefillService, instanceService)
 {
 }
        /// <summary>
        /// The stateless data controller is responsible for creating and updating stateles data elements.
        /// </summary>
        /// <param name="logger">The logger</param>
        /// <param name="altinnApp">The app logic for current application</param>
        /// <param name="appResourcesService">The apps resource service</param>
        /// <param name="prefillService">A service with prefill related logic.</param>
        public StatelessDataController(
            ILogger <DataController> logger,
            IAltinnApp altinnApp,
            IAppResources appResourcesService,
            IPrefill prefillService)
        {
            _logger = logger;

            _altinnApp           = altinnApp;
            _appResourcesService = appResourcesService;
            _prefillService      = prefillService;
        }
Esempio n. 7
0
 public AltinnApp(
     IAppResources appResourcesService,
     ILogger <AltinnApp> logger,
     IData dataService,
     IProcess processService,
     IPDF pdfService,
     IProfile profileService,
     IRegister registerService,
     IPrefill prefillService) : base(appResourcesService, logger, dataService, processService, pdfService, prefillService)
 {
     _validationHandler    = new ValidationHandler();
     _calculationHandler   = new CalculationHandler();
     _instantiationHandler = new InstantiationHandler(profileService, registerService);
 }
 /// <summary>
 /// The stateless data controller is responsible for creating and updating stateles data elements.
 /// </summary>
 public StatelessDataController(
     ILogger <DataController> logger,
     IAltinnApp altinnApp,
     IAppResources appResourcesService,
     IPrefill prefillService,
     IRegister registerService,
     IPDP pdp)
 {
     _logger              = logger;
     _altinnApp           = altinnApp;
     _appResourcesService = appResourcesService;
     _prefillService      = prefillService;
     _registerService     = registerService;
     _pdp = pdp;
 }
        /// <summary>
        /// The data controller is responsible for adding business logic to the data elements.
        /// </summary>
        /// <param name="logger">logger</param>
        /// <param name="instanceService">instance service to store instances</param>
        /// <param name="dataService">A service with access to data storage.</param>
        /// <param name="altinnApp">The app logic for current service</param>
        /// <param name="appResourcesService">The apps resource service</param>
        /// <param name="prefillService">A service with prefill related logic.</param>
        public DataController(
            ILogger<DataController> logger,
            IInstance instanceService,
            IData dataService,
            IAltinnApp altinnApp,
            IAppResources appResourcesService,
            IPrefill prefillService)
        {
            _logger = logger;

            _instanceService = instanceService;
            _dataService = dataService;
            _altinnApp = altinnApp;
            _appResourcesService = appResourcesService;
            _prefillService = prefillService;
        }
Esempio n. 10
0
 public AppBase(
     IAppResources resourceService,
     ILogger <AppBase> logger,
     IData dataService,
     IProcess processService,
     IPDF pdfService,
     IPrefill prefillService)
 {
     _appMetadata     = resourceService.GetApplication();
     _resourceService = resourceService;
     _logger          = logger;
     _dataService     = dataService;
     _processService  = processService;
     _pdfService      = pdfService;
     _prefillService  = prefillService;
 }
Esempio n. 11
0
 public App(
     IAppResources appResourcesService,
     ILogger <App> logger,
     IData dataService,
     IProcess processService,
     IPDF pdfService,
     IProfile profileService,
     IRegister registerService,
     IPrefill prefillService,
     IInstance instanceService,
     IHttpContextAccessor accessor) : base(appResourcesService, logger, dataService, processService, pdfService, prefillService)
 {
     _logger               = logger;
     _validationHandler    = new ValidationHandler(instanceService);
     _calculationHandler   = new CalculationHandler();
     _instantiationHandler = new InstantiationHandler(profileService, registerService);
 }
Esempio n. 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InstanceController"/> class
 /// </summary>
 /// <param name="authorizationService">The authorizationService (set in Startup.cs)</param>
 /// <param name="logger">The logger (set in Startup.cs)</param>
 /// <param name="profileService">The profile service (set in Startup.cs)</param>
 /// <param name="registerService">The registerService (set in Startup.cs)</param>
 /// <param name="erService">The erService (set in Startup.cs)</param>
 /// <param name="formService">The form</param>
 /// <param name="repositoryService">The repository service (set in Startup.cs)</param>
 /// <param name="serviceExecutionService">The serviceExecutionService (set in Startup.cs)</param>
 /// <param name="archiveService">The archive service</param>
 /// <param name="httpContextAccessor">The http context accessor</param>
 /// <param name="testDataService">the test data service handler</param>
 /// <param name="workflowSI">the workflow service handler</param>
 /// <param name="instanceSI">the instance service handler</param>
 /// <param name="eventSI">the instance event service handler</param>
 /// <param name="platformSI">the platform service handler</param>
 /// <param name="dataSI">the data service handler</param>
 /// <param name="application">the application service handler</param>
 /// <param name="prefill">The prefill service handler</param>
 /// <param name="repositorySettings">the repository settings</param>
 /// <param name="generalSettings">the general settings</param>
 public InstanceController(
     IAuthorization authorizationService,
     ILogger <InstanceController> logger,
     IProfile profileService,
     IRegister registerService,
     IER erService,
     IForm formService,
     IRepository repositoryService,
     IExecution serviceExecutionService,
     IArchive archiveService,
     ITestdata testDataService,
     IHttpContextAccessor httpContextAccessor,
     IWorkflow workflowSI,
     IInstance instanceSI,
     IInstanceEvent eventSI,
     IPlatformServices platformSI,
     IData dataSI,
     IApplication application,
     IPrefill prefill,
     IOptions <ServiceRepositorySettings> repositorySettings,
     IOptions <GeneralSettings> generalSettings)
 {
     _authorization       = authorizationService;
     _logger              = logger;
     _profile             = profileService;
     _register            = registerService;
     _er                  = erService;
     _form                = formService;
     _repository          = repositoryService;
     _execution           = serviceExecutionService;
     _userHelper          = new UserHelper(profileService, _register, generalSettings);
     _archive             = archiveService;
     _testdata            = testDataService;
     _httpContextAccessor = httpContextAccessor;
     _workflowSI          = workflowSI;
     _instance            = instanceSI;
     _event               = eventSI;
     _platformSI          = platformSI;
     _data                = dataSI;
     _prefill             = prefill;
     _application         = application;
     _settings            = repositorySettings.Value;
     _generalSettings     = generalSettings.Value;
 }
Esempio n. 13
0
 public AltinnApp(
     IAppResources appResourcesService,
     ILogger <AltinnApp> logger,
     IData dataService,
     IProcess processService,
     IPDF pdfService,
     IProfile profileService,
     IRegister registerService,
     IPrefill prefillService,
     IInstance instanceService,
     IOptions <GeneralSettings> settings,
     IText textService,
     IHttpContextAccessor httpContextAccessor) : base(appResourcesService, logger, dataService, processService, pdfService, prefillService, instanceService, registerService, settings, profileService, textService, httpContextAccessor)
 {
     _validationHandler    = new ValidationHandler(settings.Value, httpContextAccessor);
     _calculationHandler   = new CalculationHandler();
     _instantiationHandler = new InstantiationHandler(profileService, registerService);
     _settings             = settings.Value;
 }