Package de.xima.fc.config.server
Class CustomHttpHeadersSettingsFile
- java.lang.Object
-
- de.xima.fc.config.server.CustomHttpHeadersSettingsFile
-
public final class CustomHttpHeadersSettingsFile extends Object
Manages reading and writing custom HTTP headers to and from afile config.- Since:
- 8.6.0
-
-
Constructor Summary
Constructors Constructor Description CustomHttpHeadersSettingsFile()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<SettingsNamedParam>load(de.xima.cmn.props.FileBasedPropertiesConfiguration config, String key)Retrieves custom HTTP headers from thefile config.static voidwrite(de.xima.cmn.props.FileBasedPropertiesConfiguration config, String key, List<SettingsNamedParam> customHttpHeaders)Writes custom HTTP headers into theconfiguration file.
-
-
-
Method Detail
-
write
public static void write(de.xima.cmn.props.FileBasedPropertiesConfiguration config, String key, List<SettingsNamedParam> customHttpHeaders)Writes custom HTTP headers into theconfiguration file.- Parameters:
config- config where the headers will be writtenkey- key for save in config. If not present, defaults toDEFAULT_PREFIX_KEYcustomHttpHeaders- headers that will be written in config.
-
load
public static List<SettingsNamedParam> load(de.xima.cmn.props.FileBasedPropertiesConfiguration config, String key)
Retrieves custom HTTP headers from thefile config.Storage format:
system.header.custom.backend.0.name = name1 system.header.custom.backend.0.value = value1 system.header.custom.backend.1.name = name2 system.header.custom.backend.1.value = value2
IMPORTANT: Indices must follow a strict sequential order without gaps. The value below will be ignored because the next expected index in the sequence is 2:
system.header.custom.backend.3.name = name3 system.header.custom.backend.3.value = value3
- Parameters:
config- HTTP headers quellekey- key for search headers. If not present, defaults toDEFAULT_PREFIX_KEY- Returns:
custom HTTP headersloaded from the config file;
-
-