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 TypeMethodDescriptionvoidclose()abstract voidConfigure the input sources using the variousinputmethods.booleanProvide import error handler.booleanProvideIOExceptionhandler.booleanProvideClassNotFoundExceptionhandler.voidinit()voidProvide the input source.voidProvide the input source.voidinput(String inputName, InputStream source) Provide the input source.voidinput(String inputName, InputStream source, Charset charset) Provide the input source.voidProvide the input source.
-
Constructor Details
-
ImportTask
public ImportTask()
-
-
Method Details
-
configure
Configure the input sources using the variousinputmethods.- Throws:
IOException- if unable to read configuration- See Also:
-
init
- Throws:
IOException
-
handle
Provide import error handler.- Parameters:
e- the error cause- Returns:
- return
trueto continue else terminate the task immediately.
-
handle
ProvideIOExceptionhandler.- Parameters:
e- the error cause- Returns:
- return
trueto continue else terminate the task immediately.
-
handle
ProvideClassNotFoundExceptionhandler.- Parameters:
e- the error cause- Returns:
- return
trueto 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-