org.kohsuke.stapler.DataBoundConstructor Java Examples

The following examples show how to use org.kohsuke.stapler.DataBoundConstructor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ListGitBranchesParameterDefinition.java    From list-git-branches-parameter-plugin with MIT License 6 votes vote down vote up
@DataBoundConstructor
public ListGitBranchesParameterDefinition(String name, String description, String remoteURL, String credentialsId, String defaultValue,
                                          SortMode sortMode, SelectedValue selectedValue, Boolean quickFilterEnabled,
                                          String type, String tagFilter, String branchFilter) {
    super(name, description);
    this.remoteURL = remoteURL;
    this.credentialsId = credentialsId;
    this.defaultValue = defaultValue;
    this.uuid = UUID.randomUUID();
    this.sortMode = sortMode;
    this.selectedValue = selectedValue;
    this.quickFilterEnabled = quickFilterEnabled;
    this.listSize = DEFAULT_LIST_SIZE;

    setType(type);
    setTagFilter(tagFilter);
    setBranchFilter(branchFilter);
}
 
Example #2
Source File: JiraCloudSiteConfig.java    From atlassian-jira-software-cloud-plugin with Apache License 2.0 5 votes vote down vote up
@DataBoundConstructor
public JiraCloudSiteConfig(
        final String site, final String clientId, final String credentialsId) {
    this.site = requireNonNull(site);
    this.clientId = requireNonNull(clientId);
    this.credentialsId = requireNonNull(credentialsId);
}
 
Example #3
Source File: RecordIssuesStep.java    From warnings-ng-plugin with MIT License 5 votes vote down vote up
/**
 * Creates a new instance of {@link RecordIssuesStep}.
 */
@DataBoundConstructor
public RecordIssuesStep() {
    super();

    // empty constructor required for Stapler
}
 
Example #4
Source File: IssuesRecorder.java    From warnings-ng-plugin with MIT License 5 votes vote down vote up
/**
 * Creates a new instance of {@link IssuesRecorder}.
 */
@DataBoundConstructor
public IssuesRecorder() {
    super();

    // empty constructor required for Stapler
}
 
Example #5
Source File: PublishIssuesStep.java    From warnings-ng-plugin with MIT License 5 votes vote down vote up
/**
 * Creates a new instance of {@link PublishIssuesStep}.
 *
 * @param issues
 *         the reports to publish as {@link Action} in the {@link Job}.
 *
 * @throws IllegalArgumentException
 *         if the array of issues is {@code null} or empty
 */
@DataBoundConstructor
public PublishIssuesStep(@Nullable final List<AnnotatedReport> issues) {
    super();

    if (issues == null) {
        reports = new ArrayList<>();
    }
    else {
        reports = new ArrayList<>(issues);
    }
}
 
Example #6
Source File: ToolProxy.java    From warnings-ng-plugin with MIT License 5 votes vote down vote up
/**
 * Creates a new instance of {@link ToolProxy}.
 *
 * @param tool
 *         the ID of the tool to use
 */
@DataBoundConstructor
public ToolProxy(final Tool tool) {
    super();

    this.tool = tool;
}
 
Example #7
Source File: GitLabServer.java    From gitlab-branch-source-plugin with MIT License 5 votes vote down vote up
/**
 * Data Bound Constructor for only mandatory parameter serverUrl
 *
 * @param serverUrl The URL of this GitLab Server
 * @param name A unique name to use to describe the end-point, if empty replaced with a random
 * name
 * @param credentialsId The {@link PersonalAccessToken#getId()} of the credentials to use for
 * GitLab Server Authentication to access GitLab APIs
 */
@DataBoundConstructor
public GitLabServer(@NonNull String serverUrl, @NonNull String name,
    @NonNull String credentialsId) {
    this.serverUrl = defaultIfBlank(serverUrl, GITLAB_SERVER_URL);
    this.name = StringUtils.isBlank(name)
        ? getRandomName()
        : name;
    this.credentialsId = credentialsId;
}
 
