Package com.redwood.scheduler.action.api
Class ActionScriptObject
- java.lang.Object
- 
- com.redwood.scheduler.action.api.ActionScriptObject
 
- 
- All Implemented Interfaces:
- RestartableScriptObject
 
 public abstract class ActionScriptObject extends Object implements RestartableScriptObject Common methods for all job actions.
- 
- 
Constructor SummaryConstructors Constructor Description ActionScriptObject(boolean newFailJobOnError, Logger newLog)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseListgetCloseList()booleangetFailJobOnError()Get the current value of the fail job on error flag.booleangetForceRestart()Get the value of the Force restart flag for this trigger/action.intgetMaximumRestarts()Get the maximum number of restarts allowed for this trigger/action.Map<Object,Object>getPersistentMap()Get the persistent map.intgetRestartCount()Get the number of restarts for this trigger/action.StringgetRestartReason()Get the restart reason for this trigger/action.booleanlogRestarts()Should restarts of this trigger/action be logged?protected voidresetInLoop(int newRestarts)protected voidresetNewLoop()voidsetFailJobOnError(boolean newValue)Set the 'fail job on error' flag.voidsetForceRestart(boolean newValue, String newReason)Set the value of the force restart flag for this trigger/action.voidsetLogRestarts(boolean newValue)Set if restarts of this trigger/action should be logged.voidsetMaximumRestarts(int newValue)Set the maximum number of restarts of allowed for this trigger/action.
 
- 
- 
- 
Constructor Detail- 
ActionScriptObjectpublic ActionScriptObject(boolean newFailJobOnError, Logger newLog)
 
- 
 - 
Method Detail- 
setFailJobOnErrorpublic final void setFailJobOnError(boolean newValue) Description copied from interface:RestartableScriptObjectSet the 'fail job on error' flag. This flag determines if the job should be failed if the action fails. Set to true to fail the job if the action fails, and false to ignore action failures. The default value is true.- Specified by:
- setFailJobOnErrorin interface- RestartableScriptObject
- Parameters:
- newValue- new value.
 
 - 
getFailJobOnErrorpublic final boolean getFailJobOnError() Description copied from interface:RestartableScriptObjectGet the current value of the fail job on error flag.- Specified by:
- getFailJobOnErrorin interface- RestartableScriptObject
- Returns:
- the current value.
- See Also:
- .
 
 - 
getMaximumRestartspublic int getMaximumRestarts() Description copied from interface:RestartableScriptObjectGet the maximum number of restarts allowed for this trigger/action.- Specified by:
- getMaximumRestartsin interface- RestartableScriptObject
- Returns:
- the maximum number of restarts allowed.
- See Also:
- .
 
 - 
logRestartspublic boolean logRestarts() Description copied from interface:RestartableScriptObjectShould restarts of this trigger/action be logged?- Specified by:
- logRestartsin interface- RestartableScriptObject
- Returns:
- true if restarts should be logged, false otherwise.
 
 - 
setLogRestartspublic void setLogRestarts(boolean newValue) Description copied from interface:RestartableScriptObjectSet if restarts of this trigger/action should be logged.- Specified by:
- setLogRestartsin interface- RestartableScriptObject
- Parameters:
- newValue- true if restarts should be logged, false otherwise.
 
 - 
setMaximumRestartspublic void setMaximumRestarts(int newValue) Description copied from interface:RestartableScriptObjectSet the maximum number of restarts of allowed for this trigger/action. This is a total count for a given modification.- Specified by:
- setMaximumRestartsin interface- RestartableScriptObject
- Parameters:
- newValue- the maximum number of restarts allowed.
 
 - 
getRestartCountpublic int getRestartCount() Description copied from interface:RestartableScriptObjectGet the number of restarts for this trigger/action.- Specified by:
- getRestartCountin interface- RestartableScriptObject
- Returns:
- the number of restarts so far.
 
 - 
getPersistentMappublic Map<Object,Object> getPersistentMap() Description copied from interface:RestartableScriptObjectGet the persistent map. This can be used to store data across restarts of the trigger/action.- Specified by:
- getPersistentMapin interface- RestartableScriptObject
- Returns:
- the persistent map.
 
 - 
setForceRestartpublic void setForceRestart(boolean newValue, String newReason)Description copied from interface:RestartableScriptObjectSet the value of the force restart flag for this trigger/action. Forced restarts do not effect the restart count.- Specified by:
- setForceRestartin interface- RestartableScriptObject
- Parameters:
- newValue- true to force a restart, false to suppress a previous request to force a restart.
- newReason- the reason for the restart, will be logged.
 
 - 
getForceRestartpublic boolean getForceRestart() Description copied from interface:RestartableScriptObjectGet the value of the Force restart flag for this trigger/action.- Specified by:
- getForceRestartin interface- RestartableScriptObject
- Returns:
- the value of the force restart flag.
 
 - 
getRestartReasonpublic String getRestartReason() Description copied from interface:RestartableScriptObjectGet the restart reason for this trigger/action.- Specified by:
- getRestartReasonin interface- RestartableScriptObject
- Returns:
- the restart reason.
 
 - 
resetNewLoopprotected void resetNewLoop() 
 - 
resetInLoopprotected void resetInLoop(int newRestarts) 
 - 
getCloseListpublic CloseList getCloseList() 
 
- 
 
-