20#ifndef ORES_WT_SERVICE_APPLICATION_CONTEXT_HPP
21#define ORES_WT_SERVICE_APPLICATION_CONTEXT_HPP
24#include "ores.database/domain/context.hpp"
25#include "ores.database/domain/database_options.hpp"
26#include "ores.iam.core/service/account_service.hpp"
27#include "ores.iam.core/service/account_setup_service.hpp"
28#include "ores.iam.core/service/authorization_service.hpp"
29#include "ores.iam.core/service/bootstrap_mode_service.hpp"
30#include "ores.variability.core/service/system_settings_service.hpp"
31#include "ores.variability.api/eventing/system_setting_changed_event.hpp"
32#include "ores.refdata.core/service/currency_service.hpp"
33#include "ores.refdata.core/service/country_service.hpp"
34#include "ores.eventing/service/event_bus.hpp"
35#include "ores.eventing/service/postgres_event_source.hpp"
37namespace ores::wt::service {
51 bool is_initialized()
const {
return initialized_; }
70 return *account_service_;
74 return *account_setup_service_;
78 return *authorization_service_;
82 return *system_settings_service_;
86 return *currency_service_;
90 return *country_service_;
93 bool is_bootstrap_mode()
const {
return is_bootstrap_mode_; }
100 void setup_services();
101 void setup_eventing();
102 void check_bootstrap_mode();
104 bool initialized_ =
false;
105 bool is_bootstrap_mode_ =
false;
107 std::unique_ptr<database::context> db_context_;
108 std::unique_ptr<iam::service::account_service> account_service_;
109 std::unique_ptr<iam::service::account_setup_service> account_setup_service_;
110 std::shared_ptr<iam::service::authorization_service> authorization_service_;
111 std::shared_ptr<variability::service::system_settings_service> system_settings_service_;
112 std::unique_ptr<refdata::service::currency_service> currency_service_;
113 std::unique_ptr<refdata::service::country_service> country_service_;
116 std::unique_ptr<eventing::service::event_bus> event_bus_;
117 std::unique_ptr<eventing::service::postgres_event_source> event_source_;
Context for the operations on a postgres database.
Definition context.hpp:47
Configuration for database connection.
Definition database_options.hpp:33
RAII handle for managing event subscriptions.
Definition event_bus.hpp:41
Service for managing user accounts including creation, listing, and deletion.
Definition account_service.hpp:39
Centralized service for complete account initialization.
Definition account_setup_service.hpp:42
Service for managing role-based access control (RBAC).
Definition authorization_service.hpp:54
Service for managing countries.
Definition country_service.hpp:42
Service for managing currencies.
Definition currency_service.hpp:43
Service for managing typed system settings.
Definition system_settings_service.hpp:41
Holds all shared services for the ores.wt.service application.
Definition application_context.hpp:46
void stop_eventing()
Stop the event source.
Definition application_context.cpp:150
void start_eventing()
Start the event source to listen for PostgreSQL notifications.
Definition application_context.cpp:141