Package de.hybris.platform.cronjob.jalo
Class CronJob
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
- Direct Known Subclasses:
GeneratedAbstractMediaCronJob
,GeneratedCartRemovalCronJob
,GeneratedCartToOrderCronJob
,GeneratedCisFraudReportCronJob
,GeneratedCleanUpCronJob
,GeneratedCleanupDynamicProcessDefinitionsCronJob
,GeneratedCompareCatalogVersionsCronJob
,GeneratedCompositeCronJob
,GeneratedCreateAuditReportCronJob
,GeneratedCSTicketStagnationCronJob
,GeneratedCxDefaultPersonalizationCalculationCronJob
,GeneratedCxPersonalizationProcessCleanupCronJob
,GeneratedCxResultsCleaningCronJob
,GeneratedCxUpdateSegmentsCronJob
,GeneratedDataLoaderCronJob
,GeneratedDataLoaderStopCronJob
,GeneratedDataSupplierCronJob
,GeneratedDeleteDocumentFileCronJob
,GeneratedExcelImportCronJob
,GeneratedExportDataCronJob
,GeneratedFlashBuyCronJob
,GeneratedGeocodeAddressesCronJob
,GeneratedImpExExportCronJob
,GeneratedImpExImportCronJob
,GeneratedMediaFolderStructureMigrationCronJob
,GeneratedMediaProcessCronJob
,GeneratedMoveMediaCronJob
,GeneratedOldCartRemovalCronJob
,GeneratedOldPaymentSubscriptionResultRemovalCronJob
,GeneratedOrderScheduleCronJob
,GeneratedOrderStatusUpdateCleanerCronJob
,GeneratedOrderTemplateToOrderCronJob
,GeneratedProductConfigurationPersistenceCleanUpCronJob
,GeneratedProductExpressUpdateCleanerCronJob
,GeneratedRemoveCatalogVersionCronJob
,GeneratedRemoveItemsCronJob
,GeneratedRemoveOrphanedFilesCronJob
,GeneratedRuleEngineCronJob
,GeneratedSapRevenueCloudProductCronjob
,GeneratedSessionEventsRemovalCronJob
,GeneratedSiteMapMediaCronJob
,GeneratedSolrIndexerCronJob
,GeneratedSolrIndexOptimizationCronJob
,GeneratedSolrQueryStatisticsCollectorCronJob
,GeneratedSolrUpdateStopWordsCronJob
,GeneratedSolrUpdateSynonymsCronJob
,GeneratedSyncItemCronJob
,GeneratedUncollectedOrdersCronJob
,GeneratedWorkflow
,GeneratedY2YSyncCronJob
,OutboundSyncCronJob
public class CronJob extends GeneratedCronJob
TheCronJob
stores runtime informations, which are used by theJob
/BatchJob
during execution (normal & undo). For example theJaloSession
which will be used during the execution of aJob
/BatchJob
used the values of the attributesSessionUser
,SessionLanguage
andSessionCurrency
as presets for theSessionContext
. Furthermore all informations (JobLogs
,ChangeDescriptors
&CronJobResult
), related to an execution of aJob
are assigned to theCronJob
, which was used during their execution.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CronJob.CronJobResult
Deprecated.since ages - useCronJobResult
static class
CronJob.CronJobThreadSettings
-
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 Modifier and Type Field Description static java.lang.String
CFG_FILTERED_CTX_ATTRIBUTES
-
Fields inherited from class de.hybris.platform.cronjob.jalo.GeneratedCronJob
ACTIVE, ACTIVECRONJOBHISTORY, ALTERNATIVEDATASOURCEID, CHANGERECORDINGENABLED, CHANGES, CODE, CRONJOBHISTORYENTRIES, CRONJOBHISTORYENTRIESHANDLER, CRONJOBPENDINGSTEPSRELATION_MARKMODIFIED, CRONJOBPENDINGSTEPSRELATION_SRC_ORDERED, CRONJOBPENDINGSTEPSRELATION_TGT_ORDERED, CRONJOBPROCESSEDSTEPSRELATION_MARKMODIFIED, CRONJOBPROCESSEDSTEPSRELATION_SRC_ORDERED, CRONJOBPROCESSEDSTEPSRELATION_TGT_ORDERED, CURRENTSTEP, DEFAULT_INITIAL_ATTRIBUTES, EMAILADDRESS, EMAILNOTIFICATIONTEMPLATE, ENDTIME, ERRORMODE, FILESCOUNT, FILESDAYSOLD, FILESOPERATOR, JOB, JOBHANDLER, LOGFILES, LOGLEVELDATABASE, LOGLEVELFILE, LOGS, LOGSCOUNT, LOGSDAYSOLD, LOGSHANDLER, LOGSOPERATOR, LOGTEXT, LOGTODATABASE, LOGTOFILE, NODEGROUP, NODEID, PENDINGSTEPS, PRIORITY, PROCESSEDSTEPS, QUERYCOUNT, REMOVEONEXIT, REQUESTABORT, REQUESTABORTSTEP, RESULT, RETRY, RUNNINGONCLUSTERNODE, SENDEMAIL, SESSIONCONTEXTVALUES, SESSIONCURRENCY, SESSIONLANGUAGE, SESSIONUSER, SINGLEEXECUTABLE, STARTTIME, STATUS, 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 CronJob()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
activateCronJobThreadSettings(CronJob.CronJobThreadSettings settings)
Activates cronjob thread settings for the current thread.Use this to copy thread settings to another thread in case your cronjob starts multiple threads.protected ChangeDescriptor
addChangeDescriptor(Step forStep, java.lang.String changeType, Item item, java.lang.String description)
Deprecated.since ages - not supported in futureChangeDescriptor
addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, java.lang.String changeType, PK item, java.lang.String description, java.util.Map additionalAttributes)
Deprecated.since ages - not supported in futureChangeDescriptor
addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, java.lang.String changeType, Item item, java.lang.String description)
Deprecated.since ages - not supported in futureChangeDescriptor
addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, java.lang.String changeType, Item item, java.lang.String description, java.util.Map additionalAttributes)
Deprecated.since ages - not supported in futurevoid
addChangeListener(java.lang.String topic, ChangeListener listener)
Registers the specifiedChangeListener
for the specified topic.JobLog
addLog(java.lang.String message)
Adds a loggin message to this CronJob.JobLog
addLog(java.lang.String message, Step forStep)
Deprecated.since 4.3JobLog
addLog(java.lang.String message, Step forStep, EnumerationValue level)
Deprecated.since 4.3protected JobLog
addLog(java.lang.String message, Step forStep, EnumerationValue level, boolean appendToLogFile)
JobLog
addLog(java.lang.String message, EnumerationValue level)
Adds a loggin message with a given error level to this CronJob.int
addToCounter(int add)
Increases the current counter of this cronjob.void
addToPendingSteps(Step step)
Deprecated.since 4.3void
addToPendingSteps(SessionContext ctx, Step step)
Deprecated.since 4.3void
addToProcessedSteps(Step step)
Deprecated.since 4.3void
addToProcessedSteps(SessionContext ctx, Step step)
Deprecated.since 4.3protected void
adjustAttributes(SessionContext ctx, Item.ItemAttributeMap attributes)
boolean
checkLogLevel(EnumerationValue configuredLevel, java.lang.String configProperty, java.lang.String defaultLevel)
org.apache.log4j.Level
convertEnumToLogLevel(EnumerationValue enumvalue)
EnumerationValue
convertLogLevelToEnum(org.apache.log4j.Level level)
protected Item
createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.LogFile
createNewLogFile(java.lang.String fileName)
Deprecated.since ages - use plainLogFileModel
creation, refer to wiki documentationvoid
createRunOnceTrigger(java.util.Date date)
Deprecated.since ages - please refer toCronJobManager.createTrigger(CronJob, Date)
protected JaloSession
createSessionForCronJob(JaloSession jaloSession)
Sets theUser
,Language
andCurrency
of the specifiedJaloSession
to the values defined inGeneratedCronJob.getSessionUser()
,GeneratedCronJob.getSessionLanguage()
,GeneratedCronJob.getSessionCurrency()
.protected void
currentStepDone(boolean undo)
If undo isfalse
the currentStep
is added to the list of processedSteps
and the current step of theCronJob
is set tonull
.protected java.util.Map<java.lang.String,java.lang.Object>
filterSessionContextValuesFromCronJob(java.util.Map<java.lang.String,java.lang.Object> sessionContextValues)
Session context values stored inside this cronjob are filtered for potentially harmful ones, since we cannot rule out that they're manually changed!protected void
finalizeCronJobHistory()
EnumerationValue
getAbortedStatus()
Deprecated.since ages - useCronJobStatus.ABORTED
insteadCronJob.CronJobResult
getAbortResult()
Deprecated.since ages - useCronJobStatus.ABORTED
insteadjava.util.Collection<ChangeDescriptor>
getChanges(int start, int count)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(Step step)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(Step step, int start, int count)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(Step step, java.lang.String changeType)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(Step step, java.lang.String changeType, int start, int count)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(Step step, java.lang.String changeType, int start, int count, boolean ascending)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx, int start, int count)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx, Step step)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx, Step step, int start, int count)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx, Step step, java.lang.String changeType)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx, Step step, java.lang.String changeType, int start, int count)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx, Step step, java.lang.String changeType, int start, int count, boolean ascending)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx, java.lang.String changeType)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(SessionContext ctx, java.lang.String changeType, int start, int count)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(java.lang.String changeType)
Deprecated.since ages - not supported in futurejava.util.Collection<ChangeDescriptor>
getChanges(java.lang.String changeType, int start, int count)
Deprecated.since ages - not supported in futureint
getCounter()
Provides the current counter value of this cronjob.static CronJob.CronJobThreadSettings
getCronJobThreadSettings()
Returns thread settings for currently executing cronjob.protected static CronJob
getCurrentlyExecutingCronJob()
protected static CronJob
getCurrentlyExecutingCronJobFailSave()
EnumerationValue
getDebugLogLevel()
Deprecated.since ages - useJobLogLevel.DEBUG
insteadEnumerationValue
getErrorLogLevel()
Deprecated.since ages - useJobLogLevel.ERROR
insteadEnumerationValue
getErrorResult()
Deprecated.since ages - useCronJobResult.ERROR
insteadEnumerationValue
getFailureResult()
Deprecated.since ages - useCronJobResult.FAILURE
insteadEnumerationValue
getFatalLogLevel()
Deprecated.since ages - useJobLogLevel.FATAL
insteadprotected java.lang.String
getFinishedEmailBody(CronJob.CronJobResult cronJobResult)
CronJob.CronJobResult
getFinishedResult(boolean success)
Deprecated.since ages - useCronJobResult
insteadEnumerationValue
getFinishedStatus()
Deprecated.since ages - useCronJobStatus.FINISHED
insteadEnumerationValue
getInfoLogLevel()
Deprecated.since ages - useJobLogLevel.INFO
insteadjava.util.Collection<LogFile>
getLogFiles(SessionContext ctx)
Generated method - Getter of theCronJob.logFiles
attribute.EnumerationValue
getLogLevelDatabase(SessionContext ctx)
Generated method - Getter of theCronJob.logLevelDatabase
attribute.EnumerationValue
getLogLevelFile(SessionContext ctx)
Generated method - Getter of theCronJob.logLevelFile
attribute.java.util.List<JobLog>
getLogs(SessionContext ctx, int start, int count)
Deprecated.since ages - useCronJobModel.getLogs()
instead, however a strict access is available also viaJobLogDao.findJobLogs(de.hybris.platform.cronjob.model.CronJobModel, int, boolean)
java.lang.String
getLogText(SessionContext ctx)
Deprecated.since ages - useCronJobService.getLogsAsText(de.hybris.platform.cronjob.model.CronJobModel)
insteadChangeDescriptor
getMostRecentChange(Step step, java.lang.String changeType)
Deprecated.since ages - not supported in futureprotected java.lang.Integer
getNextChangeNumber(ComposedType changeDescriptorType)
Deprecated.since ages - not supported in futureCronJob.CronJobResult
getPausedResult()
Deprecated.since ages - useCronJobStatus.PAUSED
insteadEnumerationValue
getPausedStatus()
Deprecated.since ages - useCronJobStatus.PAUSED
insteadprotected CronJobNotificationTemplateContext
getRendererNotificationContext()
Gets filled context object used by velocity to access CronJob's significant data.EnumerationValue
getRunningRestartStatus()
Deprecated.since ages - useCronJobStatus.RUNNINGRESTART
insteadEnumerationValue
getRunningStatus()
Deprecated.since ages - useCronJobStatus.RUNNING
insteadEnumerationValue
getSuccessResult()
Deprecated.since ages - useCronJobResult.SUCCESS
insteadjava.lang.String
getTimeTable()
Deprecated.since agesjava.lang.String
getTimeTable(SessionContext ctx)
Deprecated.since ages - useCronJobModel.getTimeTable()
instead.CronJob.CronJobResult
getUndoFinishedResult(boolean success)
Deprecated.no counterpart since 4.3EnumerationValue
getUnknownLogLevel()
Deprecated.since ages - useJobLogLevel.UNKNOWN
insteadEnumerationValue
getUnknownResult()
Deprecated.since ages - useCronJobResult.UNKNOWN
insteadEnumerationValue
getUnknownStatus()
Deprecated.since ages - useCronJobStatus.UNKNOWN
insteadEnumerationValue
getWarnLogLevel()
Deprecated.since ages - useJobLogLevel.WARNING
insteadprotected static boolean
hasCurrentlyExecutingCronJob()
protected CronJobHistory
instantiateCronJobHistory()
boolean
isAbortable()
Deprecated.boolean
isEnabledFor(org.apache.log4j.Level level)
Checks if the CronJob is enabled for logging with given log level.boolean
isFinished()
Deprecated.boolean
isPaused()
Deprecated.boolean
isRunning()
Deprecated.boolean
isRunningRestart()
Deprecated.boolean
mustRunOnOtherNode()
Tells whether or not this cronjob must be run on another node.protected void
notifyChangeListeners(ChangeEvent event)
Notifies allChangeListeners
, which are registered for the topic of the specified event.void
remove(SessionContext ctx)
Removes this item.void
removeAllChangeListener()
Removes all registeredChangeListeners
.void
removeChangeListener(java.lang.String topic, ChangeListener listener)
Removes the registration of specifiedChangeListener
for the specified topic.void
resetCounter()
Resets the transient counter of this cronjob.protected void
resetFinishedCronJob()
Reset theCronJob
.void
sendEmail(CronJob.CronJobResult cronJobResult)
Sends aCronJobResult
per email.protected void
setAborted()
Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)
insteadvoid
setCronJobResult(CronJob.CronJobResult res)
Deprecated.no counterpart since 4.3protected static void
setCurrentlyExecutingCronJob(CronJob cronjob)
protected void
setCurrentStep(Step step, boolean undo)
Sets the currentvoid
setEndTime(java.util.Date end)
Sets the end time.void
setIsEnabledForCheckDifference(long diff)
Sets the difference between the point of times where the cache of theisEnabledFor(Level)
will be reseted.protected void
setJob(SessionContext ctx, Job job)
Generated method - Setter of theCronJob.job
attribute.void
setLogFiles(SessionContext ctx, java.util.Collection<LogFile> param)
Generated method - Setter of theCronJob.logFiles
attribute.void
setNodeGroup(SessionContext ctx, java.lang.String value)
Generated method - Setter of theCronJob.nodeGroup
attribute.void
setNodeID(SessionContext ctx, java.lang.Integer value)
Generated method - Setter of theCronJob.nodeID
attribute.void
setPaused()
Deprecated.since ages - there is no counterpart in service layervoid
setRequestAbort(SessionContext ctx, java.lang.Boolean abortRequested)
Sets the abort flag to the specified value.void
setResult(EnumerationValue result)
Sets the result.protected void
setRunning()
Deprecated.since ages - there is no strict counterpart in servicelayer however you can useCronJobService.performCronJob(de.hybris.platform.cronjob.model.CronJobModel, boolean)
instead to set status for given cronJob to RUNNINGprotected void
setRunningRestart()
Deprecated.since ages - there is no counterpart in service layervoid
setStartTime(java.util.Date start)
Sets the end time.void
setStatus(EnumerationValue status)
Sets the status.java.lang.String
toString()
Returns theString
representation of this item.void
tryToStop(long maxWait)
Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)
insteadstatic void
unsetCronJobThreadSettings(CronJob.CronJobThreadSettings settings)
Deactivates cronjob thread settings for the current thread.protected static void
unsetCurrentlyExecutingCronJob()
-
Methods inherited from class de.hybris.platform.cronjob.jalo.GeneratedCronJob
addToCronJobHistoryEntries, addToCronJobHistoryEntries, addToTriggers, addToTriggers, getActiveCronJobHistory, getActiveCronJobHistory, getAlternativeDataSourceID, getAlternativeDataSourceID, getChanges, getCode, getCode, getCronJobHistoryEntries, getCronJobHistoryEntries, getCurrentStep, getCurrentStep, getDefaultAttributeModes, getEmailAddress, getEmailAddress, getEmailNotificationTemplate, getEmailNotificationTemplate, getEndTime, getEndTime, getErrorMode, getErrorMode, getFilesCount, getFilesCount, getFilesCountAsPrimitive, getFilesCountAsPrimitive, getFilesDaysOld, getFilesDaysOld, getFilesDaysOldAsPrimitive, getFilesDaysOldAsPrimitive, getFilesOperator, getFilesOperator, getJob, getJob, getLogFiles, getLogLevelDatabase, getLogLevelFile, getLogs, getLogs, getLogsCount, getLogsCount, getLogsCountAsPrimitive, getLogsCountAsPrimitive, getLogsDaysOld, getLogsDaysOld, getLogsDaysOldAsPrimitive, getLogsDaysOldAsPrimitive, getLogsOperator, getLogsOperator, getLogText, getNodeGroup, getNodeGroup, getNodeID, getNodeID, getNodeIDAsPrimitive, getNodeIDAsPrimitive, getPendingSteps, getPendingSteps, getPendingStepsCount, getPendingStepsCount, getPriority, getPriority, getPriorityAsPrimitive, getPriorityAsPrimitive, getProcessedSteps, getProcessedSteps, getProcessedStepsCount, getProcessedStepsCount, getQueryCount, getQueryCount, getQueryCountAsPrimitive, getQueryCountAsPrimitive, getResult, getResult, getRunningOnClusterNode, getRunningOnClusterNode, getRunningOnClusterNodeAsPrimitive, getRunningOnClusterNodeAsPrimitive, getSessionCurrency, getSessionCurrency, getSessionLanguage, getSessionLanguage, getSessionUser, getSessionUser, getStartTime, getStartTime, getStatus, getStatus, getTriggers, getTriggers, isActive, isActive, isActiveAsPrimitive, isActiveAsPrimitive, isChangeRecordingEnabled, isChangeRecordingEnabled, isChangeRecordingEnabledAsPrimitive, isChangeRecordingEnabledAsPrimitive, isLogToDatabase, isLogToDatabase, isLogToDatabaseAsPrimitive, isLogToDatabaseAsPrimitive, isLogToFile, isLogToFile, isLogToFileAsPrimitive, isLogToFileAsPrimitive, isMarkModifiedDisabled, isRemoveOnExit, isRemoveOnExit, isRemoveOnExitAsPrimitive, isRemoveOnExitAsPrimitive, isRequestAbort, isRequestAbort, isRequestAbortAsPrimitive, isRequestAbortAsPrimitive, isRequestAbortStep, isRequestAbortStep, isRequestAbortStepAsPrimitive, isRequestAbortStepAsPrimitive, isRetry, isRetry, isRetryAsPrimitive, isRetryAsPrimitive, isSendEmail, isSendEmail, isSendEmailAsPrimitive, isSendEmailAsPrimitive, isSingleExecutable, isSingleExecutable, isSingleExecutableAsPrimitive, isSingleExecutableAsPrimitive, removeFromCronJobHistoryEntries, removeFromCronJobHistoryEntries, removeFromPendingSteps, removeFromPendingSteps, removeFromProcessedSteps, removeFromProcessedSteps, removeFromTriggers, removeFromTriggers, setActive, setActive, setActive, setActive, setActiveCronJobHistory, setActiveCronJobHistory, setAlternativeDataSourceID, setAlternativeDataSourceID, setChangeRecordingEnabled, setChangeRecordingEnabled, setChangeRecordingEnabled, setChangeRecordingEnabled, setCode, setCode, setCronJobHistoryEntries, setCronJobHistoryEntries, setEmailAddress, setEmailAddress, setEmailNotificationTemplate, setEmailNotificationTemplate, setEndTime, setErrorMode, setErrorMode, setFilesCount, setFilesCount, setFilesCount, setFilesCount, setFilesDaysOld, setFilesDaysOld, setFilesDaysOld, setFilesDaysOld, setFilesOperator, setFilesOperator, setJob, setLogFiles, setLogLevelDatabase, setLogLevelDatabase, setLogLevelFile, setLogLevelFile, setLogsCount, setLogsCount, setLogsCount, setLogsCount, setLogsDaysOld, setLogsDaysOld, setLogsDaysOld, setLogsDaysOld, setLogsOperator, setLogsOperator, setLogToDatabase, setLogToDatabase, setLogToDatabase, setLogToDatabase, setLogToFile, setLogToFile, setLogToFile, setLogToFile, setNodeGroup, setNodeID, setNodeID, setNodeID, setPendingSteps, setPendingSteps, setPriority, setPriority, setPriority, setPriority, setProcessedSteps, setProcessedSteps, setQueryCount, setQueryCount, setQueryCount, setQueryCount, setRemoveOnExit, setRemoveOnExit, setRemoveOnExit, setRemoveOnExit, setRequestAbort, setRequestAbort, setRequestAbort, setRequestAbortStep, setRequestAbortStep, setRequestAbortStep, setRequestAbortStep, setResult, setRetry, setRetry, setRetry, setRetry, setRunningOnClusterNode, setRunningOnClusterNode, setRunningOnClusterNode, setRunningOnClusterNode, setSendEmail, setSendEmail, setSendEmail, setSendEmail, setSessionCurrency, setSessionCurrency, setSessionLanguage, setSessionLanguage, setSessionUser, setSessionUser, setSingleExecutable, setSingleExecutable, setSingleExecutable, setSingleExecutable, setStartTime, setStatus, setTriggers, setTriggers
-
Methods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getNonInitialAttributes, 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, 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, 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, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Field Detail
-
CFG_FILTERED_CTX_ATTRIBUTES
public static final java.lang.String CFG_FILTERED_CTX_ATTRIBUTES
- See Also:
- Constant Field Values
-
-
Method Detail
-
setCurrentlyExecutingCronJob
protected static final void setCurrentlyExecutingCronJob(CronJob cronjob)
-
unsetCurrentlyExecutingCronJob
protected static final void unsetCurrentlyExecutingCronJob()
-
getCurrentlyExecutingCronJob
protected static final CronJob getCurrentlyExecutingCronJob()
-
getCurrentlyExecutingCronJobFailSave
protected static final CronJob getCurrentlyExecutingCronJobFailSave()
-
hasCurrentlyExecutingCronJob
protected static boolean hasCurrentlyExecutingCronJob()
- Since:
- 2.20
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Description copied from class:Item
Has to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) duringComposedType.newInstance(Map)
.In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap)
too.
Sn example:public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) ); // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes( SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret = super.getNonInitialAttributes( ctx, allAttributes ); // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
- Overrides:
createItem
in classGeneratedCronJob
- 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
-
adjustAttributes
protected void adjustAttributes(SessionContext ctx, Item.ItemAttributeMap attributes)
-
setJob
protected void setJob(SessionContext ctx, Job job)
Description copied from class:GeneratedCronJob
Generated method - Setter of theCronJob.job
attribute.- Overrides:
setJob
in classGeneratedCronJob
job
- the job - References to the Job assigned to the CronJob
-
remove
public void remove(SessionContext ctx) throws ConsistencyCheckException
Description copied from class:Item
Removes this 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
- Overrides:
remove
in classItem
- Parameters:
ctx
- A SessionContext object- Throws:
ConsistencyCheckException
- if this item could not be removed for some reason
-
resetCounter
public void resetCounter()
Resets the transient counter of this cronjob.- See Also:
getCounter()
,addToCounter(int)
-
getCounter
public int getCounter()
Provides the current counter value of this cronjob.- See Also:
addToCounter(int)
,resetCounter()
-
addToCounter
public int addToCounter(int add)
Increases the current counter of this cronjob.- Parameters:
add
- the amount to add- Returns:
- the new counter value
- See Also:
getCounter()
,resetCounter()
-
addLog
public JobLog addLog(java.lang.String message)
Adds a loggin message to this CronJob.- Parameters:
message
- The logging message- Returns:
- The JobLog object.
-
addLog
@Deprecated public JobLog addLog(java.lang.String message, Step forStep)
Deprecated.since 4.3Adds a loggin message for the givenStep
to this CronJob.- Parameters:
message
- The logging messageforStep
- The Step this message belongs to- Returns:
- The JobLog object.
-
addLog
public JobLog addLog(java.lang.String message, EnumerationValue level)
Adds a loggin message with a given error level to this CronJob.- Parameters:
message
- The logging messagelevel
- The error level- Returns:
- The JobLog object.
-
addLog
@Deprecated public JobLog addLog(java.lang.String message, Step forStep, EnumerationValue level)
Deprecated.since 4.3Adds a loggin message and error level for the givenStep
to this CronJob.- Parameters:
message
- The logging messageforStep
- The Step this message belongs tolevel
- The error level- Returns:
- The JobLog object.
-
convertLogLevelToEnum
public EnumerationValue convertLogLevelToEnum(org.apache.log4j.Level level)
-
convertEnumToLogLevel
public org.apache.log4j.Level convertEnumToLogLevel(EnumerationValue enumvalue)
-
addLog
protected JobLog addLog(java.lang.String message, Step forStep, EnumerationValue level, boolean appendToLogFile)
-
getLogLevelDatabase
public EnumerationValue getLogLevelDatabase(SessionContext ctx)
Description copied from class:GeneratedCronJob
Generated method - Getter of theCronJob.logLevelDatabase
attribute.- Overrides:
getLogLevelDatabase
in classGeneratedCronJob
- Returns:
- the logLevelDatabase - Specifies the log level for logging to the database
-
getLogLevelFile
public EnumerationValue getLogLevelFile(SessionContext ctx)
Description copied from class:GeneratedCronJob
Generated method - Getter of theCronJob.logLevelFile
attribute.- Overrides:
getLogLevelFile
in classGeneratedCronJob
- Returns:
- the logLevelFile - Specifies the log level for logging to the file
-
checkLogLevel
public boolean checkLogLevel(EnumerationValue configuredLevel, java.lang.String configProperty, java.lang.String defaultLevel)
-
setIsEnabledForCheckDifference
public void setIsEnabledForCheckDifference(long diff)
Sets the difference between the point of times where the cache of theisEnabledFor(Level)
will be reseted.- Parameters:
diff
- the time difference in ms
-
isEnabledFor
public final boolean isEnabledFor(org.apache.log4j.Level level)
Checks if the CronJob is enabled for logging with given log level. Will check log to database and to file configuration. The call of this method will be cached for a specific time, adjustable bysetIsEnabledForCheckDifference(long)
.- Parameters:
level
- log level to check- Returns:
- cronjob is enabled for given level
-
getLogText
@Deprecated public java.lang.String getLogText(SessionContext ctx)
Deprecated.since ages - useCronJobService.getLogsAsText(de.hybris.platform.cronjob.model.CronJobModel)
insteadReturns aString
representation of the last 500JobLog
s of theCronJob
.- Specified by:
getLogText
in classGeneratedCronJob
- Parameters:
ctx
- theSessionContext
, which will be used- Returns:
- a
String
representation of the last 500JobLog
s of theCronJob
-
getLogs
@Deprecated public java.util.List<JobLog> getLogs(SessionContext ctx, int start, int count)
Deprecated.since ages - useCronJobModel.getLogs()
instead, however a strict access is available also viaJobLogDao.findJobLogs(de.hybris.platform.cronjob.model.CronJobModel, int, boolean)
Returns the specified range (from start -> (start + count)) ofJobLogs
as aCollection
. TheJobLogs
are ordered by their creation time.- Parameters:
ctx
- theSessionContext
, which will be usedstart
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
JobLogs
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx)
Deprecated.since ages - not supported in futureReturns aCollection
of allChangeDescriptors
which are assigned to theCronJob
. If the number of ChangeDescriptors is very high, consider usinggetChanges(SessionContext, int, int)
method.- Specified by:
getChanges
in classGeneratedCronJob
- Parameters:
ctx
- theSessionContext
, which will be used- Returns:
- a
Collection
of allChangeDescriptors
which are assigned to theCronJob
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step)
Deprecated.since ages - not supported in futureReturns aCollection
of allChangeDescriptors
which are assigned to theCronJob
and the specifiedStep
. If the number of ChangeDescriptors is very high, consider usinggetChanges(SessionContext, Step, int, int)
method.- Parameters:
ctx
- theSessionContext
, which will be usedstep
- theStep
, whoseChangeDescriptors
should be returned- Returns:
- a
Collection
of allChangeDescriptors
which are assigned to theCronJob
and the specifiedStep
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(Step step)
Deprecated.since ages - not supported in futureReturns aCollection
of allChangeDescriptors
which are assigned to theCronJob
and the specifiedStep
. If the number of ChangeDescriptors is very high, consider usinggetChanges(SessionContext, Step, int, int)
method.- Parameters:
step
- theStep
, whoseChangeDescriptors
should be returned- Returns:
- a
Collection
of allChangeDescriptors
which are assigned to theCronJob
and the specifiedStep
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(java.lang.String changeType)
Deprecated.since ages - not supported in futureReturns aCollection
of allChangeDescriptors
with the specified changeType and which are assigned to theCronJob
. If the number of ChangeDescriptors is very high, consider usinggetChanges(String, int, int)
.- Parameters:
changeType
- the changeType- Returns:
- a
Collection
of allChangeDescriptors
with the specified changeType and which are assigned to theCronJob
. If the number of ChangeDescriptors is very high, consider usinggetChanges(String, int, int)
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx, java.lang.String changeType)
Deprecated.since ages - not supported in futureReturns aCollection
of allChangeDescriptors
with the specified changeType and which are assigned to theCronJob
. If the number of ChangeDescriptors is very high, consider usinggetChanges(String, int, int)
.- Parameters:
ctx
- theSessionContext
, which will be usedchangeType
- the changeType- Returns:
- a
Collection
of allChangeDescriptors
with the specified changeType and which are assigned to theCronJob
. If the number of ChangeDescriptors is very high, consider usinggetChanges(String, int, int)
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(Step step, java.lang.String changeType)
Deprecated.since ages - not supported in futureReturns aCollection
of allChangeDescriptors
with the specified changeType and which are assigned to theCronJob
and the specifiedStep
.- Parameters:
step
- theStep
, whoseChangeDescriptors
should be returnedchangeType
- the changeType- Returns:
- a
Collection
of allChangeDescriptors
which are assigned to theCronJob
and the specifiedStep
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step, java.lang.String changeType)
Deprecated.since ages - not supported in futureReturns aCollection
of allChangeDescriptors
with the specified changeType and which are assigned to theCronJob
and the specifiedStep
.- Parameters:
ctx
- theSessionContext
, which will be usedstep
- theStep
, whoseChangeDescriptors
should be returnedchangeType
- the changeType- Returns:
- a
Collection
of allChangeDescriptors
which are assigned to theCronJob
and the specifiedStep
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(int start, int count)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
. TheChangeDescriptors
are ordered by their creation time.- Parameters:
start
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx, int start, int count)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
. TheChangeDescriptors
are ordered by their creation time.- Parameters:
ctx
- theSessionContext
, which will be usedstart
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(Step step, int start, int count)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
which are assigned to the specifiedStep
. TheChangeDescriptors
are ordered by their creation time.- Parameters:
step
- theStep
, whoseChangeDescriptors
should be returnedstart
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step, int start, int count)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
which are assigned to the specifiedStep
. TheChangeDescriptors
are ordered by their creation time.- Parameters:
ctx
- theSessionContext
, which will be usedstep
- theStep
, whoseChangeDescriptors
should be returnedstart
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(java.lang.String changeType, int start, int count)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
which have the specified changeType. TheChangeDescriptors
are ordered by their creation time.- Parameters:
changeType
- the changeTypestart
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx, java.lang.String changeType, int start, int count)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
which have the specified changeType. TheChangeDescriptors
are ordered by their creation time.- Parameters:
ctx
- theSessionContext
, which will be usedchangeType
- the changeTypestart
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(Step step, java.lang.String changeType, int start, int count)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
which have the specified changeType and are assigned to the specifiedStep
. TheChangeDescriptors
are ordered by their creation time.- Parameters:
step
- theStep
, whoseChangeDescriptors
should be returnedchangeType
- the changeTypestart
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step, java.lang.String changeType, int start, int count)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
which have the specified changeType and are assigned to the specifiedStep
. TheChangeDescriptors
are ordered by their creation time.- Parameters:
ctx
- theSessionContext
, which will be usedstep
- theStep
, whoseChangeDescriptors
should be returnedchangeType
- the changeTypestart
- start index of the rangecount
- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(Step step, java.lang.String changeType, int start, int count, boolean ascending)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
which have the specified changeType and are assigned to the specifiedStep
. TheChangeDescriptors
are ordered by their creation time.- Parameters:
step
- theStep
, whoseChangeDescriptors
should be returnedchangeType
- the changeTypestart
- start index of the rangecount
- number of elements in the rangeascending
- order of elements by sequencenumber- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getChanges
@Deprecated public java.util.Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step, java.lang.String changeType, int start, int count, boolean ascending)
Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptors
as aCollection
which have the specified changeType and are assigned to the specifiedStep
. TheChangeDescriptors
are ordered by their creation time.- Parameters:
ctx
- theSessionContext
, which will be usedstep
- theStep
, whoseChangeDescriptors
should be returnedchangeType
- the changeTypestart
- start index of the rangecount
- number of elements in the rangeascending
- order of elements by sequencenumber- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptors
as aCollection
-
getMostRecentChange
@Deprecated public ChangeDescriptor getMostRecentChange(Step step, java.lang.String changeType)
Deprecated.since ages - not supported in futureReturns the most recentChangeDescriptor
of theCronJob
which is assigned to the specifiedStep
and has the specified changeType.- Parameters:
step
- theStep
, whoseChangeDescriptors
should be returnedchangeType
- The change type- Returns:
- the most recent
ChangeDescriptor
of theCronJob
which is assigned to the specifiedStep
and has the specified changeType
-
addChangeDescriptor
@Deprecated protected ChangeDescriptor addChangeDescriptor(Step forStep, java.lang.String changeType, Item item, java.lang.String description)
Deprecated.since ages - not supported in futureCreates a newChangeDescriptor
with the specifiedStep
, changeType,Item
and description.- Parameters:
forStep
- theStep
of the newChangeDescriptor
changeType
- the changeType of the newChangeDescriptor
item
- theItem
of the newChangeDescriptor
description
- the description of the newChangeDescriptor
- Returns:
- the new
ChangeDescriptor
-
getNextChangeNumber
@Deprecated protected java.lang.Integer getNextChangeNumber(ComposedType changeDescriptorType)
Deprecated.since ages - not supported in futureReturns the next sequence number for the specified changeDescriptorType.- Parameters:
changeDescriptorType
- the changeDescriptorType- Returns:
- the next sequence number for the specified changeDescriptorType
-
addChangeDescriptor
@Deprecated public ChangeDescriptor addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, java.lang.String changeType, Item item, java.lang.String description)
Deprecated.since ages - not supported in futureCreates a newChangeDescriptor
with the specifiedStep
, changeType,Item
and description.- Parameters:
changeDescriptorType
- the changeDescriptorTypeforStep
- theStep
of the newChangeDescriptor
changeType
- the changeType of the newChangeDescriptor
item
- theItem
of the newChangeDescriptor
description
- the description of the newChangeDescriptor
- Returns:
- the new
ChangeDescriptor
-
addChangeDescriptor
@Deprecated public ChangeDescriptor addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, java.lang.String changeType, Item item, java.lang.String description, java.util.Map additionalAttributes)
Deprecated.since ages - not supported in futureCreates a newChangeDescriptor
with the specifiedStep
, changeType,Item
and description.- Parameters:
changeDescriptorType
- the changeDescriptorTypeforStep
- theStep
of the newChangeDescriptor
changeType
- the changeType of the newChangeDescriptor
item
- theItem
of the newChangeDescriptor
description
- the description of the newChangeDescriptor
additionalAttributes
- the additional attribute values for the specified changeDescriptorType- Returns:
- the new
ChangeDescriptor
-
addChangeDescriptor
@Deprecated public ChangeDescriptor addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, java.lang.String changeType, PK item, java.lang.String description, java.util.Map additionalAttributes)
Deprecated.since ages - not supported in futureCreates a newChangeDescriptor
with the specifiedStep
, changeType,Item
and description.- Parameters:
changeDescriptorType
- the changeDescriptorTypeforStep
- theStep
of the newChangeDescriptor
changeType
- the changeType of the newChangeDescriptor
item
- theItem
PK of the newChangeDescriptor
description
- the description of the newChangeDescriptor
additionalAttributes
- the additional attribute values for the specified changeDescriptorType- Returns:
- the new
ChangeDescriptor
-
setStatus
public void setStatus(EnumerationValue status)
Sets the status. This attribute is configured to be not writable (items.xml), because the value should only be set by Jalo itself and not by other clients (like the HMC), which are using the generic access methods.- Overrides:
setStatus
in classGeneratedCronJob
- Parameters:
status
- the new status
-
setResult
public void setResult(EnumerationValue result)
Sets the result. This attribute is configured to be not writable (items.xml), because the value should only be set by Jalo itself and not by other clients (like the HMC), which are using the generic access methods.- Overrides:
setResult
in classGeneratedCronJob
- Parameters:
result
- the new result
-
setStartTime
public void setStartTime(java.util.Date start)
Sets the end time. This attribute is configured to be not writable (items.xml), because the value should only be set by Jalo itself and not by other clients (like the HMC), which are using the generic access methods.- Overrides:
setStartTime
in classGeneratedCronJob
- Parameters:
start
- the new start time
-
setEndTime
public void setEndTime(java.util.Date end)
Sets the end time. This attribute is configured to be not writable (items.xml), because the value should only be set by Jalo itself and not by other clients (like the HMC), which are using the generic access methods.- Overrides:
setEndTime
in classGeneratedCronJob
- Parameters:
end
- the new end time
-
setCurrentStep
protected void setCurrentStep(Step step, boolean undo)
Sets the current- Parameters:
step
-undo
-
-
currentStepDone
protected void currentStepDone(boolean undo)
If undo isfalse
the currentStep
is added to the list of processedSteps
and the current step of theCronJob
is set tonull
. If undo istrue
, the currentStep
is added to the begining of the list of pendingSteps
and the current step of theCronJob
is set tonull
.- Parameters:
undo
-true
if in undo mode,false
if in normal mode.
-
toString
public java.lang.String toString()
Description copied from class:Item
Returns theString
representation of this item. This is by default the representation of the primary key of this item.
-
getFatalLogLevel
@Deprecated public EnumerationValue getFatalLogLevel()
Deprecated.since ages - useJobLogLevel.FATAL
insteadReturns theEnumerationValue
for log level FATAL.- Returns:
- the
EnumerationValue
for log level FATAL
-
getErrorLogLevel
@Deprecated public EnumerationValue getErrorLogLevel()
Deprecated.since ages - useJobLogLevel.ERROR
insteadReturns theEnumerationValue
for log level ERROR.- Returns:
- the
EnumerationValue
for log level ERROR
-
getWarnLogLevel
@Deprecated public EnumerationValue getWarnLogLevel()
Deprecated.since ages - useJobLogLevel.WARNING
insteadReturns theEnumerationValue
for log level WARNING.- Returns:
- the
EnumerationValue
for log level WARNING
-
getInfoLogLevel
@Deprecated public EnumerationValue getInfoLogLevel()
Deprecated.since ages - useJobLogLevel.INFO
insteadReturns theEnumerationValue
for log level INFO.- Returns:
- the
EnumerationValue
for log level INFO
-
getDebugLogLevel
@Deprecated public EnumerationValue getDebugLogLevel()
Deprecated.since ages - useJobLogLevel.DEBUG
insteadReturns theEnumerationValue
for log level DEBUG.- Returns:
- the
EnumerationValue
for log level DEBUG
-
getUnknownLogLevel
@Deprecated public EnumerationValue getUnknownLogLevel()
Deprecated.since ages - useJobLogLevel.UNKNOWN
insteadReturns theEnumerationValue
for log level UNKNOWN.- Returns:
- the
EnumerationValue
for log level UNKNOWN
-
getFinishedStatus
@Deprecated public EnumerationValue getFinishedStatus()
Deprecated.since ages - useCronJobStatus.FINISHED
insteadReturns theEnumerationValue
forCronJob
status FINISHED.- Returns:
- the
EnumerationValue
forCronJob
status FINISHED
-
getRunningStatus
@Deprecated public EnumerationValue getRunningStatus()
Deprecated.since ages - useCronJobStatus.RUNNING
insteadReturns theEnumerationValue
forCronJob
status RUNNING.- Returns:
- the
EnumerationValue
forCronJob
status RUNNING
-
getRunningRestartStatus
@Deprecated public EnumerationValue getRunningRestartStatus()
Deprecated.since ages - useCronJobStatus.RUNNINGRESTART
insteadReturns theEnumerationValue
forCronJob
status RUNNINGRESTART.- Returns:
- the
EnumerationValue
forCronJob
status RUNNINGRESTART
-
getPausedStatus
@Deprecated public EnumerationValue getPausedStatus()
Deprecated.since ages - useCronJobStatus.PAUSED
insteadReturns theEnumerationValue
forCronJob
status PAUSED.- Returns:
- the
EnumerationValue
forCronJob
status PAUSED
-
getAbortedStatus
@Deprecated public EnumerationValue getAbortedStatus()
Deprecated.since ages - useCronJobStatus.ABORTED
insteadReturns theEnumerationValue
forCronJob
status ABORTED.- Returns:
- the
EnumerationValue
forCronJob
status ABORTED
-
getUnknownStatus
@Deprecated public EnumerationValue getUnknownStatus()
Deprecated.since ages - useCronJobStatus.UNKNOWN
insteadReturns theEnumerationValue
forCronJob
status UNKNOWN.- Returns:
- the
EnumerationValue
forCronJob
status UNKNOWN
-
getErrorResult
@Deprecated public EnumerationValue getErrorResult()
Deprecated.since ages - useCronJobResult.ERROR
insteadReturns theEnumerationValue
forCronJob
result ERROR.- Returns:
- the
EnumerationValue
forCronJob
result ERROR
-
getFailureResult
@Deprecated public EnumerationValue getFailureResult()
Deprecated.since ages - useCronJobResult.FAILURE
insteadReturns theEnumerationValue
forCronJob
result FAILURE.- Returns:
- the
EnumerationValue
forCronJob
result FAILURE
-
getSuccessResult
@Deprecated public EnumerationValue getSuccessResult()
Deprecated.since ages - useCronJobResult.SUCCESS
insteadReturns theEnumerationValue
forCronJob
result SUCCESS.- Returns:
- the
EnumerationValue
forCronJob
result SUCCESS
-
getUnknownResult
@Deprecated public EnumerationValue getUnknownResult()
Deprecated.since ages - useCronJobResult.UNKNOWN
insteadReturns theEnumerationValue
forCronJob
result UNKNOWN.- Returns:
- the
EnumerationValue
forCronJob
result UNKNOWN
-
tryToStop
@Deprecated public void tryToStop(long maxWait) throws JaloInvalidParameterException
Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)
insteadTries to stop a cronjob which is currently being executed.- Parameters:
maxWait
- the maximum time to wait for the cronjob to abort- Throws:
JaloInvalidParameterException
- if the assoziated job does not support abort- Since:
- 2.10
-
isRunning
@Deprecated public boolean isRunning()
Deprecated.Returnstrue
if theCronJob
is currently running.- Returns:
true
if theCronJob
is currently running
-
isRunningRestart
@Deprecated public boolean isRunningRestart()
Deprecated.Returnstrue
if theCronJob
has been restarted and is currently running.- Returns:
true
if theCronJob
has been restarted and is currently running
-
isPaused
@Deprecated public boolean isPaused()
Deprecated.Returnstrue
if theCronJob
is currently paused.- Returns:
true
if theCronJob
is currently paused
-
isFinished
@Deprecated public boolean isFinished()
Deprecated.Returnstrue
if theCronJob
has been finished.- Returns:
true
if theCronJob
has been finished
-
setRunning
@Deprecated protected void setRunning() throws java.lang.IllegalStateException
Deprecated.since ages - there is no strict counterpart in servicelayer however you can useCronJobService.performCronJob(de.hybris.platform.cronjob.model.CronJobModel, boolean)
instead to set status for given cronJob to RUNNINGSets the status of theCronJob
to RUNNING.- Throws:
java.lang.IllegalStateException
- if the status of theCronJob
is already RUNNING
-
setRunningRestart
@Deprecated protected void setRunningRestart() throws java.lang.IllegalStateException
Deprecated.since ages - there is no counterpart in service layerSets the status of theCronJob
to RUNNINGRESTART.- Throws:
java.lang.IllegalStateException
- if the status of theCronJob
is already RUNNING or RUNNINGRESTART
-
setPaused
@Deprecated public void setPaused() throws java.lang.IllegalStateException
Deprecated.since ages - there is no counterpart in service layerSets the status of theCronJob
to PAUSED.- Throws:
java.lang.IllegalStateException
- if the status of theCronJob
is not RUNNING or RUNNINGRESTART
-
setAborted
@Deprecated protected void setAborted()
Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)
insteadSets the status of theCronJob
to ABORTED.- Throws:
java.lang.IllegalStateException
- if the status of theCronJob
is not RUNNING or RUNNINGRESTART
-
getFinishedResult
@Deprecated public CronJob.CronJobResult getFinishedResult(boolean success)
Deprecated.since ages - useCronJobResult
insteadReturns a newCronJobResult
instance. Depending on the parameter success either a failure result or a success result is returned.- Parameters:
success
- iftrue
a success result will be returned- Returns:
- a new
CronJobResult
instance
-
getUndoFinishedResult
@Deprecated public CronJob.CronJobResult getUndoFinishedResult(boolean success)
Deprecated.no counterpart since 4.3Returns a newCronJobResult
instance. Depending on the parameter success either a failure result or a success result is returned.- Parameters:
success
- iftrue
a success result will be returned- Returns:
- a new
CronJobResult
instance
-
getAbortResult
@Deprecated public CronJob.CronJobResult getAbortResult()
Deprecated.since ages - useCronJobStatus.ABORTED
instead
-
getPausedResult
@Deprecated public CronJob.CronJobResult getPausedResult()
Deprecated.since ages - useCronJobStatus.PAUSED
instead
-
setCronJobResult
@Deprecated public void setCronJobResult(CronJob.CronJobResult res)
Deprecated.no counterpart since 4.3
-
createSessionForCronJob
protected JaloSession createSessionForCronJob(JaloSession jaloSession)
Sets theUser
,Language
andCurrency
of the specifiedJaloSession
to the values defined inGeneratedCronJob.getSessionUser()
,GeneratedCronJob.getSessionLanguage()
,GeneratedCronJob.getSessionCurrency()
.- Parameters:
jaloSession
- theJaloSession
, which should be modified- Returns:
- the modified
JaloSession
-
filterSessionContextValuesFromCronJob
protected java.util.Map<java.lang.String,java.lang.Object> filterSessionContextValuesFromCronJob(java.util.Map<java.lang.String,java.lang.Object> sessionContextValues)
Session context values stored inside this cronjob are filtered for potentially harmful ones, since we cannot rule out that they're manually changed!
-
resetFinishedCronJob
protected void resetFinishedCronJob() throws java.lang.IllegalStateException
Reset theCronJob
. This includes:- Setting the current
Step
to.
- Adding all processed Steps to the list of pending steps and clearing the list of processed steps.
- Setting the status to UNKNOWN.
- Setting start- and endtime to
null
.
- Throws:
java.lang.IllegalStateException
- if theCronJob
has not the status FINISHED
- Setting the current
-
sendEmail
public void sendEmail(CronJob.CronJobResult cronJobResult) throws org.apache.commons.mail.EmailException
Sends aCronJobResult
per email. The following properties of your project|local.properties are used:- mail.from: Sender address of the email
- mail.replyto: Replyto address of the email
GeneratedCronJob.getEmailAddress()
.- Parameters:
cronJobResult
- theCronJobResult
, which will be send per email- Throws:
org.apache.commons.mail.EmailException
- if the sending of the email was not successful.
-
getRendererNotificationContext
protected CronJobNotificationTemplateContext getRendererNotificationContext()
Gets filled context object used by velocity to access CronJob's significant data. If in any sub types any other fields are needed simple overwrite getRendererNotificationContext returning any others getters- Returns:
- interface used by velocity to access CronJob's significant data
- Since:
- 3.1-u7
-
getFinishedEmailBody
protected java.lang.String getFinishedEmailBody(CronJob.CronJobResult cronJobResult)
- Since:
- 2.10
-
addChangeListener
public void addChangeListener(java.lang.String topic, ChangeListener listener)
Registers the specifiedChangeListener
for the specified topic.- Parameters:
topic
- the topic theChangeListener
will be regiersted forlistener
- theChangeListener
which should be registered
-
removeChangeListener
public void removeChangeListener(java.lang.String topic, ChangeListener listener)
Removes the registration of specifiedChangeListener
for the specified topic.- Parameters:
topic
- the topic theChangeListener
should be deregiersted formlistener
- theChangeListener
which should be deregistered
-
removeAllChangeListener
public void removeAllChangeListener()
Removes all registeredChangeListeners
.
-
notifyChangeListeners
protected final void notifyChangeListeners(ChangeEvent event)
Notifies allChangeListeners
, which are registered for the topic of the specified event.- Parameters:
event
- theChangeEvent
all registeredChangeListeners
should be notfied from
-
getTimeTable
@Deprecated public java.lang.String getTimeTable(SessionContext ctx)
Deprecated.since ages - useCronJobModel.getTimeTable()
instead.Returns a localized text, representing the timetable(s) of theCronJobs
trigger(s).- Parameters:
ctx
- theSessionContext
, which will be used- Returns:
- the localized timeTable text
-
addToPendingSteps
@Deprecated public void addToPendingSteps(SessionContext ctx, Step step)
Deprecated.since 4.3Appends the specifiedStep
to the list of pending steps. This method is only used, if the assignedJob
(GeneratedCronJob.getJob()
) is aBatchJob
.- Overrides:
addToPendingSteps
in classGeneratedCronJob
- Parameters:
ctx
- theSessionContext
, which will be usedstep
- theStep
, which will be appended
-
addToPendingSteps
@Deprecated public void addToPendingSteps(Step step)
Deprecated.since 4.3Appends the specifiedStep
to the list of pending steps. This method is only used, if the assignedJob
(GeneratedCronJob.getJob()
) is aBatchJob
.- Overrides:
addToPendingSteps
in classGeneratedCronJob
- Parameters:
step
- theStep
, which will be appended
-
addToProcessedSteps
@Deprecated public void addToProcessedSteps(SessionContext ctx, Step step)
Deprecated.since 4.3Appends the specifiedStep
to the list of processed steps. This method is only used, if the assignedJob
(GeneratedCronJob.getJob()
) is aBatchJob
.- Overrides:
addToProcessedSteps
in classGeneratedCronJob
- Parameters:
ctx
- theSessionContext
, which will be usedstep
- theStep
, which will be appended
-
addToProcessedSteps
@Deprecated public void addToProcessedSteps(Step step)
Deprecated.since 4.3Appends the specifiedStep
to the list of processed steps. This method is only used, if the assignedJob
(GeneratedCronJob.getJob()
) is aBatchJob
.- Overrides:
addToProcessedSteps
in classGeneratedCronJob
- Parameters:
step
- theStep
, which will be appended
-
mustRunOnOtherNode
public boolean mustRunOnOtherNode()
Tells whether or not this cronjob must be run on another node. This may be the case when clustering is enabled and the current server instance is different from the one specified within the conjob (see {GeneratedCronJob.getNodeID()
).
-
createRunOnceTrigger
@Deprecated public void createRunOnceTrigger(java.util.Date date)
Deprecated.since ages - please refer toCronJobManager.createTrigger(CronJob, Date)
-
getTimeTable
@Deprecated public java.lang.String getTimeTable()
Deprecated.since agesReturns a localized text, representing the timetable(s) of theCronJobs
trigger(s).- Returns:
- the localized timeTable text
-
isAbortable
@Deprecated public boolean isAbortable()
Deprecated.Tells whether this cronjob is abortable. This method simply delegates toJob.isAbortable(CronJob)
.
-
setRequestAbort
public void setRequestAbort(SessionContext ctx, java.lang.Boolean abortRequested)
Sets the abort flag to the specified value.- Overrides:
setRequestAbort
in classGeneratedCronJob
- Parameters:
ctx
- theSessionContext
, which will be usedabortRequested
-
-
createNewLogFile
@Deprecated public LogFile createNewLogFile(java.lang.String fileName)
Deprecated.since ages - use plainLogFileModel
creation, refer to wiki documentation
-
getLogFiles
public java.util.Collection<LogFile> getLogFiles(SessionContext ctx)
Description copied from class:GeneratedCronJob
Generated method - Getter of theCronJob.logFiles
attribute.- Specified by:
getLogFiles
in classGeneratedCronJob
- Returns:
- the logFiles - A list of log files related to the current CronJob
-
setLogFiles
public void setLogFiles(SessionContext ctx, java.util.Collection<LogFile> param)
Description copied from class:GeneratedCronJob
Generated method - Setter of theCronJob.logFiles
attribute.- Specified by:
setLogFiles
in classGeneratedCronJob
param
- the logFiles - A list of log files related to the current CronJob
-
setNodeID
public void setNodeID(SessionContext ctx, java.lang.Integer value)
Description copied from class:GeneratedCronJob
Generated method - Setter of theCronJob.nodeID
attribute.- Overrides:
setNodeID
in classGeneratedCronJob
value
- the nodeID - The number of the cluster node on which the CronJob is to be run. This setting is relevant for clustered hybris Suite installations only.
-
setNodeGroup
public void setNodeGroup(SessionContext ctx, java.lang.String value)
Description copied from class:GeneratedCronJob
Generated method - Setter of theCronJob.nodeGroup
attribute.- Overrides:
setNodeGroup
in classGeneratedCronJob
value
- the nodeGroup
-
getCronJobThreadSettings
public static CronJob.CronJobThreadSettings getCronJobThreadSettings()
Returns thread settings for currently executing cronjob. Use this to copy thread settings to another thread in case your cronjob starts multiple threads.- Since:
- 3.1-u7
- See Also:
activateCronJobThreadSettings(CronJobThreadSettings)
,unsetCronJobThreadSettings(CronJobThreadSettings)
-
activateCronJobThreadSettings
public static void activateCronJobThreadSettings(CronJob.CronJobThreadSettings settings)
Activates cronjob thread settings for the current thread.Use this to copy thread settings to another thread in case your cronjob starts multiple threads.- Since:
- 3.1-u7
- See Also:
getCronJobThreadSettings()
,unsetCronJobThreadSettings(CronJobThreadSettings)
-
unsetCronJobThreadSettings
public static void unsetCronJobThreadSettings(CronJob.CronJobThreadSettings settings)
Deactivates cronjob thread settings for the current thread. Use this after copying thread settings to another thread in case your cronjob starts multiple threads.- Since:
- 3.1-u7
- See Also:
getCronJobThreadSettings()
,activateCronJobThreadSettings(CronJobThreadSettings)
-
instantiateCronJobHistory
protected CronJobHistory instantiateCronJobHistory() throws JaloGenericCreationException, JaloAbstractTypeException
-
finalizeCronJobHistory
protected void finalizeCronJobHistory()
-
-