hudson.model.Job.getProperties()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(103)

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

Job.getProperties介绍

[英]Gets all the job properties configured for this job.
[中]获取为此作业配置的所有作业属性。

代码示例

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

public Map<JobPropertyDescriptor, JobProperty<? super JobT>> superGetProperties() {
  return super.getProperties();
}

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

@Override
@SuppressWarnings("unchecked")
public Map<JobPropertyDescriptor, JobProperty<? super JobT>> getProperties() {
  initPython();
  if (pexec.isImplemented(29)) {
    return (Map) pexec.execPython("get_properties");
  } else {
    return super.getProperties();
  }
}

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

/**
 * If a subversion remote uses $VAR or ${VAR} as a parameterized build,
 * we expand the url. This will expand using the DEFAULT item. If there
 * is a choice parameter, it will expand with the FIRST item.
 */
public ModuleLocation getExpandedLocation(Job<?, ?> project) {
  String url = this.getURL();
  String returnURL = url;
  for (JobProperty property : project.getProperties().values()) {
    if (property instanceof ParametersDefinitionProperty) {
      ParametersDefinitionProperty pdp = (ParametersDefinitionProperty) property;
      for (String propertyName : pdp.getParameterDefinitionNames()) {
        if (url.contains(propertyName)) {
          ParameterDefinition pd = pdp.getParameterDefinition(propertyName);
          ParameterValue pv = pd.getDefaultParameterValue();
          String replacement = "";
          if (pv != null) {
            replacement = String.valueOf(pv.createVariableResolver(null).resolve(propertyName));
          }
          returnURL = returnURL.replace("${" + propertyName + "}", replacement);
          returnURL = returnURL.replace("$" + propertyName, replacement);
        }
      }
    }
  }
  return new ModuleLocation(returnURL, credentialsId, getLocalDir(), getDepthOption(), isIgnoreExternalsOption(),
    isCancelProcessOnExternalsFail());
}

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

Map<JobPropertyDescriptor, JobProperty> propertyMap = job.getProperties();
for (JobProperty jobProperty : propertyMap.values()) {
  if (jobProperty.getClass() == EnvInjectJobProperty.class) {

相关文章

微信公众号

最新文章

更多

Job类方法