Class LoadCsvModelTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- org.eclipse.epsilon.workflow.tasks.EpsilonTask
-
- org.eclipse.epsilon.workflow.tasks.csv.LoadCsvModelTask
-
- All Implemented Interfaces:
java.lang.Cloneable
public class LoadCsvModelTask extends EpsilonTask
The Ant task to load Csv Models.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
alias
The alias.protected boolean
cached
The cached.protected java.lang.String
fieldSeparator
The field separator.protected java.io.File
file
The file.protected java.lang.String
idFieldValue
The field that can be used as idprotected boolean
knownHeaders
The has known headers.protected java.lang.String
name
The name.protected char
quoteChar
The quote char.protected boolean
read
The read on load.protected boolean
store
The store on disposal.protected boolean
varargsHeaders
The has varargs headers.-
Fields inherited from class org.eclipse.epsilon.workflow.tasks.EpsilonTask
failOnErrors, failOnWarnings, profile
-
-
Constructor Summary
Constructors Constructor Description LoadCsvModelTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CsvModel
createCsvModel()
Creates the csv model.void
executeImpl()
java.lang.String
getAlias()
Gets the alias.java.lang.String
getFieldSeparator()
Gets the field separator.java.io.File
getFile()
Gets the file.java.lang.String
getIdFieldValue()
java.lang.String
getName()
Gets the name.char
getQuoteChar()
boolean
isCached()
Checks if is cached.boolean
isKnownHeaders()
Checks if is known headers.boolean
isRead()
Checks if is read.boolean
isStore()
Checks if is store.boolean
isVarargsHeaders()
Checks if is varargs headers.void
setAlias(java.lang.String alias)
Sets the alias.void
setCached(boolean cached)
Sets the cached.void
setFieldSeparator(java.lang.String fieldSeparator)
Sets the field separator.void
setFile(java.io.File file)
Sets the file.void
setIdFieldValue(java.lang.String idFieldValue)
void
setKnownHeaders(boolean knownHeaders)
Sets the known headers.void
setName(java.lang.String name)
Sets the name.void
setQuoteChar(char quoteChar)
void
setRead(boolean read)
Sets the read.void
setStore(boolean store)
Sets the store.void
setVarargsHeaders(boolean varargsHeaders)
Sets the varargs headers.-
Methods inherited from class org.eclipse.epsilon.workflow.tasks.EpsilonTask
execute, fail, getActiveTransactions, getBaseDir, getExtendedProperties, getProjectRepository, getProjectStackFrame, isFailOnErrors, isFailOnWarnings, isProfile, setFailOnErrors, setFailOnWarnings, setProfile, setProjectRepository, warn
-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Field Detail
-
name
protected java.lang.String name
The name.
-
fieldSeparator
protected java.lang.String fieldSeparator
The field separator.
-
quoteChar
protected char quoteChar
The quote char.
-
knownHeaders
protected boolean knownHeaders
The has known headers.
-
varargsHeaders
protected boolean varargsHeaders
The has varargs headers.
-
idFieldValue
protected java.lang.String idFieldValue
The field that can be used as id
-
file
protected java.io.File file
The file.
-
alias
protected java.lang.String alias
The alias.
-
cached
protected boolean cached
The cached.
-
read
protected boolean read
The read on load.
-
store
protected boolean store
The store on disposal.
-
-
Method Detail
-
executeImpl
public void executeImpl() throws org.apache.tools.ant.BuildException
- Specified by:
executeImpl
in classEpsilonTask
- Throws:
org.apache.tools.ant.BuildException
-
createCsvModel
protected CsvModel createCsvModel()
Creates the csv model. This logic has been extracted so that it can be stubbed out in tests- Returns:
- the csv model
-
getName
public java.lang.String getName()
Gets the name.- Returns:
- the name
-
setName
public void setName(java.lang.String name)
Sets the name.- Parameters:
name
- the name to set
-
getFieldSeparator
public java.lang.String getFieldSeparator()
Gets the field separator.- Returns:
- the fieldSeparator
-
setFieldSeparator
public void setFieldSeparator(java.lang.String fieldSeparator)
Sets the field separator.- Parameters:
fieldSeparator
- the fieldSeparator to set
-
isKnownHeaders
public boolean isKnownHeaders()
Checks if is known headers.- Returns:
- the knownHeaders
-
setKnownHeaders
public void setKnownHeaders(boolean knownHeaders)
Sets the known headers.- Parameters:
knownHeaders
- the knownHeaders to set
-
isVarargsHeaders
public boolean isVarargsHeaders()
Checks if is varargs headers.- Returns:
- the varargsHeaders
-
setVarargsHeaders
public void setVarargsHeaders(boolean varargsHeaders)
Sets the varargs headers.- Parameters:
varargsHeaders
- the varargsHeaders to set
-
getFile
public java.io.File getFile()
Gets the file.- Returns:
- the file
-
setFile
public void setFile(java.io.File file)
Sets the file.- Parameters:
file
- the file to set
-
getAlias
public java.lang.String getAlias()
Gets the alias.- Returns:
- the alias
-
setAlias
public void setAlias(java.lang.String alias)
Sets the alias.- Parameters:
alias
- the alias to set
-
isCached
public boolean isCached()
Checks if is cached.- Returns:
- the cached
-
setCached
public void setCached(boolean cached)
Sets the cached.- Parameters:
cached
- the cached to set
-
isRead
public boolean isRead()
Checks if is read.- Returns:
- the read
-
setRead
public void setRead(boolean read)
Sets the read.- Parameters:
read
- the read to set
-
isStore
public boolean isStore()
Checks if is store.- Returns:
- the store
-
setStore
public void setStore(boolean store)
Sets the store.- Parameters:
store
- the store to set
-
getQuoteChar
public char getQuoteChar()
- Returns:
- the quoteChar
-
setQuoteChar
public void setQuoteChar(char quoteChar)
- Parameters:
quoteChar
- the quoteChar to set
-
getIdFieldValue
public java.lang.String getIdFieldValue()
- Returns:
- the idFieldValue
-
setIdFieldValue
public void setIdFieldValue(java.lang.String idFieldValue)
- Parameters:
idFieldValue
- the idFieldValue to set
-
-