public class AbortCronJobAction extends ItemAction
CronJob editors to be able to abort running Cronjobs. Add the
following tag (as subtag of either the <td> or the <listlayout> tag) to your hmc.tmpl to add the abort
action:
<action type="item"
classname="de.hybris.platform.hmc.ext.cronjob.AbortCronJobAction"
name="action.abortcronjob"/>
The action is used in the hmc.tmpl of the CronJobExtension
(<CronJobExtension-Directory>/hmc/resources/hmc.tmpl), just search for
'de.hybris.platform.hmc.ext.cronjob.AbortCronJobAction' to find the definition.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_WAIT |
| Constructor and Description |
|---|
AbortCronJobAction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isActive(ActionEvent event)
Returns
true, if the action is active. |
ActionResult |
perform(ActionEvent event)
Tries to abort the
CronJob, which is passed as part of the ActionEvent. |
canChange, canRead, canRemove, createDialogChip, getConfirmationMessage, getEditorContext, getHMCContext, getItem, getNodeParams, hasDialogChip, initialize, isAutoSave, isVisible, needConfirmation, needSaveBeforePerform, setAutoSavepublic static final int MAX_WAIT
public ActionResult perform(ActionEvent event) throws JaloBusinessException
CronJob, which is passed as part of the ActionEvent. The following
preconditions must be fulfilled, so that the CronJob can be aborted:
CronJob must be passed with the ActionEventCronJob must be changeable (the current user must have sufficent rights to change the
CronJob)CronJob must be currently running and the current Step / Job must
be abortableperform in interface HMCActionperform in class ItemActionevent - the eventJaloBusinessExceptionHMCAction.perform(de.hybris.platform.hmc.util.action.ActionEvent)public boolean isActive(ActionEvent event)
true, if the action is active. In order to be active, the following preconditions must be
fulfilled:
CronJob must be passed with the ActionEventCronJob must be changeable (the current user must have sufficent rights to change the
CronJob)CronJob must be currently runningStep (Step.isAbortable()) / the
Job must be abortableisActive in interface HMCStatefulActionisActive in class ItemActionevent - the actionEventtrue, if the action is activeHMCStatefulAction.isActive(de.hybris.platform.hmc.util.action.ActionEvent)Copyright © 2017 SAP SE. All Rights Reserved.