Package de.hybris.platform.cronjob.jalo
Class CronJob
- All Implemented Interfaces:
Serializable,Comparable
- Direct Known Subclasses:
GeneratedAbstractMediaCronJob,GeneratedAbstractSnIndexerCronJob,GeneratedCartRemovalCronJob,GeneratedCartToOrderCronJob,GeneratedCleanUpCronJob,GeneratedCleanupDynamicProcessDefinitionsCronJob,GeneratedCompareCatalogVersionsCronJob,GeneratedCompositeCronJob,GeneratedCreateAuditReportCronJob,GeneratedCSTicketStagnationCronJob,GeneratedCxDefaultPersonalizationCalculationCronJob,GeneratedCxPersonalizationProcessCleanupCronJob,GeneratedCxResultsCleaningCronJob,GeneratedCxUpdateSegmentsCronJob,GeneratedDataSupplierCronJob,GeneratedDeleteDocumentFileCronJob,GeneratedExcelImportCronJob,GeneratedExportDataCronJob,GeneratedFlashBuyCronJob,GeneratedGeocodeAddressesCronJob,GeneratedImpExExportCronJob,GeneratedImpExImportCronJob,GeneratedMediaFolderStructureMigrationCronJob,GeneratedMediaProcessCronJob,GeneratedMoveMediaCronJob,GeneratedOldCartRemovalCronJob,GeneratedOldPaymentSubscriptionResultRemovalCronJob,GeneratedOrderScheduleCronJob,GeneratedOrderStatusUpdateCleanerCronJob,GeneratedOrderTemplateToOrderCronJob,GeneratedProductConfigurationPersistenceCleanUpCronJob,GeneratedProductExpressUpdateCleanerCronJob,GeneratedRemoveCatalogVersionCronJob,GeneratedRemoveItemsCronJob,GeneratedRemoveOrphanedFilesCronJob,GeneratedRuleEngineCronJob,GeneratedSessionEventsRemovalCronJob,GeneratedSiteMapMediaCronJob,GeneratedSolrIndexerCronJob,GeneratedSolrIndexOptimizationCronJob,GeneratedSolrQueryStatisticsCollectorCronJob,GeneratedSolrUpdateStopWordsCronJob,GeneratedSolrUpdateSynonymsCronJob,GeneratedSyncItemCronJob,GeneratedUncollectedOrdersCronJob,GeneratedWorkflow,GeneratedY2YSyncCronJob,OutboundSyncCronJob
The
CronJob stores runtime informations, which are used by the Job/BatchJob
during execution (normal & undo). For example the JaloSession which will be used during the execution of
a Job/BatchJob used the values of the attributes SessionUser,
SessionLanguage and SessionCurrency as presets for the SessionContext.
Furthermore all informations (JobLogs,ChangeDescriptors & CronJobResult),
related to an execution of a Job are assigned to the CronJob, which was used during their
execution.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.static classNested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException -
Field Summary
FieldsFields inherited from class de.hybris.platform.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, CURRENTRETRY, 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, NUMBEROFRETRIES, PENDINGSTEPS, PRIORITY, PROCESSEDSTEPS, QUERYCOUNT, REMOVEONEXIT, REQUESTABORT, REQUESTABORTSTEP, RESULT, RETRY, RUNNINGONCLUSTERNODE, SENDEMAIL, SESSIONCONTEXTVALUES, SESSIONCURRENCY, SESSIONLANGUAGE, SESSIONUSER, SINGLEEXECUTABLE, STARTTIME, STATUS, TRIGGERS, TRIGGERSHANDLER, USEREADONLYDATASOURCEFields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLEDFields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEFields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidActivates cronjob thread settings for the current thread.Use this to copy thread settings to another thread in case your cronjob starts multiple threads.protected ChangeDescriptoraddChangeDescriptor(Step forStep, String changeType, Item item, String description) Deprecated.since ages - not supported in futureaddChangeDescriptor(ComposedType changeDescriptorType, Step forStep, String changeType, PK item, String description, Map additionalAttributes) Deprecated.since ages - not supported in futureaddChangeDescriptor(ComposedType changeDescriptorType, Step forStep, String changeType, Item item, String description) Deprecated.since ages - not supported in futureaddChangeDescriptor(ComposedType changeDescriptorType, Step forStep, String changeType, Item item, String description, Map additionalAttributes) Deprecated.since ages - not supported in futurevoidaddChangeListener(String topic, ChangeListener listener) Registers the specifiedChangeListenerfor the specified topic.Adds a loggin message to this CronJob.Deprecated.since 4.3addLog(String message, Step forStep, EnumerationValue level) Deprecated.since 4.3protected JobLogaddLog(String message, Step forStep, EnumerationValue level, boolean appendToLogFile) addLog(String message, EnumerationValue level) Adds a loggin message with a given error level to this CronJob.intaddToCounter(int add) Increases the current counter of this cronjob.voidaddToPendingSteps(Step step) Deprecated.since 4.3voidaddToPendingSteps(SessionContext ctx, Step step) Deprecated.since 4.3voidaddToProcessedSteps(Step step) Deprecated.since 4.3voidaddToProcessedSteps(SessionContext ctx, Step step) Deprecated.since 4.3protected voidadjustAttributes(SessionContext ctx, Item.ItemAttributeMap attributes) booleancheckLogLevel(EnumerationValue configuredLevel, String configProperty, String defaultLevel) org.apache.log4j.LevelconvertEnumToLogLevel(EnumerationValue enumvalue) convertLogLevelToEnum(org.apache.log4j.Level level) protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) Has to be implemented for each concrete subtype of item.createNewLogFile(String fileName) Deprecated.since ages - use plainLogFileModelcreation, refer to wiki documentationvoidcreateRunOnceTrigger(Date date) Deprecated.since ages - please refer toCronJobManager.createTrigger(CronJob, Date)protected JaloSessioncreateSessionForCronJob(JaloSession jaloSession) Sets theUser,LanguageandCurrencyof the specifiedJaloSessionto the values defined inGeneratedCronJob.getSessionUser(),GeneratedCronJob.getSessionLanguage(),GeneratedCronJob.getSessionCurrency().protected voidcurrentStepDone(boolean undo) If undo isfalsethe currentStepis added to the list of processedStepsand the current step of theCronJobis set tonull.filterSessionContextValuesFromCronJob(Map<String, 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 voidDeprecated.since ages - useCronJobStatus.ABORTEDinsteadDeprecated.since ages - useCronJobStatus.ABORTEDinsteadgetChanges(int start, int count) Deprecated.since ages - not supported in futuregetChanges(Step step) Deprecated.since ages - not supported in futuregetChanges(Step step, int start, int count) Deprecated.since ages - not supported in futuregetChanges(Step step, String changeType) Deprecated.since ages - not supported in futuregetChanges(Step step, String changeType, int start, int count) Deprecated.since ages - not supported in futuregetChanges(Step step, String changeType, int start, int count, boolean ascending) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx, int start, int count) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx, Step step) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx, Step step, int start, int count) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx, Step step, String changeType) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx, Step step, String changeType, int start, int count) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx, Step step, String changeType, int start, int count, boolean ascending) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx, String changeType) Deprecated.since ages - not supported in futuregetChanges(SessionContext ctx, String changeType, int start, int count) Deprecated.since ages - not supported in futuregetChanges(String changeType) Deprecated.since ages - not supported in futuregetChanges(String changeType, int start, int count) Deprecated.since ages - not supported in futureintProvides the current counter value of this cronjob.Returns thread settings for currently executing cronjob.protected static final CronJobprotected static final CronJobDeprecated.since ages - useJobLogLevel.DEBUGinsteadDeprecated.since ages - useJobLogLevel.ERRORinsteadDeprecated.since ages - useCronJobResult.ERRORinsteadDeprecated.since ages - useCronJobResult.FAILUREinsteadDeprecated.since ages - useJobLogLevel.FATALinsteadprotected StringgetFinishedEmailBody(CronJob.CronJobResult cronJobResult) getFinishedResult(boolean success) Deprecated.since ages - useCronJobResultinsteadDeprecated.since ages - useCronJobStatus.FINISHEDinsteadDeprecated.since ages - useJobLogLevel.INFOinsteadGenerated method - Getter of theCronJob.logFilesattribute.Generated method - Getter of theCronJob.logLevelDatabaseattribute.Generated method - Getter of theCronJob.logLevelFileattribute.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)getLogText(SessionContext ctx) Deprecated.since ages - useCronJobService.getLogsAsText(de.hybris.platform.cronjob.model.CronJobModel)insteadgetMostRecentChange(Step step, String changeType) Deprecated.since ages - not supported in futureprotected IntegergetNextChangeNumber(ComposedType changeDescriptorType) Deprecated.since ages - not supported in futureDeprecated.since ages - useCronJobStatus.PAUSEDinsteadDeprecated.since ages - useCronJobStatus.PAUSEDinsteadprotected CronJobNotificationTemplateContextGets filled context object used by velocity to access CronJob's significant data.Deprecated.since ages - useCronJobStatus.RUNNINGRESTARTinsteadDeprecated.since ages - useCronJobStatus.RUNNINGinsteadDeprecated.since ages - useCronJobResult.SUCCESSinsteadDeprecated.since agesDeprecated.since ages - useCronJobModel.getTimeTable()instead.getUndoFinishedResult(boolean success) Deprecated.no counterpart since 4.3Deprecated.since ages - useJobLogLevel.UNKNOWNinsteadDeprecated.since ages - useCronJobResult.UNKNOWNinsteadDeprecated.since ages - useCronJobStatus.UNKNOWNinsteadDeprecated.since ages - useJobLogLevel.WARNINGinsteadprotected static booleanprotected CronJobHistorybooleanDeprecated.final booleanisEnabledFor(org.apache.log4j.Level level) Checks if the CronJob is enabled for logging with given log level.booleanDeprecated.booleanisPaused()Deprecated.booleanDeprecated.booleanDeprecated.booleanTells whether or not this cronjob must be run on another node.protected final voidnotifyChangeListeners(ChangeEvent event) Notifies allChangeListeners, which are registered for the topic of the specified event.voidremove(SessionContext ctx) Removes this item.voidRemoves all registeredChangeListeners.voidremoveChangeListener(String topic, ChangeListener listener) Removes the registration of specifiedChangeListenerfor the specified topic.voidResets the transient counter of this cronjob.protected voidReset theCronJob.voidsendEmail(CronJob.CronJobResult cronJobResult) Sends aCronJobResultper email.protected voidDeprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)insteadvoidDeprecated.no counterpart since 4.3protected static final voidsetCurrentlyExecutingCronJob(CronJob cronjob) protected voidsetCurrentStep(Step step, boolean undo) Sets the currentvoidsetEndTime(Date end) Sets the end time.voidsetIsEnabledForCheckDifference(long diff) Sets the difference between the point of times where the cache of theisEnabledFor(Level)will be reseted.protected voidsetJob(SessionContext ctx, Job job) Generated method - Setter of theCronJob.jobattribute.voidsetLogFiles(SessionContext ctx, Collection<LogFile> param) Generated method - Setter of theCronJob.logFilesattribute.voidsetNodeGroup(SessionContext ctx, String value) Generated method - Setter of theCronJob.nodeGroupattribute.voidsetNodeID(SessionContext ctx, Integer value) Generated method - Setter of theCronJob.nodeIDattribute.voidDeprecated.since ages - there is no counterpart in service layervoidsetRequestAbort(SessionContext ctx, Boolean abortRequested) Sets the abort flag to the specified value.voidsetResult(EnumerationValue result) Sets the result.protected voidDeprecated.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 voidDeprecated.since ages - there is no counterpart in service layervoidsetStartTime(Date start) Sets the end time.voidsetStatus(EnumerationValue status) Sets the status.toString()Returns theStringrepresentation of this item.voidtryToStop(long maxWait) Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)insteadstatic voidDeactivates cronjob thread settings for the current thread.protected static final voidMethods inherited from class de.hybris.platform.cronjob.jalo.GeneratedCronJob
addToCronJobHistoryEntries, addToCronJobHistoryEntries, addToTriggers, addToTriggers, getActiveCronJobHistory, getActiveCronJobHistory, getAlternativeDataSourceID, getAlternativeDataSourceID, getChanges, getCode, getCode, getCronJobHistoryEntries, getCronJobHistoryEntries, getCurrentRetry, getCurrentRetry, getCurrentRetryAsPrimitive, getCurrentRetryAsPrimitive, 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, getNumberOfRetries, getNumberOfRetries, getNumberOfRetriesAsPrimitive, getNumberOfRetriesAsPrimitive, 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, isUseReadOnlyDatasource, isUseReadOnlyDatasource, isUseReadOnlyDatasourceAsPrimitive, isUseReadOnlyDatasourceAsPrimitive, removeFromCronJobHistoryEntries, removeFromCronJobHistoryEntries, removeFromPendingSteps, removeFromPendingSteps, removeFromProcessedSteps, removeFromProcessedSteps, removeFromTriggers, removeFromTriggers, setActive, setActive, setActive, setActive, setActiveCronJobHistory, setActiveCronJobHistory, setAlternativeDataSourceID, setAlternativeDataSourceID, setChangeRecordingEnabled, setChangeRecordingEnabled, setChangeRecordingEnabled, setChangeRecordingEnabled, setCode, setCode, setCronJobHistoryEntries, setCronJobHistoryEntries, setCurrentRetry, setCurrentRetry, setCurrentRetry, setCurrentRetry, 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, setNumberOfRetries, setNumberOfRetries, setNumberOfRetries, setNumberOfRetries, 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, setUseReadOnlyDatasource, setUseReadOnlyDatasource, setUseReadOnlyDatasource, setUseReadOnlyDatasourceMethods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getNonInitialAttributes, getRelatedItems, getRelatedItems, setRelatedItemsMethods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertyMethods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyMethods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, 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, getPartOfRemovedSessionMarker, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, suppressRelation, useTA, writeReplaceMethods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
Field Details
-
CFG_FILTERED_CTX_ATTRIBUTES
- See Also:
-
-
Constructor Details
-
CronJob
public CronJob()
-
-
Method Details
-
setCurrentlyExecutingCronJob
-
unsetCurrentlyExecutingCronJob
protected static final void unsetCurrentlyExecutingCronJob() -
getCurrentlyExecutingCronJob
-
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:ItemHas 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:
createItemin 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
-
setJob
Description copied from class:GeneratedCronJobGenerated method - Setter of theCronJob.jobattribute.- Overrides:
setJobin classGeneratedCronJobjob- the job - References to the Job assigned to the CronJob
-
remove
Description copied from class:ItemRemoves 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:
removein 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
public int getCounter()Provides the current counter value of this cronjob.- See Also:
-
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:
-
addLog
Adds a loggin message to this CronJob.- Parameters:
message- The logging message- Returns:
- The JobLog object.
-
addLog
Deprecated.since 4.3Adds a loggin message for the givenStepto this CronJob.- Parameters:
message- The logging messageforStep- The Step this message belongs to- Returns:
- The JobLog object.
-
addLog
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(since="4.3", forRemoval=false) public JobLog addLog(String message, Step forStep, EnumerationValue level) Deprecated.since 4.3Adds a loggin message and error level for the givenStepto this CronJob.- Parameters:
message- The logging messageforStep- The Step this message belongs tolevel- The error level- Returns:
- The JobLog object.
-
convertLogLevelToEnum
-
convertEnumToLogLevel
-
addLog
protected JobLog addLog(String message, Step forStep, EnumerationValue level, boolean appendToLogFile) -
getLogLevelDatabase
Description copied from class:GeneratedCronJobGenerated method - Getter of theCronJob.logLevelDatabaseattribute.- Overrides:
getLogLevelDatabasein classGeneratedCronJob- Returns:
- the logLevelDatabase - Specifies the log level for logging to the database
-
getLogLevelFile
Description copied from class:GeneratedCronJobGenerated method - Getter of theCronJob.logLevelFileattribute.- Overrides:
getLogLevelFilein classGeneratedCronJob- Returns:
- the logLevelFile - Specifies the log level for logging to the file
-
checkLogLevel
public boolean checkLogLevel(EnumerationValue configuredLevel, String configProperty, 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.since ages - useCronJobService.getLogsAsText(de.hybris.platform.cronjob.model.CronJobModel)insteadReturns aStringrepresentation of the last 500JobLogs of theCronJob.- Specified by:
getLogTextin classGeneratedCronJob- Parameters:
ctx- theSessionContext, which will be used- Returns:
- a
Stringrepresentation of the last 500JobLogs of theCronJob
-
getLogs
@Deprecated(since="ages", forRemoval=false) public 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)) ofJobLogsas aCollection. TheJobLogsare 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
JobLogsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(SessionContext ctx) Deprecated.since ages - not supported in futureReturns aCollectionof allChangeDescriptorswhich are assigned to theCronJob. If the number of ChangeDescriptors is very high, consider usinggetChanges(SessionContext, int, int)method.- Specified by:
getChangesin classGeneratedCronJob- Parameters:
ctx- theSessionContext, which will be used- Returns:
- a
Collectionof allChangeDescriptorswhich are assigned to theCronJob
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step) Deprecated.since ages - not supported in futureReturns aCollectionof allChangeDescriptorswhich are assigned to theCronJoband 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, whoseChangeDescriptorsshould be returned- Returns:
- a
Collectionof allChangeDescriptorswhich are assigned to theCronJoband the specifiedStep
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(Step step) Deprecated.since ages - not supported in futureReturns aCollectionof allChangeDescriptorswhich are assigned to theCronJoband the specifiedStep. If the number of ChangeDescriptors is very high, consider usinggetChanges(SessionContext, Step, int, int)method.- Parameters:
step- theStep, whoseChangeDescriptorsshould be returned- Returns:
- a
Collectionof allChangeDescriptorswhich are assigned to theCronJoband the specifiedStep
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(String changeType) Deprecated.since ages - not supported in futureReturns aCollectionof allChangeDescriptorswith 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
Collectionof allChangeDescriptorswith the specified changeType and which are assigned to theCronJob. If the number of ChangeDescriptors is very high, consider usinggetChanges(String, int, int)
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(SessionContext ctx, String changeType) Deprecated.since ages - not supported in futureReturns aCollectionof allChangeDescriptorswith 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
Collectionof allChangeDescriptorswith the specified changeType and which are assigned to theCronJob. If the number of ChangeDescriptors is very high, consider usinggetChanges(String, int, int)
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(Step step, String changeType) Deprecated.since ages - not supported in futureReturns aCollectionof allChangeDescriptorswith the specified changeType and which are assigned to theCronJoband the specifiedStep.- Parameters:
step- theStep, whoseChangeDescriptorsshould be returnedchangeType- the changeType- Returns:
- a
Collectionof allChangeDescriptorswhich are assigned to theCronJoband the specifiedStep
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step, String changeType) Deprecated.since ages - not supported in futureReturns aCollectionof allChangeDescriptorswith the specified changeType and which are assigned to theCronJoband the specifiedStep.- Parameters:
ctx- theSessionContext, which will be usedstep- theStep, whoseChangeDescriptorsshould be returnedchangeType- the changeType- Returns:
- a
Collectionof allChangeDescriptorswhich are assigned to theCronJoband the specifiedStep
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(int start, int count) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollection. TheChangeDescriptorsare 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
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(SessionContext ctx, int start, int count) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollection. TheChangeDescriptorsare 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
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(Step step, int start, int count) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollectionwhich are assigned to the specifiedStep. TheChangeDescriptorsare ordered by their creation time.- Parameters:
step- theStep, whoseChangeDescriptorsshould be returnedstart- start index of the rangecount- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public 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)) ofChangeDescriptorsas aCollectionwhich are assigned to the specifiedStep. TheChangeDescriptorsare ordered by their creation time.- Parameters:
ctx- theSessionContext, which will be usedstep- theStep, whoseChangeDescriptorsshould be returnedstart- start index of the rangecount- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(String changeType, int start, int count) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollectionwhich have the specified changeType. TheChangeDescriptorsare 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
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(SessionContext ctx, String changeType, int start, int count) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollectionwhich have the specified changeType. TheChangeDescriptorsare 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
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(Step step, String changeType, int start, int count) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollectionwhich have the specified changeType and are assigned to the specifiedStep. TheChangeDescriptorsare ordered by their creation time.- Parameters:
step- theStep, whoseChangeDescriptorsshould be returnedchangeType- the changeTypestart- start index of the rangecount- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step, String changeType, int start, int count) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollectionwhich have the specified changeType and are assigned to the specifiedStep. TheChangeDescriptorsare ordered by their creation time.- Parameters:
ctx- theSessionContext, which will be usedstep- theStep, whoseChangeDescriptorsshould be returnedchangeType- the changeTypestart- start index of the rangecount- number of elements in the range- Returns:
- the specified range (from start -> (start + count)) of
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(Step step, String changeType, int start, int count, boolean ascending) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollectionwhich have the specified changeType and are assigned to the specifiedStep. TheChangeDescriptorsare ordered by their creation time.- Parameters:
step- theStep, whoseChangeDescriptorsshould 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
ChangeDescriptorsas aCollection
-
getChanges
@Deprecated(since="ages", forRemoval=false) public Collection<ChangeDescriptor> getChanges(SessionContext ctx, Step step, String changeType, int start, int count, boolean ascending) Deprecated.since ages - not supported in futureReturns the specified range (from start -> (start + count)) ofChangeDescriptorsas aCollectionwhich have the specified changeType and are assigned to the specifiedStep. TheChangeDescriptorsare ordered by their creation time.- Parameters:
ctx- theSessionContext, which will be usedstep- theStep, whoseChangeDescriptorsshould 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
ChangeDescriptorsas aCollection
-
getMostRecentChange
@Deprecated(since="ages", forRemoval=false) public ChangeDescriptor getMostRecentChange(Step step, String changeType) Deprecated.since ages - not supported in futureReturns the most recentChangeDescriptorof theCronJobwhich is assigned to the specifiedStepand has the specified changeType.- Parameters:
step- theStep, whoseChangeDescriptorsshould be returnedchangeType- The change type- Returns:
- the most recent
ChangeDescriptorof theCronJobwhich is assigned to the specifiedStepand has the specified changeType
-
addChangeDescriptor
@Deprecated(since="ages", forRemoval=false) protected ChangeDescriptor addChangeDescriptor(Step forStep, String changeType, Item item, String description) Deprecated.since ages - not supported in futureCreates a newChangeDescriptorwith the specifiedStep, changeType,Itemand description.- Parameters:
forStep- theStepof the newChangeDescriptorchangeType- the changeType of the newChangeDescriptoritem- theItemof the newChangeDescriptordescription- the description of the newChangeDescriptor- Returns:
- the new
ChangeDescriptor
-
getNextChangeNumber
@Deprecated(since="ages", forRemoval=false) protected 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(since="ages", forRemoval=false) public ChangeDescriptor addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, String changeType, Item item, String description) Deprecated.since ages - not supported in futureCreates a newChangeDescriptorwith the specifiedStep, changeType,Itemand description.- Parameters:
changeDescriptorType- the changeDescriptorTypeforStep- theStepof the newChangeDescriptorchangeType- the changeType of the newChangeDescriptoritem- theItemof the newChangeDescriptordescription- the description of the newChangeDescriptor- Returns:
- the new
ChangeDescriptor
-
addChangeDescriptor
@Deprecated(since="ages", forRemoval=false) public ChangeDescriptor addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, String changeType, Item item, String description, Map additionalAttributes) Deprecated.since ages - not supported in futureCreates a newChangeDescriptorwith the specifiedStep, changeType,Itemand description.- Parameters:
changeDescriptorType- the changeDescriptorTypeforStep- theStepof the newChangeDescriptorchangeType- the changeType of the newChangeDescriptoritem- theItemof the newChangeDescriptordescription- the description of the newChangeDescriptoradditionalAttributes- the additional attribute values for the specified changeDescriptorType- Returns:
- the new
ChangeDescriptor
-
addChangeDescriptor
@Deprecated(since="ages", forRemoval=false) public ChangeDescriptor addChangeDescriptor(ComposedType changeDescriptorType, Step forStep, String changeType, PK item, String description, Map additionalAttributes) Deprecated.since ages - not supported in futureCreates a newChangeDescriptorwith the specifiedStep, changeType,Itemand description.- Parameters:
changeDescriptorType- the changeDescriptorTypeforStep- theStepof the newChangeDescriptorchangeType- the changeType of the newChangeDescriptoritem- theItemPK of the newChangeDescriptordescription- the description of the newChangeDescriptoradditionalAttributes- the additional attribute values for the specified changeDescriptorType- Returns:
- the new
ChangeDescriptor
-
setStatus
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:
setStatusin classGeneratedCronJob- Parameters:
status- the new status
-
setResult
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:
setResultin classGeneratedCronJob- Parameters:
result- the new result
-
setStartTime
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:
setStartTimein classGeneratedCronJob- Parameters:
start- the new start time
-
setEndTime
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:
setEndTimein classGeneratedCronJob- Parameters:
end- the new end time
-
setCurrentStep
Sets the current- Parameters:
step-undo-
-
currentStepDone
protected void currentStepDone(boolean undo) If undo isfalsethe currentStepis added to the list of processedStepsand the current step of theCronJobis set tonull. If undo istrue, the currentStepis added to the begining of the list of pendingStepsand the current step of theCronJobis set tonull.- Parameters:
undo-trueif in undo mode,falseif in normal mode.
-
toString
Description copied from class:ItemReturns theStringrepresentation of this item. This is by default the representation of the primary key of this item. -
getFatalLogLevel
Deprecated.since ages - useJobLogLevel.FATALinsteadReturns theEnumerationValuefor log level FATAL.- Returns:
- the
EnumerationValuefor log level FATAL
-
getErrorLogLevel
Deprecated.since ages - useJobLogLevel.ERRORinsteadReturns theEnumerationValuefor log level ERROR.- Returns:
- the
EnumerationValuefor log level ERROR
-
getWarnLogLevel
Deprecated.since ages - useJobLogLevel.WARNINGinsteadReturns theEnumerationValuefor log level WARNING.- Returns:
- the
EnumerationValuefor log level WARNING
-
getInfoLogLevel
Deprecated.since ages - useJobLogLevel.INFOinsteadReturns theEnumerationValuefor log level INFO.- Returns:
- the
EnumerationValuefor log level INFO
-
getDebugLogLevel
Deprecated.since ages - useJobLogLevel.DEBUGinsteadReturns theEnumerationValuefor log level DEBUG.- Returns:
- the
EnumerationValuefor log level DEBUG
-
getUnknownLogLevel
Deprecated.since ages - useJobLogLevel.UNKNOWNinsteadReturns theEnumerationValuefor log level UNKNOWN.- Returns:
- the
EnumerationValuefor log level UNKNOWN
-
getFinishedStatus
Deprecated.since ages - useCronJobStatus.FINISHEDinsteadReturns theEnumerationValueforCronJobstatus FINISHED.- Returns:
- the
EnumerationValueforCronJobstatus FINISHED
-
getRunningStatus
Deprecated.since ages - useCronJobStatus.RUNNINGinsteadReturns theEnumerationValueforCronJobstatus RUNNING.- Returns:
- the
EnumerationValueforCronJobstatus RUNNING
-
getRunningRestartStatus
Deprecated.since ages - useCronJobStatus.RUNNINGRESTARTinsteadReturns theEnumerationValueforCronJobstatus RUNNINGRESTART.- Returns:
- the
EnumerationValueforCronJobstatus RUNNINGRESTART
-
getPausedStatus
Deprecated.since ages - useCronJobStatus.PAUSEDinsteadReturns theEnumerationValueforCronJobstatus PAUSED.- Returns:
- the
EnumerationValueforCronJobstatus PAUSED
-
getAbortedStatus
Deprecated.since ages - useCronJobStatus.ABORTEDinsteadReturns theEnumerationValueforCronJobstatus ABORTED.- Returns:
- the
EnumerationValueforCronJobstatus ABORTED
-
getUnknownStatus
Deprecated.since ages - useCronJobStatus.UNKNOWNinsteadReturns theEnumerationValueforCronJobstatus UNKNOWN.- Returns:
- the
EnumerationValueforCronJobstatus UNKNOWN
-
getErrorResult
Deprecated.since ages - useCronJobResult.ERRORinsteadReturns theEnumerationValueforCronJobresult ERROR.- Returns:
- the
EnumerationValueforCronJobresult ERROR
-
getFailureResult
Deprecated.since ages - useCronJobResult.FAILUREinsteadReturns theEnumerationValueforCronJobresult FAILURE.- Returns:
- the
EnumerationValueforCronJobresult FAILURE
-
getSuccessResult
Deprecated.since ages - useCronJobResult.SUCCESSinsteadReturns theEnumerationValueforCronJobresult SUCCESS.- Returns:
- the
EnumerationValueforCronJobresult SUCCESS
-
getUnknownResult
Deprecated.since ages - useCronJobResult.UNKNOWNinsteadReturns theEnumerationValueforCronJobresult UNKNOWN.- Returns:
- the
EnumerationValueforCronJobresult UNKNOWN
-
tryToStop
@Deprecated(since="ages", forRemoval=false) 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.Returnstrueif theCronJobis currently running.- Returns:
trueif theCronJobis currently running
-
isRunningRestart
Deprecated.Returnstrueif theCronJobhas been restarted and is currently running.- Returns:
trueif theCronJobhas been restarted and is currently running
-
isPaused
Deprecated.Returnstrueif theCronJobis currently paused.- Returns:
trueif theCronJobis currently paused
-
isFinished
Deprecated.Returnstrueif theCronJobhas been finished.- Returns:
trueif theCronJobhas been finished
-
setRunning
@Deprecated(since="ages", forRemoval=false) protected void setRunning() throws IllegalStateExceptionDeprecated.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 theCronJobto RUNNING.- Throws:
IllegalStateException- if the status of theCronJobis already RUNNING
-
setRunningRestart
@Deprecated(since="ages", forRemoval=false) protected void setRunningRestart() throws IllegalStateExceptionDeprecated.since ages - there is no counterpart in service layerSets the status of theCronJobto RUNNINGRESTART.- Throws:
IllegalStateException- if the status of theCronJobis already RUNNING or RUNNINGRESTART
-
setPaused
Deprecated.since ages - there is no counterpart in service layerSets the status of theCronJobto PAUSED.- Throws:
IllegalStateException- if the status of theCronJobis not RUNNING or RUNNINGRESTART
-
setAborted
Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)insteadSets the status of theCronJobto ABORTED.- Throws:
IllegalStateException- if the status of theCronJobis not RUNNING or RUNNINGRESTART
-
getFinishedResult
@Deprecated(since="ages", forRemoval=false) public CronJob.CronJobResult getFinishedResult(boolean success) Deprecated.since ages - useCronJobResultinsteadReturns a newCronJobResultinstance. Depending on the parameter success either a failure result or a success result is returned.- Parameters:
success- iftruea success result will be returned- Returns:
- a new
CronJobResultinstance
-
getUndoFinishedResult
@Deprecated(since="ages", forRemoval=false) public CronJob.CronJobResult getUndoFinishedResult(boolean success) Deprecated.no counterpart since 4.3Returns a newCronJobResultinstance. Depending on the parameter success either a failure result or a success result is returned.- Parameters:
success- iftruea success result will be returned- Returns:
- a new
CronJobResultinstance
-
getAbortResult
Deprecated.since ages - useCronJobStatus.ABORTEDinstead -
getPausedResult
Deprecated.since ages - useCronJobStatus.PAUSEDinstead -
setCronJobResult
Deprecated.no counterpart since 4.3 -
createSessionForCronJob
Sets theUser,LanguageandCurrencyof the specifiedJaloSessionto the values defined inGeneratedCronJob.getSessionUser(),GeneratedCronJob.getSessionLanguage(),GeneratedCronJob.getSessionCurrency().- Parameters:
jaloSession- theJaloSession, which should be modified- Returns:
- the modified
JaloSession
-
filterSessionContextValuesFromCronJob
protected Map<String,Object> filterSessionContextValuesFromCronJob(Map<String, 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
Reset theCronJob. This includes:- Setting the current
Stepto. - 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:
IllegalStateException- if theCronJobhas not the status FINISHED
- Setting the current
-
sendEmail
public void sendEmail(CronJob.CronJobResult cronJobResult) throws org.apache.commons.mail.EmailException Sends aCronJobResultper 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
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
- Since:
- 2.10
-
addChangeListener
Registers the specifiedChangeListenerfor the specified topic.- Parameters:
topic- the topic theChangeListenerwill be regiersted forlistener- theChangeListenerwhich should be registered
-
removeChangeListener
Removes the registration of specifiedChangeListenerfor the specified topic.- Parameters:
topic- the topic theChangeListenershould be deregiersted formlistener- theChangeListenerwhich should be deregistered
-
removeAllChangeListener
public void removeAllChangeListener()Removes all registeredChangeListeners. -
notifyChangeListeners
Notifies allChangeListeners, which are registered for the topic of the specified event.- Parameters:
event- theChangeEventall registeredChangeListenersshould be notfied from
-
getTimeTable
Deprecated.since ages - useCronJobModel.getTimeTable()instead.Returns a localized text, representing the timetable(s) of theCronJobstrigger(s).- Parameters:
ctx- theSessionContext, which will be used- Returns:
- the localized timeTable text
-
addToPendingSteps
@Deprecated(since="4.3", forRemoval=false) public void addToPendingSteps(SessionContext ctx, Step step) Deprecated.since 4.3Appends the specifiedStepto the list of pending steps. This method is only used, if the assignedJob(GeneratedCronJob.getJob()) is aBatchJob.- Overrides:
addToPendingStepsin classGeneratedCronJob- Parameters:
ctx- theSessionContext, which will be usedstep- theStep, which will be appended
-
addToPendingSteps
Deprecated.since 4.3Appends the specifiedStepto the list of pending steps. This method is only used, if the assignedJob(GeneratedCronJob.getJob()) is aBatchJob.- Overrides:
addToPendingStepsin classGeneratedCronJob- Parameters:
step- theStep, which will be appended
-
addToProcessedSteps
@Deprecated(since="4.3", forRemoval=false) public void addToProcessedSteps(SessionContext ctx, Step step) Deprecated.since 4.3Appends the specifiedStepto the list of processed steps. This method is only used, if the assignedJob(GeneratedCronJob.getJob()) is aBatchJob.- Overrides:
addToProcessedStepsin classGeneratedCronJob- Parameters:
ctx- theSessionContext, which will be usedstep- theStep, which will be appended
-
addToProcessedSteps
Deprecated.since 4.3Appends the specifiedStepto the list of processed steps. This method is only used, if the assignedJob(GeneratedCronJob.getJob()) is aBatchJob.- Overrides:
addToProcessedStepsin 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.since ages - please refer toCronJobManager.createTrigger(CronJob, Date) -
getTimeTable
Deprecated.since agesReturns a localized text, representing the timetable(s) of theCronJobstrigger(s).- Returns:
- the localized timeTable text
-
isAbortable
Deprecated.Tells whether this cronjob is abortable. This method simply delegates toJob.isAbortable(CronJob). -
setRequestAbort
Sets the abort flag to the specified value.- Overrides:
setRequestAbortin classGeneratedCronJob- Parameters:
ctx- theSessionContext, which will be usedabortRequested-
-
createNewLogFile
Deprecated.since ages - use plainLogFileModelcreation, refer to wiki documentation -
getLogFiles
Description copied from class:GeneratedCronJobGenerated method - Getter of theCronJob.logFilesattribute.- Specified by:
getLogFilesin classGeneratedCronJob- Returns:
- the logFiles - A list of log files related to the current CronJob
-
setLogFiles
Description copied from class:GeneratedCronJobGenerated method - Setter of theCronJob.logFilesattribute.- Specified by:
setLogFilesin classGeneratedCronJobparam- the logFiles - A list of log files related to the current CronJob
-
setNodeID
Description copied from class:GeneratedCronJobGenerated method - Setter of theCronJob.nodeIDattribute.- Overrides:
setNodeIDin classGeneratedCronJobvalue- 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
Description copied from class:GeneratedCronJobGenerated method - Setter of theCronJob.nodeGroupattribute.- Overrides:
setNodeGroupin classGeneratedCronJobvalue- the nodeGroup
-
getCronJobThreadSettings
Returns thread settings for currently executing cronjob. Use this to copy thread settings to another thread in case your cronjob starts multiple threads. -
activateCronJobThreadSettings
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:
-
unsetCronJobThreadSettings
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:
-
instantiateCronJobHistory
protected CronJobHistory instantiateCronJobHistory() throws JaloGenericCreationException, JaloAbstractTypeException -
finalizeCronJobHistory
protected void finalizeCronJobHistory()
-
CronJobResult