Class SkuInventoryImportSpecification
- All Implemented Interfaces:
GlobalImportSpecification
,ImportSpecification
-
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether or not this specification can actually handle the given import.boolean
Certain imports support the concept ofImport.getParentEntityId()
.protected void
populateHeaderFieldConfigsByRowType
(Map<String, Map<String, ImportFieldConfig>> headerFieldConfigsByRowType) This method is always invoked in the constructor - seeDefaultSpecification.createUnmodifiableHeaderFieldConfigsByRowType()
.boolean
shouldAllowUnmappedHeaders
(String rowType) This method describes whether imports processed with this specification should allow passthrough of headers with no explicit mapping.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
getParentEntityIdHeader, hasParentEntity
Methods inherited from interface com.broadleafcommerce.dataimport.processor.specification.ImportSpecification
getDependencyMappings, getFieldConfigMap, getHeaderFieldConfigsByRowType, getImportDataNormalizers, getImportType, getMainRecordType, getName, getRequiredAuthorities, getRequiredHeaders, getRequiredHeaders, getRequiredScopes, isCatalogDiscriminated, isRequiresRowTypeHeader, isSandboxDiscriminated, mapDynamicFieldToHeader, mapDynamicHeaderToField, resolveAndRemoveRecordType, resolveRecordTypeBeforePropertyMapping, shouldAutoGenerateOperationTypeForEachRecord, shouldAutoGenerateResourceTierIdForEachRecord
-
Field Details
-
DEFAULT_INVENTORY_IMPORT_SPECIFICATION_NAME
- See Also:
-
-
Constructor Details
-
SkuInventoryImportSpecification
-
-
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()
.
-
shouldAllowUnmappedHeaders
Description copied from interface:ImportSpecification
This method describes whether imports processed with this specification should allow passthrough of headers with no explicit mapping.Essentially, when a record is being processed, if there is no explicit header-to-field mapping possible for a given input via
ImportSpecification.getHeaderFieldConfigsByRowType()
, or viaImportSpecification.mapDynamicHeaderToField(String, String)
, this method describes the behavior that should be used.Some import types may choose to allow such 'unmapped' fields to be passed through with just the raw unmapped header and its corresponding value. For those situations, this method should return
true
. Other import types may want to intentionally ignore any unmappable headers and exclude them to force strict adherence to the specification. For those, this method should returnfalse
.Note that 'meta' headers/fields such as
DefaultImportProcessor.OPERATION_COLUMN
have special meaning and thus may not be affected by this setting. SeeDefaultImportProcessor
to understand how such fields are processed.- Specified by:
shouldAllowUnmappedHeaders
in interfaceImportSpecification
- Parameters:
rowType
- the row type for which this method should return a preference. Allows for different behavior for different row types within an import- Returns:
true
if unmapped headers should be allowed, elsefalse
-
parentEntityIdRequiredInRequest
public boolean parentEntityIdRequiredInRequest()Description copied from interface:ImportSpecification
Certain imports support the concept ofImport.getParentEntityId()
. In some of these cases, it may be desirable to require a value be provided for this inImportRequest.getParentEntityId()
.This method allows the specification to describe whether the initial
ImportRequest.getParentEntityId()
should be required to have a value. If this is set totrue
, then any requests that do not provide a value will be rejected.- Specified by:
parentEntityIdRequiredInRequest
in interfaceImportSpecification
- Returns:
- whether imports for this specification must supply
ImportRequest.getParentEntityId()
- See Also:
-