Class DefaultImportProcessor
java.lang.Object
de.hybris.platform.impex.jalo.imp.DefaultImportProcessor
- All Implemented Interfaces:
ImportProcessor
- Direct Known Subclasses:
ConditionalImportProcessor,ImpExImportJob.MyImportProcessor,ImpExModifierTest.TestImportProcessor,MultiThreadedImportProcessor,TestImportProcessor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidassertTargetTypePermitted(HeaderDescriptor header, ComposedType targetType, ValueLine valueLine) protected voidprotected ImpExImportCUDHandlercreateCUDHandler(ImpExImportReader reader) protected ExistingItemResolvercreateExistingItemsResolver(HeaderDescriptor header, boolean useCache) protected voidDeprecated.protected voidprotected voidDeprecated.since ages - use the loggerCategory.error(Object)method directprotected SessionContextgetCreationContext(ComposedType targetType, Map<StandardColumnDescriptor, Object> attributeValueMappings, ValueLine valueLine) protected ExistingItemResolvergetExistingItemResolver(ValueLine valueLine) getHandlerForLine(ValueLine line) protected LanguagegetLanguage(StandardColumnDescriptor columnDescriptor) protected StringgetSavedValuesMessage(SavedValues savedValues, Item existingItem, ValueLine valueLine) protected ValueLineTranslatorgetValueLineTranslator(ValueLine valueLine) protected voidhandleExceptionDuringImport(ValueLine valueLine, Exception e, ImpExProcessModeEnum mode, String message) protected booleanhasUnresolvedMandatoryOrInitialColumns(Collection<StandardColumnDescriptor> columns, ValueLine valueLine) protected voidDeprecated.since ages - use the loggerCategory.info(Object)method directvoidinit(ImpExImportReader reader) protected booleanDeprecated.since ages - use the loggerCategory.isDebugEnabled()method directprotected booleanDeprecated.since ages - use the loggerCategory.isInfoEnabled()method directprotected voidlogExceptionDuringImport(Exception e, String message) protected ItemprocessInsertLine(ValueLine valueLine, HeaderDescriptor header, ComposedType targetType) protected ItemprocessInsertLine(Collection<Item> existingItems, ValueLine valueLine, ComposedType targetType) protected ItemprocessInsertLineInternal(Collection<Item> existingItems, ValueLine valueLine, ComposedType targetType) protected ItemprocessItemCreation(ComposedType targetType, Map<StandardColumnDescriptor, Object> attributeValueMappings, ValueLine valueLine) processItemData(ValueLine valueLine) processItemData_Impl(ValueLine valueLine) processItemData_TX(ValueLine valueLine) protected voidprocessItemRemoval(Item toRemove, ValueLine valueLine) protected voidprocessItemUpdate(Item toUpdate, Map<StandardColumnDescriptor, Object> attributeValueMappings, ValueLine valueLine) protected voidprocessRemoveLine(Item item, ValueLine valueLine, HeaderDescriptor header) protected ItemprocessRemoveLine(Collection<Item> existingItems, ValueLine valueLine) protected voidprocessUpdateLine(Item item, ValueLine valueLine, HeaderDescriptor header, ComposedType targetType) protected voidprotected booleanshouldRetryAfterException(Exception exception, ImpExProcessModeEnum mode) protected voidtranslateValueMappings(Item existingItem, Map<StandardColumnDescriptor, Object> attributeValueMappings) protected voidDeprecated.since ages - use the loggerCategory.warn(Object)method direct
-
Field Details
-
CLEARING_MODEL_CONTEXT_AFTER_PROCESSING_EACH_ITEM_ENABLED
- See Also:
-
-
Constructor Details
-
DefaultImportProcessor
public DefaultImportProcessor()
-
-
Method Details
-
init
- Specified by:
initin interfaceImportProcessor
-
createCUDHandler
-
getHandlerForLine
-
enableLegacyFlagWhenLineIsUsingJaloOnlyFeatures
-
getReader
-
adjustSessionSettings
protected void adjustSessionSettings() -
restoreSessionSettings
protected void restoreSessionSettings() -
processItemData
- Specified by:
processItemDatain interfaceImportProcessor- Throws:
ImpExException
-
processItemData_TX
- Throws:
ImpExException
-
processItemData_Impl
- Throws:
ImpExException
-
clearModelContextAfterProcessingItem
protected void clearModelContextAfterProcessingItem() -
assertTargetTypePermitted
protected void assertTargetTypePermitted(HeaderDescriptor header, ComposedType targetType, ValueLine valueLine) throws InsufficientDataException - Throws:
InsufficientDataException
-
processRemoveLine
protected Item processRemoveLine(Collection<Item> existingItems, ValueLine valueLine) throws ImpExException - Throws:
ImpExException
-
processInsertLine
protected Item processInsertLine(Collection<Item> existingItems, ValueLine valueLine, ComposedType targetType) throws ImpExException - Throws:
ImpExException
-
processInsertLineInternal
protected Item processInsertLineInternal(Collection<Item> existingItems, ValueLine valueLine, ComposedType targetType) throws ImpExException - Throws:
ImpExException
-
processInsertLine
protected Item processInsertLine(ValueLine valueLine, HeaderDescriptor header, ComposedType targetType) throws ImpExException - Throws:
ImpExException
-
throwImpExOrRuntimeException
- Throws:
ImpExException
-
handleExceptionDuringImport
protected void handleExceptionDuringImport(ValueLine valueLine, Exception e, ImpExProcessModeEnum mode, String message) throws ImpExException - Throws:
ImpExException
-
logExceptionDuringImport
-
shouldRetryAfterException
-
processUpdateLine
protected void processUpdateLine(Item item, ValueLine valueLine, HeaderDescriptor header, ComposedType targetType) throws InsufficientDataException, ImpExException -
processRemoveLine
protected void processRemoveLine(Item item, ValueLine valueLine, HeaderDescriptor header) throws ImpExException - Throws:
ImpExException
-
hasUnresolvedMandatoryOrInitialColumns
protected boolean hasUnresolvedMandatoryOrInitialColumns(Collection<StandardColumnDescriptor> columns, ValueLine valueLine) -
getSavedValuesMessage
protected String getSavedValuesMessage(SavedValues savedValues, Item existingItem, ValueLine valueLine) -
processItemRemoval
protected void processItemRemoval(Item toRemove, ValueLine valueLine) throws ConsistencyCheckException - Throws:
ConsistencyCheckException
-
processItemUpdate
protected void processItemUpdate(Item toUpdate, Map<StandardColumnDescriptor, Object> attributeValueMappings, ValueLine valueLine) throws ImpExException- Throws:
ImpExException
-
getCreationContext
protected SessionContext getCreationContext(ComposedType targetType, Map<StandardColumnDescriptor, Object> attributeValueMappings, ValueLine valueLine) -
processItemCreation
protected Item processItemCreation(ComposedType targetType, Map<StandardColumnDescriptor, Object> attributeValueMappings, ValueLine valueLine) throws ImpExException- Throws:
ImpExException
-
translateValueMappings
protected Map<String,Object> translateValueMappings(Item existingItem, Map<StandardColumnDescriptor, Object> attributeValueMappings) throws ImpExException- Throws:
ImpExException
-
isDebugEnabled
Deprecated.since ages - use the loggerCategory.isDebugEnabled()method directChecks if the debug method of the reader is enabled or if no reader set the logger will be checked.- Returns:
- is debug mode enabled?
-
debug
Deprecated.since ages - use the loggerCategory.debug(Object)method directDebugs a message with the reader or the current logger instance.- Parameters:
msg- debug message
-
isInfoEnabled
Deprecated.since ages - use the loggerCategory.isInfoEnabled()method directChecks if the info method of the reader is enabled or if no reader set the logger will be checked.- Returns:
- is info mode enabled?
-
info
Deprecated.since ages - use the loggerCategory.info(Object)method directLogs an info message with the reader or the current logger instance.- Parameters:
msg- info message
-
warn
Deprecated.since ages - use the loggerCategory.warn(Object)method directLogs an warn message with the reader or the current logger instance.- Parameters:
msg- warn message
-
error
Deprecated.since ages - use the loggerCategory.error(Object)method directLogs an error message with the reader or the current logger instance.- Parameters:
msg- error message
-
getLanguage
protected Language getLanguage(StandardColumnDescriptor columnDescriptor) throws InsufficientDataException, HeaderValidationException -
getValueLineTranslator
-
getExistingItemResolver
protected ExistingItemResolver getExistingItemResolver(ValueLine valueLine) throws HeaderValidationException - Throws:
HeaderValidationException
-
createExistingItemsResolver
protected ExistingItemResolver createExistingItemsResolver(HeaderDescriptor header, boolean useCache) throws HeaderValidationException - Throws:
HeaderValidationException
-
Category.debug(Object)method direct