Package de.hybris.platform.catalog.jalo
Class SyncItemJob
- All Implemented Interfaces:
TriggerableJob,Serializable,Comparable
- Direct Known Subclasses:
GeneratedCatalogVersionSyncJob
@Deprecated(since="ages",
forRemoval=false)
public class SyncItemJob
extends GeneratedSyncItemJob
implements TriggerableJob
Deprecated.
Superclass for job which synchronizes content of a catalog version to another catalog version.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.CompletionInfostatic classDeprecated.ModifiedItemsPairstatic classDeprecated.classDeprecated.Own copy context from inside the job.Nested classes/interfaces inherited from class de.hybris.platform.cronjob.jalo.Job
Job.JobFileLogContainer, Job.SynchronicityNested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException -
Field Summary
FieldsFields inherited from class de.hybris.platform.catalog.jalo.GeneratedSyncItemJob
CREATENEWITEMS, DEFAULT_INITIAL_ATTRIBUTES, EFFECTIVESYNCLANGUAGES, EXCLUSIVEMODE, EXECUTIONS, EXPORTATTRIBUTEDESCRIPTORS, REMOVEMISSINGITEMS, ROOTTYPES, SOURCEVERSION, SOURCEVERSIONHANDLER, SYNCATTRIBUTECONFIGURATIONS, SYNCITEMJOB2PRINCIPAL_MARKMODIFIED, SYNCITEMJOB2PRINCIPAL_SRC_ORDERED, SYNCITEMJOB2PRINCIPAL_TGT_ORDERED, SYNCJOB2LANGREL_MARKMODIFIED, SYNCJOB2LANGREL_SRC_ORDERED, SYNCJOB2LANGREL_TGT_ORDERED, SYNCJOB2TYPEREL_MARKMODIFIED, SYNCJOB2TYPEREL_SRC_ORDERED, SYNCJOB2TYPEREL_TGT_ORDERED, SYNCLANGUAGES, SYNCORDER, SYNCPRINCIPALS, SYNCPRINCIPALSONLY, TARGETVERSION, TARGETVERSIONHANDLERFields inherited from class de.hybris.platform.cronjob.jalo.Job
CTX_CURRENTCRONJOB, CTX_CURRENTJOBFields inherited from class de.hybris.platform.cronjob.jalo.GeneratedJob
ACTIVE, ALTERNATIVEDATASOURCEID, CHANGERECORDINGENABLED, CODE, CRONJOBS, CRONJOBSHANDLER, EMAILADDRESS, EMAILNOTIFICATIONTEMPLATE, ERRORMODE, LOGLEVELDATABASE, LOGLEVELFILE, LOGTODATABASE, LOGTOFILE, NODEGROUP, NODEID, NUMBEROFRETRIES, PRIORITY, REMOVEONEXIT, REQUESTABORT, REQUESTABORTSTEP, RESTRICTIONS, RESTRICTIONSHANDLER, RETRY, SENDEMAIL, SESSIONCONTEXTVALUES, SESSIONCURRENCY, SESSIONLANGUAGE, SESSIONUSER, SINGLEEXECUTABLE, TRIGGERS, TRIGGERSHANDLER, USEREADONLYDATASOURCEFields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLEDFields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEFields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCatalogItemsToSync(SyncItemCronJob cronJob, Collection<? extends Item> items) Deprecated.Added any catalog item except categories to a syncronization.voidaddCategoriesToSync(SyncItemCronJob cronJob, Collection<? extends Category> categories, boolean includeSubcategories, boolean includeProducts) Deprecated.protected List<ComposedType>assureCatalogItemTypes(List<ComposedType> types) Deprecated.protected booleancanSelectAttribute(AttributeDescriptor attributeDescriptor) Deprecated.protected booleanDeprecated.This job does not support undo!protected booleancheckCatalogVersionValidity(SyncItemCronJob cronJob, SyncItemJob.SyncItemCopyContext syncItemCopyContext) Deprecated.Use this method to check if the given catalog version is valid for synchronization.protected booleanconfigAlreadyExists(AttributeDescriptor attributeDescriptor) Deprecated.protected voidconfigureFullSyncForItemType(SessionContext ctx, SyncItemCronJob cronJob, ComposedType type, String additionalQueryRestrictions, boolean removeMissing, boolean createNew, boolean forceUpdate, int range) Deprecated.Configures a full synchronization of the items of a given type according to the specified sync cronjob settings.voidconfigureFullVersionSync(SyncItemCronJob cronJob) Deprecated.Collects all changes between the source and target version of this job.protected voidcopyItem(ItemCopyContext itemCopyContext, SyncItemCronJob cronJob, Item src, Item tgt) Deprecated.protected ItemCopyContextcreateCopyContext(SyncItemCronJob cronJob, CatalogVersion srcV, CatalogVersion tgtV, Map<PK, PK> alreadyFinished) Deprecated.protected SyncAttributeDescriptorConfigcreateDefaultConfigFor(SessionContext ctx, AttributeDescriptor attributeDescriptor) Deprecated.protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) Deprecated.Superclass method overridden to ensure initial attributesGeneratedSyncItemJob.SOURCEVERSION, andGeneratedSyncItemJob.TARGETVERSION.protected SessionContextcreateSyncSessionContext(SyncItemCronJob cronJob) Deprecated.Returns a newSessionContextwith the following settings.
LANGUAGE: null DISABLE_RESTRICTIONS: false DISABLE_RESTRICTION_GROUP_INHERITANCE: false USE_FAST_ALGORITHMS: true DISABLE_ATTRIBUTE_CHECK: true DISABLE_SUBCATEGORY_REMOVALCHECK: true DISABLE_SETALLOWEDPRINCIPAL_RECURSIVELY: true LANGUAGE_FALLBACK_ENABLED: false TRANSACTION_4_ALLATTRIBUTES: falseprotected CronJob.CronJobResultdoAbort(SyncItemCronJob cronJob) Deprecated.This method is called if abort is requested by the user while still executing this job.protected booleandoSynchronization(SyncItemJob.SyncItemCopyContext syncItemCopyContext, SyncItemCronJob cronJob) Deprecated.Executes actual synchronization.protected StringgetAdditionalQueryRestrictions(SessionContext ctx, ComposedType rootType, SyncItemCronJob cronJob) Deprecated.Deprecated.Getter for HMC editor - we pass a map { AttributeDescriptor -> Boolean }Deprecated.Returns [AttributeDescriptor,SyncAttributeDescriptorConfig] pairs for all existing declared attribute descriptors and their sync config item if it exists for this job.getCompletionInfo(SyncItemCronJob cronJob) Deprecated.getConfigFor(SessionContext ctx, AttributeDescriptor attributeDescriptor, boolean createOnDemand) Deprecated.Returns theSyncAttributeDescriptorConfiginstance which is responsible for all publication settings of the specified attribute descriptor.getConfigFor(AttributeDescriptor attributeDescriptor, boolean createOnDemand) Deprecated.Returns theSyncAttributeDescriptorConfiginstance which is responsible for all publication settings of the specified attribute descriptor.static List<ComposedType>Deprecated.Provides the list of default root types.protected intgetDuplicatedCatalogItemsCount(SessionContext ctx, CatalogVersion version, SyncItemCronJob cronJob, ComposedType type) Deprecated.Deprecated.Calculates current effective sync languages.longgetElapsedMillis(SyncItemCronJob cronJob) Deprecated.Deprecated.Generated method - Getter of theSyncItemJob.executionsattribute.getMissingTargetItems(Collection<? extends Item> sourceItems, Collection<? extends Item> targetItems, CatalogVersion sourceVersion) Deprecated.protected List<SyncItemJob.ModifiedItemsPair>getModifiedCatalogItemPairs(SessionContext ctx, ComposedType type, int start, int range, boolean forceUpdate) Deprecated.protected List<SyncItemJob.ModifiedItemsPair>getPossibleCatalogItemPairs(SessionContext ctx, ComposedType type, String additionalQueryRestrictions, int start, int range) Deprecated.Deprecated.Generated method - Getter of theSyncItemJob.rootTypesattribute.getSingleVersionCatalogItems(SessionContext ctx, ComposedType type, String additionalQueryRestrictions, boolean fromSource, int start, int range) Deprecated.Deprecated.Returns a collection containing aSyncAttributeDescriptorConfiginstance for each declared attribute of any catalog item type.protected voidinitializeTimeCounter(SyncItemCronJob cronJob) Deprecated.booleanisAbortable(CronJob conJob) Deprecated.The SyncCatalogVersionJob supports aborting.Deprecated.since ages - please usenewExecution()Deprecated.New execution.protected CronJob.CronJobResultperformCronJob(CronJob cronJob) Deprecated.You have to implement this method in yourJob.protected voidregisterSynchronizedItem(SyncItemCronJob cronjob, Item source, Item copy, String message) Deprecated.Registers a synchronized item pair permanently by creating aChangeDescriptorfor them.voidremove(SessionContext ctx) Deprecated.Removes itsItemSyncTimestampinstances as well.protected voidremoveItem(ItemCopyContext itemCopyContext, SyncItemCronJob cronJob, Item removeItem) Deprecated.protected voidDeprecated.voidsetAllExportAttributeDescriptors(SessionContext ctx, Map syncMap) Deprecated.setter for HMC editor - we just set the 'includedInSync' attributevoidsetRootTypes(SessionContext ctx, List<ComposedType> value) Deprecated.Overwritten to ensure that each root type is a catalog item type.voidsetSyncAttributeConfigurations(SessionContext ctx, Collection param) Deprecated.Generated method - Setter of theSyncItemJob.syncAttributeConfigurationsattribute.toPendingItemsList(List<SyncItemJob.ModifiedItemsPair> itemPairs) Deprecated.toPendingItemsList(List<PK> itemPKs, boolean remove) Deprecated.Methods inherited from class de.hybris.platform.catalog.jalo.GeneratedSyncItemJob
addToRootTypes, addToRootTypes, addToSyncLanguages, addToSyncLanguages, addToSyncPrincipals, addToSyncPrincipals, getAllExportAttributeDescriptors, getDefaultAttributeModes, getEffectiveSyncLanguages, getExecutions, getRootTypes, getRootTypesCount, getRootTypesCount, getSourceVersion, getSourceVersion, getSyncAttributeConfigurations, getSyncLanguages, getSyncLanguages, getSyncLanguagesCount, getSyncLanguagesCount, getSyncOrder, getSyncOrder, getSyncOrderAsPrimitive, getSyncOrderAsPrimitive, getSyncPrincipals, getSyncPrincipals, getSyncPrincipalsCount, getSyncPrincipalsCount, getTargetVersion, getTargetVersion, isCreateNewItems, isCreateNewItems, isCreateNewItemsAsPrimitive, isCreateNewItemsAsPrimitive, isExclusiveMode, isExclusiveMode, isExclusiveModeAsPrimitive, isExclusiveModeAsPrimitive, isMarkModifiedDisabled, isRemoveMissingItems, isRemoveMissingItems, isRemoveMissingItemsAsPrimitive, isRemoveMissingItemsAsPrimitive, isSyncPrincipalsOnly, isSyncPrincipalsOnly, isSyncPrincipalsOnlyAsPrimitive, isSyncPrincipalsOnlyAsPrimitive, removeFromRootTypes, removeFromRootTypes, removeFromSyncLanguages, removeFromSyncLanguages, removeFromSyncPrincipals, removeFromSyncPrincipals, setAllExportAttributeDescriptors, setCreateNewItems, setCreateNewItems, setCreateNewItems, setCreateNewItems, setExclusiveMode, setExclusiveMode, setExclusiveMode, setExclusiveMode, setRemoveMissingItems, setRemoveMissingItems, setRemoveMissingItems, setRemoveMissingItems, setRootTypes, setSourceVersion, setSourceVersion, setSyncAttributeConfigurations, setSyncLanguages, setSyncLanguages, setSyncOrder, setSyncOrder, setSyncOrder, setSyncOrder, setSyncPrincipals, setSyncPrincipals, setSyncPrincipalsOnly, setSyncPrincipalsOnly, setSyncPrincipalsOnly, setSyncPrincipalsOnly, setTargetVersion, setTargetVersionMethods inherited from class de.hybris.platform.cronjob.jalo.Job
canPerform, checkRemovable, configureCronjob, createLogContext, debug, error, fatal, getConfigAttributes, getCronJobsByCode, getCronJobsByCode, getCurrentLogContainer, getEffectiveLogLevel, getNonInitialAttributes, info, isDebugEnabled, isEnabledFor, isErrorEnabled, isInfoEnabled, isPerformable, isPerformable, isUndoable, isWarnEnabled, jobIsCurrentlyRunning, log, logToFile, perform, perform, perform, prepareAfterFinishEvent, prepareBeforeStartEvent, saveToLogFile, sendFinishedEvent, sendStartEvent, setCode, setCronJobs, setCurrentLogContainer, setNonInitialAttributes, startOwnSession, stopOwnSession, switchDataSource, undo, undo, undoCronJob, unsetAlternativeDataSource, unsetCurrentLogContainer, warnMethods inherited from class de.hybris.platform.cronjob.jalo.GeneratedJob
addToRestrictions, addToRestrictions, addToTriggers, addToTriggers, getAlternativeDataSourceID, getAlternativeDataSourceID, getCode, getCode, getCronJobs, getCronJobs, getEmailAddress, getEmailAddress, getEmailNotificationTemplate, getEmailNotificationTemplate, getErrorMode, getErrorMode, getLogLevelDatabase, getLogLevelDatabase, getLogLevelFile, getLogLevelFile, getNodeGroup, getNodeGroup, getNodeID, getNodeID, getNodeIDAsPrimitive, getNodeIDAsPrimitive, getNumberOfRetries, getNumberOfRetries, getNumberOfRetriesAsPrimitive, getNumberOfRetriesAsPrimitive, getPriority, getPriority, getPriorityAsPrimitive, getPriorityAsPrimitive, getRestrictions, getRestrictions, getSessionCurrency, getSessionCurrency, getSessionLanguage, getSessionLanguage, getSessionUser, getSessionUser, getTriggers, getTriggers, isActive, isActive, isActiveAsPrimitive, isActiveAsPrimitive, isChangeRecordingEnabled, isChangeRecordingEnabled, isChangeRecordingEnabledAsPrimitive, isChangeRecordingEnabledAsPrimitive, isLogToDatabase, isLogToDatabase, isLogToDatabaseAsPrimitive, isLogToDatabaseAsPrimitive, isLogToFile, isLogToFile, isLogToFileAsPrimitive, isLogToFileAsPrimitive, isRemoveOnExit, isRemoveOnExit, isRemoveOnExitAsPrimitive, isRemoveOnExitAsPrimitive, isRequestAbort, isRequestAbort, isRequestAbortAsPrimitive, isRequestAbortAsPrimitive, isRequestAbortStep, isRequestAbortStep, isRequestAbortStepAsPrimitive, isRequestAbortStepAsPrimitive, isRetry, isRetry, isRetryAsPrimitive, isRetryAsPrimitive, isSendEmail, isSendEmail, isSendEmailAsPrimitive, isSendEmailAsPrimitive, isSingleExecutable, isSingleExecutable, isSingleExecutableAsPrimitive, isSingleExecutableAsPrimitive, isUseReadOnlyDatasource, isUseReadOnlyDatasource, isUseReadOnlyDatasourceAsPrimitive, isUseReadOnlyDatasourceAsPrimitive, removeFromRestrictions, removeFromRestrictions, removeFromTriggers, removeFromTriggers, setActive, setActive, setActive, setActive, setAlternativeDataSourceID, setAlternativeDataSourceID, setChangeRecordingEnabled, setChangeRecordingEnabled, setChangeRecordingEnabled, setChangeRecordingEnabled, setCode, setEmailAddress, setEmailAddress, setEmailNotificationTemplate, setEmailNotificationTemplate, setErrorMode, setErrorMode, setLogLevelDatabase, setLogLevelDatabase, setLogLevelFile, setLogLevelFile, setLogToDatabase, setLogToDatabase, setLogToDatabase, setLogToDatabase, setLogToFile, setLogToFile, setLogToFile, setLogToFile, setNodeGroup, setNodeGroup, setNodeID, setNodeID, setNodeID, setNodeID, setNumberOfRetries, setNumberOfRetries, setNumberOfRetries, setNumberOfRetries, setPriority, setPriority, setPriority, setPriority, setRemoveOnExit, setRemoveOnExit, setRemoveOnExit, setRemoveOnExit, setRequestAbort, setRequestAbort, setRequestAbort, setRequestAbort, setRequestAbortStep, setRequestAbortStep, setRequestAbortStep, setRequestAbortStep, setRestrictions, setRestrictions, setRetry, setRetry, setRetry, setRetry, setSendEmail, setSendEmail, setSendEmail, setSendEmail, setSessionCurrency, setSessionCurrency, setSessionLanguage, setSessionLanguage, setSessionUser, setSessionUser, setSingleExecutable, setSingleExecutable, setSingleExecutable, setSingleExecutable, setTriggers, setTriggers, setUseReadOnlyDatasource, setUseReadOnlyDatasource, setUseReadOnlyDatasource, setUseReadOnlyDatasourceMethods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getRelatedItems, getRelatedItems, setRelatedItemsMethods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertyMethods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyMethods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, 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, getPartOfRemovedSessionMarker, 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, notifyManagerAboutItemRemoval, readResolve, 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, suppressRelation, toString, useTA, writeReplaceMethods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
Field Details
-
START_TIME
Deprecated.- See Also:
-
HIDDEN_ATTRIBUTES
Deprecated.
-
-
Constructor Details
-
SyncItemJob
public SyncItemJob()Deprecated.
-
-
Method Details
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException Deprecated.Superclass method overridden to ensure initial attributesGeneratedSyncItemJob.SOURCEVERSION, andGeneratedSyncItemJob.TARGETVERSION. Additionally it auto-fillsGeneratedJob.CODEin case it is not provided.- Overrides:
createItemin classGeneratedSyncItemJob- Parameters:
ctx- the current session context which this item is created withintype- the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )- Returns:
- the new item instance
- Throws:
JaloBusinessException- indicates an error during creation - any changes will be rollbacked
-
remove
Deprecated.Removes itsItemSyncTimestampinstances as well. Be careful, this may take a while!- Overrides:
removein classJob- Parameters:
ctx- A SessionContext object- Throws:
ConsistencyCheckException- if this item could not be removed for some reason- See Also:
-
removeSyncTimestamps
Deprecated. -
getDefaultRootTypes
Deprecated.Provides the list of default root types. By now these are- Category
- Product
- Media
- Keyword
- PriceRow (global rows only)
- TaxRow (global rows only)
- DiscountRow (global rows only)
- MediaContainer
-
newExecution
Deprecated.Description copied from interface:TriggerableJobNew execution.- Specified by:
newExecutionin interfaceTriggerableJob- Returns:
- the cron job
-
newExcecution
Deprecated.since ages - please usenewExecution() -
getExecutions
Deprecated.Description copied from class:GeneratedSyncItemJobGenerated method - Getter of theSyncItemJob.executionsattribute.- Specified by:
getExecutionsin classGeneratedSyncItemJob- Returns:
- the executions
-
isAbortable
Deprecated.The SyncCatalogVersionJob supports aborting.- Overrides:
isAbortablein classJob- Parameters:
conJob- the current execution of this job.- Returns:
trueif the cronjob is running and the job supports aborting viaGeneratedCronJob.setRequestAbort(boolean)
-
createSyncSessionContext
Deprecated.Returns a newSessionContextwith the following settings.
- LANGUAGE: null
- DISABLE_RESTRICTIONS: false
- DISABLE_RESTRICTION_GROUP_INHERITANCE: false
- USE_FAST_ALGORITHMS: true
- DISABLE_ATTRIBUTE_CHECK: true
- DISABLE_SUBCATEGORY_REMOVALCHECK: true
- DISABLE_SETALLOWEDPRINCIPAL_RECURSIVELY: true
- LANGUAGE_FALLBACK_ENABLED: false
- TRANSACTION_4_ALLATTRIBUTES: false
- Parameters:
cronJob- the assignedSyncItemCronJob- Returns:
- new
SessionContextinstance:
-
initializeTimeCounter
Deprecated. -
getElapsedMillis
Deprecated. -
canUndo
Deprecated.This job does not support undo! -
getDuplicatedCatalogItemsCount
protected int getDuplicatedCatalogItemsCount(SessionContext ctx, CatalogVersion version, SyncItemCronJob cronJob, ComposedType type) Deprecated. -
checkCatalogVersionValidity
protected boolean checkCatalogVersionValidity(SyncItemCronJob cronJob, SyncItemJob.SyncItemCopyContext syncItemCopyContext) Deprecated.Use this method to check if the given catalog version is valid for synchronization. As default this method will check whether or not duplicate product IDs exist or not. If so a error log is created.- Parameters:
cronJob-syncItemCopyContext-- Returns:
- true if the catalog version is valid (and synchronization may use it)
-
createCopyContext
protected ItemCopyContext createCopyContext(SyncItemCronJob cronJob, CatalogVersion srcV, CatalogVersion tgtV, Map<PK, PK> alreadyFinished) Deprecated. -
registerSynchronizedItem
protected void registerSynchronizedItem(SyncItemCronJob cronjob, Item source, Item copy, String message) Deprecated.Registers a synchronized item pair permanently by creating aChangeDescriptorfor them. If the current cronjob is aborted or crashes these changes are loaded on restart so that no item is synchronized twice.Please note that this feature is disabled if change recording is disabled dor the executed chronjob !
- Parameters:
cronjob- theSyncItemCronJobsource- sourceitemcopy- copyitemmessage- a message
-
getSingleVersionCatalogItems
protected List<PK> getSingleVersionCatalogItems(SessionContext ctx, ComposedType type, String additionalQueryRestrictions, boolean fromSource, int start, int range) Deprecated. -
copyItem
protected void copyItem(ItemCopyContext itemCopyContext, SyncItemCronJob cronJob, Item src, Item tgt) Deprecated. -
getModifiedCatalogItemPairs
protected List<SyncItemJob.ModifiedItemsPair> getModifiedCatalogItemPairs(SessionContext ctx, ComposedType type, int start, int range, boolean forceUpdate) Deprecated.- Returns:
- a list of
SyncItemJob.ModifiedItemsPairs.
-
getPossibleCatalogItemPairs
protected List<SyncItemJob.ModifiedItemsPair> getPossibleCatalogItemPairs(SessionContext ctx, ComposedType type, String additionalQueryRestrictions, int start, int range) Deprecated.- Returns:
- a list of
SyncItemJob.ModifiedItemsPairs.
-
removeItem
protected void removeItem(ItemCopyContext itemCopyContext, SyncItemCronJob cronJob, Item removeItem) Deprecated. -
getMissingTargetItems
protected Set<Item> getMissingTargetItems(Collection<? extends Item> sourceItems, Collection<? extends Item> targetItems, CatalogVersion sourceVersion) Deprecated. -
addCatalogItemsToSync
Deprecated.Added any catalog item except categories to a syncronization.- Parameters:
cronJob- the synchronization cronjobitems- the items to add
-
addCategoriesToSync
public void addCategoriesToSync(SyncItemCronJob cronJob, Collection<? extends Category> categories, boolean includeSubcategories, boolean includeProducts) Deprecated. -
configureFullVersionSync
Deprecated.Collects all changes between the source and target version of this job. Depending whether or not new item creation and missing item removal has been configured new (source version) items and missing (source version) items are scheduled too. -
getAdditionalQueryRestrictions
protected String getAdditionalQueryRestrictions(SessionContext ctx, ComposedType rootType, SyncItemCronJob cronJob) Deprecated. -
toPendingItemsList
Deprecated. -
toPendingItemsList
Deprecated. -
configureFullSyncForItemType
protected void configureFullSyncForItemType(SessionContext ctx, SyncItemCronJob cronJob, ComposedType type, String additionalQueryRestrictions, boolean removeMissing, boolean createNew, boolean forceUpdate, int range) Deprecated.Configures a full synchronization of the items of a given type according to the specified sync cronjob settings.- Parameters:
ctx- the enclosing session contextcronJob- the sync cronjob (among others) holding source and target versiontype- the item type specifying which items should be synchronizedadditionalQueryRestrictions- flexible search WHERE parameters to be considered when querying new, removed or possible item pairs when scheduling synchronizationremoveMissing- iftrueall items are removed which still exist in target version but do not exist in source versioncreateNew- iftruenew items are created with the target version if the exist in source versionforceUpdate- iftruethe process will include even item pairs which are considered up to daterange- if > 0 this parameter enables paging logic while collecting items via flexible search; otherwise all matches are processed at once ( read as PK so no actual item is loaded into memory! )
-
getCompletionInfo
Deprecated. -
performCronJob
Deprecated.Description copied from class:JobYou have to implement this method in yourJob. Here you can execute the job. You have to return aCronJobResultthat indicates whether theJobwas successfully executed or not.- Specified by:
performCronJobin classJob- Parameters:
cronJob- the CronJob to execute- Returns:
- a
CronJobResultthat indicates whether theJobwas successfully executed or not. - See Also:
-
doSynchronization
protected boolean doSynchronization(SyncItemJob.SyncItemCopyContext syncItemCopyContext, SyncItemCronJob cronJob) throws AbortCronJobException Deprecated.Executes actual synchronization.- Parameters:
syncItemCopyContext- the copy contextcronJob- the cronjob- Returns:
- true if no (ignored) errors occured, false otherwise
- Throws:
AbortCronJobException- if the cronjob has been set to be aborted during execution
-
doAbort
Deprecated.This method is called if abort is requested by the user while still executing this job.- Parameters:
cronJob- the currently executing cronjob- Returns:
- the abort cronjob result
-
canSelectAttribute
Deprecated. -
getAllExportAttributeDescriptors
Deprecated.Getter for HMC editor - we pass a map { AttributeDescriptor -> Boolean }- Specified by:
getAllExportAttributeDescriptorsin classGeneratedSyncItemJob- Returns:
- the exportAttributeDescriptors
-
setAllExportAttributeDescriptors
Deprecated.setter for HMC editor - we just set the 'includedInSync' attribute- Specified by:
setAllExportAttributeDescriptorsin classGeneratedSyncItemJob- Parameters:
syncMap- Map<AttributeDescriptor,Boolean>
-
configAlreadyExists
Deprecated. -
getConfigFor
public SyncAttributeDescriptorConfig getConfigFor(AttributeDescriptor attributeDescriptor, boolean createOnDemand) Deprecated.Returns theSyncAttributeDescriptorConfiginstance which is responsible for all publication settings of the specified attribute descriptor.Please note that the attribute descriptor cannot be a inherited one because publication settings are generally stored for declared attributes only!
- Parameters:
attributeDescriptor- the attribute descriptor to get settings item forcreateOnDemand- iftrueand no settings item exists create one
-
getConfigFor
public SyncAttributeDescriptorConfig getConfigFor(SessionContext ctx, AttributeDescriptor attributeDescriptor, boolean createOnDemand) Deprecated.Returns theSyncAttributeDescriptorConfiginstance which is responsible for all publication settings of the specified attribute descriptor.Please note that the attribute descriptor cannot be a inherited one because publication settings are generally stored for declared attributes only!
- Parameters:
ctx- the enclosing session contextattributeDescriptor- the attribute descriptor to get settings item forcreateOnDemand- iftrueand no settings item exists create one
-
getAttributeAndConfigPairs
Deprecated.Returns [AttributeDescriptor,SyncAttributeDescriptorConfig] pairs for all existing declared attribute descriptors and their sync config item if it exists for this job. Otherwise the second entry is null. -
createDefaultConfigFor
protected SyncAttributeDescriptorConfig createDefaultConfigFor(SessionContext ctx, AttributeDescriptor attributeDescriptor) Deprecated. -
getSyncAttributeConfigurations
Deprecated.Returns a collection containing aSyncAttributeDescriptorConfiginstance for each declared attribute of any catalog item type.There is no need to create them explicitly since this method creates them on demand.
- Specified by:
getSyncAttributeConfigurationsin classGeneratedSyncItemJob- Returns:
- the syncAttributeConfigurations
-
setSyncAttributeConfigurations
Deprecated.Description copied from class:GeneratedSyncItemJobGenerated method - Setter of theSyncItemJob.syncAttributeConfigurationsattribute.- Specified by:
setSyncAttributeConfigurationsin classGeneratedSyncItemJobparam- the syncAttributeConfigurations
-
getRootTypes
Deprecated.Description copied from class:GeneratedSyncItemJobGenerated method - Getter of theSyncItemJob.rootTypesattribute.- Overrides:
getRootTypesin classGeneratedSyncItemJob- Returns:
- the rootTypes
-
assureCatalogItemTypes
Deprecated. -
setRootTypes
Deprecated.Overwritten to ensure that each root type is a catalog item type.- Overrides:
setRootTypesin classGeneratedSyncItemJobvalue- the rootTypes- See Also:
-
getEffectiveSyncLanguages
Deprecated.Calculates current effective sync languages. This is either the collection fromGeneratedSyncItemJob.getSyncLanguages()or, if empty, the intersection of source version languages and target version languages.- Specified by:
getEffectiveSyncLanguagesin classGeneratedSyncItemJob- Returns:
- the effectiveSyncLanguages
-
CatalogVersionSyncJobinstead