Package com.axelor.data
Class ImportTask
java.lang.Object
com.axelor.data.ImportTask
- All Implemented Interfaces:
Closeable
,AutoCloseable
Import task configures input sources and provides error handler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
abstract void
Configure the input sources using the variousinput
methods.boolean
Provide import error handler.boolean
ProvideIOException
handler.boolean
ProvideClassNotFoundException
handler.void
init()
void
Provide the input source.void
Provide the input source.void
input
(String inputName, InputStream source) Provide the input source.void
input
(String inputName, InputStream source, Charset charset) Provide the input source.void
Provide the input source.
-
Constructor Details
-
ImportTask
public ImportTask()
-
-
Method Details
-
configure
Configure the input sources using the variousinput
methods.- Throws:
IOException
- if unable to read configuration- See Also:
-
init
- Throws:
IOException
-
handle
Provide import error handler.- Parameters:
e
- the error cause- Returns:
- return
true
to continue else terminate the task immediately.
-
handle
ProvideIOException
handler.- Parameters:
e
- the error cause- Returns:
- return
true
to continue else terminate the task immediately.
-
handle
ProvideClassNotFoundException
handler.- Parameters:
e
- the error cause- Returns:
- return
true
to continue else terminate the task immediately.
-
input
Provide the input source.- Parameters:
inputName
- the input namesource
- the input source- Throws:
FileNotFoundException
- if source file doesn't exist
-
input
Provide the input source.- Parameters:
inputName
- the input namesource
- the input sourcecharset
- the source encoding- Throws:
FileNotFoundException
- if source file doesn't exist
-
input
Provide the input source.- Parameters:
inputName
- the input namesource
- the input source
-
input
Provide the input source.- Parameters:
inputName
- the input namesource
- the input sourcecharset
- the source encoding
-
input
Provide the input source.- Parameters:
inputName
- the input namereader
- the input source
-
getReader
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-