public class WebApplicationProperties extends Object
getProperties()
to obtain the properties and
load these into the Configuration
of your choice.Constructor and Description |
---|
WebApplicationProperties() |
Modifier and Type | Method and Description |
---|---|
static File |
getAppConfFolder() |
static String |
getLibraryPropertiesResourceRelativePath()
Returns the relative Resource Path of the properties files in the JAR files
|
static Properties |
getProperties()
Returns all the properties presently available
|
protected static void |
initApplicationProperties() |
protected static void |
initClasspathPropertiesConfiguration() |
static void |
initialize()
Initialize.
|
static void |
initialize(File appConfFolderFromConfig,
String baseConfigFileName,
boolean loadLibraryProperties,
String propertiesResourceRelativePath)
Initialize.
|
static void |
setAppConfFolder(File appConfFolderFromConfig,
String baseConfigFileName)
The folder where the application's properties files are located.
|
static void |
setLibraryPropertiesResourceRelativePath(String libraryPropertiesResourceRelativePath)
Please see
ClasspathPropertiesConfiguration on Library Properties. |
static void |
setLoadLibraryProperties(boolean loadLibraryProperties)
Set this if you would like the
ClasspathPropertiesConfiguration
to scan the JAR files in the classpath and load those proerties into the
default Configuration |
static boolean |
shouldLoadLibraryProperties()
Should we load the Library Properties
|
public static void initialize(File appConfFolderFromConfig, String baseConfigFileName, boolean loadLibraryProperties, String propertiesResourceRelativePath)
setAppConfFolder(File, String)
method.appConfFolderFromConfig
- baseConfigFileName
- loadLibraryProperties
- propertiesResourceRelativePath
- public static void initialize()
setAppConfFolder(File, String)
method.protected static void initClasspathPropertiesConfiguration()
protected static void initApplicationProperties() throws org.apache.commons.configuration.ConfigurationException, MalformedURLException
org.apache.commons.configuration.ConfigurationException
MalformedURLException
public static File getAppConfFolder()
public static void setAppConfFolder(File appConfFolderFromConfig, String baseConfigFileName)
appConfFolderFromConfig
- the folder as a File
object where the
application's properties files are locatedbaseConfigFileName
- the "base" name of the properties file. For e.g. if you have
config.properties, config-test.properties, then the value to
pass in is "config"public static boolean shouldLoadLibraryProperties()
public static void setLoadLibraryProperties(boolean loadLibraryProperties)
ClasspathPropertiesConfiguration
to scan the JAR files in the classpath and load those proerties into the
default ConfigurationloadLibraryProperties
- public static String getLibraryPropertiesResourceRelativePath()
public static void setLibraryPropertiesResourceRelativePath(String libraryPropertiesResourceRelativePath)
ClasspathPropertiesConfiguration
on Library Properties.
This methods sets the relativeResource pathlibraryPropertiesResourceRelativePath
- public static Properties getProperties()
Copyright © 2015. All Rights Reserved.