Package org.apache.torque.generator.source.stream

# Klasse FileSourceProvider

java.lang.Object
org.apache.torque.generator.source.SourceProvider
org.apache.torque.generator.source.stream.FileSourceProvider

Alle implementierten Schnittstellen:
  `Iterator<Source>`

public class FileSourceProvider extends SourceProvider
Contains sources which are read from files in the file system. $Id: FileSourceProvider.java 1917241 2024-04-21 13:29:41Z tv $

- ## Konstruktorübersicht

  Konstruktoren
  Konstruktor
  Beschreibung
  `FileSourceProvider(StreamSourceFormat sourceFormat, Fileset sourceFileset, Boolean combineFiles)`
  Constructor.

- ## Methodenübersicht

  Modifizierer und Typ
  Methode
  Beschreibung
  `SourceProvider`
  `copy()`
  Returns a copy of this source provider in its initial state.
  `void`
  `copyNotSetSettingsFrom(SourceProvider sourceProvider)`
  Copies settings which are not set in this source provider from another source provider.
  `Boolean`
  `getCombineFiles()`
  Returns whether source files are combined into one source tree.
  `List<File>`
  `getPaths()`
  Returns all paths in the source Fileset.
  `Fileset`
  `getSourceFileset()`
  Returns the fileset which determines the source files to read.
  `StreamSourceFormat`
  `getSourceFormat()`
  Returns the source format for this provider.
  `boolean`
  `hasNext()`
  `protected void`
  `initInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState)`
  Determines the files which match the source fileset.
  `Source`
  `next()`
  `void`
  `remove()`
  `void`
  `resetInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState)`
  Resets the sources provided by this SourceProvider.
  `void`
  `setSourceFileset(Fileset sourceFileset)`
  Sets the fileset which determines the source files to read.
  `String`
  `toString()`

  ### Von Klasse geerbte Methoden org.apache.torque.generator.source.SourceProvider

  `init, isInit, reset`

  ### Von Klasse geerbte Methoden java.lang.Object

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

  ### Von Schnittstelle geerbte Methoden java.util.Iterator

  `forEachRemaining`

- ## Konstruktordetails

  - ### FileSourceProvider

    public FileSourceProvider(StreamSourceFormat sourceFormat, Fileset sourceFileset, Boolean combineFiles) throws ConfigurationException
    Constructor.
    Parameter:
      `sourceFormat` - the source format, or null if the source format should be determined from the file extension.
      `sourceFileset` - the fileset defining the source files, not null.
      `combineFiles` - whether all files should be combined into one source tree.
    Löst aus:
      `IllegalArgumentException` - if the source type is unknown.
      `NullPointerException` - if path is null.
      `ConfigurationException` - if the source filter cannot be instantiated.

- ## Methodendetails

  - ### initInternal

    protected void initInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState) throws ConfigurationException
    Determines the files which match the source fileset.
    Angegeben von:
      `initInternal` in Klasse `SourceProvider`
    Parameter:
      `configurationHandlers` - the configuration handlers, not null.
      `controllerState` - the current controller state, not null.
    Löst aus:
      `ConfigurationException` - if the sourceFileset has no basedir or if the files cannot be determined.

  - ### resetInternal

    public void resetInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState)
    Beschreibung aus Klasse kopiert: `SourceProvider`
    Resets the sources provided by this SourceProvider.
    Angegeben von:
      `resetInternal` in Klasse `SourceProvider`
    Parameter:
      `configurationHandlers` - the configuration handlers, not null.
      `controllerState` - the current controller state, not null.

  - ### hasNext

    public boolean hasNext()

  - ### next

    public Source next()

  - ### remove

    public void remove()

  - ### toString

    public String toString()
    Setzt außer Kraft:
      `toString` in Klasse `Object`

  - ### getSourceFormat

    public StreamSourceFormat getSourceFormat()
    Returns the source format for this provider.
    Gibt zurück:
      the source format, or null if the format is determined from file extensions.

  - ### getSourceFileset

    public Fileset getSourceFileset()
    Returns the fileset which determines the source files to read.
    Gibt zurück:
      the fileset which determines the source files to read.

  - ### setSourceFileset

    public void setSourceFileset(Fileset sourceFileset)
    Sets the fileset which determines the source files to read.
    Parameter:
      `sourceFileset` - the new source fileset, not null.
    Löst aus:
      `NullPointerException` - if sourceFileset is null.
      `IllegalStateException` - if init() was called before.

  - ### getPaths

    public List<File> getPaths()
    Returns all paths in the source Fileset. The method init() must be called beforehand.
    Gibt zurück:
      all Paths in the source fileset, not null.
    Löst aus:
      `IllegalStateException` - if the init method was not yet called.

  - ### getCombineFiles

    public Boolean getCombineFiles()
    Returns whether source files are combined into one source tree.
    Gibt zurück:
      true if the source files are combined into one source tree, false otherwise, null to allow overriding this property (but will count as false if not overridden).

  - ### copy

    public SourceProvider copy() throws ConfigurationException
    Returns a copy of this source provider in its initial state. This means the `SourceProvider.init(ConfigurationHandlers, ControllerState)` method of the new source provider must be called before it can be used.
    Angegeben von:
      `copy` in Klasse `SourceProvider`
    Gibt zurück:
      the SourceProvider
    Löst aus:
      `ConfigurationException` - if the new SourceProvider cannot be initialized.

  - ### copyNotSetSettingsFrom

    public void copyNotSetSettingsFrom(SourceProvider sourceProvider)
    Copies settings which are not set in this source provider from another source provider. This only works if the type of the other source provider is known to this source provider. Only a subset of all properties are typically used for overwriting. No Properties which are already set are overwritten.
    Angegeben von:
      `copyNotSetSettingsFrom` in Klasse `SourceProvider`
    Parameter:
      `sourceProvider` - the source provoder to copy the settings from.