PageRenderTime 18ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/hudson-core/src/main/java/hudson/model/queue/QueueTaskFilter.java

http://github.com/hudson/hudson
Java | 121 lines | 69 code | 23 blank | 29 comment | 0 complexity | e64c57eaef9572d1c9f5949bdd15abab MD5 | raw file
  1/*
  2 * The MIT License
  3 *
  4 * Copyright (c) 2010, InfraDNA, Inc.
  5 *
  6 * Permission is hereby granted, free of charge, to any person obtaining a copy
  7 * of this software and associated documentation files (the "Software"), to deal
  8 * in the Software without restriction, including without limitation the rights
  9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 10 * copies of the Software, and to permit persons to whom the Software is
 11 * furnished to do so, subject to the following conditions:
 12 *
 13 * The above copyright notice and this permission notice shall be included in
 14 * all copies or substantial portions of the Software.
 15 *
 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 22 * THE SOFTWARE.
 23 */
 24
 25package hudson.model.queue;
 26
 27import hudson.model.Label;
 28import hudson.model.Node;
 29import hudson.model.Queue;
 30import hudson.model.Queue.Executable;
 31import hudson.model.Queue.Task;
 32import hudson.model.ResourceList;
 33
 34import java.io.IOException;
 35import java.util.Collection;
 36
 37/**
 38 * Base class for defining filter {@link Queue.Task}.
 39 *
 40 * @author Kohsuke Kawaguchi
 41 * @since 1.360
 42 */
 43public abstract class QueueTaskFilter implements Queue.Task {
 44    private final Queue.Task base;
 45
 46    protected QueueTaskFilter(Task base) {
 47        this.base = base;
 48    }
 49
 50    public Label getAssignedLabel() {
 51        return base.getAssignedLabel();
 52    }
 53
 54    public Node getLastBuiltOn() {
 55        return base.getLastBuiltOn();
 56    }
 57
 58    public boolean isBuildBlocked() {
 59        return base.isBuildBlocked();
 60    }
 61
 62    public String getWhyBlocked() {
 63        return base.getWhyBlocked();
 64    }
 65
 66    public CauseOfBlockage getCauseOfBlockage() {
 67        return base.getCauseOfBlockage();
 68    }
 69
 70    public String getName() {
 71        return base.getName();
 72    }
 73
 74    public String getFullDisplayName() {
 75        return base.getFullDisplayName();
 76    }
 77
 78    public long getEstimatedDuration() {
 79        return base.getEstimatedDuration();
 80    }
 81
 82    public Executable createExecutable() throws IOException {
 83        return base.createExecutable();
 84    }
 85
 86    public void checkAbortPermission() {
 87        base.checkAbortPermission();
 88    }
 89
 90    public boolean hasAbortPermission() {
 91        return base.hasAbortPermission();
 92    }
 93
 94    public String getUrl() {
 95        return base.getUrl();
 96    }
 97
 98    public boolean isConcurrentBuild() {
 99        return base.isConcurrentBuild();
100    }
101
102    public String getDisplayName() {
103        return base.getDisplayName();
104    }
105
106    public ResourceList getResourceList() {
107        return base.getResourceList();
108    }
109
110    public Collection<? extends SubTask> getSubTasks() {
111        return base.getSubTasks();
112    }
113
114    public final Task getOwnerTask() {
115        return this;
116    }
117
118    public Object getSameNodeConstraint() {
119        return base.getSameNodeConstraint();
120    }
121}