Skip to content

Commit

Permalink
[JENKINS-19146] make CRLF to LF.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedam committed Aug 16, 2013
1 parent 3f3eb46 commit 353e3e4
Show file tree
Hide file tree
Showing 3 changed files with 466 additions and 466 deletions.
@@ -1,116 +1,116 @@
/*
* The MIT License
*
* Copyright (c) 2013 IKEDA Yasuyuki
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.jenkins_ci.plugins.flexible_publish;

import java.util.List;
import java.util.Set;

import org.jenkins_ci.plugins.run_condition.RunCondition;
import org.jenkins_ci.plugins.run_condition.BuildStepRunner;

import hudson.model.AbstractProject;
import hudson.model.DependencyGraph;

/**
* Wraps {@link DependencyGraph} and append {@link RunCondition} to {@link Dependency}.
*
* Methods other than addDependency are just calling methods of wrapped {@link DependencyGraph}
*/
public class ConditionalDependencyGraphWrapper extends DependencyGraph
{
private DependencyGraph graph;
private RunCondition condition;
private BuildStepRunner runner;

public ConditionalDependencyGraphWrapper(DependencyGraph graph, RunCondition condition, BuildStepRunner runner) {
this.graph = graph;
this.condition = condition;
this.runner = runner;
}

/**
* Add dependency. {@link RunCondition} will be attached.
*
* @see hudson.model.DependencyGraph#addDependency(hudson.model.DependencyGraph.Dependency)
*/
@Override
public void addDependency(Dependency dep) {
graph.addDependency(new ConditionalDependencyWrapper(dep, condition, runner));
}

@Override
public void build() {
graph.build();
}

@Override
public int compare(AbstractProject o1, AbstractProject o2) {
return graph.compare(o1, o2);
}

@Override
public <T> T getComputationalData(Class<T> key) {
return graph.getComputationalData(key);
}

@Override
public List<AbstractProject> getDownstream(AbstractProject p) {
return graph.getDownstream(p);
}

@Override
public List<Dependency> getDownstreamDependencies(AbstractProject p) {
return graph.getDownstreamDependencies(p);
}

@Override
public Set<AbstractProject> getTransitiveDownstream(AbstractProject src) {
return graph.getTransitiveDownstream(src);
}

@Override
public Set<AbstractProject> getTransitiveUpstream(AbstractProject src) {
return graph.getTransitiveUpstream(src);
}

@Override
public List<AbstractProject> getUpstream(AbstractProject p) {
return graph.getUpstream(p);
}

@Override
public List<Dependency> getUpstreamDependencies(AbstractProject p) {
return graph.getUpstreamDependencies(p);
}

@Override
public boolean hasIndirectDependencies(AbstractProject src, AbstractProject dst) {
return graph.hasIndirectDependencies(src, dst);
}

@Override
public <T> void putComputationalData(Class<T> key, T value) {
graph.putComputationalData(key, value);
}
}
/*
* The MIT License
*
* Copyright (c) 2013 IKEDA Yasuyuki
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.jenkins_ci.plugins.flexible_publish;

import java.util.List;
import java.util.Set;

import org.jenkins_ci.plugins.run_condition.RunCondition;
import org.jenkins_ci.plugins.run_condition.BuildStepRunner;

import hudson.model.AbstractProject;
import hudson.model.DependencyGraph;

/**
* Wraps {@link DependencyGraph} and append {@link RunCondition} to {@link Dependency}.
*
* Methods other than addDependency are just calling methods of wrapped {@link DependencyGraph}
*/
public class ConditionalDependencyGraphWrapper extends DependencyGraph
{
private DependencyGraph graph;
private RunCondition condition;
private BuildStepRunner runner;

public ConditionalDependencyGraphWrapper(DependencyGraph graph, RunCondition condition, BuildStepRunner runner) {
this.graph = graph;
this.condition = condition;
this.runner = runner;
}

/**
* Add dependency. {@link RunCondition} will be attached.
*
* @see hudson.model.DependencyGraph#addDependency(hudson.model.DependencyGraph.Dependency)
*/
@Override
public void addDependency(Dependency dep) {
graph.addDependency(new ConditionalDependencyWrapper(dep, condition, runner));
}

@Override
public void build() {
graph.build();
}

@Override
public int compare(AbstractProject o1, AbstractProject o2) {
return graph.compare(o1, o2);
}

@Override
public <T> T getComputationalData(Class<T> key) {
return graph.getComputationalData(key);
}

@Override
public List<AbstractProject> getDownstream(AbstractProject p) {
return graph.getDownstream(p);
}

@Override
public List<Dependency> getDownstreamDependencies(AbstractProject p) {
return graph.getDownstreamDependencies(p);
}

@Override
public Set<AbstractProject> getTransitiveDownstream(AbstractProject src) {
return graph.getTransitiveDownstream(src);
}

@Override
public Set<AbstractProject> getTransitiveUpstream(AbstractProject src) {
return graph.getTransitiveUpstream(src);
}

@Override
public List<AbstractProject> getUpstream(AbstractProject p) {
return graph.getUpstream(p);
}

@Override
public List<Dependency> getUpstreamDependencies(AbstractProject p) {
return graph.getUpstreamDependencies(p);
}

@Override
public boolean hasIndirectDependencies(AbstractProject src, AbstractProject dst) {
return graph.hasIndirectDependencies(src, dst);
}

@Override
public <T> void putComputationalData(Class<T> key, T value) {
graph.putComputationalData(key, value);
}
}

0 comments on commit 353e3e4

Please sign in to comment.