Owner(WorkflowRun run) { job = run.getParent().getFullName(); id = run.getId(); this.run = run; } private String key() {
public static String of(WorkflowRun build) { if (build == null) { return null; } return build.getParent().getFullName(); }
@Override public boolean hasAbortPermission() { return run.getParent().hasAbortPermission(); }
@Override public Label getAssignedLabel() { return run.getParent().getAssignedLabel(); }
@Override public Node getLastBuiltOn() { return run.getParent().getLastBuiltOn(); }
@Override public void checkAbortPermission() { run.getParent().checkAbortPermission(); }
@Override public long getEstimatedDuration() { return run.getParent().getEstimatedDuration(); }
@SuppressWarnings("rawtypes") @Override public boolean filter(Object context, Descriptor descriptor) { if (descriptor instanceof DescriptorImpl) { return context instanceof WorkflowJob && ((WorkflowJob) context).getParent() instanceof WorkflowMultiBranchProject; } return true; }
@Override public File getRootDir() throws IOException { return run().getRootDir(); } @Override public Queue.Executable getExecutable() throws IOException {
@Override public boolean shouldCalculateCulprits() { return isBuilding() || culprits == null; }
public void setQuietPeriod(Integer seconds) throws IOException { this.quietPeriod = seconds; save(); }
@Override public String getUrl() { return run.getUrl(); }
@Override public String getDisplayName() { return run.getDisplayName(); }
/** * Needed if it wants Pipeline jobs are categorized in Jenkins 2.x. * * TODO: Override when the baseline is upgraded to 2.x * * @return A string with the Item description. */ public String getDescription() { return Messages.WorkflowJob_Description(); }
public WorkflowJob(ItemGroup parent, String name) { super(parent, name); buildMixIn = createBuildMixIn(); }
@Override public Queue.Executable getExecutable() throws IOException { return run(); } @Override public String getUrl() throws IOException {
@Override public String getName() { return getDisplayName(); }
private String key() { return getParent().getFullName() + '/' + getId(); }
@SuppressWarnings("rawtypes") @Override public boolean filter(Object context, Descriptor descriptor) { if (descriptor instanceof DescriptorImpl) { return context instanceof WorkflowJob && ((WorkflowJob) context).getParent() instanceof WorkflowMultiBranchProject; } return true; }