Example #8
Source File: SourceDirectory.java    From warnings-ng-plugin with MIT License 5 votes vote down vote up
/**
 * Creates a new instance of {@link SourceDirectory}.
 *
 * @param path
 *         the name of the folder
 */
@DataBoundConstructor
public SourceDirectory(final String path) {
    super();

    this.path = path;
}
 
Example #9
Source File: FolderBasedAuthorizationStrategy.java    From folder-auth-plugin with MIT License 5 votes vote down vote up
@DataBoundConstructor
public FolderBasedAuthorizationStrategy(Set<GlobalRole> globalRoles, Set<FolderRole> folderRoles,
                                        Set<AgentRole> agentRoles) {
    this.agentRoles = new HashSet<>(agentRoles);
    this.globalRoles = new HashSet<>(globalRoles);
    this.folderRoles = new HashSet<>(folderRoles);

    // the sets above should NOT be modified. They are not Collections.unmodifiableSet()
    // because that complicates the serialized XML and add unnecessary nesting.

    init();
}
 
Example #10
Source File: DockerSwarmAgentTemplate.java    From docker-swarm-plugin with MIT License 5 votes vote down vote up
@DataBoundConstructor
public DockerSwarmAgentTemplate(final String image, final String hostBinds, final String hostNamedPipes, final String dnsIps,
        final String dnsSearchDomains, final String command, final String user, final String workingDir,
        final String hosts, final String secrets, final String configs, final String label, final String cacheDir,
        final String tmpfsDir, final String envVars, final long limitsNanoCPUs, final long limitsMemoryBytes,
        final long reservationsNanoCPUs, final long reservationsMemoryBytes, String portBinds, final boolean osWindows,
        final String baseWorkspaceLocation, final String placementConstraints, final String email,
        final String serverAddress, final String pullCredentialsId) {
    this.image = image;
    this.hostBinds = hostBinds;
    this.hostNamedPipes = hostNamedPipes;
    this.dnsIps = dnsIps;
    this.dnsSearchDomains = dnsSearchDomains;
    this.command = command;
    this.user = user;
    this.workingDir = workingDir;
    this.hosts = hosts;
    this.secrets = secrets;
    this.configs = configs;
    this.label = label;
    this.cacheDir = cacheDir;
    this.tmpfsDir = tmpfsDir;
    this.limitsNanoCPUs = limitsNanoCPUs;
    this.limitsMemoryBytes = limitsMemoryBytes;
    this.reservationsNanoCPUs = reservationsNanoCPUs;
    this.reservationsMemoryBytes = reservationsMemoryBytes;
    this.envVars = envVars;
    this.portBinds = portBinds;
    this.osWindows = osWindows;
    this.baseWorkspaceLocation = baseWorkspaceLocation;
    this.placementConstraints = placementConstraints;
    this.email = email;
    this.serverAddress = serverAddress;
    this.pullCredentialsId = pullCredentialsId;
}
 
Example #11
Source File: TagBuildStrategyImpl.java    From basic-branch-build-strategies-plugin with MIT License 5 votes vote down vote up
/**
 * Our constructor.
 *
 * @param atLeastDays the number of days old that the tag must be before it is considered for automatic build
 * @param atMostDays the number of days old that the tag must be after which it is no longer considered for automatic build.
 */
@DataBoundConstructor
public TagBuildStrategyImpl(@CheckForNull String atLeastDays, @CheckForNull String atMostDays) {
    this(
            TimeUnit.DAYS,
            Long.parseLong(StringUtils.defaultIfBlank(atLeastDays, "-1")),
            Long.parseLong(StringUtils.defaultIfBlank(atMostDays, "-1"))
    );
}
 
Example #12
Source File: ScanForIssuesStep.java    From warnings-ng-plugin with MIT License 5 votes vote down vote up
/**
 * Creates a new instance of {@link ScanForIssuesStep}.
 */
