Class CatalogVersionSyncJob
- java.lang.Object
-
- de.hybris.platform.util.BridgeAbstraction
-
- de.hybris.platform.jalo.Item
-
- de.hybris.platform.jalo.ExtensibleItem
-
- de.hybris.platform.jalo.c2l.LocalizableItem
-
- de.hybris.platform.jalo.GenericItem
-
- de.hybris.platform.cronjob.jalo.GeneratedJob
-
- de.hybris.platform.cronjob.jalo.Job
-
- de.hybris.platform.catalog.jalo.GeneratedSyncItemJob
-
- de.hybris.platform.catalog.jalo.SyncItemJob
-
- de.hybris.platform.catalog.jalo.synchronization.GeneratedCatalogVersionSyncJob
-
- de.hybris.platform.catalog.jalo.synchronization.CatalogVersionSyncJob
-
- All Implemented Interfaces:
TriggerableJob,java.io.Serializable,java.lang.Comparable
- Direct Known Subclasses:
NewSyncRestrictionsTest.TestCustomCatalogVersionSyncJob
public class CatalogVersionSyncJob extends GeneratedCatalogVersionSyncJob
Superclass for job which synchronizes content of a catalog version to another catalog version.- Since:
- 3.1-u6
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.catalog.jalo.SyncItemJob
SyncItemJob.CompletionInfo, SyncItemJob.ModifiedItemsPair, SyncItemJob.SyncAttributeDescriptorConfigData, SyncItemJob.SyncItemCopyContext
-
Nested classes/interfaces inherited from class de.hybris.platform.cronjob.jalo.Job
Job.JobFileLogContainer, Job.Synchronicity
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImpl
-
Nested 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
-
Fields inherited from class de.hybris.platform.catalog.jalo.synchronization.GeneratedCatalogVersionSyncJob
COPYCACHESIZE, DEFAULT_INITIAL_ATTRIBUTES, DEPENDENTCATALOGVERSIONSYNCJOBRELATION_MARKMODIFIED, DEPENDENTCATALOGVERSIONSYNCJOBRELATION_SRC_ORDERED, DEPENDENTCATALOGVERSIONSYNCJOBRELATION_TGT_ORDERED, DEPENDENTSYNCJOBS, DEPENDSONSYNCJOBS, ENABLETRANSACTIONS, MAXSCHEDULERTHREADS, MAXTHREADS
-
Fields inherited from class de.hybris.platform.catalog.jalo.SyncItemJob
HIDDEN_ATTRIBUTES, START_TIME
-
Fields inherited from class de.hybris.platform.catalog.jalo.GeneratedSyncItemJob
CREATENEWITEMS, 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, TARGETVERSIONHANDLER
-
Fields inherited from class de.hybris.platform.cronjob.jalo.Job
CTX_CURRENTCRONJOB, CTX_CURRENTJOB
-
Fields inherited from class de.hybris.platform.cronjob.jalo.GeneratedJob
ACTIVE, ALTERNATIVEDATASOURCEID, CHANGERECORDINGENABLED, CODE, CRONJOBS, CRONJOBSHANDLER, EMAILADDRESS, EMAILNOTIFICATIONTEMPLATE, ERRORMODE, LOGLEVELDATABASE, LOGLEVELFILE, LOGTODATABASE, LOGTOFILE, NODEGROUP, NODEID, PRIORITY, REMOVEONEXIT, REQUESTABORT, REQUESTABORTSTEP, RESTRICTIONS, RESTRICTIONSHANDLER, RETRY, SENDEMAIL, SESSIONCONTEXTVALUES, SESSIONCURRENCY, SESSIONLANGUAGE, SESSIONUSER, SINGLEEXECUTABLE, TRIGGERS, TRIGGERSHANDLER
-
Fields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLED
-
Fields 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, TYPE
-
Fields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant
-
-
Constructor Summary
Constructors Constructor Description CatalogVersionSyncJob()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidabortWhenConfigured(CatalogVersionSyncCronJob cronJob)voidaddCatalogItemsToSync(SyncItemCronJob _cj, java.util.Collection<? extends Item> items)Added any catalog item except categories to a syncronization.voidaddCategoriesToSync(SyncItemCronJob _cj, java.util.Collection<? extends Category> categories, boolean includeSubcategories, boolean includeProducts)protected booleancanPerform(CronJob cronJob)This method is called before aJobis performed.protected booleancheckCatalogVersionValidity(CatalogVersionSyncCronJob cronJob)Use this method to check if the given catalog version is valid for synchronization.protected booleancheckDependentJobsValidity()protected voidcloseSyncWriter(SyncScheduleWriter syncScheduleWriter)voidconfigureFullVersionSync(SyncItemCronJob cronJob)Collects all changes between the source and target version of this job.protected CatalogVersionSyncCopyContextcreateCopyContext(CatalogVersionSyncCronJob catalogVersionSyncCronJob, CatalogVersionSyncWorker worker)protected SessionContextcreateSyncSessionContext(SyncItemCronJob cronJob)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 booleandoSynchronization(SyncItemJob.SyncItemCopyContext syncItemCopyContext, SyncItemCronJob cronJob)Executes actual synchronization.protected java.util.List<java.util.List>getAttributeAndConfigPairs()Returns [AttributeDescriptor,SyncAttributeDescriptorConfig] pairs for all existing declared attribute descriptors and their sync config item if it exists for this job.SyncItemJob.CompletionInfogetCompletionInfo(SyncItemCronJob cronJob)java.lang.IntegergetCopyCacheSize(SessionContext ctx)Generated method - Getter of theCatalogVersionSyncJob.copyCacheSizeattribute.static intgetDefaultMaxThreads(Tenant tenant)java.lang.IntegergetMaxSchedulerThreads(SessionContext ctx)Generated method - Getter of theCatalogVersionSyncJob.maxSchedulerThreadsattribute.java.lang.IntegergetMaxThreads(SessionContext ctx)Generated method - Getter of theCatalogVersionSyncJob.maxThreadsattribute.java.lang.BooleanisEnableTransactions(SessionContext ctx)Generated method - Getter of theCatalogVersionSyncJob.enableTransactionsattribute.booleanisPerformable(CronJob cronJob)Tests whether the given CronJob instance can be performed.SyncItemCronJobnewExecution()New execution.protected CronJob.CronJobResultperformCronJob(CronJob cronJob)You have to implement this method in yourJob.voidsetCopyCacheSize(SessionContext ctx, java.lang.Integer size)Generated method - Setter of theCatalogVersionSyncJob.copyCacheSizeattribute.voidsetEnableTransactions(SessionContext ctx, java.lang.Boolean enableTransaction)Generated method - Setter of theCatalogVersionSyncJob.enableTransactionsattribute.voidsetMaxSchedulerThreads(SessionContext ctx, java.lang.Integer maxSchedulerThreads)Generated method - Setter of theCatalogVersionSyncJob.maxSchedulerThreadsattribute.voidsetMaxThreads(SessionContext ctx, java.lang.Integer maxThreads)Generated method - Setter of theCatalogVersionSyncJob.maxThreadsattribute.-
Methods inherited from class de.hybris.platform.catalog.jalo.synchronization.GeneratedCatalogVersionSyncJob
addToDependentSyncJobs, addToDependentSyncJobs, addToDependsOnSyncJobs, addToDependsOnSyncJobs, getCopyCacheSize, getCopyCacheSizeAsPrimitive, getCopyCacheSizeAsPrimitive, getDefaultAttributeModes, getDependentSyncJobs, getDependentSyncJobs, getDependentSyncJobsCount, getDependentSyncJobsCount, getDependsOnSyncJobs, getDependsOnSyncJobs, getDependsOnSyncJobsCount, getDependsOnSyncJobsCount, getMaxSchedulerThreads, getMaxSchedulerThreadsAsPrimitive, getMaxSchedulerThreadsAsPrimitive, getMaxThreads, getMaxThreadsAsPrimitive, getMaxThreadsAsPrimitive, isEnableTransactions, isEnableTransactionsAsPrimitive, isEnableTransactionsAsPrimitive, isMarkModifiedDisabled, removeFromDependentSyncJobs, removeFromDependentSyncJobs, removeFromDependsOnSyncJobs, removeFromDependsOnSyncJobs, setCopyCacheSize, setCopyCacheSize, setCopyCacheSize, setDependentSyncJobs, setDependentSyncJobs, setDependsOnSyncJobs, setDependsOnSyncJobs, setEnableTransactions, setEnableTransactions, setEnableTransactions, setMaxSchedulerThreads, setMaxSchedulerThreads, setMaxSchedulerThreads, setMaxThreads, setMaxThreads, setMaxThreads
-
Methods inherited from class de.hybris.platform.catalog.jalo.SyncItemJob
assureCatalogItemTypes, canSelectAttribute, canUndo, checkCatalogVersionValidity, configAlreadyExists, configureFullSyncForItemType, copyItem, createCopyContext, createDefaultConfigFor, createItem, doAbort, getAdditionalQueryRestrictions, getAllExportAttributeDescriptors, getConfigFor, getConfigFor, getDefaultRootTypes, getDuplicatedCatalogItemsCount, getEffectiveSyncLanguages, getElapsedMillis, getExecutions, getMissingTargetItems, getModifiedCatalogItemPairs, getPossibleCatalogItemPairs, getRootTypes, getSingleVersionCatalogItems, getSyncAttributeConfigurations, initializeTimeCounter, isAbortable, newExcecution, registerSynchronizedItem, remove, removeItem, removeSyncTimestamps, setAllExportAttributeDescriptors, setRootTypes, setSyncAttributeConfigurations, toPendingItemsList, toPendingItemsList
-
Methods inherited from class de.hybris.platform.catalog.jalo.GeneratedSyncItemJob
addToRootTypes, addToRootTypes, addToSyncLanguages, addToSyncLanguages, addToSyncPrincipals, addToSyncPrincipals, getAllExportAttributeDescriptors, 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, 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, setTargetVersion
-
Methods inherited from class de.hybris.platform.cronjob.jalo.Job
checkRemovable, configureCronjob, createLogContext, debug, error, fatal, getConfigAttributes, getCronJobsByCode, getCronJobsByCode, getCurrentLogContainer, getEffectiveLogLevel, getNonInitialAttributes, info, isDebugEnabled, isEnabledFor, isErrorEnabled, isInfoEnabled, 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, warn
-
Methods 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, 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, 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, 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
-
Methods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getRelatedItems, getRelatedItems, setRelatedItems
-
Methods 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, setLocalizedProperty
-
Methods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setProperty
-
Methods 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, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Method Detail
-
newExecution
public SyncItemCronJob newExecution()
Description copied from interface:TriggerableJobNew execution.- Specified by:
newExecutionin interfaceTriggerableJob- Overrides:
newExecutionin classSyncItemJob- Returns:
- the cron job
-
checkDependentJobsValidity
protected boolean checkDependentJobsValidity()
-
checkCatalogVersionValidity
protected boolean checkCatalogVersionValidity(CatalogVersionSyncCronJob cronJob)
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-- Returns:
- true if the catalog version is valid (and synchronization may use it)
-
createSyncSessionContext
protected SessionContext createSyncSessionContext(SyncItemCronJob cronJob)
Description copied from class:SyncItemJobReturns 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
- Overrides:
createSyncSessionContextin classSyncItemJob- Parameters:
cronJob- the assignedSyncItemCronJob- Returns:
- new
SessionContextinstance:
-
canPerform
protected boolean canPerform(CronJob cronJob)
Description copied from class:JobThis method is called before aJobis performed. If you override this method you can check the things that are necessary for the performing of yourJob. Default value istrue.- Overrides:
canPerformin classJob- Parameters:
cronJob- the actualCronJob- Returns:
trueif thisJobis performable,falseotherwise. de.hybris.platform.servicelayer.cronjob.CronJobService
-
abortWhenConfigured
protected void abortWhenConfigured(CatalogVersionSyncCronJob cronJob)
-
addCatalogItemsToSync
public void addCatalogItemsToSync(SyncItemCronJob _cj, java.util.Collection<? extends Item> items)
Description copied from class:SyncItemJobAdded any catalog item except categories to a syncronization.- Overrides:
addCatalogItemsToSyncin classSyncItemJob- Parameters:
_cj- the synchronization cronjobitems- the items to add
-
addCategoriesToSync
public void addCategoriesToSync(SyncItemCronJob _cj, java.util.Collection<? extends Category> categories, boolean includeSubcategories, boolean includeProducts)
- Overrides:
addCategoriesToSyncin classSyncItemJob
-
closeSyncWriter
protected void closeSyncWriter(SyncScheduleWriter syncScheduleWriter)
-
configureFullVersionSync
public void configureFullVersionSync(SyncItemCronJob cronJob)
Description copied from class:SyncItemJobCollects 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.- Overrides:
configureFullVersionSyncin classSyncItemJob
-
getCompletionInfo
public SyncItemJob.CompletionInfo getCompletionInfo(SyncItemCronJob cronJob)
- Overrides:
getCompletionInfoin classSyncItemJob
-
isPerformable
public boolean isPerformable(CronJob cronJob)
Description copied from class:JobTests whether the given CronJob instance can be performed. Internal the methodscanPerform( final CronJob cronJob )and canPerformInternal( final CronJob cronJob ) are called. Only if both methods returningtrue, this method also returntrueReturnstrue, if thisJobcan be performed using the specifiedCronjob. Otherwisefalseis returned.- Overrides:
isPerformablein classJob- Parameters:
cronJob- which should be performed- Returns:
true, if thisJobcan be performed using the specifiedCronjob. Otherwisefalseis returned
-
performCronJob
protected CronJob.CronJobResult performCronJob(CronJob cronJob)
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.- Overrides:
performCronJobin classSyncItemJob- Parameters:
cronJob- the CronJob to execute- Returns:
- a
CronJobResultthat indicates whether theJobwas successfully executed or not. - See Also:
CronJob.getFinishedResult(boolean),CronJob.getAbortResult()
-
setEnableTransactions
public void setEnableTransactions(SessionContext ctx, java.lang.Boolean enableTransaction)
Description copied from class:GeneratedCatalogVersionSyncJobGenerated method - Setter of theCatalogVersionSyncJob.enableTransactionsattribute.- Overrides:
setEnableTransactionsin classGeneratedCatalogVersionSyncJobenableTransaction- the enableTransactions
-
isEnableTransactions
public java.lang.Boolean isEnableTransactions(SessionContext ctx)
Description copied from class:GeneratedCatalogVersionSyncJobGenerated method - Getter of theCatalogVersionSyncJob.enableTransactionsattribute.- Overrides:
isEnableTransactionsin classGeneratedCatalogVersionSyncJob- Returns:
- the enableTransactions
-
setCopyCacheSize
public void setCopyCacheSize(SessionContext ctx, java.lang.Integer size)
Description copied from class:GeneratedCatalogVersionSyncJobGenerated method - Setter of theCatalogVersionSyncJob.copyCacheSizeattribute.- Overrides:
setCopyCacheSizein classGeneratedCatalogVersionSyncJobsize- the copyCacheSize
-
getCopyCacheSize
public java.lang.Integer getCopyCacheSize(SessionContext ctx)
Description copied from class:GeneratedCatalogVersionSyncJobGenerated method - Getter of theCatalogVersionSyncJob.copyCacheSizeattribute.- Overrides:
getCopyCacheSizein classGeneratedCatalogVersionSyncJob- Returns:
- the copyCacheSize
-
doSynchronization
protected boolean doSynchronization(SyncItemJob.SyncItemCopyContext syncItemCopyContext, SyncItemCronJob cronJob) throws AbortCronJobException
Description copied from class:SyncItemJobExecutes actual synchronization.- Overrides:
doSynchronizationin classSyncItemJob- 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
-
setMaxThreads
public void setMaxThreads(SessionContext ctx, java.lang.Integer maxThreads)
Description copied from class:GeneratedCatalogVersionSyncJobGenerated method - Setter of theCatalogVersionSyncJob.maxThreadsattribute.- Overrides:
setMaxThreadsin classGeneratedCatalogVersionSyncJobmaxThreads- the maxThreads
-
setMaxSchedulerThreads
public void setMaxSchedulerThreads(SessionContext ctx, java.lang.Integer maxSchedulerThreads)
Description copied from class:GeneratedCatalogVersionSyncJobGenerated method - Setter of theCatalogVersionSyncJob.maxSchedulerThreadsattribute.- Overrides:
setMaxSchedulerThreadsin classGeneratedCatalogVersionSyncJobmaxSchedulerThreads- the maxSchedulerThreads
-
getMaxThreads
public java.lang.Integer getMaxThreads(SessionContext ctx)
Description copied from class:GeneratedCatalogVersionSyncJobGenerated method - Getter of theCatalogVersionSyncJob.maxThreadsattribute.- Overrides:
getMaxThreadsin classGeneratedCatalogVersionSyncJob- Returns:
- the maxThreads
-
getMaxSchedulerThreads
public java.lang.Integer getMaxSchedulerThreads(SessionContext ctx)
Description copied from class:GeneratedCatalogVersionSyncJobGenerated method - Getter of theCatalogVersionSyncJob.maxSchedulerThreadsattribute.- Overrides:
getMaxSchedulerThreadsin classGeneratedCatalogVersionSyncJob- Returns:
- the maxSchedulerThreads
-
getDefaultMaxThreads
public static int getDefaultMaxThreads(Tenant tenant)
-
getAttributeAndConfigPairs
protected java.util.List<java.util.List> getAttributeAndConfigPairs()
Description copied from class:SyncItemJobReturns [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.- Overrides:
getAttributeAndConfigPairsin classSyncItemJob
-
createCopyContext
protected CatalogVersionSyncCopyContext createCopyContext(CatalogVersionSyncCronJob catalogVersionSyncCronJob, CatalogVersionSyncWorker worker)
-
-