Skip to content
Permalink
Browse files

Modify to use @DataBoundSetter for new parameters.

  • Loading branch information
wadahiro committed Oct 8, 2015
1 parent cb3d137 commit a55c66cd908eb1b697e86572ae18fe203003155b
@@ -113,10 +113,16 @@ public AbstractGitSCMSource(String id) {

public abstract GitRepositoryBrowser getBrowser();

public abstract void setBrowser(GitRepositoryBrowser browser);

public abstract String getGitTool();

public abstract void setGitTool(String gitTool);

public abstract List<GitSCMExtension> getExtensions();

public abstract void setExtensions(List<GitSCMExtension> extensions);

public String getRemoteName() {
return "origin";
}
@@ -27,6 +27,7 @@
import com.cloudbees.plugins.credentials.common.StandardListBoxModel;
import com.cloudbees.plugins.credentials.common.StandardUsernameCredentials;
import com.cloudbees.plugins.credentials.domains.URIRequirementBuilder;

import hudson.Extension;
import hudson.Util;
import hudson.model.Item;
@@ -41,17 +42,21 @@
import hudson.security.ACL;
import hudson.util.ListBoxModel;
import jenkins.model.Jenkins;

import org.acegisecurity.context.SecurityContext;
import org.acegisecurity.context.SecurityContextHolder;

import jenkins.scm.api.SCMSource;
import jenkins.scm.api.SCMSourceDescriptor;
import jenkins.scm.api.SCMSourceOwner;
import jenkins.scm.api.SCMSourceOwners;

import org.eclipse.jgit.transport.RefSpec;
import org.eclipse.jgit.transport.URIish;
import org.jenkinsci.plugins.gitclient.GitClient;
import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
@@ -83,25 +88,20 @@

private final boolean ignoreOnPushNotifications;

private final GitRepositoryBrowser browser;
private GitRepositoryBrowser browser;

private final String gitTool;
private String gitTool;

private final List<GitSCMExtension> extensions;
private List<GitSCMExtension> extensions;

@DataBoundConstructor
public GitSCMSource(String id, String remote, String credentialsId, String includes, String excludes,
boolean ignoreOnPushNotifications, GitRepositoryBrowser browser, String gitTool,
List<GitSCMExtension> extensions) {
public GitSCMSource(String id, String remote, String credentialsId, String includes, String excludes, boolean ignoreOnPushNotifications) {
super(id);
this.remote = remote;
this.credentialsId = credentialsId;
this.includes = includes;
this.excludes = excludes;
this.ignoreOnPushNotifications = ignoreOnPushNotifications;
this.browser = browser;
this.gitTool = gitTool;
this.extensions = Util.fixNull(extensions);
}

public boolean isIgnoreOnPushNotifications() {
@@ -113,16 +113,34 @@ public GitRepositoryBrowser getBrowser() {
return browser;
}

@Override
@DataBoundSetter
public void setBrowser(GitRepositoryBrowser browser) {
this.browser = browser;
}

@Override
public String getGitTool() {
return gitTool;
}

@Override
@DataBoundSetter
public void setGitTool(String gitTool) {
this.gitTool = gitTool;
}

@Override
public List<GitSCMExtension> getExtensions() {
return extensions;
}

@Override
@DataBoundSetter
public void setExtensions(List<GitSCMExtension> extensions) {
this.extensions = Util.fixNull(extensions);
}

@Override
public String getCredentialsId() {
return credentialsId;

0 comments on commit a55c66c

Please sign in to comment.
You can’t perform that action at this time.