|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.beans.config.PropertiesInitializer
public class PropertiesInitializer
This class is responsible for loading the various "magnolia.properties" files, merging them, and substituting variables in their values.
Field Summary | |
---|---|
static String |
CONTEXT_ATTRIBUTE_PLACEHOLDER_PREFIX
Context attribute prefix, to obtain a property definition like ${contextAttribute/property}, that can refer to any context attribute. |
static String |
CONTEXT_PARAM_PLACEHOLDER_PREFIX
Context parameter prefix, to obtain a property definition like ${contextParam/property}, that can refer to any context parameter. |
static String |
DEFAULT_INITIALIZATION_PARAMETER
Default value for the MAGNOLIA_INITIALIZATION_FILE parameter. |
static String |
PLACEHOLDER_PREFIX
Placeholder prefix: "${". |
static String |
PLACEHOLDER_SUFFIX
Placeholder suffix: "}". |
Constructor Summary | |
---|---|
PropertiesInitializer()
|
Method Summary | |
---|---|
static PropertiesInitializer |
getInstance()
|
void |
loadAllModuleProperties()
|
void |
loadAllProperties(String propertiesFilesString,
String rootPath)
|
void |
loadBeanProperties()
|
protected void |
loadModuleProperties(List<ModuleDefinition> moduleDefinitions)
Load the properties defined in the module descriptors. |
boolean |
loadPropertiesFile(String rootPath,
String location)
Try to load a magnolia.properties file. |
void |
loadPropertiesFiles(String propertiesLocationString,
String rootPath)
|
void |
overloadWithSystemProperties()
Overload the properties with set system properties. |
protected String |
parseStringValue(String strVal,
Set<String> visitedPlaceholders)
Parse the given String value recursively, to be able to resolve nested placeholders. |
static String |
processPropertyFilesString(javax.servlet.ServletContext context,
String servername,
String webapp,
String propertiesFilesString)
Returns the property files configuration string passed, replacing all the needed values: ${servername} will be reaplced with the name of the server, ${webapp} will be replaced with webapp name, and ${contextAttribute/*} and ${contextParam/*} will be replaced with the corresponding attributes or parameters taken from servlet context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PLACEHOLDER_PREFIX
public static final String PLACEHOLDER_SUFFIX
public static final String CONTEXT_ATTRIBUTE_PLACEHOLDER_PREFIX
public static final String CONTEXT_PARAM_PLACEHOLDER_PREFIX
public static final String DEFAULT_INITIALIZATION_PARAMETER
Constructor Detail |
---|
public PropertiesInitializer()
Method Detail |
---|
public static PropertiesInitializer getInstance()
public void loadAllProperties(String propertiesFilesString, String rootPath)
public void loadAllModuleProperties()
protected void loadModuleProperties(List<ModuleDefinition> moduleDefinitions)
public void loadPropertiesFiles(String propertiesLocationString, String rootPath)
public void loadBeanProperties()
public boolean loadPropertiesFile(String rootPath, String location)
rootPath
- location
-
public void overloadWithSystemProperties()
public static String processPropertyFilesString(javax.servlet.ServletContext context, String servername, String webapp, String propertiesFilesString)
WEB-INF/config/${servername}/${contextAttribute/com.ibm.websphere.servlet.application.host}/magnolia.properties
context
- Servlet contextservername
- Server namewebapp
- Webapp namepropertiesFilesString
- Property file configuration string.
protected String parseStringValue(String strVal, Set<String> visitedPlaceholders)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |