mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 14:02:22 +00:00
BuildWrapper now has the getProjectAction method.
See http://www.nabble.com/Plugin-development-help-tt17870443.html git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10144 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
d3e6c65ac6
commit
cd6c126f4e
3 files changed
+25
No files matched your search
@@ -112,6 +112,11 @@ public class MatrixProject extends AbstractProject<MatrixProject,MatrixBuild> im
|
||||
if(a!=null)
|
||||
transientActions.add(a);
|
||||
}
|
||||
for (BuildWrapper step : buildWrappers) {
|
||||
Action a = step.getProjectAction(this);
|
||||
if(a!=null)
|
||||
transientActions.add(a);
|
||||
}
|
||||
for (Trigger trigger : triggers) {
|
||||
Action a = trigger.getProjectAction();
|
||||
if(a!=null)
|
||||
|
||||
@@ -166,6 +166,11 @@ public abstract class Project<P extends Project<P,B>,B extends Build<P,B>>
|
||||
if(a!=null)
|
||||
transientActions.add(a);
|
||||
}
|
||||
for (BuildWrapper step : buildWrappers) {
|
||||
Action a = step.getProjectAction(this);
|
||||
if(a!=null)
|
||||
transientActions.add(a);
|
||||
}
|
||||
for (Trigger trigger : triggers) {
|
||||
Action a = trigger.getProjectAction();
|
||||
if(a!=null)
|
||||
|
||||
@@ -7,6 +7,8 @@ import hudson.model.Build;
|
||||
import hudson.model.BuildListener;
|
||||
import hudson.model.Describable;
|
||||
import hudson.model.Project;
|
||||
import hudson.model.Action;
|
||||
import hudson.model.AbstractProject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
@@ -133,4 +135,17 @@ public abstract class BuildWrapper implements ExtensionPoint, Describable<BuildW
|
||||
public Environment setUp( Build build, Launcher launcher, BuildListener listener ) throws IOException, InterruptedException {
|
||||
throw new UnsupportedOperationException(getClass()+" needs to implement the setUp method");
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link Action} to be displayed in the job page.
|
||||
*
|
||||
* @param job
|
||||
* This object owns the {@link BuildWrapper}. The returned action will be added to this object.
|
||||
* @return
|
||||
* null if there's no such action.
|
||||
* @since 1.226
|
||||
*/
|
||||
public Action getProjectAction(AbstractProject job) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user