Class BatchingImportReader
- java.lang.Object
-
- de.hybris.platform.impex.jalo.ImpExReader
-
- de.hybris.platform.impex.distributed.process.BatchingImportReader
-
public class BatchingImportReader extends ImpExReader
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.impex.jalo.ImpExReader
ImpExReader.ResultSetCSVReader
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.impex.jalo.ImpExReader
FIRST
-
-
Constructor Summary
Constructors Constructor Description BatchingImportReader(java.io.InputStream input, ImportDataDumpStrategy dumpStrategy, java.lang.String processCode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enableCodeExecution(boolean isOn)
Sets the code execution flag.ImpExMedia
findExternalDataMedia(java.lang.String code)
Searches the media with the given code in the context of the reader and returns it.ImportBatchCreationData
getNextBatch()
protected void
processCodeLine(AbstractCodeLine line)
Processes given code line.void
setCurrentHeader(HeaderDescriptor header)
Sets the given header instance as current header.-
Methods inherited from class de.hybris.platform.impex.jalo.ImpExReader
addDefinition, addExternalDataMedia, addExternalDataMedias, addHeaderExceptionInfoAsComment, addHeaderReplacementRule, addToBeanShellContext, adjustLineIndexes, applyHeaderReplacements, assureBeanShellLoaded, checkDefinitonKey, close, createCodeLine, createCodeLineLegacyWay, createCodeLineModernWay, createInvalidHeader, createNewHeader, createValueLine, debug, debug, enableExternalCodeExecution, enableExternalDataCodeExecution, enableExternalImpExSyntaxParsing, enableExternalSyntaxParsing, enterIfBlock, error, error, execute, execute, exitIfBlock, findExternalDataMedia, findMarker, getAllExternalDataMediaCodes, getAttributeConstraintFilter, getBeforeEachCode, getCellDecorators, getCSVReader, getCurrentHeader, getCurrentLocation, getCurrentReader, getDefaultReplacements, getDocumentIDRegistry, getFromBeanShellContext, getInvalidHeaderPolicy, getLineSize, getLocale, getScriptExecutionContext, getStrictMode, getValidationMode, gotInsertedLines, hasCellDecorators, includeExternalData, includeExternalData, includeExternalData, includeExternalData, includeExternalData, includeExternalData, includeExternalData, includeExternalData, includeExternalData, includeExternalData, includeExternalDataMedia, includeExternalDataMedia, includeExternalDataMedia, includeExternalDataMedia, includeExternalDataMedia, includeExternalDataMedia, includeExternalDataMedia, includeExternalDataMedia, includeExternalDataMedia, includeExternalDataMedia, includeSQLData, includeSQLData, includeSQLData, info, info, initDatabase, insertLine, isCodeExecutionEnabled, isCodeLine, isCombinedSearchEnabled, isCommentLine, isDebugEnabled, isDefinition, isEmptyLine, isEndUserRights, isExternalCodeExecutionEnabled, isExternalSyntaxParsingEnabled, isHeaderLine, isIncludingExternalData, isInfoEnabled, isNotInInactiveIfBlock, isStartUserRights, legacyExecute, lineToList, modernExecute, parseHeader, parseHeader, parseHeader, parseHeader, processMarkerCodeLine, readLine, readNextCSVLine, removeExternalDataMedia, removeExternalDataMedias, replaceDefinitions, setAttributeConstraintFilter, setBeanShellContext, setBeforeEachCode, setCellDecorators, setCurrentHeader, setInvalidHeaderPolicy, setLocale, setRelaxedMode, setRelaxedMode, setValidationMode, setValidationMode, sortRulesList, splitDefinitonCell, storeUserRightsLine, warn, warn, writeUserRightsLines
-
-
-
-
Constructor Detail
-
BatchingImportReader
public BatchingImportReader(java.io.InputStream input, ImportDataDumpStrategy dumpStrategy, java.lang.String processCode) throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
-
-
Method Detail
-
findExternalDataMedia
public ImpExMedia findExternalDataMedia(java.lang.String code) throws JaloBusinessException
Description copied from class:ImpExReader
Searches the media with the given code in the context of the reader and returns it.- Overrides:
findExternalDataMedia
in classImpExReader
- Parameters:
code
- code of the media- Returns:
- media with given code or null if no data is found
- Throws:
JaloBusinessException
- a media with the code was found but has had no data attached
-
enableCodeExecution
public void enableCodeExecution(boolean isOn)
Description copied from class:ImpExReader
Sets the code execution flag. Is code execution enabled, the parsing and interpreting of code lines is enabled. Otherwise these lines will be seen as comments.- Overrides:
enableCodeExecution
in classImpExReader
- Parameters:
isOn
- Should code execution be enabled?
-
processCodeLine
protected final void processCodeLine(AbstractCodeLine line) throws ImpExException
Description copied from class:ImpExReader
Processes given code line. Checks for special marker logic and executed the code line.- Overrides:
processCodeLine
in classImpExReader
- Parameters:
line
- line to execute- Throws:
ImpExException
- error while execution of code line
-
setCurrentHeader
public void setCurrentHeader(HeaderDescriptor header)
Description copied from class:ImpExReader
Sets the given header instance as current header. The current header is set for each read value line.- Overrides:
setCurrentHeader
in classImpExReader
- Parameters:
header
- the header which will be used from now as header for read value lines
-
getNextBatch
public ImportBatchCreationData getNextBatch()
-
-