@Component(value="blSingleMediaProcessor") public class SingleMediaProcessor extends MediaParsingCellProcessor
MediaParsingCellProcessor}
Modifier and Type | Field and Description |
---|---|
static Pattern |
HEADER_REGEX |
CATEGORY_MEDIA_FIELD_NAME, entityDaoProvider, persistencePackageFactory, PRODUCT_MEDIA_FIELD_NAME
Constructor and Description |
---|
SingleMediaProcessor() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(String header,
ImportType importType)
Determines if this processor can be used to handle the given header within the context of an import of the
given importingClass
|
ColumnParseResult |
execute(String value,
BroadleafCsvContext context)
Parses out the String value that appears in the CSV file.
|
protected String |
parseKey(String header) |
createPersistenceRequests, getMediaField, parseMediaString
execute, getOrder
public static final Pattern HEADER_REGEX
public boolean canHandle(String header, ImportType importType)
BroadleafCellProcessor
canHandle
in interface BroadleafCellProcessor
canHandle
in class MediaParsingCellProcessor
header
- the header that appears in the CSVimportType
- the type of importpublic ColumnParseResult execute(String value, BroadleafCsvContext context)
BroadleafCellProcessor
ColumnParseResult
. The ColumnParseResult.getVal()
could be
null.execute
in interface BroadleafCellProcessor
execute
in class MediaParsingCellProcessor
value
- the raw value that was parsed out of the CSV row, could be null if the value was ommittedcontext
- the context that the value appears in in relation to the rest of the lineColumnParseResult
indicating either the parsed value or sub-persistence packages that
should be executedCopyright © 2020. All rights reserved.