CatalogVersionSyncJob instead@Deprecated public class SyncItemJob extends GeneratedSyncItemJob implements TriggerableJob
| Modifier and Type | Class and Description |
|---|---|
static class |
SyncItemJob.CompletionInfo
Deprecated.
CompletionInfo
|
static class |
SyncItemJob.ModifiedItemsPair
Deprecated.
ModifiedItemsPair
|
static class |
SyncItemJob.SyncAttributeDescriptorConfigData
Deprecated.
|
class |
SyncItemJob.SyncItemCopyContext
Deprecated.
Own copy context from inside the job.
|
Job.JobFileLogContainer, Job.SynchronicityGenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<java.lang.String> |
HIDDEN_ATTRIBUTES
Deprecated.
|
protected static java.lang.String |
START_TIME
Deprecated.
|
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, TARGETVERSIONHANDLERCTX_CURRENTCRONJOB, CTX_CURRENTJOBACTIVE, 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, TRIGGERSHANDLERLANGUAGE_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 |
|---|
SyncItemJob()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCatalogItemsToSync(SyncItemCronJob cronJob,
java.util.Collection<? extends Item> items)
Deprecated.
Added any catalog item except categories to a syncronization.
|
void |
addCategoriesToSync(SyncItemCronJob cronJob,
java.util.Collection<? extends Category> categories,
boolean includeSubcategories,
boolean includeProducts)
Deprecated.
|
protected java.util.List<ComposedType> |
assureCatalogItemTypes(java.util.List<ComposedType> types)
Deprecated.
|
protected boolean |
canSelectAttribute(AttributeDescriptor attributeDescriptor)
Deprecated.
|
protected boolean |
canUndo(CronJob cronJob)
Deprecated.
This job does not support undo!
|
protected boolean |
checkCatalogVersionValidity(SyncItemCronJob cronJob,
SyncItemJob.SyncItemCopyContext syncItemCopyContext)
Deprecated.
Use this method to check if the given catalog version is valid for synchronization.
|
protected boolean |
configAlreadyExists(AttributeDescriptor attributeDescriptor)
Deprecated.
|
protected void |
configureFullSyncForItemType(SessionContext ctx,
SyncItemCronJob cronJob,
ComposedType type,
java.lang.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.
|
void |
configureFullVersionSync(SyncItemCronJob cronJob)
Deprecated.
Collects all changes between the source and target version of this job.
|
protected void |
copyItem(ItemCopyContext itemCopyContext,
SyncItemCronJob cronJob,
Item src,
Item tgt)
Deprecated.
|
protected ItemCopyContext |
createCopyContext(SyncItemCronJob cronJob,
CatalogVersion srcV,
CatalogVersion tgtV,
java.util.Map<PK,PK> alreadyFinished)
Deprecated.
|
protected SyncAttributeDescriptorConfig |
createDefaultConfigFor(SessionContext ctx,
AttributeDescriptor attributeDescriptor)
Deprecated.
|
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
Deprecated.
Superclass method overridden to ensure initial attributes
GeneratedSyncItemJob.SOURCEVERSION, and
GeneratedSyncItemJob.TARGETVERSION. |
protected SessionContext |
createSyncSessionContext(SyncItemCronJob cronJob)
Deprecated.
Returns a new
SessionContext with 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 |
protected CronJob.CronJobResult |
doAbort(SyncItemCronJob cronJob)
Deprecated.
This method is called if abort is requested by the user while still executing this job.
|
protected boolean |
doSynchronization(SyncItemJob.SyncItemCopyContext syncItemCopyContext,
SyncItemCronJob cronJob)
Deprecated.
Executes actual synchronization.
|
protected java.lang.String |
getAdditionalQueryRestrictions(SessionContext ctx,
ComposedType rootType,
SyncItemCronJob cronJob)
Deprecated.
|
java.util.Map<AttributeDescriptor,java.lang.Boolean> |
getAllExportAttributeDescriptors(SessionContext ctx)
Deprecated.
Getter for HMC editor - we pass a map { AttributeDescriptor -> Boolean }
|
protected java.util.List<java.util.List> |
getAttributeAndConfigPairs()
Deprecated.
Returns [
AttributeDescriptor,SyncAttributeDescriptorConfig] pairs for all existing
declared attribute descriptors and their sync config item if it exists for this job. |
SyncItemJob.CompletionInfo |
getCompletionInfo(SyncItemCronJob cronJob)
Deprecated.
|
SyncAttributeDescriptorConfig |
getConfigFor(AttributeDescriptor attributeDescriptor,
boolean createOnDemand)
Deprecated.
Returns the
SyncAttributeDescriptorConfig instance which is responsible for all publication settings of
the specified attribute descriptor. |
SyncAttributeDescriptorConfig |
getConfigFor(SessionContext ctx,
AttributeDescriptor attributeDescriptor,
boolean createOnDemand)
Deprecated.
Returns the
SyncAttributeDescriptorConfig instance which is responsible for all publication settings of
the specified attribute descriptor. |
static java.util.List<ComposedType> |
getDefaultRootTypes()
Deprecated.
Provides the list of default root types.
|
protected int |
getDuplicatedCatalogItemsCount(SessionContext ctx,
CatalogVersion version,
SyncItemCronJob cronJob,
ComposedType type)
Deprecated.
|
java.util.Collection<Language> |
getEffectiveSyncLanguages(SessionContext ctx)
Deprecated.
Calculates current effective sync languages.
|
long |
getElapsedMillis(SyncItemCronJob cronJob)
Deprecated.
|
java.util.Collection |
getExecutions(SessionContext ctx)
Deprecated.
Generated method - Getter of the
SyncItemJob.executions attribute. |
protected java.util.Set<Item> |
getMissingTargetItems(java.util.Collection<? extends Item> sourceItems,
java.util.Collection<? extends Item> targetItems,
CatalogVersion sourceVersion)
Deprecated.
|
protected java.util.List<SyncItemJob.ModifiedItemsPair> |
getModifiedCatalogItemPairs(SessionContext ctx,
ComposedType type,
int start,
int range,
boolean forceUpdate)
Deprecated.
|
protected java.util.List<SyncItemJob.ModifiedItemsPair> |
getPossibleCatalogItemPairs(SessionContext ctx,
ComposedType type,
java.lang.String additionalQueryRestrictions,
int start,
int range)
Deprecated.
|
java.util.List<ComposedType> |
getRootTypes(SessionContext ctx)
Deprecated.
Generated method - Getter of the
SyncItemJob.rootTypes attribute. |
protected java.util.List<PK> |
getSingleVersionCatalogItems(SessionContext ctx,
ComposedType type,
java.lang.String additionalQueryRestrictions,
boolean fromSource,
int start,
int range)
Deprecated.
|
java.util.Collection<SyncAttributeDescriptorConfig> |
getSyncAttributeConfigurations(SessionContext ctx)
Deprecated.
Returns a collection containing a
SyncAttributeDescriptorConfig instance for each declared attribute of
any catalog item type. |
protected void |
initializeTimeCounter(SyncItemCronJob cronJob)
Deprecated.
|
boolean |
isAbortable(CronJob conJob)
Deprecated.
The SyncCatalogVersionJob supports aborting.
|
SyncItemCronJob |
newExcecution()
Deprecated.
since ages - please use
newExecution() |
SyncItemCronJob |
newExecution()
Deprecated.
New execution.
|
protected CronJob.CronJobResult |
performCronJob(CronJob cronJob)
Deprecated.
You have to implement this method in your
Job. |
protected void |
registerSynchronizedItem(SyncItemCronJob cronjob,
Item source,
Item copy,
java.lang.String message)
Deprecated.
Registers a synchronized item pair permanently by creating a
ChangeDescriptorfor them. |
void |
remove(SessionContext ctx)
Deprecated.
Removes its
ItemSyncTimestamp instances as well. |
protected void |
removeItem(ItemCopyContext itemCopyContext,
SyncItemCronJob cronJob,
Item removeItem)
Deprecated.
|
protected void |
removeSyncTimestamps(SessionContext ctx)
Deprecated.
|
void |
setAllExportAttributeDescriptors(SessionContext ctx,
java.util.Map syncMap)
Deprecated.
setter for HMC editor - we just set the 'includedInSync' attribute
|
void |
setRootTypes(SessionContext ctx,
java.util.List<ComposedType> value)
Deprecated.
Overwritten to ensure that each root type is a catalog item type.
|
void |
setSyncAttributeConfigurations(SessionContext ctx,
java.util.Collection param)
Deprecated.
Generated method - Setter of the
SyncItemJob.syncAttributeConfigurations attribute. |
protected java.util.List<PK[]> |
toPendingItemsList(java.util.List<PK> itemPKs,
boolean remove)
Deprecated.
|
protected java.util.List<PK[]> |
toPendingItemsList(java.util.List<SyncItemJob.ModifiedItemsPair> itemPairs)
Deprecated.
|
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, setTargetVersioncanPerform, 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, warnaddToRestrictions, 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, setTriggersgetInitialPropertiesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getImplementation, 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, 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, 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, toString, useTA, writeReplacesetTenantprotected static final java.lang.String START_TIME
public static final java.util.Set<java.lang.String> HIDDEN_ATTRIBUTES
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
GeneratedSyncItemJob.SOURCEVERSION, and
GeneratedSyncItemJob.TARGETVERSION. Additionally it auto-fills
GeneratedJob.CODEin case it is not provided.createItem in class GeneratedSyncItemJobctx - 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 )JaloBusinessException - indicates an error during creation - any changes will be rollbackedpublic void remove(SessionContext ctx) throws ConsistencyCheckException
ItemSyncTimestamp instances as well. Be careful, this may take a while!remove in class Jobctx - A SessionContext objectConsistencyCheckException - if this item could not be removed for some reasonItem.remove(de.hybris.platform.jalo.SessionContext)protected void removeSyncTimestamps(SessionContext ctx)
public static java.util.List<ComposedType> getDefaultRootTypes()
public SyncItemCronJob newExecution()
TriggerableJobnewExecution in interface TriggerableJob@Deprecated public SyncItemCronJob newExcecution()
newExecution()public java.util.Collection getExecutions(SessionContext ctx)
GeneratedSyncItemJobSyncItemJob.executions attribute.getExecutions in class GeneratedSyncItemJobpublic boolean isAbortable(CronJob conJob)
isAbortable in class JobconJob - the current execution of this job.true if the cronjob is running and the job supports aborting via
GeneratedCronJob.setRequestAbort(boolean)protected SessionContext createSyncSessionContext(SyncItemCronJob cronJob)
SessionContext with the following settings.cronJob - the assigned SyncItemCronJobSessionContext instance:protected void initializeTimeCounter(SyncItemCronJob cronJob)
public long getElapsedMillis(SyncItemCronJob cronJob)
protected boolean canUndo(CronJob cronJob)
protected int getDuplicatedCatalogItemsCount(SessionContext ctx, CatalogVersion version, SyncItemCronJob cronJob, ComposedType type)
protected boolean checkCatalogVersionValidity(SyncItemCronJob cronJob, SyncItemJob.SyncItemCopyContext syncItemCopyContext)
cronJob - syncItemCopyContext - protected ItemCopyContext createCopyContext(SyncItemCronJob cronJob, CatalogVersion srcV, CatalogVersion tgtV, java.util.Map<PK,PK> alreadyFinished)
protected void registerSynchronizedItem(SyncItemCronJob cronjob, Item source, Item copy, java.lang.String message)
ChangeDescriptorfor 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 !
cronjob - the SyncItemCronJobsource - sourceitemcopy - copyitemmessage - a messageprotected java.util.List<PK> getSingleVersionCatalogItems(SessionContext ctx, ComposedType type, java.lang.String additionalQueryRestrictions, boolean fromSource, int start, int range)
protected void copyItem(ItemCopyContext itemCopyContext, SyncItemCronJob cronJob, Item src, Item tgt)
protected java.util.List<SyncItemJob.ModifiedItemsPair> getModifiedCatalogItemPairs(SessionContext ctx, ComposedType type, int start, int range, boolean forceUpdate)
SyncItemJob.ModifiedItemsPairs.protected java.util.List<SyncItemJob.ModifiedItemsPair> getPossibleCatalogItemPairs(SessionContext ctx, ComposedType type, java.lang.String additionalQueryRestrictions, int start, int range)
SyncItemJob.ModifiedItemsPairs.protected void removeItem(ItemCopyContext itemCopyContext, SyncItemCronJob cronJob, Item removeItem)
protected java.util.Set<Item> getMissingTargetItems(java.util.Collection<? extends Item> sourceItems, java.util.Collection<? extends Item> targetItems, CatalogVersion sourceVersion)
public void addCatalogItemsToSync(SyncItemCronJob cronJob, java.util.Collection<? extends Item> items)
cronJob - the synchronization cronjobitems - the items to addpublic void addCategoriesToSync(SyncItemCronJob cronJob, java.util.Collection<? extends Category> categories, boolean includeSubcategories, boolean includeProducts)
public void configureFullVersionSync(SyncItemCronJob cronJob)
protected java.lang.String getAdditionalQueryRestrictions(SessionContext ctx, ComposedType rootType, SyncItemCronJob cronJob)
protected java.util.List<PK[]> toPendingItemsList(java.util.List<PK> itemPKs, boolean remove)
protected java.util.List<PK[]> toPendingItemsList(java.util.List<SyncItemJob.ModifiedItemsPair> itemPairs)
protected void configureFullSyncForItemType(SessionContext ctx, SyncItemCronJob cronJob, ComposedType type, java.lang.String additionalQueryRestrictions, boolean removeMissing, boolean createNew, boolean forceUpdate, int range)
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 - if true all items are removed which still exist in target version but do not exist in
source versioncreateNew - if true new items are created with the target version if the exist in source versionforceUpdate - if true the 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! )public SyncItemJob.CompletionInfo getCompletionInfo(SyncItemCronJob cronJob)
protected CronJob.CronJobResult performCronJob(CronJob cronJob)
JobJob. Here you can execute the job. You have to return a
CronJobResult that indicates whether the Job was successfully executed or not.performCronJob in class JobcronJob - the CronJob to executeCronJobResult that indicates whether the Job was successfully executed or not.
CronJob.getFinishedResult(boolean),
CronJob.getAbortResult()protected boolean doSynchronization(SyncItemJob.SyncItemCopyContext syncItemCopyContext, SyncItemCronJob cronJob) throws AbortCronJobException
syncItemCopyContext - the copy contextcronJob - the cronjobAbortCronJobException - if the cronjob has been set to be aborted during executionprotected CronJob.CronJobResult doAbort(SyncItemCronJob cronJob)
cronJob - the currently executing cronjobprotected boolean canSelectAttribute(AttributeDescriptor attributeDescriptor)
public java.util.Map<AttributeDescriptor,java.lang.Boolean> getAllExportAttributeDescriptors(SessionContext ctx)
getAllExportAttributeDescriptors in class GeneratedSyncItemJobpublic void setAllExportAttributeDescriptors(SessionContext ctx, java.util.Map syncMap)
setAllExportAttributeDescriptors in class GeneratedSyncItemJobsyncMap - Map<AttributeDescriptor,Boolean>protected boolean configAlreadyExists(AttributeDescriptor attributeDescriptor)
public SyncAttributeDescriptorConfig getConfigFor(AttributeDescriptor attributeDescriptor, boolean createOnDemand)
SyncAttributeDescriptorConfig instance 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!
attributeDescriptor - the attribute descriptor to get settings item forcreateOnDemand - if true and no settings item exists create onepublic SyncAttributeDescriptorConfig getConfigFor(SessionContext ctx, AttributeDescriptor attributeDescriptor, boolean createOnDemand)
SyncAttributeDescriptorConfig instance 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!
ctx - the enclosing session contextattributeDescriptor - the attribute descriptor to get settings item forcreateOnDemand - if true and no settings item exists create oneprotected java.util.List<java.util.List> getAttributeAndConfigPairs()
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.protected SyncAttributeDescriptorConfig createDefaultConfigFor(SessionContext ctx, AttributeDescriptor attributeDescriptor)
public java.util.Collection<SyncAttributeDescriptorConfig> getSyncAttributeConfigurations(SessionContext ctx)
SyncAttributeDescriptorConfig instance for each declared attribute of
any catalog item type.
There is no need to create them explicitly since this method creates them on demand.
getSyncAttributeConfigurations in class GeneratedSyncItemJobpublic void setSyncAttributeConfigurations(SessionContext ctx, java.util.Collection param)
GeneratedSyncItemJobSyncItemJob.syncAttributeConfigurations attribute.setSyncAttributeConfigurations in class GeneratedSyncItemJobparam - the syncAttributeConfigurationspublic java.util.List<ComposedType> getRootTypes(SessionContext ctx)
GeneratedSyncItemJobSyncItemJob.rootTypes attribute.getRootTypes in class GeneratedSyncItemJobprotected java.util.List<ComposedType> assureCatalogItemTypes(java.util.List<ComposedType> types)
public void setRootTypes(SessionContext ctx, java.util.List<ComposedType> value)
setRootTypes in class GeneratedSyncItemJobvalue - the rootTypesGeneratedSyncItemJob.setRootTypes(de.hybris.platform.jalo.SessionContext,
java.util.List)public java.util.Collection<Language> getEffectiveSyncLanguages(SessionContext ctx)
GeneratedSyncItemJob.getSyncLanguages() or, if empty, the intersection of source version languages and
target version languages.getEffectiveSyncLanguages in class GeneratedSyncItemJobCopyright © 2018 SAP SE. All Rights Reserved.