@DataBoundConstructor
public ScanForIssuesStep() {
    super();

    // empty constructor required for Stapler
}
 
Example #13
Source File: IssuesTotalColumn.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link ToolSelection}. */
@DataBoundConstructor
public IssuesTotalColumn() {
    super();
    // empty constructor required for stapler
}
 
Example #14
Source File: PreFast.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link PreFast}. */
@DataBoundConstructor
public PreFast() {
    super();
    // empty constructor required for stapler
}
 
Example #15
Source File: PyLint.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link PyLint}. */
@DataBoundConstructor
public PyLint() {
    super();
    // empty constructor required for stapler
}
 
Example #16
Source File: Perforce.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link Perforce}. */
@DataBoundConstructor
public Perforce() {
    super();
    // empty constructor required for stapler
}
 
Example #17
Source File: UpdateChangeTaskStep.java    From service-now-plugin with MIT License 4 votes vote down vote up
@DataBoundConstructor
public UpdateChangeTaskStep(ServiceNowConfiguration serviceNowConfiguration, String credentialsId, ServiceNowItem serviceNowItem) {
    super(serviceNowConfiguration, credentialsId, serviceNowItem);
}
 
Example #18
Source File: MyPy.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link MyPy}. */
@DataBoundConstructor
public MyPy() {
    super();
    // empty constructor required for stapler
}
 
Example #19
Source File: GetCTaskStep.java    From service-now-plugin with MIT License 4 votes vote down vote up
@DataBoundConstructor
public GetCTaskStep(ServiceNowConfiguration serviceNowConfiguration, String credentialsId, ServiceNowItem serviceNowItem) {
    super(serviceNowConfiguration, credentialsId, serviceNowItem);
}
 
Example #20
Source File: SpotBugs.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link SpotBugs}. */
@DataBoundConstructor
public SpotBugs() {
    super();
    // empty constructor required for stapler
}
 
Example #21
Source File: Ajc.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link Ajc}. */
@DataBoundConstructor
public Ajc() {
    super();
    // empty constructor required for stapler
}
 
Example #22
Source File: PutStep.java    From ssh-steps-plugin with Apache License 2.0 4 votes vote down vote up
@DataBoundConstructor
public PutStep(String from, String into) {
  this.from = from;
  this.into = into;
}
 
Example #23
Source File: DrMemory.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link DrMemory}. */
@DataBoundConstructor
public DrMemory() {
    super();
    // empty constructor required for stapler
}
 
Example #24
Source File: PcLint.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link PcLint}. */
@DataBoundConstructor
public PcLint() {
    super();
    // empty constructor required for stapler
}
 
Example #25
Source File: ZptLint.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link ZptLint}. */
@DataBoundConstructor
public ZptLint() {
    super();
    // empty constructor required for stapler
}
 
Example #26
Source File: GoLint.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link GoLint}. */
@DataBoundConstructor
public GoLint() {
    super();
    // empty constructor required for stapler
}
 
Example #27
Source File: CreateChangeStep.java    From service-now-plugin with MIT License 4 votes vote down vote up
@DataBoundConstructor
public CreateChangeStep(ServiceNowConfiguration serviceNowConfiguration, String credentialsId) {
    super(serviceNowConfiguration, credentialsId, null);
}
 
Example #28
Source File: CssLint.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link CssLint}. */
@DataBoundConstructor
public CssLint() {
    super();
    // empty constructor required for stapler
}
 
Example #29
Source File: Scala.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link Scala}. */
@DataBoundConstructor
public Scala() {
    super();
    // empty constructor required for stapler
}
 
Example #30
Source File: Doxygen.java    From warnings-ng-plugin with MIT License 4 votes vote down vote up
/** Creates a new instance of {@link Doxygen}. */
@DataBoundConstructor
public Doxygen() {
    super();
    // empty constructor required for stapler
}