import { BaseDoEntity, ConfigProperties, ObjectModel } from '../index'; /** * Cache for {@link ConfigProperty} instances by backend system. */ export declare class ConfigPropertyCache implements ObjectModel { objectType: string; configMap: Map>>; constructor(); /** * Loads config properties from the given system using the configuration of that {@link System}. * @param system The optional system name to which the properties belong. By default, {@link System.MAIN_SYSTEM} is used. */ bootstrapSystem(system?: string): JQuery.Promise; /** * Adds the {@link ConfigProperty} instances returned by the urls given to the properties map of the given system. * @param urls The urls to fetch the properties from. Typically, 'res/config-properties.json' for the UI backend and/or 'api/config-properties' for the server backend. * @param system The optional system name to which the properties belong. By default, {@link System.MAIN_SYSTEM} is used. */ bootstrap(urls: string | string[], system?: string): JQuery.Promise; /** * Add the {@link ConfigProperty} instances given to the system given. If a property with the same key already exists, its value is overwritten. * @param data The properties to add. * @param system The optional system name to which the properties belong. By default, {@link System.MAIN_SYSTEM} is used. */ protected _handleBootstrapResponse(data?: ConfigPropertyDo | ConfigPropertyDo[], system?: string): void; protected _handleBootstrapProperty(property?: ConfigPropertyDo, system?: string): void; protected _getSystemMap(system?: string): Map>; /** * Gets the {@link ConfigProperty} with given key. Optionally from a specific backend system. * * The method only returns properties which have already been loaded from the backend. * If the property might not already been loaded, use {@link load} instead. * @param key The key of the config property that should be returned. * @param system An optional system from which the property should be. By default, {@link System.MAIN_SYSTEM} is used. */ get(key: TKey, system?: TSystem): ConfigProperty; /** * Adds a property. If there is already an existing property with the same key, its value is overwritten. * @param key The key of the property. * @param value The new value of the property. * @param system An optional system to which the property belongs. By default, {@link System.MAIN_SYSTEM} is used. * @returns The created {@link ConfigProperty}. */ set(key: TKey, value: TValue, system?: TSystem): ConfigProperty; /** * Loads the properties from the given system and returns the value of the property with the given key. * * To configure the system URL use {@link systems.getOrCreate} and {@link System.setEndpointUrl} for endpointName 'config-properties' if required. * @param key The key of the property that should be returned. * @param system An optional system from which the property should be loaded. By default, {@link System.MAIN_SYSTEM} is used. * @returns a promise that when resolved returns the newly loaded property with the given key. */ load(key: TKey, system?: TSystem): JQuery.Promise>; } export declare class ConfigPropertyDo extends BaseDoEntity implements ConfigProperty { key: string; value: any; } export interface ConfigProperty { key: string; value: TValue; } export declare const config: ConfigPropertyCache; //# sourceMappingURL=ConfigPropertyCache.d.ts.map