Class CampaignCodeSpecification
java.lang.Object
com.broadleafcommerce.dataimport.processor.specification.DefaultSpecification
com.broadleafcommerce.dataimport.processor.specification.CampaignCodeSpecification
- All Implemented Interfaces:
GlobalImportSpecification
,ImportSpecification
public class CampaignCodeSpecification
extends DefaultSpecification
implements GlobalImportSpecification
- Author:
- Vitalii Voronkov (vvoronkov)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
static final class
-
Field Summary
Fields inherited from class com.broadleafcommerce.dataimport.processor.specification.DefaultSpecification
dependencyMappings, fieldConfigMap
Fields inherited from interface com.broadleafcommerce.dataimport.processor.specification.ImportSpecification
ROW_DETERMINATION_COLUMN
-
Constructor Summary
ConstructorDescriptionCampaignCodeSpecification
(String ImportType, List<ImportDataNormalizer> importDataNormalizers, List<String> requiredAuthorities, List<String> requiredScopes) CampaignCodeSpecification
(List<ImportDataNormalizer> importDataNormalizers, List<String> requiredAuthorities, List<String> requiredScopes) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether or not this specification can actually handle the given import.The list ofImportDataNormalizer
that will be executed to pre-process the data parsed out from the file.In case when entity has parent, we need to specify header in file with parent entity id valueprotected ImportServicesProperties
protected void
populateHeaderFieldConfigsByRowType
(Map<String, Map<String, ImportFieldConfig>> headerFieldConfigsByRowType) This method is always invoked in the constructor - seeDefaultSpecification.createUnmodifiableHeaderFieldConfigsByRowType()
.void
setProperties
(ImportServicesProperties properties) protected boolean
Methods inherited from class com.broadleafcommerce.dataimport.processor.specification.DefaultSpecification
getDependencyMappings, getDynamicHeaderMappingConfigsByRowType, getFieldConfigMap, getHeaderFieldConfigsByRowType, getImportType, getName, getRequiredAuthorities, getRequiredHeaders, getRequiredHeaders, getRequiredScopes, isRequiresRowTypeHeader, mapDynamicFieldToHeader, mapDynamicHeaderToField, populateDynamicHeaderMappingsByRowType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.dataimport.processor.specification.GlobalImportSpecification
hasParentEntity
Methods inherited from interface com.broadleafcommerce.dataimport.processor.specification.ImportSpecification
getDependencyMappings, getFieldConfigMap, getHeaderFieldConfigsByRowType, getImportType, getMainRecordType, getName, getRequiredAuthorities, getRequiredHeaders, getRequiredHeaders, getRequiredScopes, isCatalogDiscriminated, isRequiresRowTypeHeader, isSandboxDiscriminated, mapDynamicFieldToHeader, mapDynamicHeaderToField, parentEntityIdRequiredInRequest, resolveAndRemoveRecordType, resolveRecordTypeBeforePropertyMapping, shouldAllowUnmappedHeaders, shouldAutoGenerateOperationTypeForEachRecord, shouldAutoGenerateResourceTierIdForEachRecord
-
Constructor Details
-
CampaignCodeSpecification
-
CampaignCodeSpecification
-
-
Method Details
-
canHandle
Description copied from interface:ImportSpecification
Whether or not this specification can actually handle the given import. Checks will generally be based on the import type.- Specified by:
canHandle
in interfaceImportSpecification
- Overrides:
canHandle
in classDefaultSpecification
- Returns:
- whether or not this specification can actually handle the given import
-
populateHeaderFieldConfigsByRowType
protected void populateHeaderFieldConfigsByRowType(Map<String, Map<String, ImportFieldConfig>> headerFieldConfigsByRowType) Description copied from class:DefaultSpecification
This method is always invoked in the constructor - seeDefaultSpecification.createUnmodifiableHeaderFieldConfigsByRowType()
.Extensions of this class should override this method and use it to populate the values that they want to ultimately be in
DefaultSpecification.getHeaderFieldConfigsByRowType()
.- Overrides:
populateHeaderFieldConfigsByRowType
in classDefaultSpecification
- Parameters:
headerFieldConfigsByRowType
- a special, mutable map instance which implementations should populate with field configurations. This map will ultimately be copied into an unmodifiable separate instance that will actually be used forDefaultSpecification.getHeaderFieldConfigsByRowType()
.
-
getParentEntityIdHeader
Description copied from interface:GlobalImportSpecification
In case when entity has parent, we need to specify header in file with parent entity id value- Specified by:
getParentEntityIdHeader
in interfaceGlobalImportSpecification
- Returns:
- parent entity header otherwise an empty optional
-
shouldUseParentEntityIdHeader
protected boolean shouldUseParentEntityIdHeader() -
getImportDataNormalizers
Description copied from interface:ImportSpecification
The list ofImportDataNormalizer
that will be executed to pre-process the data parsed out from the file.- Specified by:
getImportDataNormalizers
in interfaceImportSpecification
- Returns:
- the list of
ImportDataNormalizer
-
getProperties
-
setProperties
-