Class AbstractTrigger
- All Implemented Interfaces:
ExtensionPoint,Describable<Trigger<?>>,Serializable
- Direct Known Subclasses:
AbstractTriggerByFullContext
- Author:
- Gregory Boissinot
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.CronNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionAbstractTrigger(String cronTabSpec) protectedAbstractTrigger(String cronTabSpec, boolean unblockConcurrentBuild) protectedAbstractTrigger(String cronTabSpec, String triggerLabel) protectedAbstractTrigger(String cronTabSpec, String triggerLabel, boolean unblockConcurrentBuild) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancheckIfModified(Node pollingNode, XTriggerLog log) Checks if there are modifications in the environment between last pollprotected booleanprotected XTriggerCauseGet the build cause instance to set This method may be overridden by subclasses in order to add additional information to the causeprotected abstract StringgetCause()Gets the trigger causeprotected abstract FileGets the triggering log fileprotected abstract StringgetName()protected abstract Action[]getScheduledActions(Node pollingNode, XTriggerLog log) protected Action[]getScheduledXTriggerActions(Node pollingNode, XTriggerLog log) protected booleanprotected abstract booleanChecks if a consistency workspace is required for the pollingprotected StringresolveEnvVars(String value, AbstractProject<?, ?> project, Node node) Deprecated.voidrun()voidstart(BuildableItem project, boolean newInstance) protected voidstart(Node pollingNode, BuildableItem project, boolean newInstance, XTriggerLog log) Can be overridden if neededMethods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getProjectAction, getProjectActions, getSpec, readResolve, stop, toString
-
Field Details
-
LOGGER
-
offlineSlaveOnStartup
protected transient boolean offlineSlaveOnStartup
-
-
Constructor Details
-
AbstractTrigger
- Throws:
ANTLRException
-
AbstractTrigger
- Throws:
ANTLRException
-
AbstractTrigger
- Throws:
ANTLRException
-
AbstractTrigger
protected AbstractTrigger(String cronTabSpec, String triggerLabel, boolean unblockConcurrentBuild) throws ANTLRException - Throws:
ANTLRException
-
-
Method Details
-
getTriggerLabel
-
getLogFile
Gets the triggering log file- Returns:
- the trigger log
-
requiresWorkspaceForPolling
protected abstract boolean requiresWorkspaceForPolling()Checks if a consistency workspace is required for the polling- Returns:
- true if a workspace is required for the job, false otherwise
-
start
- Overrides:
startin classTrigger<BuildableItem>
-
start
protected void start(Node pollingNode, BuildableItem project, boolean newInstance, XTriggerLog log) throws XTriggerException Can be overridden if needed- Throws:
XTriggerException
-
resolveEnvVars
@Deprecated protected String resolveEnvVars(String value, AbstractProject<?, ?> project, Node node) throws XTriggerExceptionDeprecated.- Throws:
XTriggerException
-
run
public void run()- Overrides:
runin classTrigger<BuildableItem>
-
getName
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<Trigger<?>>- Overrides:
getDescriptorin classTrigger<BuildableItem>
-
getScheduledXTriggerActions
protected Action[] getScheduledXTriggerActions(Node pollingNode, XTriggerLog log) throws XTriggerException - Throws:
XTriggerException
-
getScheduledActions
-
checkIfModified
protected abstract boolean checkIfModified(Node pollingNode, XTriggerLog log) throws XTriggerException Checks if there are modifications in the environment between last poll- Returns:
- true if there are modifications
- Throws:
XTriggerException
-
requirePollingNode
protected boolean requirePollingNode() -
checkIfModified
- Throws:
XTriggerException
-
getCause
Gets the trigger cause- Returns:
- the trigger cause text
-
getBuildCause
Get the build cause instance to set This method may be overridden by subclasses in order to add additional information to the cause
-