|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.generator.source.SourceProvider
org.apache.torque.generator.source.stream.FileSourceProvider
public class FileSourceProvider
Contains sources which are read from files in the file system. $Id: FileSourceProvider.java 1331190 2012-04-27 02:41:35Z tfischer $
Constructor Summary | |
---|---|
FileSourceProvider(StreamSourceFormat sourceFormat,
Fileset sourceFileset,
Boolean combineFiles)
Constructor. |
Method Summary | |
---|---|
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()
|
Methods inherited from class org.apache.torque.generator.source.SourceProvider |
---|
init, isInit, reset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileSourceProvider(StreamSourceFormat sourceFormat, Fileset sourceFileset, Boolean combineFiles) throws ConfigurationException
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.
IllegalArgumentException
- if the source type is unknown.
NullPointerException
- if path is null.
ConfigurationException
- if the source filter cannot be
instantiated.Method Detail |
---|
protected void initInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState) throws ConfigurationException
initInternal
in class SourceProvider
configurationHandlers
- the configuration handlers, not null.controllerState
- the current controller state, not null.
ConfigurationException
- if the sourceFileset has no basedir or
if the files cannot be determined.public void resetInternal(ConfigurationHandlers configurationHandlers, ControllerState controllerState)
SourceProvider
resetInternal
in class SourceProvider
configurationHandlers
- the configuration handlers, not null.controllerState
- the current controller state, not null.public boolean hasNext()
public Source next()
public void remove()
public String toString()
toString
in class Object
public StreamSourceFormat getSourceFormat()
public Fileset getSourceFileset()
public void setSourceFileset(Fileset sourceFileset)
sourceFileset
- the new source fileset, not null.
NullPointerException
- if sourceFileset is null.
IllegalStateException
- if init() was called before.public List<File> getPaths()
IllegalStateException
- if the init method was not yet called.public Boolean getCombineFiles()
public SourceProvider copy() throws ConfigurationException
SourceProvider.init(ConfigurationHandlers, ControllerState)
method of the new source provider must be called before it can be used.
copy
in class SourceProvider
ConfigurationException
- if the new SourceProvider cannot
be initialized.public void copyNotSetSettingsFrom(SourceProvider sourceProvider)
copyNotSetSettingsFrom
in class SourceProvider
sourceProvider
- the source provoder to copy the settings from.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |