net.sf.spring.batch
Class DefaultPropertiesLoader
java.lang.Object
net.sf.spring.batch.DefaultPropertiesLoader
- All Implemented Interfaces:
- PropertiesLoader
- public class DefaultPropertiesLoader
- extends Object
- implements PropertiesLoader
A properties configuration loader that loads 2 files.
The following files are loaded in this order:
- The global property file, used to centralized parameters for several
batches.
- The
confDir/jobName.toLowerCase()-conf.properties
- Author:
- willy
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPropertiesLoader
public DefaultPropertiesLoader()
loadProperties
public Properties loadProperties(File confDir,
String jobName)
throws FileNotFoundException,
IOException
- Description copied from interface:
PropertiesLoader
- Load a properties file that contains the configuration.
- Specified by:
loadProperties
in interface PropertiesLoader
- Parameters:
confDir
- The batch configuration directory.jobName
- The job name.
- Returns:
- A properties that can be empty but not null!
- Throws:
IOException
- if an io error occurs.
FileNotFoundException
- if the property file doesn't exists.- See Also:
loadProperties(java.io.File,
java.lang.String, java.lang.String)
loadProperties
public Properties loadProperties(File confDir,
String jobName,
String globalPropertyFile)
throws FileNotFoundException,
IOException
- Loads properties from several files.
The following files are loaded in this order:
- The global property file, used to centralized parameters for several
batches.
- The
confDir/jobName.toLowerCase()-conf.properties
- Specified by:
loadProperties
in interface PropertiesLoader
- Parameters:
confDir
- The configuration directory.jobName
- The main job name.globalPropertyFile
- The global property file, used to centralized parameters for several batches. Can be null.
- Returns:
- properties loaded, that can be empty but not null.
- Throws:
FileNotFoundException
- if the property file doesn't exists.
IOException
- if an io error occurs.
Copyright © 2009. All Rights Reserved.