net.sf.spring.batch
Interface PropertiesLoader

All Known Implementing Classes:
DefaultPropertiesLoader

public interface PropertiesLoader

Interface to load configuration properties.

Author:
willy

Method Summary
 Properties loadProperties(File confDir, String batchName)
          Load a properties file that contains the configuration.
 Properties loadProperties(File confDir, String batchName, String globalPropertyFile)
          Load several properties files that contains the configuration.
 

Method Detail

loadProperties

public Properties loadProperties(File confDir,
                                 String batchName)
                          throws FileNotFoundException,
                                 IOException
Load a properties file that contains the configuration.

Parameters:
confDir - The batch configuration directory.
batchName - The job name.
Returns:
A properties that can be empty but not null!
Throws:
FileNotFoundException - if the property file doesn't exists.
IOException - if an io error occurs.

loadProperties

public Properties loadProperties(File confDir,
                                 String batchName,
                                 String globalPropertyFile)
                          throws FileNotFoundException,
                                 IOException
Load several properties files that contains the configuration.

Parameters:
confDir - The batch configuration directory.
batchName - The job name.
globalPropertyFile - A global property file that can be used to centralize configuration for several batches.
Returns:
A properties 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.