public abstract class AbstractTriggerByFullContext<C extends XTriggerContext> extends AbstractTrigger
Trigger.Cron
ExtensionPoint.LegacyInstancesAreScopedToHudson
LOGGER, offlineSlaveOnStartup
Modifier | Constructor and Description |
---|---|
|
AbstractTriggerByFullContext(String cronTabSpec)
Builds a trigger object
Calls an implementation trigger
|
protected |
AbstractTriggerByFullContext(String cronTabSpec,
boolean unblockConcurrentBuild) |
protected |
AbstractTriggerByFullContext(String cronTabSpec,
String triggerLabel) |
protected |
AbstractTriggerByFullContext(String cronTabSpec,
String triggerLabel,
boolean unblockConcurrentBuild) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
checkIfModified(C oldContext,
C newContext,
XTriggerLog log)
Checks if there are modifications in the environment between last poll
|
protected boolean |
checkIfModified(Node pollingNode,
XTriggerLog log)
Checks if there are modifications in the environment between last poll
|
protected boolean |
checkIfModified(XTriggerLog log) |
protected C |
getContext(Node pollingNode,
XTriggerLog log)
Captures the context
This method is alternative to getContext(XTriggerLog log)
It must be overridden
from 0.26
|
protected C |
getContext(XTriggerLog log)
Captures the context
This method is alternative to getContext(Node pollingNode, XTriggerLog log)
It must be overridden
from 0.26
|
abstract boolean |
isContextOnStartupFetched() |
protected void |
resetOldContext(C oldContext)
Resets the current context to the old context
|
protected void |
setNewContext(C context) |
protected void |
start(Node pollingNode,
BuildableItem project,
boolean newInstance,
XTriggerLog log)
Can be overridden if needed
|
getBuildCause, getCause, getDescriptor, getLogFile, getName, getScheduledActions, getScheduledXTriggerActions, getTriggerLabel, requirePollingNode, requiresWorkspaceForPolling, resolveEnvVars, run, start
all, checkTriggers, for_, getProjectAction, getProjectActions, getSpec, readResolve, stop
public AbstractTriggerByFullContext(String cronTabSpec) throws antlr.ANTLRException
cronTabSpec
- the scheduler valueantlr.ANTLRException
- the expression language expressionprotected AbstractTriggerByFullContext(String cronTabSpec, boolean unblockConcurrentBuild) throws antlr.ANTLRException
antlr.ANTLRException
protected AbstractTriggerByFullContext(String cronTabSpec, String triggerLabel) throws antlr.ANTLRException
antlr.ANTLRException
protected void start(Node pollingNode, BuildableItem project, boolean newInstance, XTriggerLog log) throws XTriggerException
start
in class AbstractTrigger
XTriggerException
public abstract boolean isContextOnStartupFetched()
protected boolean checkIfModified(Node pollingNode, XTriggerLog log) throws XTriggerException
AbstractTrigger
checkIfModified
in class AbstractTrigger
XTriggerException
protected boolean checkIfModified(XTriggerLog log) throws XTriggerException
checkIfModified
in class AbstractTrigger
XTriggerException
protected void setNewContext(C context)
protected void resetOldContext(C oldContext)
oldContext
- the previous contextprotected C getContext(Node pollingNode, XTriggerLog log) throws XTriggerException
XTriggerException
protected C getContext(XTriggerLog log) throws XTriggerException
XTriggerException
protected abstract boolean checkIfModified(C oldContext, C newContext, XTriggerLog log) throws XTriggerException
XTriggerException
Copyright © 2016–2022. All rights reserved.