Package org.apache.torque.generator.configuration

## Class ClasspathConfigurationProvider

- java.lang.Object
- - org.apache.torque.generator.configuration.AbstractConfigurationProvider
  - - org.apache.torque.generator.configuration.ClasspathConfigurationProvider

- All Implemented Interfaces:
    `ConfigurationProvider`

      public class ClasspathConfigurationProvider
      extends AbstractConfigurationProvider

  Provides InputStreams to read a configuration of a unit of generation from a jar file.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClasspathConfigurationProvider​(UnitDescriptor unitDescriptor)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getControlConfigurationLocation()` | Returns the location of the control configuration as human readable String for debugging and error tracking purposes.
    `protected String` | `getFileName​(String name, String directory)` |
    `protected InputStream` | `getInputStream​(String name, String directory, String fileDescription)` |
    `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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClasspathConfigurationProvider

          public ClasspathConfigurationProvider​(UnitDescriptor unitDescriptor)

      Constructor.
      Parameters:
        `unitDescriptor` - The description of the generation unit, not null.
      Throws:
        `NullPointerException` - if unitDescriptor is null.

  - ### Method Detail

    - #### getControlConfigurationLocation

          public String getControlConfigurationLocation()

      Description copied from interface: `ConfigurationProvider`
      Returns 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.
      See Also:
        `ConfigurationProvider.getControlConfigurationLocation()`

    - #### getFileName

          protected String getFileName​(String name,
                                       String directory)

    - #### getInputStream

          protected InputStream getInputStream​(String name,
                                               String directory,
                                               String fileDescription)
                                        throws ConfigurationException

      Specified by:
        `getInputStream` in class `AbstractConfigurationProvider`
      Parameters:
        `name` - input stream name
        `directory` - location
        `fileDescription` - describes the file
      Returns:
        an InputStream
      Throws:
        `ConfigurationException` - if unable to process

    - #### getOutletConfigurationNames

          public Collection<String> getOutletConfigurationNames()
                                                         throws ConfigurationException

      Description copied from interface: `ConfigurationProvider`
      Returns 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: `ConfigurationProvider`
      Lists 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()`