Java源码示例:org.kohsuke.stapler.DataBoundConstructor
示例1
@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);
}
示例2
@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();
}
示例3
@DataBoundConstructor
public JiraCloudSiteConfig(
final String site, final String clientId, final String credentialsId) {
this.site = requireNonNull(site);
this.clientId = requireNonNull(clientId);
this.credentialsId = requireNonNull(credentialsId);
}
示例4
/**
* 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;
}
示例5
/**
* 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;
}
示例6
/**
* Creates a new instance of {@link RecordIssuesStep}.
*/
@DataBoundConstructor
public RecordIssuesStep() {
super();
// empty constructor required for Stapler
}
示例7
/**
* 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);
}
}
示例8
@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;
}
示例9
/**
* Creates a new instance of {@link ScanForIssuesStep}.
*/
@DataBoundConstructor
public ScanForIssuesStep() {
super();
// empty constructor required for Stapler
}
示例10
/**
* 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"))
);
}
示例11
/**
* Creates a new instance of {@link SourceDirectory}.
*
* @param path
* the name of the folder
*/
@DataBoundConstructor
public SourceDirectory(final String path) {
super();
this.path = path;
}
示例12
/**
* Creates a new instance of {@link IssuesRecorder}.
*/
@DataBoundConstructor
public IssuesRecorder() {
super();
// empty constructor required for Stapler
}
示例13
@DataBoundConstructor
public ConfigDrivenWorkflowMultiBranchProjectFactory() {}
示例14
@DataBoundConstructor public ConfigFileSCMBinder(String scriptPath, SCM jenkinsFileScm) {
this.scriptPath = scriptPath;
this.jenkinsFileScm = jenkinsFileScm;
}
示例15
@DataBoundConstructor
public ConfigDrivenWorkflowBranchProjectFactory() {}
示例16
/** Creates a new instance of {@link Xlc}. */
@DataBoundConstructor
public Xlc() {
super();
// empty constructor required for stapler
}
示例17
@DataBoundConstructor
public AgentRole(String name, Set<PermissionWrapper> permissions, Set<String> agents, Set<String> sids) {
super(name, permissions, sids);
this.agents = new HashSet<>(agents);
}
示例18
@DataBoundConstructor
public GlobalRole(String name, Set<PermissionWrapper> permissions, Set<String> sids) {
super(name, permissions, sids);
this.sids.addAll(sids);
}
示例19
/** Creates a new instance of {@link Iar}. */
@DataBoundConstructor
public Iar() {
super();
// empty constructor required for stapler
}
示例20
/** Creates a new instance of {@link GhsMulti}. */
@DataBoundConstructor
public GhsMulti() {
super();
// empty constructor required for stapler
}
示例21
@DataBoundConstructor
public JiraSendBuildInfoStep() {
// Empty constructor
}
示例22
/** Creates a new instance of {@link Pit}. */
@DataBoundConstructor
public Pit() {
super();
// empty constructor required for stapler
}
示例23
/** Creates a new instance of {@link CppLint}. */
@DataBoundConstructor
public CppLint() {
super();
// empty constructor required for stapler
}
示例24
@DataBoundConstructor
public KafkaComputerLauncher(String kafkaUsername, String sslTruststoreLocation, String sslKeystoreLocation,
String enableSSL) {
this(kafkaUsername, sslTruststoreLocation, sslKeystoreLocation);
this.enableSSL = Boolean.valueOf(enableSSL);
}
示例25
@DataBoundConstructor
public GitLabBrowser(String projectUrl) {
super(projectUrl);
}
示例26
/** Creates a new instance of {@link TagList}. */
@DataBoundConstructor
public TagList() {
super();
// empty constructor required for stapler
}
示例27
/** Creates a new instance of {@link PerlCritic}. */
@DataBoundConstructor
public PerlCritic() {
super();
// empty constructor required for stapler
}
示例28
@DataBoundConstructor
public ProjectNamingStrategyTrait() {
// empty
}
示例29
/**
* Constructor for stapler.
*/
@DataBoundConstructor
public TagDiscoveryTrait() {
}
示例30
@DataBoundConstructor
public SSHCheckoutTrait(String credentialsId) {
this.credentialsId = Util.fixEmpty(credentialsId);
}