本文整理汇总了Java中hudson.util.ComboBoxModel类的典型用法代码示例。如果您正苦于以下问题:Java ComboBoxModel类的具体用法?Java ComboBoxModel怎么用?Java ComboBoxModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ComboBoxModel类属于hudson.util包,在下文中一共展示了ComboBoxModel类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: doFillProjectNameItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
public ComboBoxModel doFillProjectNameItems(@QueryParameter final boolean useOwnServerCredentials, @QueryParameter final String serverUrl,
@QueryParameter final String username, @QueryParameter final String password, @QueryParameter final String timestamp, @QueryParameter final String credentialsId) {
// timestamp is not used in code, it is one of the arguments to invalidate Internet Explorer cache
ComboBoxModel projectNames = new ComboBoxModel();
try {
CxCredentials credentials = CxCredentials.resolveCredentials(!useOwnServerCredentials, serverUrl, username, getPasswordPlainText(password), credentialsId, this);
final CxWebService cxWebService = prepareLoggedInWebservice(credentials);
List<ProjectDisplayData> projectsDisplayData = cxWebService.getProjectsDisplayData();
for (ProjectDisplayData pd : projectsDisplayData) {
projectNames.add(pd.getProjectName());
}
STATIC_LOGGER.info("Projects list: " + projectNames.size());
return projectNames;
} catch (Exception e) {
STATIC_LOGGER.error("Failed to populate project list: " + e.toString());
STATIC_LOGGER.info("Projects list: empty");
return projectNames; // Return empty list of project names
}
}
开发者ID:jenkinsci,项目名称:checkmarx-plugin,代码行数:24,代码来源:CxScanBuilder.java
示例2: doFillTypeItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
@SuppressWarnings("unused") // used by stapler
public ComboBoxModel doFillTypeItems(@QueryParameter final String groupId,
@QueryParameter final String artifactId,
@QueryParameter final String classifier) {
Set<String> result = new TreeSet<String>();
for (MavenArtifact artifact : getAllArtifacts(findMavenBuilds())) {
if (!"pom".equals(artifact.type)) {
if (StringUtils.isBlank(groupId) || StringUtils.equals(groupId, artifact.groupId)) {
if (StringUtils.isBlank(artifactId) || StringUtils.equals(artifactId, artifact.artifactId)) {
if (StringUtils.isBlank(classifier) || StringUtils
.equals(classifier, artifact.classifier)) {
result.add(Util.fixNull(artifact.type));
}
}
}
}
}
return new ComboBoxModel(result);
}
开发者ID:jenkinsci,项目名称:deployer-framework-plugin,代码行数:20,代码来源:MavenArtifactDeploySource.java
示例3: doFillScriptItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
public ComboBoxModel doFillScriptItems() {
ComboBoxModel items = new ComboBoxModel();
File scriptFolder = new File(Jenkins.getInstance().getRootDir().getAbsolutePath() + SCRIPT_FOLDER);
FilenameFilter filter = new FilenameFilter() {
public boolean accept(File dir, String name) {
String fileName = name.toLowerCase();
return new File(dir, name).isFile() && (
fileName.endsWith(".groovy") ||
fileName.endsWith(".gvy") ||
fileName.endsWith(".gy") ||
fileName.endsWith(".gsh") ||
fileName.endsWith(".bat") ||
fileName.endsWith(".sh")
);
}
};
Collections.addAll(items, scriptFolder.list(filter));
return items;
}
开发者ID:jenkinsci,项目名称:global-post-script-plugin,代码行数:22,代码来源:GlobalPostScript.java
示例4: doFillTitleItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
/**
* This method determines the values of the song title combo box.
* Note that it takes the album information as a parameter, so the contents
* of the combo box changes depending on the currently selected album.
*/
public ComboBoxModel doFillTitleItems(@QueryParameter int album) {
switch (album) {
case 1:
return new ComboBoxModel("Yellow Submarine","Only a Northern Song","All You Need Is Love");
case 2:
return new ComboBoxModel("Come Together","Something","I Want You");
case 3:
return new ComboBoxModel("The One After 909","Rocker","Get Back");
default:
// if no value is selected in the album, we'll get 0
return new ComboBoxModel();
}
}
开发者ID:10000TB,项目名称:Jenkins-Plugin-Examples,代码行数:19,代码来源:DynamicComboBox.java
示例5: doFillIdItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
public ComboBoxModel doFillIdItems(@AncestorInPath Job<?, ?> copyingJob, @RelativePath("..") @QueryParameter("projectName") String projectName) {
Job<?, ?> j = null;
Jenkins jenkins = Jenkins.getInstance();
if (projectName != null && jenkins != null) {
j = jenkins.getItem(projectName, copyingJob, Job.class);
}
ComboBoxModel r = new ComboBoxModel();
for (Permalink p : j != null ? j.getPermalinks() : Permalink.BUILTIN) {
r.add(p.getId());
}
return r;
}
开发者ID:jenkinsci,项目名称:run-selector-plugin,代码行数:13,代码来源:PermalinkRunSelector.java
示例6: doFillBuildJobItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
public ComboBoxModel doFillBuildJobItems() {
ComboBoxModel model = new ComboBoxModel();
for (String jobName : Jenkins.getInstance().getJobNames()) {
model.add(jobName);
}
return model;
}
开发者ID:codecentric,项目名称:jenkins-deployment-dashboard-plugin,代码行数:10,代码来源:Environment.java
示例7: doFillGroupIdItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
@SuppressWarnings("unused") // used by stapler
public ComboBoxModel doFillGroupIdItems() {
Set<String> result = new TreeSet<String>();
for (MavenArtifact artifact : getAllArtifacts(findMavenBuilds())) {
result.add(artifact.groupId);
}
return new ComboBoxModel(result);
}
开发者ID:jenkinsci,项目名称:deployer-framework-plugin,代码行数:9,代码来源:MavenArtifactDeploySource.java
示例8: doFillArtifactIdItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
@SuppressWarnings("unused") // used by stapler
public ComboBoxModel doFillArtifactIdItems(@QueryParameter final String groupId) {
Set<String> result = new TreeSet<String>();
for (MavenArtifact artifact : getAllArtifacts(findMavenBuilds())) {
if (StringUtils.isBlank(groupId) || StringUtils.equals(groupId, artifact.groupId)) {
result.add(artifact.artifactId);
}
}
return new ComboBoxModel(result);
}
开发者ID:jenkinsci,项目名称:deployer-framework-plugin,代码行数:11,代码来源:MavenArtifactDeploySource.java
示例9: doFillClassifierItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
@SuppressWarnings("unused") // used by stapler
public ComboBoxModel doFillClassifierItems(@QueryParameter final String groupId,
@QueryParameter final String artifactId) {
Set<String> result = new TreeSet<String>();
for (MavenArtifact artifact : getAllArtifacts(findMavenBuilds())) {
if (StringUtils.isBlank(groupId) || StringUtils.equals(groupId, artifact.groupId)) {
if (StringUtils.isBlank(artifactId) || StringUtils.equals(artifactId, artifact.artifactId)) {
result.add(Util.fixNull(artifact.classifier));
}
}
}
return new ComboBoxModel(result);
}
开发者ID:jenkinsci,项目名称:deployer-framework-plugin,代码行数:14,代码来源:MavenArtifactDeploySource.java
示例10: doFillEnvironmentItems
import hudson.util.ComboBoxModel; //导入依赖的package包/类
public ComboBoxModel doFillEnvironmentItems(@QueryParameter(value = "credential") @RelativePath(value = "..") String credential,
@QueryParameter(value = "credential") String credential2,
@AncestorInPath AbstractProject project)
{
String creds = !isNullOrEmpty(credential) ? credential : credential2;
Credential overridingCredential = RepositoryUtils.retrieveOverridingCredentialFromProject(project);
List<String> environments = new ArrayList<String>();
if (!isNullOrEmpty(creds)) {
DeployitServer deployitServer = RepositoryUtils.getDeployitServer(creds, overridingCredential);
environments = RepositoryUtils.environments(deployitServer);
}
return new ComboBoxModel(environments);
}
开发者ID:jenkinsci,项目名称:xldeploy-plugin,代码行数:14,代码来源:JenkinsDeploymentOptions.java
注:本文中的hudson.util.ComboBoxModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论