java.lang.Object
org.omnifaces.utils.properties.PropertiesUtils
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
static void
loadListFromUrl
(String url, Map<? super String, ? super String> settings) static void
loadListFromURL
(URL url, Map<? super String, ? super String> settings) loadPropertiesFromClasspath
(String baseName) static void
loadPropertiesFromStream
(InputStream in, String locationDescription, Map<? super String, ? super String> settings, PropertiesUtils.PropertiesFormat propertiesFormat) static void
loadPropertiesFromUrl
(String url, Map<? super String, ? super String> settings, PropertiesUtils.PropertiesFormat propertiesFormat) static void
loadPropertiesFromUrl
(URL url, Map<? super String, ? super String> settings, PropertiesUtils.PropertiesFormat propertiesFormat) loadPropertiesListStagedFromClassPath
(String fileName, String stageSystemPropertyName, String defaultStage) Loads the properties file in properties list format with the given name from the configuration directory of META-INF with support for staging.loadPropertiesListStagedFromEar
(String fileName, String stageSystemPropertyName) Loads the properties file in properties list format with the given name from the configuration directory of an EAR with support for staging.loadStagedFromClassPath
(BiConsumer<URL, Map<? super String, ? super String>> loadMethod, String fileName, String stageSystemPropertyName, String defaultStage) loadStagedFromEar
(BiConsumer<String, Map<? super String, ? super String>> loadMethod, String fileName, String stageSystemPropertyName) static void
loadXMLFromUrl
(String url, Map<? super String, ? super String> settings) static void
loadXMLFromURL
(URL url, Map<? super String, ? super String> settings) loadXMLPropertiesStagedFromClassPath
(String fileName, String stageSystemPropertyName, String defaultStage) Loads the properties file in XML format with the given name from the configuration directory of META-INF with support for staging.loadXMLPropertiesStagedFromEar
(String fileName, String stageSystemPropertyName) Loads the properties file in XML format with the given name from the configuration directory of an EAR with support for staging.
-
Method Details
-
loadPropertiesFromClasspath
-
loadPropertiesListStagedFromClassPath
public static Map<String,String> loadPropertiesListStagedFromClassPath(String fileName, String stageSystemPropertyName, String defaultStage) Loads the properties file in properties list format with the given name from the configuration directory of META-INF with support for staging. The properties will loaded from the default properties file and the properties file from the given stage. If both files contain properties with the same key, the returned Map object will only contain the stage specific ones.- Parameters:
fileName
- the file name of the properties filestageSystemPropertyName
- the name of the system property from which the stage is readdefaultStage
- the default stage- Returns:
- an immutable map instance containing the key/value pairs from the given file
-
loadXMLPropertiesStagedFromClassPath
public static Map<String,String> loadXMLPropertiesStagedFromClassPath(String fileName, String stageSystemPropertyName, String defaultStage) Loads the properties file in XML format with the given name from the configuration directory of META-INF with support for staging. The properties will loaded from the default properties file and the properties file from the given stage. If both files contain properties with the same key, the returned Map object will only contain the stage specific ones.- Parameters:
fileName
- the file name of the properties filestageSystemPropertyName
- the name of the system property from which the stage is readdefaultStage
- the default stage- Returns:
- an immutable map instance containing the key/value pairs from the given file
-
loadStagedFromClassPath
-
loadPropertiesListStagedFromEar
public static Map<String,String> loadPropertiesListStagedFromEar(String fileName, String stageSystemPropertyName) Loads the properties file in properties list format with the given name from the configuration directory of an EAR with support for staging. The properties will loaded from the default properties file and the properties file from the given stage. If both files contain properties with the same key, the returned Map object will only contain the stage specific ones.- Parameters:
fileName
- the file name of the properties filestageSystemPropertyName
- the name of the system property from which the stage is read- Returns:
- an immutable map instance containing the key/value pairs from the given file
-
loadXMLPropertiesStagedFromEar
public static Map<String,String> loadXMLPropertiesStagedFromEar(String fileName, String stageSystemPropertyName) Loads the properties file in XML format with the given name from the configuration directory of an EAR with support for staging. The properties will loaded from the default properties file and the properties file from the given stage. If both files contain properties with the same key, the returned Map object will only contain the stage specific ones.- Parameters:
fileName
- the file name of the properties filestageSystemPropertyName
- the name of the system property from which the stage is read- Returns:
- an immutable map instance containing the key/value pairs from the given file
-
loadStagedFromEar
-
getEarBaseUrl
-
loadListFromUrl
-
loadXMLFromUrl
-
loadListFromURL
-
loadXMLFromURL
-
loadPropertiesFromUrl
public static void loadPropertiesFromUrl(String url, Map<? super String, ? super String> settings, PropertiesUtils.PropertiesFormat propertiesFormat) -
loadPropertiesFromUrl
public static void loadPropertiesFromUrl(URL url, Map<? super String, ? super String> settings, PropertiesUtils.PropertiesFormat propertiesFormat) -
loadPropertiesFromStream
public static void loadPropertiesFromStream(InputStream in, String locationDescription, Map<? super String, ? super String> settings, PropertiesUtils.PropertiesFormat propertiesFormat) -
getStage
-