Class JarConfigurationProvider
- java.lang.Object
-
- org.apache.torque.generator.configuration.AbstractConfigurationProvider
-
- org.apache.torque.generator.configuration.JarConfigurationProvider
-
- All Implemented Interfaces:
ConfigurationProvider
public class JarConfigurationProvider extends AbstractConfigurationProvider
Provides InputStreams to read a configuration of a unit of generation from a jar file.
-
-
Constructor Summary
Constructors Constructor Description JarConfigurationProvider(ProjectPaths projectPaths, TorqueGeneratorPaths configurationPaths)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetControlConfigurationLocation()Returns the location of the control configuration as human readable String for debugging and error tracking purposes.protected InputStreamgetInputStream(String name, String directory, String description)Collection<String>getOutletConfigurationNames()Returns a list of all found outlet configuration files in the generation unit.Collection<String>getTemplateNames()Lists all available template names.-
Methods inherited from class org.apache.torque.generator.configuration.AbstractConfigurationProvider
getControlConfigurationInputStream, getOptionsInputStream, getOutletConfigurationInputStream, getResourceInputStream, getTemplateInputStream
-
-
-
-
Constructor Detail
-
JarConfigurationProvider
public JarConfigurationProvider(ProjectPaths projectPaths, TorqueGeneratorPaths configurationPaths) throws ConfigurationException
Constructor.- Parameters:
projectPaths- the paths needed to interact with the enclosing project, not null.configurationPaths- The internal directory structure of the generator configuration files, not null.- Throws:
NullPointerException- if projectPaths or configurationPaths are null.ConfigurationException- if the jar file can not be accessed.
-
-
Method Detail
-
getControlConfigurationLocation
public String getControlConfigurationLocation() throws ConfigurationException
Description copied from interface:ConfigurationProviderReturns the location of the control configuration as human readable String for debugging and error tracking purposes.- Returns:
- the location of the control configuration, not null.
- Throws:
ConfigurationException- if the location name can not be created.
-
getInputStream
protected InputStream getInputStream(String name, String directory, String description) throws ConfigurationException
- Specified by:
getInputStreamin classAbstractConfigurationProvider- Parameters:
name- input stream namedirectory- locationdescription- describes the file- Returns:
- an InputStream
- Throws:
ConfigurationException- if unable to process
-
getOutletConfigurationNames
public Collection<String> getOutletConfigurationNames() throws ConfigurationException
Description copied from interface:ConfigurationProviderReturns a list of all found outlet configuration files in the generation unit.- Returns:
- a list with the generation configuration files, not null.
- Throws:
ConfigurationException- if the configuration can not be read.
-
getTemplateNames
public Collection<String> getTemplateNames() throws ConfigurationException
Description copied from interface:ConfigurationProviderLists all available template names.- Returns:
- a collection of all available template names, not null.
- Throws:
ConfigurationException- if the template names cannot be determined.- See Also:
ConfigurationProvider.getTemplateNames()
-
-