hudson.model.TopLevelItem.getDisplayName()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中hudson.model.TopLevelItem.getDisplayName()方法的一些代码示例,展示了TopLevelItem.getDisplayName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TopLevelItem.getDisplayName()方法的具体详情如下:
包路径:hudson.model.TopLevelItem
类名称:TopLevelItem
方法名:getDisplayName

TopLevelItem.getDisplayName介绍

暂无

代码示例

代码示例来源:origin: jenkinsci/jenkins

void addDisplayNamesToSearchIndex(SearchIndexBuilder sib, Collection<TopLevelItem> items) {
  for(TopLevelItem item : items) {
    
    if(LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine((String.format("Adding url=%s,displayName=%s",
            item.getSearchUrl(), item.getDisplayName())));
    }
    sib.add(item.getSearchUrl(), item.getDisplayName());
  }        
}

代码示例来源:origin: jenkinsci/jenkins

/**
 * This method checks all existing jobs to see if displayName is
 * unique. It does not check the displayName against the displayName of the
 * job that the user is configuring though to prevent a validation warning
 * if the user sets the displayName to what it currently is.
 * @param displayName
 * @param currentJobName
 */
boolean isDisplayNameUnique(String displayName, String currentJobName) {
  Collection<TopLevelItem> itemCollection = items.values();
  // if there are a lot of projects, we'll have to store their
  // display names in a HashSet or something for a quick check
  for(TopLevelItem item : itemCollection) {
    if(item.getName().equals(currentJobName)) {
      // we won't compare the candidate displayName against the current
      // item. This is to prevent an validation warning if the user
      // sets the displayName to what the existing display name is
      continue;
    }
    else if(displayName.equals(item.getDisplayName())) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: jenkinsci/jenkins

public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(StaplerRequest request, StaplerResponse response) throws Exception {
  ModelObjectWithContextMenu.ContextMenu m = new ModelObjectWithContextMenu.ContextMenu();
  for (TopLevelItem i : getItems())
    m.add(i.getShortUrl(),i.getDisplayName());
  return m;
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

@Override
public String getDisplayName() {
  return item().getDisplayName();
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

void addDisplayNamesToSearchIndex(SearchIndexBuilder sib, Collection<TopLevelItem> items) {
  for(TopLevelItem item : items) {
    
    if(LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine((String.format("Adding url=%s,displayName=%s",
            item.getSearchUrl(), item.getDisplayName())));
    }
    sib.add(item.getSearchUrl(), item.getDisplayName());
  }        
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * This method checks all existing jobs to see if displayName is
 * unique. It does not check the displayName against the displayName of the
 * job that the user is configuring though to prevent a validation warning
 * if the user sets the displayName to what it currently is.
 * @param displayName
 * @param currentJobName
 */
boolean isDisplayNameUnique(String displayName, String currentJobName) {
  Collection<TopLevelItem> itemCollection = items.values();
  // if there are a lot of projects, we'll have to store their
  // display names in a HashSet or something for a quick check
  for(TopLevelItem item : itemCollection) {
    if(item.getName().equals(currentJobName)) {
      // we won't compare the candidate displayName against the current
      // item. This is to prevent an validation warning if the user
      // sets the displayName to what the existing display name is
      continue;
    }
    else if(displayName.equals(item.getDisplayName())) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: jenkinsci/cloudbees-folder-plugin

listener.getLogger().printf("Will not remove %s as %s is still in progress%n", item.getDisplayName(), build.getFullDisplayName());
      iterator.remove();
      continue CANDIDATES;
      listener.getLogger().printf("Will not remove %s as %s is marked to not be removed: %s%n", item.getDisplayName(), build.getFullDisplayName(), whyKeepLog);
      iterator.remove();
      continue CANDIDATES;
  count++;
  if (count <= numToKeep) {
    listener.getLogger().printf("Will not remove %s as it is only #%d in the list%n", item.getDisplayName(), count);
    continue;
  listener.getLogger().printf("Will remove %s as it is #%d in the list%n", item.getDisplayName(), count);
  toRemove.add(item);
  iterator.remove();
for (I item : candidates) {
  if (lastBuildTime(item) > cal.getTimeInMillis()) {
    listener.getLogger().printf("Will not remove %s because it is new%n", item.getDisplayName());
    continue;
  listener.getLogger().printf("Will remove %s as it is too old%n", item.getDisplayName());
  toRemove.add(item);
  listener.getLogger().printf("Will remove %s%n", item.getDisplayName());
  toRemove.add(item);

代码示例来源:origin: org.jenkins-ci.plugins/cloudbees-folder

listener.getLogger().printf("Will not remove %s as %s is still in progress%n", item.getDisplayName(), build.getFullDisplayName());
      iterator.remove();
      continue CANDIDATES;
      listener.getLogger().printf("Will not remove %s as %s is marked to not be removed: %s%n", item.getDisplayName(), build.getFullDisplayName(), whyKeepLog);
      iterator.remove();
      continue CANDIDATES;
  count++;
  if (count <= numToKeep) {
    listener.getLogger().printf("Will not remove %s as it is only #%d in the list%n", item.getDisplayName(), count);
    continue;
  listener.getLogger().printf("Will remove %s as it is #%d in the list%n", item.getDisplayName(), count);
  toRemove.add(item);
  iterator.remove();
for (I item : candidates) {
  if (lastBuildTime(item) > cal.getTimeInMillis()) {
    listener.getLogger().printf("Will not remove %s because it is new%n", item.getDisplayName());
    continue;
  listener.getLogger().printf("Will remove %s as it is too old%n", item.getDisplayName());
  toRemove.add(item);
  listener.getLogger().printf("Will remove %s%n", item.getDisplayName());
  toRemove.add(item);

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

public ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(StaplerRequest request, StaplerResponse response) throws Exception {
  ModelObjectWithContextMenu.ContextMenu m = new ModelObjectWithContextMenu.ContextMenu();
  for (TopLevelItem i : getItems())
    m.add(i.getShortUrl(),i.getDisplayName());
  return m;
}

代码示例来源:origin: org.jenkins-ci.plugins/disk-usage

LOGGER.log(Level.WARNING, "Can not get workspace for " + item.getDisplayName() + " on " + node.getDisplayName(), e);

相关文章