info.magnolia.init
Class DefaultMagnoliaPropertiesResolver

java.lang.Object
  extended by info.magnolia.init.DefaultMagnoliaPropertiesResolver
All Implemented Interfaces:
MagnoliaPropertiesResolver

@Singleton
public class DefaultMagnoliaPropertiesResolver
extends Object
implements MagnoliaPropertiesResolver

Resolves the paths of the properties file to load by using the "magnolia.initialization.file" context init parameter.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Field Summary
protected static String DEFAULT_INITIALIZATION_PARAMETER
          Default value for the MAGNOLIA_INITIALIZATION_FILE parameter.
protected static String MAGNOLIA_INITIALIZATION_FILE
          Context parameter name.
 
Constructor Summary
DefaultMagnoliaPropertiesResolver(javax.servlet.ServletContext context, MagnoliaInitPaths initPaths)
           
 
Method Summary
protected  String getInitParameter(javax.servlet.ServletContext ctx, String name, String defaultValue)
           
protected  List<String> getLocations()
          Used in tests, potentially in subclasses.
 List<PropertySource> getSources()
          Returns the paths to load, TODO: in which order ?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAGNOLIA_INITIALIZATION_FILE

protected static final String MAGNOLIA_INITIALIZATION_FILE
Context parameter name. Value should be a comma-separated list of paths to look for properties files. Defaults to "WEB-INF/config/${servername}/${webapp}/magnolia.properties,WEB-INF/config/${servername}/magnolia.properties,WEB-INF/config/${webapp}/magnolia.properties,WEB-INF/config/default/magnolia.properties,WEB-INF/config/magnolia.properties"

See Also:
Constant Field Values

DEFAULT_INITIALIZATION_PARAMETER

protected static final String DEFAULT_INITIALIZATION_PARAMETER
Default value for the MAGNOLIA_INITIALIZATION_FILE parameter.

See Also:
Constant Field Values
Constructor Detail

DefaultMagnoliaPropertiesResolver

@Inject
public DefaultMagnoliaPropertiesResolver(javax.servlet.ServletContext context,
                                                MagnoliaInitPaths initPaths)
Method Detail

getInitParameter

protected String getInitParameter(javax.servlet.ServletContext ctx,
                                  String name,
                                  String defaultValue)

getLocations

protected List<String> getLocations()
Used in tests, potentially in subclasses.

Returns:

getSources

public List<PropertySource> getSources()
Description copied from interface: MagnoliaPropertiesResolver
Returns the paths to load, TODO: in which order ?

Specified by:
getSources in interface MagnoliaPropertiesResolver


Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.