public class BMECatArticleStep extends GeneratedBMECatArticleStep
| Modifier and Type | Class and Description |
|---|---|
static class |
BMECatArticleStep.FeatureComparator
BMECatArticleStep.FeatureComparator
|
static class |
BMECatArticleStep.QualifierFeaturePair
Helper class for sorting in FeatureComparator
|
static class |
BMECatArticleStep.QualifierTypePair
BMECatArticleStep.QualifierTypePair
|
static class |
BMECatArticleStep.VariantFeatureComparator
BMECatArticleStep.VariantFeatureComparator
|
BMECatImportStep.DefaultBMECatObjectProcessorGenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationExceptionARTICLEATTRIBUTEMAPPING, ARTICLETYPE, DEFAULT_INITIAL_ATTRIBUTESXML_MIME_TYPE, ZIP_MIME_TYPEBATCHJOB, CODE, CRONJOBPENDINGSTEPSRELATION_MARKMODIFIED, CRONJOBPENDINGSTEPSRELATION_SRC_ORDERED, CRONJOBPENDINGSTEPSRELATION_TGT_ORDERED, CRONJOBPROCESSEDSTEPSRELATION_MARKMODIFIED, CRONJOBPROCESSEDSTEPSRELATION_SRC_ORDERED, CRONJOBPROCESSEDSTEPSRELATION_TGT_ORDERED, ERRORMODE, PENDINGCRONJOBS, PROCESSEDCRONJOBS, SEQUENCENUMBER, SYNCHRONOUSLANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
BMECatArticleStep() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canUndo(CronJob forSchedule)
Returns
true, if this Step is undoable for the specified CronJob. |
protected Object |
convertClassificationValue(String valueStr,
ClassificationClass cat,
ClassificationAttribute attr,
String type,
Map valueMap) |
JaloPropertyContainer |
copyProductAttributes(BMECatImportCronJob cronJob,
Product product) |
protected Map |
copyProductAttributes(BMECatImportCronJob cronJob,
ProductUpdateVersion updateVersion) |
protected Product |
createArticle(BMECatImportCronJob cronJob,
Catalog catalog,
Article article) |
protected Map |
createDefaultMapping(ComposedType targetType)
Creates and returns the default article attribute mapping.
|
ProductUpdateVersion |
createProductUpdateVersion(CronJob cronJob,
Product product) |
protected void |
deleteArticle(BMECatImportCronJob cronJob,
Catalog catalog,
Article article)
Processes the tag <ARTICLE mode ="delete" > tag in T_UPDATE_PRODUCT transaction.
|
protected String |
getAttributeQualifier(EnumerationValue eValue,
Map mapping) |
protected Map |
getBuyerIDValues(BMECatImportCronJob cronJob,
Map buyerIDValueObject) |
int |
getCompletedCount(BMECatImportCronJob cronJob) |
Comparator |
getFeatureComparator() |
protected String |
getLastValidArticleCode(BMECatImportCronJob cronJob,
Catalog catalogValueObj) |
protected Map |
getMapping()
Returns the locale copy of the article attribute mappings.
|
protected VariantType |
getOrCreateVariantType(Collection qualifierTypePairs)
Gets variant type with the given attributes if not found creates a new one with these attributes
|
protected String |
getProductCodeDelimiter() |
int |
getTotalToComplete(BMECatImportCronJob cronJob) |
protected Item.ItemAttributeMap |
getValues(BMECatImportCronJob cronJob,
AbstractValueObject valueObject,
boolean update) |
protected String |
getVariantAttributeName(ArticleFeatures featureGroup,
String name)
Build the name of the variant attribute from reference system and variant feature name
To assure unique identifiers the name is constructed like this: name = |
protected Comparator |
getVariantFeatureComparator()
Returns Comparator which sorts variant features within one CategorySystem
|
VariantsManager |
getVariantsManager() |
protected void |
importBMECatObject(Catalog catalogValueObject,
AbstractValueObject object,
BMECatImportCronJob cronJob)
Imports the <ARTICLE> tag
|
protected boolean |
importFeature(BMECatImportCronJob cronJob,
Product product,
ArticleFeatures featureGroup,
Feature feature)
Gives subclasses the possibility to import the feature in a different way or ignore it
Returns true if feature should be imported by default mechanism of BMECatArticleStep (->ProductFeature) |
protected boolean |
importVariantFeatures(ArticleFeatures features)
Decides whether variant features for the given reference system will be imported
May be overwritten to ignore variant features of specified reference systems |
protected void |
initializeArticleAttributeEnums() |
protected void |
initializeBMECatImport(Catalog catalog,
BMECatImportCronJob cronJob)
Initializes article step enums
|
protected void |
initializeCopyAttributes() |
protected void |
lastValidArticleFound(CronJob cronJob) |
protected List |
multiplyVariants(BMECatImportCronJob cronJob,
List variantsItemAttributes,
Item.ItemAttributeMap productAttributes,
String qualifier,
Feature variantFeature)
Creates new variant products (that is only their attributeMaps) by adding a feature with variants (a,b,c)*(1,2) =>
a1,a2,b1,b2,c1,c2 Returns collection of attribute maps for the creation of variant products (which still have to
be completed by adding the base product)
|
protected void |
performStep(CronJob forSchedule)
Performs
BMECatImportCronJob by creating a BMECat 1.2 Sax parser around the
media data attached to the cronJob. |
void |
remove(SessionContext ctx)
Removes this item.
|
protected void |
setFeatures(BMECatImportCronJob cronJob,
Product product,
Article article)
Method sets features which are not variants It is called for once for all feature groups.
|
void |
setNonInitialAttributes(SessionContext ctx,
Item item,
Item.ItemAttributeMap nonInitialAttributes)
Implements default setting of category type and the attribute mapping if these attributes are not specified during
step creation.
|
protected VariantType |
setVariantFeatures(BMECatImportCronJob cronJob,
Item.ItemAttributeMap productAttributes,
Article article,
List variantItemAttributes)
Builds attributemaps for the creation of variant products by building all combinations of given variant features
values.
|
protected void |
undoProducts(CronJob cronJob) |
protected void |
undoStep(CronJob forSchedule)
Reverts any changes of this step.
|
protected void |
updateArticle(BMECatImportCronJob cronJob,
Catalog catalog,
Article article) |
getAllArticleAttributeMapping, getAllArticleAttributeMapping, getArticleType, getArticleType, getDefaultAttributeModes, setAllArticleAttributeMapping, setAllArticleAttributeMapping, setArticleType, setArticleTypecanPerform, createKeyword, createProcessor, customizeImport, finalizeStep, getBMECatManager, getCatalogManager, getCompletionStatus, getData, getOrCreateKeywords, getProduct, isAbortable, writeToFileaddChange, createItem, debug, error, fatal, getChanges, getChanges, getChanges, getChanges, getFailErrorMode, getIgnoreErrorMode, getMostRecentChange, getNonInitialAttributes, getPauseErrorMode, hasChanges, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isWarnEnabled, log, toString, warngetBatchJob, getBatchJob, getCode, getCode, getErrorMode, getErrorMode, getSequenceNumber, getSequenceNumber, getSequenceNumberAsPrimitive, getSequenceNumberAsPrimitive, isSynchronous, isSynchronous, isSynchronousAsPrimitive, isSynchronousAsPrimitive, setBatchJob, setBatchJob, setCode, setCode, setErrorMode, setErrorMode, setSequenceNumber, setSequenceNumber, setSequenceNumber, setSequenceNumber, setSynchronous, setSynchronous, setSynchronous, setSynchronousgetInitialPropertiesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplacegetImplementation, setTenantprotected EnumerationValue ARTICLE_REFERENCES
protected EnumerationValue BUYER_IDS
protected EnumerationValue CATALOGVERSION
protected EnumerationValue CONTENT_UNIT
protected EnumerationValue DELIVERY_TIME
protected EnumerationValue EAN
protected EnumerationValue ERP_GROUP_BUYER
protected EnumerationValue ERP_GROUP_SUPPLIER
protected EnumerationValue KEYWORDS
protected EnumerationValue LONG_DESCRIPTION
protected EnumerationValue MANUFACTURER_AID
protected EnumerationValue MANUFACTURER_NAME
protected EnumerationValue MANUFACTURER_TYPE_DESCRIPTION
protected EnumerationValue MIN_ORDER_QUANTITY
protected EnumerationValue NUMBER_CONTENT_UNITS
protected EnumerationValue ORDER
protected EnumerationValue ORDER_QUANTITY_INTERVAL
protected EnumerationValue ORDER_UNIT
protected EnumerationValue PRICE_QUANTITY
protected EnumerationValue REMARKS
protected EnumerationValue SEGMENT
protected EnumerationValue SHORT_DESCRIPTION
protected EnumerationValue SPECIAL_TREATMENT_CLASSES
protected EnumerationValue STATUS
protected EnumerationValue SUPPLIER_AID
protected EnumerationValue SUPPLIER_ALT_AID
protected Set unlocalizedProductAttributes
protected Set localizedProductAttributes
protected static final String LAST_VALID_ARTICLE_KEY
protected static final String NONE
protected Map createDefaultMapping(ComposedType targetType)
ArticleAttributeEnum-EnumerationType. Values are AttributeDescriptors of the specified
targetType.targetType - the composed type which should be used for the article importpublic void remove(SessionContext ctx) throws ConsistencyCheckException
Item
This method is using the following attributes of the given SessionContext:
| CacheUsage | Language | StagingMethod | ||
|---|---|---|---|---|
| n/a (this is a setter method) | no, language doesn't matter for removal | yes if called on a StageableItem, no otherwise |
remove in class BMECatImportStepctx - A SessionContext objectConsistencyCheckException - if this item could not be removed for some reasonItem.remove(de.hybris.platform.jalo.SessionContext)protected boolean canUndo(CronJob forSchedule)
Steptrue, if this Step is undoable for the specified CronJob. Otherwise
false is returned.
If one step of a CronJob returns false the whole CronJob will stop the undo process. The default
implementation returns false. If your subclass of Step supports the undo-feature,
override this method and return true.canUndo in class StepforSchedule - the CronJob which is used for executiontrue, if this Step is undoable for the specified CronJobStep.canUndo(de.hybris.platform.cronjob.jalo.CronJob)protected void undoStep(CronJob forSchedule)
undoStep in class BMECatImportStepforSchedule - Step.canUndo(CronJob)protected void undoProducts(CronJob cronJob)
public int getCompletedCount(BMECatImportCronJob cronJob)
getCompletedCount in class BMECatImportSteppublic int getTotalToComplete(BMECatImportCronJob cronJob)
getTotalToComplete in class BMECatImportStepprotected void initializeBMECatImport(Catalog catalog, BMECatImportCronJob cronJob)
initializeBMECatImport in class BMECatImportStepcatalog - object which holds information about the BMECat catalog tagcronJob - context under which this step isprotected void importBMECatObject(Catalog catalogValueObject, AbstractValueObject object, BMECatImportCronJob cronJob) throws ParseAbortException
importBMECatObject in class BMECatImportStepcatalogValueObject - the parsed catalog dataobject - the parsed value objectcronJob - the cronJob which executes the current importParseAbortExceptionBMECatImportStep.importBMECatObject(Catalog, AbstractValueObject, BMECatImportCronJob)protected void deleteArticle(BMECatImportCronJob cronJob, Catalog catalog, Article article)
cronJob - catalog - article - protected void updateArticle(BMECatImportCronJob cronJob, Catalog catalog, Article article)
catalog - article - cronJob - protected Comparator getVariantFeatureComparator()
protected void setFeatures(BMECatImportCronJob cronJob, Product product, Article article)
cronJob - product - article - protected Object convertClassificationValue(String valueStr, ClassificationClass cat, ClassificationAttribute attr, String type, Map valueMap)
protected VariantType setVariantFeatures(BMECatImportCronJob cronJob, Item.ItemAttributeMap productAttributes, Article article, List variantItemAttributes)
cronJob - productAttributes - article - variantItemAttributes - protected VariantType getOrCreateVariantType(Collection qualifierTypePairs)
qualifierTypePairs - protected boolean importVariantFeatures(ArticleFeatures features)
features - protected boolean importFeature(BMECatImportCronJob cronJob, Product product, ArticleFeatures featureGroup, Feature feature)
cronJob - product - featureGroup - feature - protected String getVariantAttributeName(ArticleFeatures featureGroup, String name)
featureGroup - name - Name of variant featureprotected String getProductCodeDelimiter()
protected List multiplyVariants(BMECatImportCronJob cronJob, List variantsItemAttributes, Item.ItemAttributeMap productAttributes, String qualifier, Feature variantFeature)
variantsItemAttributes - existing variant product attribute maps (e.g. a,b.c)productAttributes - attributeMap of the base productvariantFeature - feature that contains variants (1,2)public VariantsManager getVariantsManager()
protected void initializeArticleAttributeEnums()
protected String getAttributeQualifier(EnumerationValue eValue, Map mapping)
protected Item.ItemAttributeMap getValues(BMECatImportCronJob cronJob, AbstractValueObject valueObject, boolean update)
protected void performStep(CronJob forSchedule) throws AbortCronJobException
BMECatImportStepBMECatImportCronJob by creating a BMECat 1.2 Sax parser around the
media data attached to the cronJob.
First BMECatImportStep.initializeBMECatImport(de.hybris.platform.bmecat.parser.Catalog, BMECatImportCronJob)is called to
pass all informations about the BMECat catalog of the imported document. Afterwards
BMECatImportStep.importBMECatObject(de.hybris.platform.bmecat.parser.Catalog, AbstractValueObject, BMECatImportCronJob) is
called for any other BMECat data object.
performStep in class BMECatImportStepforSchedule - the CronJob which is used for executionAbortCronJobException - if the execution is aborted due to an errorBMECatImportStep.performStep(CronJob)protected String getLastValidArticleCode(BMECatImportCronJob cronJob, Catalog catalogValueObj)
protected void lastValidArticleFound(CronJob cronJob)
protected Product createArticle(BMECatImportCronJob cronJob, Catalog catalog, Article article)
public void setNonInitialAttributes(SessionContext ctx, Item item, Item.ItemAttributeMap nonInitialAttributes) throws JaloBusinessException
setNonInitialAttributes in class Stepctx - item - nonInitialAttributes - JaloBusinessExceptionprotected Map getBuyerIDValues(BMECatImportCronJob cronJob, Map buyerIDValueObject)
protected Map getMapping()
public Comparator getFeatureComparator()
public ProductUpdateVersion createProductUpdateVersion(CronJob cronJob, Product product)
protected void initializeCopyAttributes()
public JaloPropertyContainer copyProductAttributes(BMECatImportCronJob cronJob, Product product)
protected Map copyProductAttributes(BMECatImportCronJob cronJob, ProductUpdateVersion updateVersion)
Copyright © 2017 SAP SE. All Rights Reserved.