ro.isdc.wro.config.factory
Class ServletContextPropertyWroConfigurationFactory

java.lang.Object
  extended by ro.isdc.wro.config.factory.ServletContextPropertyWroConfigurationFactory
All Implemented Interfaces:
ObjectFactory<WroConfiguration>

public class ServletContextPropertyWroConfigurationFactory
extends Object
implements ObjectFactory<WroConfiguration>

Load WroConfiguration from a servletContext relative location. By default loads properties file from ( /WEB-INF/wro.properties) location.

Since:
1.4.6
Author:
Alex Objelean

Constructor Summary
ServletContextPropertyWroConfigurationFactory(javax.servlet.ServletContext servletContext)
           
 
Method Summary
 WroConfiguration create()
          
 Properties createProperties()
           
protected  String getConfigPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletContextPropertyWroConfigurationFactory

public ServletContextPropertyWroConfigurationFactory(javax.servlet.ServletContext servletContext)
Method Detail

getConfigPath

protected String getConfigPath()
Returns:
default path to configuration file relative to ServletContext location.

create

public final WroConfiguration create()

Specified by:
create in interface ObjectFactory<WroConfiguration>

createProperties

public Properties createProperties()
Returns:
Properties loaded from the stream from servletContext location specified by getConfigPath() method.


Copyright © 2008-2013. All Rights Reserved.