提交 5543c771 编写于 作者: K kohsuke

added a parameter to the Trigger callback.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1109 71c3de6d-444a-0410-be80-ed276b4c234a
上级 ec7804ab
......@@ -171,7 +171,7 @@ public class Project extends Job<Project,Build> {
});
for (Trigger t : triggers)
t.start(this);
t.start(this,false);
updateTransientActions();
}
......@@ -539,7 +539,7 @@ public class Project extends Job<Project,Build> {
t.stop();
buildDescribable(req, Triggers.TRIGGERS, triggers, "trigger");
for (Trigger t : triggers)
t.start(this);
t.start(this,true);
updateTransientActions();
......
......@@ -37,6 +37,17 @@ public abstract class Trigger implements Describable<Trigger>, ExtensionPoint {
*
* @param project
* given so that the persisted form of this object won't have to have a back pointer.
* @param newInstance
* True if this is a newly created trigger first attached to the {@link Project}.
* False if this is invoked for a {@link Project} loaded from disk.
*/
public void start(Project project, boolean newInstance) {
start(project); // compatibility
}
/**
* @deprecated as of 1.61.
* Use {@link #start(Project, boolean)}.
*/
public void start(Project project) {
this.project = project;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册