UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

147 lines (146 loc) 6.67 kB
// SPDX-License-Identifier: Apache-2.0 import DragManager from '../../components/treeview/tools/dragmanager.js'; import ApplicationLifeCycleManager from '../app/lifecyclemanager.js'; import AuthManager from '../auth/authmanager.js'; import PluginManager from '../auth/pluginmanager.js'; import ConfigManager from '../configuration/configmanager.js'; import ErrorManager from '../error/errormanager.js'; import I18nManager from '../i18n/i18nmanager.js'; import LayerManager from '../layers/layermanager.js'; import SnapManager from '../layers/snapmanager.js'; import LocalFileManager from '../localfile/localfilemanager.js'; import LogManager from '../logging/logmanager.js'; import OfflineManager from '../offline/offlinemanager.js'; import OgcApiFeaturesManager from '../ogcapi/ogcapifeaturesmanager.js'; import OnBoardingManager from '../onboarding/onboardingmanager.js'; import OrderingManager from '../ordering/orderingmanager.js'; import SessionManager from '../share/sessionmanager.js'; import ShareManager from '../share/sharemanager.js'; import StateSerializer from '../share/stateserializer.js'; import ComponentManager from '../state/componentManager.js'; import MapManager from '../state/mapManager.js'; import StateManager from '../state/statemanager.js'; import UserInteractionManager from '../state/userInteractionManager.js'; import CustomThemesManager from '../themes/customthemesmanager.js'; import ThemesHelper from '../themes/themeshelper.js'; import ThemesManager from '../themes/themesmanager.js'; import UserLayerManager from '../themes/userlayermanager.js'; import PermalinkManager from '../url/permalinkmanager.js'; import UrlManager from '../url/urlmanager.js'; import UserDataManager from '../userdata/userdatamanager.js'; import WfsManager from '../wfs/wfsmanager.js'; import WmsManager from '../wms/wmsmanager.js'; import ThemeFavoritesManager from '../themes/themefavoritesmanager.js'; import SearchManager from '../search/searchmanager.js'; import FeedbackManager from '../feedback/feedbackmanager.js'; export default class GirafeContext { userDataManager; configManager; stateManager; componentManager; userInteractionManager; i18nManager; pluginManager; themesManager; themesHelper; permalinkManager; dragManager; urlManager; layerManager; sessionManager; stateSerializer; shareManager; customThemesManager; errorManager; wfsManager; authManager; snapManager; mapManager; logManager; offlineManager; applicationLifeCycleManager; orderingManager; userLayerManager; wmsManager; ogcApiFeaturesManager; localFileManager; onBoardingManager; themeFavoritesManager; searchManager; feedbackManager; constructor() { this.componentManager = new ComponentManager(this); this.userDataManager = new UserDataManager(this); this.configManager = new ConfigManager(this); this.logManager = new LogManager(this); this.stateManager = new StateManager(this); this.orderingManager = new OrderingManager(this); this.applicationLifeCycleManager = new ApplicationLifeCycleManager(this); this.mapManager = new MapManager(this); this.offlineManager = new OfflineManager(this); this.snapManager = new SnapManager(this); this.authManager = new AuthManager(this); this.pluginManager = new PluginManager(this); this.i18nManager = new I18nManager(this); this.userInteractionManager = new UserInteractionManager(this); this.urlManager = new UrlManager(this); this.dragManager = new DragManager(this); this.permalinkManager = new PermalinkManager(this); this.layerManager = new LayerManager(this); this.userLayerManager = new UserLayerManager(this); this.themesHelper = new ThemesHelper(this); this.stateSerializer = new StateSerializer(this); this.sessionManager = new SessionManager(this); this.shareManager = new ShareManager(this); this.wfsManager = new WfsManager(this); this.errorManager = new ErrorManager(this); this.customThemesManager = new CustomThemesManager(this); this.themesManager = new ThemesManager(this); this.wmsManager = new WmsManager(this); this.localFileManager = new LocalFileManager(this); this.ogcApiFeaturesManager = new OgcApiFeaturesManager(this); this.onBoardingManager = new OnBoardingManager(this); this.themeFavoritesManager = new ThemeFavoritesManager(this); this.searchManager = new SearchManager(this); this.feedbackManager = new FeedbackManager(this); } async initialize() { // NOTE: This initialization order is important, because some singleton will need other ones! this.componentManager.initializeSingleton(); this.userDataManager.initializeSingleton(); this.configManager.initializeSingleton(); await this.configManager.loadConfig(); this.logManager.initializeSingleton(); this.logManager.initLogging(); this.stateManager.initializeSingleton(); this.orderingManager.initializeSingleton(); this.applicationLifeCycleManager.initializeSingleton(); this.mapManager.initializeSingleton(); this.offlineManager.initializeSingleton(); this.snapManager.initializeSingleton(); this.authManager.initializeSingleton(); this.pluginManager.initializeSingleton(); this.i18nManager.initializeSingleton(); this.userInteractionManager.initializeSingleton(); this.dragManager.initializeSingleton(); this.urlManager.initializeSingleton(); this.permalinkManager.initializeSingleton(); this.layerManager.initializeSingleton(); this.userLayerManager.initializeSingleton(); this.themesHelper.initializeSingleton(); this.stateSerializer.initializeSingleton(); this.sessionManager.initializeSingleton(); this.shareManager.initializeSingleton(); this.wfsManager.initializeSingleton(); this.errorManager.initializeSingleton(); this.customThemesManager.initializeSingleton(); this.themesManager.initializeSingleton(); this.wmsManager.initializeSingleton(); this.localFileManager.initializeSingleton(); this.ogcApiFeaturesManager.initializeSingleton(); this.onBoardingManager.initializeSingleton(); this.themeFavoritesManager.initializeSingleton(); this.searchManager.initializeSingleton(); this.feedbackManager.initializeSingleton(); } }