1 | import { StringValueMap } from '../data/StringValueMap';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | export declare class ConfigParams extends StringValueMap {
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | constructor(values?: any);
|
47 | /**
|
48 | * Gets a list with all 1st level section names.
|
49 | *
|
50 | * @returns a list of section names stored in this ConfigMap.
|
51 | */
|
52 | getSectionNames(): string[];
|
53 | /**
|
54 | * Gets parameters from specific section stored in this ConfigMap.
|
55 | * The section name is removed from parameter keys.
|
56 | *
|
57 | * @param section name of the section to retrieve configuration parameters from.
|
58 | * @returns all configuration parameters that belong to the section named 'section'.
|
59 | */
|
60 | getSection(section: string): ConfigParams;
|
61 | /**
|
62 | * Adds parameters into this ConfigParams under specified section.
|
63 | * Keys for the new parameters are appended with section dot prefix.
|
64 | *
|
65 | * @param section name of the section where add new parameters
|
66 | * @param sectionParams new parameters to be added.
|
67 | */
|
68 | addSection(section: string, sectionParams: ConfigParams): void;
|
69 | /**
|
70 | * Overrides parameters with new values from specified ConfigParams
|
71 | * and returns a new ConfigParams object.
|
72 | *
|
73 | * @param configParams ConfigMap with parameters to override the current values.
|
74 | * @returns a new ConfigParams object.
|
75 | *
|
76 | * @see [[setDefaults]]
|
77 | */
|
78 | override(configParams: ConfigParams): ConfigParams;
|
79 | /**
|
80 | * Set default values from specified ConfigParams and returns a new ConfigParams object.
|
81 | *
|
82 | * @param defaultConfigParams ConfigMap with default parameter values.
|
83 | * @returns a new ConfigParams object.
|
84 | *
|
85 | * @see [[override]]
|
86 | */
|
87 | setDefaults(defaultConfigParams: ConfigParams): ConfigParams;
|
88 | /**
|
89 | * Creates a new ConfigParams object filled with key-value pairs from specified object.
|
90 | *
|
91 | * @param value an object with key-value pairs used to initialize a new ConfigParams.
|
92 | * @returns a new ConfigParams object.
|
93 | */
|
94 | static fromValue(value: any): ConfigParams;
|
95 | /**
|
96 | * Creates a new ConfigParams object filled with provided key-value pairs called tuples.
|
97 | * Tuples parameters contain a sequence of key1, value1, key2, value2, ... pairs.
|
98 | *
|
99 | * @param tuples the tuples to fill a new ConfigParams object.
|
100 | * @returns a new ConfigParams object.
|
101 | *
|
102 | * @see [[StringValueMap.fromTuplesArray]]
|
103 | */
|
104 | static fromTuples(...tuples: any[]): ConfigParams;
|
105 | /**
|
106 | * Creates a new ConfigParams object filled with key-value pairs serialized as a string.
|
107 | *
|
108 | * @param line a string with serialized key-value pairs as "key1=value1;key2=value2;..."
|
109 | * Example: "Key1=123;Key2=ABC;Key3=2016-09-16T00:00:00.00Z"
|
110 | * @returns a new ConfigParams object.
|
111 | *
|
112 | * @see [[StringValueMap.fromString]]
|
113 | */
|
114 | static fromString(line: string): ConfigParams;
|
115 | /**
|
116 | * Merges two or more ConfigParams into one. The following ConfigParams override
|
117 | * previously defined parameters.
|
118 | *
|
119 | * @param configs a list of ConfigParams objects to be merged.
|
120 | * @returns a new ConfigParams object.
|
121 | *
|
122 | * @see [[StringValueMap.fromMaps]]
|
123 | */
|
124 | static mergeConfigs(...configs: ConfigParams[]): ConfigParams;
|
125 | }
|