Package org.mapfish.print.config
Class ConfigurationFactory
java.lang.Object
org.mapfish.print.config.ConfigurationFactory
Strategy/plug-in for loading
Configuration objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ConfigurationCreate a configuration object from a config file.final ConfigurationgetConfig(File configFile, InputStream configData) Create a configuration object from a config file.final voidinit()initialize this factory.final voidsetDoValidation(boolean doValidation) If doValidation is true then the Configuration object will be validated after loading.
-
Constructor Details
-
ConfigurationFactory
public ConfigurationFactory()
-
-
Method Details
-
init
@PostConstruct public final void init()initialize this factory. Called by spring after construction. -
getConfig
Create a configuration object from a config file.- Parameters:
configFile- the file to read the configuration from.- Throws:
IOException
-
getConfig
Create a configuration object from a config file.- Parameters:
configFile- the file that contains the configuration data.configData- the config file data- Throws:
IOException
-
setDoValidation
public final void setDoValidation(boolean doValidation) If doValidation is true then the Configuration object will be validated after loading. However for some tests we don't want this so this method allows it to be set to false for tests.By default it is true so only tests should modify this.
- Parameters:
doValidation- the new validation value.
-