Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-27208] DataBoundConstructor, DataBoundSetter
  • Loading branch information
recena committed Sep 27, 2015
1 parent 7847264 commit 2124750
Showing 1 changed file with 44 additions and 6 deletions.
50 changes: 44 additions & 6 deletions src/main/java/hudson/plugins/logparser/LogParserPublisher.java
Expand Up @@ -24,16 +24,18 @@
import jenkins.tasks.SimpleBuildStep;
import net.sf.json.JSONObject;

import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.StaplerRequest;

public class LogParserPublisher extends Recorder implements SimpleBuildStep, Serializable {
private static final long serialVersionUID = 1L;
public final boolean unstableOnWarning;
public final boolean failBuildOnError;
public final boolean showGraphs;
public final String parsingRulesPath;
public final boolean useProjectRule;
public final String projectRulePath;
public boolean unstableOnWarning;
public boolean failBuildOnError;
public boolean showGraphs;
public String parsingRulesPath;
public boolean useProjectRule;
public String projectRulePath;

/**
* Create new LogParserPublisher.
Expand All @@ -51,6 +53,7 @@ public class LogParserPublisher extends Recorder implements SimpleBuildStep, Ser
* @param projectRulePath
* path to project specific rules relative to workspace root.
*/
@Deprecated
private LogParserPublisher(final boolean unstableOnWarning,
final boolean failBuildOnError, final boolean showGraphs,
final String parsingRulesPath, final boolean useProjectRule,
Expand All @@ -64,6 +67,41 @@ private LogParserPublisher(final boolean unstableOnWarning,
this.projectRulePath = projectRulePath;
}

@DataBoundConstructor
public LogParserPublisher() {
super();
}

@DataBoundSetter
public void setUnstableOnWarning(boolean unstableOnWarning) {
this.unstableOnWarning = unstableOnWarning;
}

@DataBoundSetter
public void setFailBuildOnError(boolean failBuildOnError) {
this.failBuildOnError = failBuildOnError;
}

@DataBoundSetter
public void setShowGraphs(boolean showGraphs) {
this.showGraphs = showGraphs;
}

@DataBoundSetter
public void setUseProjectRule(final boolean useProjectRule) {
this.useProjectRule = useProjectRule;
}

@DataBoundSetter
public void setParsingRulesPath(final String parsingRulesPath) {
this.parsingRulesPath = parsingRulesPath;
}

@DataBoundSetter
public void setProjectRulePath(final String projectRulePath) {
this.projectRulePath = projectRulePath;
}

@Override
public boolean prebuild(final AbstractBuild<?, ?> build,
final BuildListener listener) {
Expand Down

0 comments on commit 2124750

Please sign in to comment.