hudson.Functions.getSortedDescriptorsForGlobalConfig()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(159)

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

Functions.getSortedDescriptorsForGlobalConfig介绍

[英]Gets all the descriptors sorted by their inheritance tree of Describableso that descriptors of similar types come nearby.
[中]获取按描述符继承树排序的所有描述符,以便相似类型的描述符位于附近。

代码示例

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

/**
 * Like {@link #getSortedDescriptorsForGlobalConfig(Predicate)} but for unclassified descriptors only.
 * @since 1.506
 */
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfigUnclassified() {
  return getSortedDescriptorsForGlobalConfig(new Predicate<GlobalConfigurationCategory>() {
    public boolean apply(GlobalConfigurationCategory cat) {
      return cat instanceof GlobalConfigurationCategory.Unclassified;
    }
  });
}

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

/**
 * Like {@link #getSortedDescriptorsForGlobalConfig(Predicate)} but with a constant truth predicate, to include all descriptors.
 */
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfig() {
  return getSortedDescriptorsForGlobalConfig(Predicates.<GlobalConfigurationCategory>alwaysTrue());
}

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

/**
 * @deprecated This is rather meaningless.
 */
@Deprecated
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfigNoSecurity() {
  return getSortedDescriptorsForGlobalConfig(Predicates.not(GlobalSecurityConfiguration.FILTER));
}

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

private boolean configure(StaplerRequest req, JSONObject json) throws hudson.model.Descriptor.FormException, IOException {
  Jenkins j = Jenkins.getInstance();
  j.checkPermission(Jenkins.ADMINISTER);
  boolean result = true;
  for(Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig(FILTER)){
    result &= configureDescriptor(req, json, d);
  }
  j.save();
  return result;
}

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

for(Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig(FILTER)){
  result &= configureDescriptor(req,json,d);

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

/**
 * Like {@link #getSortedDescriptorsForGlobalConfig(Predicate)} but for unclassified descriptors only.
 * @since 1.506
 */
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfigUnclassified() {
  return getSortedDescriptorsForGlobalConfig(new Predicate<GlobalConfigurationCategory>() {
    public boolean apply(GlobalConfigurationCategory cat) {
      return cat instanceof GlobalConfigurationCategory.Unclassified;
    }
  });
}

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

/**
 * Like {@link #getSortedDescriptorsForGlobalConfig(Predicate)} but with a constant truth predicate, to include all descriptors.
 */
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfig() {
  return getSortedDescriptorsForGlobalConfig(Predicates.<GlobalConfigurationCategory>alwaysTrue());
}

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

/**
 * @deprecated This is rather meaningless.
 */
@Deprecated
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfigNoSecurity() {
  return getSortedDescriptorsForGlobalConfig(Predicates.not(GlobalSecurityConfiguration.FILTER));
}

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

/**
 * Performs the configuration.
 *
 * @param req  the request.
 * @param json the JSON object.
 * @return {@code false} to keep the client in the same config page.
 * @throws FormException if something goes wrong.
 */
private boolean configure(StaplerRequest req, JSONObject json) throws FormException {
  // for compatibility reasons, the actual value is stored in Jenkins
  Jenkins j = Jenkins.getActiveInstance();
  j.checkPermission(Jenkins.ADMINISTER);
  // persist all the provider configs
  boolean result = true;
  for (Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig(FILTER)) {
    result &= configureDescriptor(req, json, d);
  }
  return result;
}

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

private boolean configure(StaplerRequest req, JSONObject json) throws hudson.model.Descriptor.FormException, IOException {
  Jenkins j = Jenkins.getInstance();
  j.checkPermission(Jenkins.ADMINISTER);
  boolean result = true;
  for(Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig(FILTER)){
    result &= configureDescriptor(req, json, d);
  }
  j.save();
  return result;
}

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

/**
 * Performs the configuration.
 *
 * @param req  the request.
 * @param json the JSON object.
 * @return {@code false} to keep the client in the same config page.
 * @throws FormException if something goes wrong.
 */
private boolean configure(StaplerRequest req, JSONObject json) throws FormException {
  // for compatibility reasons, the actual value is stored in Jenkins
  Jenkins j = Jenkins.getActiveInstance();
  j.checkPermission(Jenkins.ADMINISTER);
  // persist all the provider configs
  boolean result = true;
  for (Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig(FILTER)) {
    result &= configureDescriptor(req, json, d);
  }
  return result;
}

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

for(Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig(FILTER)){
  result &= configureDescriptor(req,json,d);

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

for (Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig()) {
  result &= configureDescriptor(req, json, d);

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

for (Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig()) {
  result &= configureDescriptor(req, json, d);

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

for (Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig()) {
  result &= configureDescriptor(req, json, d);

代码示例来源:origin: hudson/hudson-2.x

for (Descriptor<?> d : Functions.getSortedDescriptorsForGlobalConfig()) {
  result &= configureDescriptor(req, json, d);

相关文章

微信公众号

最新文章

更多