org.jenkinsci.lib.xtrigger
Class AbstractTrigger
java.lang.Object
hudson.triggers.Trigger<hudson.model.BuildableItem>
org.jenkinsci.lib.xtrigger.AbstractTrigger
- All Implemented Interfaces:
- hudson.ExtensionPoint, hudson.model.Describable<hudson.triggers.Trigger<?>>, Serializable
public abstract class AbstractTrigger
- extends hudson.triggers.Trigger<hudson.model.BuildableItem>
- implements Serializable
- Author:
- Gregory Boissinot
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class hudson.triggers.Trigger |
hudson.triggers.Trigger.Cron |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Fields inherited from class hudson.triggers.Trigger |
job, spec, tabs, timer |
|
Constructor Summary |
AbstractTrigger(String cronTabSpec)
Builds a trigger object
Calls an implementation trigger |
| Methods inherited from class hudson.triggers.Trigger |
all, checkTriggers, for_, getProjectAction, getProjectActions, getSpec, init, readResolve, start, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTrigger
public AbstractTrigger(String cronTabSpec)
throws antlr.ANTLRException
- Builds a trigger object
Calls an implementation trigger
- Parameters:
cronTabSpec - the scheduler value
- Throws:
antlr.ANTLRException
getLogFile
protected abstract File 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
checkIfModified
protected abstract boolean checkIfModified(XTriggerLog log)
throws XTriggerException
- Checks if the new folder content has been modified
The date time and the content file are used.
- Returns:
- true if the new folder content has been modified
- Throws:
XTriggerException
resolveEnvVars
protected String resolveEnvVars(String value,
hudson.model.AbstractProject project,
hudson.model.Node node)
throws XTriggerException
- Throws:
XTriggerException
run
public void run()
- Overrides:
run in class hudson.triggers.Trigger<hudson.model.BuildableItem>
getName
protected abstract String getName()
getDescriptor
public XTriggerDescriptor getDescriptor()
- Specified by:
getDescriptor in interface hudson.model.Describable<hudson.triggers.Trigger<?>>- Overrides:
getDescriptor in class hudson.triggers.Trigger<hudson.model.BuildableItem>
getCause
protected abstract String getCause()
- Gets the trigger cause
- Returns:
- the trigger cause
getPollingNode
protected hudson.model.Node getPollingNode(XTriggerLog log)
- Get the node where the polling need to be done
The returned node must have a number of executor different of 0.
- Parameters:
log -
- Returns:
- the node; null if there is no available node
getPollingNodeListWithExecutors
protected List<hudson.model.Node> getPollingNodeListWithExecutors(XTriggerLog log)
Copyright © 2004-2012. All Rights Reserved.