Package de.hybris.platform.cronjob.jalo
Class CronJobManager
- java.lang.Object
-
- de.hybris.platform.jalo.Manager
-
- de.hybris.platform.jalo.extension.Extension
-
- de.hybris.platform.cronjob.jalo.GeneratedCronJobManager
-
- de.hybris.platform.cronjob.jalo.CronJobManager
-
- All Implemented Interfaces:
ItemLifecycleListener,java.io.Serializable
public class CronJobManager extends GeneratedCronJobManager
The CronJobManager offers create-methods for CronJobExtension items and methods forTriggerhandling.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.extension.Extension
Extension.RestrictedLanguagesProvider, Extension.RightsProvider
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBEAN_NAMEstatic CronJobLogListenercronjobLoggerstatic de.hybris.platform.cronjob.jalo.CronJobManager.CronJobTenantListenerlistenerstatic java.lang.StringLOADONSTARTUP_CONFIG_PARAM-
Fields inherited from class de.hybris.platform.cronjob.jalo.GeneratedCronJobManager
DEFAULT_INITIAL_ATTRIBUTES
-
-
Constructor Summary
Constructors Constructor Description CronJobManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanabortRunningCronJobsForClusterNode(int nodeID)Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead to abort a specific cronJob.voidafterItemCreation(SessionContext ctx, ComposedType type, Item createdItem, Item.ItemAttributeMap attributes)Overwritten to trigger re-poll whenever a new task item has been created.protected voidcheckBeforeItemRemoval(SessionContext ctx, Item item)Superclass method overridden to avoid calls to ejb layer.BatchJobcreateBatchJob(SessionContext ctx, java.util.Map params)Deprecated.since agesBatchJobis obsolete since 4.3BatchJobcreateBatchJob(java.lang.String code)Deprecated.since 4.3BatchJobis obsoleteBatchJobcreateBatchJob(java.util.Map params)Deprecated.since agesBatchJobis obsolete since 4.3ChangeDescriptorcreateChangeDescriptor(SessionContext ctx, java.util.Map params)Deprecated.since ages - use plainChangeDescriptorModelcreation instead, refer to wiki documentationChangeDescriptorcreateChangeDescriptor(java.util.Map params)Deprecated.since ages - use plainChangeDescriptorModelcreation instead, refer to wiki documentationCronJobcreateCronJob(Job job, java.lang.String code, boolean active)Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCronJobcreateCronJob(Job job, java.lang.String code, boolean active, int node)Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCronJobcreateCronJob(SessionContext ctx, java.util.Map params)Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCronJobcreateCronJob(java.util.Map params)Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCSVExportStepcreateCSVExportStep(SessionContext ctx, java.util.Map params)Deprecated.since 4.3Stepis obsoleteCSVExportStepcreateCSVExportStep(java.util.Map params)Deprecated.since 4.3Stepis obsoletevoidcreateEssentialData(java.util.Map params, JspContext jspc)FlexibleSearchCronJobcreateFlexibleSearchCronJob(SessionContext ctx, java.util.Map params)Deprecated.since agesFlexibleSearchCronJobis obsolete since 4.3FlexibleSearchCronJobcreateFlexibleSearchCronJob(java.util.Map params)Deprecated.since agesFlexibleSearchCronJobis obsolete since 4.3GenericCSVImportStepcreateGenericCSVImportStep(SessionContext ctx, java.util.Map params)Deprecated.since 4.3Stepis obsoleteGenericCSVImportStepcreateGenericCSVImportStep(java.util.Map params)Deprecated.since 4.3Stepis obsoleteGetURLStepcreateGetURLStep(SessionContext ctx, java.util.Map params)Deprecated.since 4.3Stepis obsoleteGetURLStepcreateGetURLStep(java.util.Map params)Deprecated.since 4.3Stepis obsoleteJobLogcreateJobLog(SessionContext ctx, java.util.Map params)Deprecated.since ages - there should be used aJobLogModeldirectly insteadJobLogcreateJobLog(java.util.Map params)Deprecated.since ages - there should be used aJobLogModeldirectly insteadJobMediacreateJobMedia(SessionContext ctx, java.util.Map params)Deprecated.since ages - there should be used aJobMediaModeldirectly insteadJobMediacreateJobMedia(java.util.Map params)Deprecated.since ages - there should be used aJobMediaModeldirectly insteadMediaProcessCronJobcreateMediaProcessCronJob(SessionContext ctx, java.util.Map params)Deprecated.since ages - there should be used aMediaProcessCronJobModeldirectly insteadMediaProcessCronJobcreateMediaProcessCronJob(java.util.Map params)Deprecated.since ages - there should be used aMediaProcessCronJobModeldirectly insteadTriggercreateTrigger(CronJob cronJob, int second, boolean relative)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(CronJob cronJob, int second, int minute, boolean relative)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(CronJob cronJob, int second, int minute, int hour, boolean relative)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(CronJob cronJob, int second, int minute, int hour, int day, boolean relative)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, boolean relative)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year, java.util.List daysOfWeek, boolean relative)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(CronJob cronJob, int second, int minute, int hour, java.util.List daysOfWeek, boolean relative)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(CronJob cronJob, java.util.Date date)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(SessionContext ctx, java.util.Map params)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTriggercreateTrigger(java.util.Map params)Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationTypeSystemExportJobcreateTypeSystemExportJob(SessionContext ctx, java.util.Map params)Deprecated.since agesTypeSystemExportJobis obsolete since 4.3TypeSystemExportJobcreateTypeSystemExportJob(java.lang.String code)Deprecated.since agesTypeSystemExportJobis obsolete since 4.3TypeSystemExportJobcreateTypeSystemExportJob(java.util.Map params)Deprecated.since agesTypeSystemExportJobis obsolete since 4.3URLCronJobcreateURLCronJob(SessionContext ctx, java.util.Map params)Deprecated.since agesURLCronJobis obsolete since 4.3URLCronJobcreateURLCronJob(java.util.Map params)Deprecated.since agesURLCronJobis obsolete since 4.3protected voiddoStart(java.lang.String cronJobPK)protected TriggerTaskfindTaskForTrigger(Trigger trigger)Searches for Task for the given Trigger.java.util.Collection<Trigger>getActiveTriggers()Deprecated.since ages - as of release 4.3, please useTriggerService.getActiveTriggers()java.util.Collection<Trigger>getActiveTriggers(java.util.Date date)Deprecated.since ages - as of release 4.3, please useTriggerService.getActiveTriggers(Calendar)protected java.lang.StringgetCronjobBroadcastMessagePrefix()MediaFoldergetCronJobMediaFolder()Deprecated.since ages - use plainMediaFolderModelcreation instead, refer to wiki documentationRendererTemplategetDefaultCronJobFinishNotificationTemplate()Deprecated.since ages - useRendererService.getRendererTemplateForCode(String)insteadstatic CronJobManagergetInstance()Returns the CronJobManager instance.static CronJobManagergetInstance(Tenant tenant)JobgetJob(java.lang.String code)Deprecated.since ages - use plainJobModelcreation instead, refer to wiki documentationjava.lang.StringgetNextConjobNumber()Deprecated.since ages - please usegetNextCronjobNumber()instead!java.lang.StringgetNextCronjobNumber()MoveMediaJobgetOrCreateMoveMediaJob()Deprecated.since ages - useCronJobService.getJob(String)instead with spring bean ofMoveMediaJobPerformableas parameter value.java.util.Collection<CronJob>getRunningOrRestartedCronJobsForNode(int nodeID)Deprecated.since ages - useCronJobService.getRunningOrRestartedCronJobs()instead.protected TaskEnginegetTaskEngine()booleanisCreatorDisabled()Part ofDataCreatorinterface.voidnotifyInitializationEnd(java.util.Map params, JspContext ctx)voidnotifyInitializationStart(java.util.Map<java.lang.String,java.lang.String> params, JspContext ctx)protected voidnotifyItemRemoval(SessionContext ctx, Item item)Superclass method overridden to avoid calls to ejb layer.voidonFirstSessionCreation()Is called on first session creation (while startup) exactly one time.voidperformOnOtherNode(int nodeID, CronJob cronJob)Deprecated.since ages - useCronJobService.performCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead.protected AfterCronJobCrashAbortEventprepareCrashAbortEvent(CronJob cj)protected voidprocessStartMessage(java.lang.String str)protected voidsendAfterCronJobCrashAbortEvent(AfterCronJobCrashAbortEvent evt)voidsetKeyGenerator(KeyGenerator keyGenerator)protected voidstartTaskEngine()Starts the actual task engine.static voidstartTimerTask()Deprecated.since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngineprotected voidstartupCronjobEngine()protected voidstopConjobEngine()protected voidstopTaskEngine()Stops the task engine.static voidstopTimerTask()Deprecated.since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngine-
Methods inherited from class de.hybris.platform.cronjob.jalo.GeneratedCronJobManager
createAfterRetentionCleanupRule, createAfterRetentionCleanupRule, createBatch, createBatch, createBusinessProcess, createBusinessProcess, createBusinessProcessParameter, createBusinessProcessParameter, createCleanUpCronJob, createCleanUpCronJob, createCleanupDynamicProcessDefinitionsCronJob, createCleanupDynamicProcessDefinitionsCronJob, createCompositeCronJob, createCompositeCronJob, createCompositeEntry, createCompositeEntry, createCompositeJob, createCompositeJob, createCronJobHistory, createCronJobHistory, createDistributedProcess, createDistributedProcess, createDistributedProcessTransitionTask, createDistributedProcessTransitionTask, createDistributedProcessWorkerTask, createDistributedProcessWorkerTask, createDynamicMaintenanceCleanupJob, createDynamicMaintenanceCleanupJob, createDynamicProcessDefinition, createDynamicProcessDefinition, createFlexibleSearchRetentionRule, createFlexibleSearchRetentionRule, createJobSearchRestriction, createJobSearchRestriction, createLogFile, createLogFile, createMaintenanceCleanupJob, createMaintenanceCleanupJob, createMediaFolderStructureMigrationCronJob, createMediaFolderStructureMigrationCronJob, createMoveMediaCronJob, createMoveMediaCronJob, createMoveMediaJob, createMoveMediaJob, createProcessTask, createProcessTask, createProcessTaskLog, createProcessTaskLog, createProcessTaskLogMaintenanceJob, createProcessTaskLogMaintenanceJob, createRemoveItemsCronJob, createRemoveItemsCronJob, createRemoveItemsJob, createRemoveItemsJob, createRetentionJob, createRetentionJob, createScriptingJob, createScriptingJob, createScriptingTask, createScriptingTask, createServicelayerJob, createServicelayerJob, createSimpleAction, createSimpleAction, createSimpleBatch, createSimpleBatch, createSimpleDistributedProcess, createSimpleDistributedProcess, createTask, createTask, createTaskCondition, createTaskCondition, createTriggerTask, createTriggerTask, getDefaultAttributeModes, getName
-
Methods inherited from class de.hybris.platform.jalo.extension.Extension
createProjectData, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, writeReplace
-
Methods inherited from class de.hybris.platform.jalo.Manager
beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, init, setAttribute, setTenant, setTransientObject, wrap
-
-
-
-
Field Detail
-
LOADONSTARTUP_CONFIG_PARAM
public static final java.lang.String LOADONSTARTUP_CONFIG_PARAM
- See Also:
- Constant Field Values
-
BEAN_NAME
public static final java.lang.String BEAN_NAME
- See Also:
- Constant Field Values
-
listener
public static final de.hybris.platform.cronjob.jalo.CronJobManager.CronJobTenantListener listener
-
cronjobLogger
public static final CronJobLogListener cronjobLogger
-
-
Method Detail
-
setKeyGenerator
public void setKeyGenerator(KeyGenerator keyGenerator)
-
processStartMessage
protected void processStartMessage(java.lang.String str)
-
doStart
protected void doStart(java.lang.String cronJobPK)
-
performOnOtherNode
@Deprecated public void performOnOtherNode(int nodeID, CronJob cronJob)Deprecated.since ages - useCronJobService.performCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead.Tries to performs a given cronjob on a different node.- Parameters:
nodeID- the node to perform this cronjob atcronJob- the cronjob to perform
-
onFirstSessionCreation
public void onFirstSessionCreation()
Description copied from class:ExtensionIs called on first session creation (while startup) exactly one time. Put here code which has to be called within startup process.- Overrides:
onFirstSessionCreationin classExtension
-
startupCronjobEngine
protected void startupCronjobEngine()
-
stopConjobEngine
protected void stopConjobEngine()
-
getCronjobBroadcastMessagePrefix
protected java.lang.String getCronjobBroadcastMessagePrefix()
-
getInstance
public static CronJobManager getInstance()
Returns the CronJobManager instance.- Returns:
- the CronJobManager instance
-
getInstance
public static CronJobManager getInstance(Tenant tenant)
-
checkBeforeItemRemoval
protected void checkBeforeItemRemoval(SessionContext ctx, Item item) throws ConsistencyCheckException
Superclass method overridden to avoid calls to ejb layer.- Overrides:
checkBeforeItemRemovalin classExtension- Parameters:
ctx- the current session contextitem- the item which should be removed- Throws:
ConsistencyCheckException- thrown to abort removal due to consistency errors
-
notifyItemRemoval
protected void notifyItemRemoval(SessionContext ctx, Item item)
Superclass method overridden to avoid calls to ejb layer.- Overrides:
notifyItemRemovalin classExtension- Parameters:
ctx- the currency session contextitem- the item which is going to be removed
-
createBatchJob
@Deprecated public BatchJob createBatchJob(java.lang.String code)
Deprecated.since 4.3BatchJobis obsoleteCreates aBatchJobwith the specified code.- Parameters:
code- the code of the newBatchJob- Returns:
- the new
BatchJob
-
createCronJob
@Deprecated public CronJob createCronJob(Job job, java.lang.String code, boolean active)
Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCreates a CronJob for the specifiedJob, with the specified code and active flag. The node id of the newCronJobis set to the value configured in the project|local.properties file in the extension directory with the 'cronjob.clusterid' property.- Parameters:
job- theJobwhich should be performed using this newCronJobcode- the code of the newCronJobactive-true, if the newCronJobshould be active.false, if theCronJobshould be inactive- Returns:
- the new
CronJob
-
createCronJob
@Deprecated public CronJob createCronJob(Job job, java.lang.String code, boolean active, int node)
Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCreates a CronJob for the specifiedJob, with the specified code and active flag. The node id of the newCronJobis set to the value configured in the project|local.properties file in the extension directory with the 'cronjob.mastermode' property.- Parameters:
job- theJobwhich should be performed using this newCronJobcode- the code of the newCronJobactive-true, if the newCronJobshould be active.false, if theCronJobshould be inactivenode- the id of the node, thisCronJobshould be executed on- Returns:
- the new
CronJob
-
createTypeSystemExportJob
@Deprecated public TypeSystemExportJob createTypeSystemExportJob(java.lang.String code)
Deprecated.since agesTypeSystemExportJobis obsolete since 4.3Creates a newTypeSystemExportJobinstance with the specified code.- Parameters:
code- the code of the newTypeSystemExportJob- Returns:
- a new
TypeSystemExportJobinstance with the specified code
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, java.util.Date date)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates a trigger for a single date only.- Parameters:
cronJob- the cronjob to performdate- the date to perform cronjob at
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, int second, boolean relative)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, int second, int minute, boolean relative)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, boolean relative)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, boolean relative)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)day- the day of month theTriggershould fire (0-31 or -1 for every day)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, boolean relative)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)day- the day of month theTriggershould fire (0-31 or -1 for every day)month- the month at which theTriggershould fire (0-11 or -1 for every month)relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)day- the day of month theTriggershould fire (0-31 or -1 for every day)month- the month at which theTriggershould fire (0-11 or -1 for every month)year- the year when theTriggershould fire (-1 for every year)- Returns:
- the Trigger created
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, java.util.List daysOfWeek, boolean relative)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)daysOfWeek- aListof EnumerationValues ((@link CronJobConstants.TC.DayOfWeek}, Value constants ((@link CronJobConstants.Enumerations.DayOfWeek)})relative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
createTrigger
@Deprecated public Trigger createTrigger(CronJob cronJob, int second, int minute, int hour, int day, int month, int year, java.util.List daysOfWeek, boolean relative)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates aTriggerfor the specifiedCronJob.- Parameters:
cronJob- theCronJobtheTriggershould be assigned tosecond- the second at which theTriggershould fire (0-59 or -1 for every second)minute- the minute at which theTriggershould fire (0-59 or -1 for every minute)hour- hour at which theTriggershould fire (0-23 or -1 for every hour)day- the day of month theTriggershould fire (0-31 or -1 for every day)month- the month at which theTriggershould fire (0-11 or -1 for every month)year- the year when theTriggershould fire (-1 for every year)daysOfWeek- aListofrelative- true if time values should be considered relative to each other or false if not- Returns:
- the Trigger created
-
getJob
@Deprecated public Job getJob(java.lang.String code)
Deprecated.since ages - use plainJobModelcreation instead, refer to wiki documentationReturns theJobwith the specified code.- Parameters:
code- the code of the searchedJob- Returns:
- the Job
-
getRunningOrRestartedCronJobsForNode
@Deprecated public java.util.Collection<CronJob> getRunningOrRestartedCronJobsForNode(int nodeID)
Deprecated.since ages - useCronJobService.getRunningOrRestartedCronJobs()instead.Returns aCollectionof all running or restarted CronJobs for the specified nodeID.- Parameters:
nodeID- the ID of the node, for which all restarted or running Cronjobs should be returned- Returns:
- a
Collectionof all running or restarted CronJobs for the specified nodeID
-
abortRunningCronJobsForClusterNode
@Deprecated public boolean abortRunningCronJobsForClusterNode(int nodeID)
Deprecated.since ages - useCronJobService.requestAbortCronJob(de.hybris.platform.cronjob.model.CronJobModel)instead to abort a specific cronJob. Note that since 4.3 aborting the cronJob on the distant node is not possible.Sets all running or restarted CronJobs for the specified nodeID to status ABORT (usingCronJob.setAborted()). This is an internal method that should run only after system restart before the timerthread is started to catch all cronjobs that were hit by a hard shutdown (e.g. CTRL-C on Windows).- Parameters:
nodeID- the ID of the node, whose running / restarted CronJobs should be aborted- Returns:
trueif all CronJobs were aborted successfully,falseotherwise
-
sendAfterCronJobCrashAbortEvent
protected void sendAfterCronJobCrashAbortEvent(AfterCronJobCrashAbortEvent evt)
-
prepareCrashAbortEvent
protected AfterCronJobCrashAbortEvent prepareCrashAbortEvent(CronJob cj)
-
getActiveTriggers
@Deprecated public java.util.Collection<Trigger> getActiveTriggers()
Deprecated.since ages - as of release 4.3, please useTriggerService.getActiveTriggers()Returns aCollectionof all Triggers, whose next activation time (Trigger.getNextTime(long)lies before the current system time.- Returns:
- a
Collectionof all Triggers, whose next activation time (Trigger.getNextTime(long)is smaller than current system time
-
getActiveTriggers
@Deprecated public java.util.Collection<Trigger> getActiveTriggers(java.util.Date date)
Deprecated.since ages - as of release 4.3, please useTriggerService.getActiveTriggers(Calendar)Returns aCollectionof all Triggers, whose next activation time (Trigger.getNextTime(long)lies before the specified date.- Parameters:
date- the date- Returns:
- a
Collectionof all Triggers, whose next activation time (Trigger.getNextTime(long)lies before the specified date
-
createBatchJob
@Deprecated public BatchJob createBatchJob(java.util.Map params)
Deprecated.since agesBatchJobis obsolete since 4.3Creates a newBatchJobusing the parameters specified in the paramsMap.- Overrides:
createBatchJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
BatchJobcreated using the parameters specified in the paramsMap
-
createBatchJob
@Deprecated public BatchJob createBatchJob(SessionContext ctx, java.util.Map params)
Deprecated.since agesBatchJobis obsolete since 4.3Creates a newBatchJobusing the parameters specified in the paramsMap.- Overrides:
createBatchJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
BatchJobcreated using the parameters specified in the paramsMap
-
createChangeDescriptor
@Deprecated public ChangeDescriptor createChangeDescriptor(java.util.Map params)
Deprecated.since ages - use plainChangeDescriptorModelcreation instead, refer to wiki documentationCreates a newChangeDescriptorusing the parameters specified in the paramsMap.- Overrides:
createChangeDescriptorin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
ChangeDescriptorcreated using the parameters specified in the paramsMap
-
createChangeDescriptor
@Deprecated public ChangeDescriptor createChangeDescriptor(SessionContext ctx, java.util.Map params)
Deprecated.since ages - use plainChangeDescriptorModelcreation instead, refer to wiki documentationCreates a newChangeDescriptorusing the parameters specified in the paramsMap.- Overrides:
createChangeDescriptorin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
ChangeDescriptorcreated using the parameters specified in the paramsMap
-
createCronJob
@Deprecated public CronJob createCronJob(java.util.Map params)
Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCreates a newCronJobusing the parameters specified in the paramsMap.- Overrides:
createCronJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
CronJobcreated using the parameters specified in the paramsMap
-
createCronJob
@Deprecated public CronJob createCronJob(SessionContext ctx, java.util.Map params)
Deprecated.since ages - use plainCronJobModelcreation instead, refer to wiki documentationCreates a newCronJobusing the parameters specified in the paramsMap.- Overrides:
createCronJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
CronJobcreated using the parameters specified in the paramsMap
-
createCSVExportStep
@Deprecated public CSVExportStep createCSVExportStep(java.util.Map params)
Deprecated.since 4.3Stepis obsoleteCreates a newCSVExportStepusing the parameters specified in the paramsMap.- Overrides:
createCSVExportStepin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
CSVExportStepcreated using the parameters specified in the paramsMap
-
createCSVExportStep
@Deprecated public CSVExportStep createCSVExportStep(SessionContext ctx, java.util.Map params)
Deprecated.since 4.3Stepis obsoleteCreates a newCSVExportStepusing the parameters specified in the paramsMap.- Overrides:
createCSVExportStepin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
CSVExportStepcreated using the parameters specified in the paramsMap
-
createFlexibleSearchCronJob
@Deprecated public FlexibleSearchCronJob createFlexibleSearchCronJob(java.util.Map params)
Deprecated.since agesFlexibleSearchCronJobis obsolete since 4.3Creates a newFlexibleSearchCronJobusing the parameters specified in the paramsMap.- Overrides:
createFlexibleSearchCronJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
FlexibleSearchCronJobcreated using the parameters specified in the paramsMap
-
createFlexibleSearchCronJob
@Deprecated public FlexibleSearchCronJob createFlexibleSearchCronJob(SessionContext ctx, java.util.Map params)
Deprecated.since agesFlexibleSearchCronJobis obsolete since 4.3Creates a newFlexibleSearchCronJobusing the parameters specified in the paramsMap.- Overrides:
createFlexibleSearchCronJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
FlexibleSearchCronJobcreated using the parameters specified in the paramsMap
-
createGenericCSVImportStep
@Deprecated public GenericCSVImportStep createGenericCSVImportStep(java.util.Map params)
Deprecated.since 4.3Stepis obsoleteCreates a newGenericCSVImportStepusing the parameters specified in the paramsMap.- Overrides:
createGenericCSVImportStepin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
GenericCSVImportStepcreated using the parameters specified in the paramsMap
-
createGenericCSVImportStep
@Deprecated public GenericCSVImportStep createGenericCSVImportStep(SessionContext ctx, java.util.Map params)
Deprecated.since 4.3Stepis obsoleteCreates a newGenericCSVImportStepusing the parameters specified in the paramsMap.- Overrides:
createGenericCSVImportStepin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
GenericCSVImportStepcreated using the parameters specified in the paramsMap
-
createGetURLStep
@Deprecated public GetURLStep createGetURLStep(java.util.Map params)
Deprecated.since 4.3Stepis obsoleteCreates a newGetURLStepusing the parameters specified in the paramsMap.- Overrides:
createGetURLStepin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
GetURLStepcreated using the parameters specified in the paramsMap
-
createGetURLStep
@Deprecated public GetURLStep createGetURLStep(SessionContext ctx, java.util.Map params)
Deprecated.since 4.3Stepis obsoleteCreates a newGetURLStepusing the parameters specified in the paramsMap.- Overrides:
createGetURLStepin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
GetURLStepcreated using the parameters specified in the paramsMap
-
createJobLog
@Deprecated public JobLog createJobLog(java.util.Map params)
Deprecated.since ages - there should be used aJobLogModeldirectly insteadCreates a newJobLogusing the parameters specified in the paramsMap.- Overrides:
createJobLogin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
JobLogcreated using the parameters specified in the paramsMap
-
createJobLog
@Deprecated public JobLog createJobLog(SessionContext ctx, java.util.Map params)
Deprecated.since ages - there should be used aJobLogModeldirectly insteadCreates a newJobLogusing the parameters specified in the paramsMap.- Overrides:
createJobLogin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
JobLogcreated using the parameters specified in the paramsMap
-
createJobMedia
@Deprecated public JobMedia createJobMedia(java.util.Map params)
Deprecated.since ages - there should be used aJobMediaModeldirectly insteadCreates a newJobMediausing the parameters specified in the paramsMap.- Overrides:
createJobMediain classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
JobMediacreated using the parameters specified in the paramsMap
-
createJobMedia
@Deprecated public JobMedia createJobMedia(SessionContext ctx, java.util.Map params)
Deprecated.since ages - there should be used aJobMediaModeldirectly insteadCreates a newJobMediausing the parameters specified in the paramsMap.- Overrides:
createJobMediain classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
JobMediacreated using the parameters specified in the paramsMap
-
createMediaProcessCronJob
@Deprecated public MediaProcessCronJob createMediaProcessCronJob(java.util.Map params)
Deprecated.since ages - there should be used aMediaProcessCronJobModeldirectly insteadCreates a newMediaProcessCronJobusing the parameters specified in the paramsMap.- Overrides:
createMediaProcessCronJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
MediaProcessCronJobcreated using the parameters specified in the paramsMap
-
createMediaProcessCronJob
@Deprecated public MediaProcessCronJob createMediaProcessCronJob(SessionContext ctx, java.util.Map params)
Deprecated.since ages - there should be used aMediaProcessCronJobModeldirectly insteadCreates a newMediaProcessCronJobusing the parameters specified in the paramsMap.- Overrides:
createMediaProcessCronJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
MediaProcessCronJobcreated using the parameters specified in the paramsMap
-
createTrigger
@Deprecated public Trigger createTrigger(java.util.Map params)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates a newTriggerusing the parameters specified in the paramsMap.- Overrides:
createTriggerin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
Triggercreated using the parameters specified in the paramsMap
-
createTrigger
@Deprecated public Trigger createTrigger(SessionContext ctx, java.util.Map params)
Deprecated.since ages - use plainTriggerModelcreation instead, refer to wiki documentationCreates a newTriggerusing the parameters specified in the paramsMap. Since 5.5.1 TriggerTask is created additionally.- Overrides:
createTriggerin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
Triggercreated using the parameters specified in the paramsMap
-
createTypeSystemExportJob
@Deprecated public TypeSystemExportJob createTypeSystemExportJob(java.util.Map params)
Deprecated.since agesTypeSystemExportJobis obsolete since 4.3Creates a newTypeSystemExportJobusing the parameters specified in the paramsMap.- Overrides:
createTypeSystemExportJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
TypeSystemExportJobcreated using the parameters specified in the paramsMap
-
createTypeSystemExportJob
@Deprecated public TypeSystemExportJob createTypeSystemExportJob(SessionContext ctx, java.util.Map params)
Deprecated.since agesTypeSystemExportJobis obsolete since 4.3Creates a newTypeSystemExportJobusing the parameters specified in the paramsMap.- Overrides:
createTypeSystemExportJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
TypeSystemExportJobcreated using the parameters specified in the paramsMap
-
createURLCronJob
@Deprecated public URLCronJob createURLCronJob(java.util.Map params)
Deprecated.since agesURLCronJobis obsolete since 4.3Creates a newURLCronJobusing the parameters specified in the paramsMap.- Overrides:
createURLCronJobin classGeneratedCronJobManager- Parameters:
params-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
URLCronJobcreated using the parameters specified in the paramsMap
-
createURLCronJob
@Deprecated public URLCronJob createURLCronJob(SessionContext ctx, java.util.Map params)
Deprecated.since agesURLCronJobis obsolete since 4.3Creates a newURLCronJobusing the parameters specified in the paramsMap.- Overrides:
createURLCronJobin classGeneratedCronJobManager- Parameters:
ctx- theSessionContext, which will be usedparams-Mapof parameters. (Mapping 'attribute qualifier' -> 'attribute value')- Returns:
- a new
URLCronJobcreated using the parameters specified in the paramsMap
-
getNextConjobNumber
@Deprecated public java.lang.String getNextConjobNumber()
Deprecated.since ages - please usegetNextCronjobNumber()instead!
-
getNextCronjobNumber
public java.lang.String getNextCronjobNumber()
-
isCreatorDisabled
public boolean isCreatorDisabled()
Part ofDataCreatorinterface. Returnsfalse- Overrides:
isCreatorDisabledin classExtension- Returns:
false
-
createEssentialData
public void createEssentialData(java.util.Map params, JspContext jspc) throws java.lang.Exception- Overrides:
createEssentialDatain classExtension- Throws:
java.lang.Exception
-
getDefaultCronJobFinishNotificationTemplate
@Deprecated public RendererTemplate getDefaultCronJobFinishNotificationTemplate()
Deprecated.since ages - useRendererService.getRendererTemplateForCode(String)insteadGets the default notification template for a cronjob. It is set at creation time of a cronjob if no template is provided.- Returns:
- default notification template
- Since:
- 3.1-u7
-
getCronJobMediaFolder
@Deprecated public MediaFolder getCronJobMediaFolder()
Deprecated.since ages - use plainMediaFolderModelcreation instead, refer to wiki documentationGets the HMC specificMediaFolderused for storing hmc system medias.- Returns:
- folder for hmc specific medias
- Since:
- 3.1-u4
-
findTaskForTrigger
protected TriggerTask findTaskForTrigger(Trigger trigger)
Searches for Task for the given Trigger.
-
startTimerTask
@Deprecated public static void startTimerTask()
Deprecated.since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngine
-
stopTimerTask
@Deprecated public static void stopTimerTask()
Deprecated.since ages - - Since 5.5.1 explicit CronJob management should not be done, because CronJobs are handled by TaskEngine
-
notifyInitializationStart
public void notifyInitializationStart(java.util.Map<java.lang.String,java.lang.String> params, JspContext ctx) throws java.lang.Exception- Overrides:
notifyInitializationStartin classExtension- Throws:
java.lang.Exception
-
notifyInitializationEnd
public void notifyInitializationEnd(java.util.Map params, JspContext ctx) throws java.lang.Exception- Overrides:
notifyInitializationEndin classExtension- Throws:
java.lang.Exception
-
getOrCreateMoveMediaJob
@Deprecated public MoveMediaJob getOrCreateMoveMediaJob()
Deprecated.since ages - useCronJobService.getJob(String)instead with spring bean ofMoveMediaJobPerformableas parameter value.Gets the central import job instance or creates it if not existent already.- Returns:
- import job instance
-
afterItemCreation
public void afterItemCreation(SessionContext ctx, ComposedType type, Item createdItem, Item.ItemAttributeMap attributes) throws JaloBusinessException
Overwritten to trigger re-poll whenever a new task item has been created. Creates also Tasks for Triggers if necessary.- Specified by:
afterItemCreationin interfaceItemLifecycleListener- Overrides:
afterItemCreationin classManager- Parameters:
ctx- the currency session contexttype- the type of the item which will be createdcreatedItem- the created item- Throws:
JaloBusinessException- See Also:
This method does nothing and may be overridden. CAUTION: This method will be called inside a transaction !!!
-
startTaskEngine
protected void startTaskEngine()
Starts the actual task engine. Internally a polling thread is polling scheduled tasks from database and performs them asynchronously.
-
stopTaskEngine
protected void stopTaskEngine()
Stops the task engine. From now on scheduled tasks are not longer performed at this platform instance. Please note that other nodes may still be running and perform tasks.
-
getTaskEngine
protected TaskEngine getTaskEngine()
-
-