hudson.model.AbstractProject.setScmCheckoutRetryCount()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(8.3k)|赞(0)|评价(0)|浏览(90)

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

AbstractProject.setScmCheckoutRetryCount介绍

[英]Sets scmCheckoutRetryCount, Uses NumberUtils#isNumber(String) for checking retryCount param. If it is not valid number, null will be set.
[中]设置SCMCHECKOUTRYCOUNT,使用NumberUtils#isNumber(字符串)检查retryCount参数。如果它不是有效的数字,则将设置为null。

代码示例

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

void convertScmCheckoutRetryCountProperty() throws IOException {
  if (null != scmCheckoutRetryCount && null == getProperty(SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)) {
    setScmCheckoutRetryCount(scmCheckoutRetryCount);
    scmCheckoutRetryCount = null;
  }
}

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

void convertScmCheckoutRetryCountProperty() throws IOException {
  if (null != scmCheckoutRetryCount && null == getProperty(SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)) {
    setScmCheckoutRetryCount(scmCheckoutRetryCount);
    scmCheckoutRetryCount = null;
  }
}

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

void convertScmCheckoutRetryCountProperty() throws IOException {
  if (null != scmCheckoutRetryCount && null == getProperty(SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)) {
    setScmCheckoutRetryCount(scmCheckoutRetryCount);
    scmCheckoutRetryCount = null;
  }
}

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

void convertScmCheckoutRetryCountProperty() throws IOException {
  if (null != scmCheckoutRetryCount && null == getProperty(SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)) {
    setScmCheckoutRetryCount(scmCheckoutRetryCount);
    scmCheckoutRetryCount = null;
  }
}

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

/**
 * Sets scmCheckoutRetryCount, Uses {@link NumberUtils#isNumber(String)} for checking retryCount param.
 * If it is not valid number, null will be set.
 *
 * @param scmCheckoutRetryCount retry count.
 * @throws IOException if any.
 */
protected void setScmCheckoutRetryCount(String scmCheckoutRetryCount) throws IOException {
  Integer retryCount = null;
  if (NumberUtils.isNumber(scmCheckoutRetryCount)) {
    retryCount = NumberUtils.createInteger(scmCheckoutRetryCount);
  }
  setScmCheckoutRetryCount(retryCount);
}

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

/**
 * Sets scmCheckoutRetryCount, Uses {@link NumberUtils#isNumber(String)} for
 * checking retryCount param. If it is not valid number, null will be set.
 *
 * @param scmCheckoutRetryCount retry count.
 * @throws IOException if any.
 */
protected void setScmCheckoutRetryCount(String scmCheckoutRetryCount) throws IOException {
  Integer retryCount = null;
  if (NumberUtils.isNumber(scmCheckoutRetryCount)) {
    retryCount = NumberUtils.createInteger(scmCheckoutRetryCount);
  }
  setScmCheckoutRetryCount(retryCount);
}

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

/**
 * Sets scmCheckoutRetryCount, Uses {@link NumberUtils#isNumber(String)} for checking retryCount param.
 * If it is not valid number, null will be set.
 *
 * @param scmCheckoutRetryCount retry count.
 * @throws IOException if any.
 */
protected void setScmCheckoutRetryCount(String scmCheckoutRetryCount) throws IOException {
  Integer retryCount = null;
  if (NumberUtils.isNumber(scmCheckoutRetryCount)) {
    retryCount = NumberUtils.createInteger(scmCheckoutRetryCount);
  }
  setScmCheckoutRetryCount(retryCount);
}

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

/**
 * Sets scmCheckoutRetryCount, Uses {@link NumberUtils#isNumber(String)} for
 * checking retryCount param. If it is not valid number, null will be set.
 *
 * @param scmCheckoutRetryCount retry count.
 * @throws IOException if any.
 */
protected void setScmCheckoutRetryCount(String scmCheckoutRetryCount) throws IOException {
  Integer retryCount = null;
  if (NumberUtils.isNumber(scmCheckoutRetryCount)) {
    retryCount = NumberUtils.createInteger(scmCheckoutRetryCount);
  }
  setScmCheckoutRetryCount(retryCount);
}

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

setScmCheckoutRetryCount(hasScmCheckoutRetryCount != null ?
             hasScmCheckoutRetryCount.getString("scmCheckoutRetryCount"): null);

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

@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
  super.submit(req,rsp);
  makeDisabled(null != req.getParameter("disable"));
  setJDK(req.getParameter("jdk"));
  setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
    ? req.getParameter("quiet_period") : null);
  setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
    ? req.getParameter("scmCheckoutRetryCount") : null);
  setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
  setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
  if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
    // New logic for handling whether this choice came from the dropdown or textfield.
    if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
      setAppointedNode(
        new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
    } else {
      setAppointedNode(
        new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
    }
  } else {
    setAppointedNode(null);
  }
  setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
  setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
  authToken = BuildAuthorizationToken.create(req);
  setScm(SCMS.parseSCM(req,this));
  buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}

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

@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
  super.submit(req, rsp);
  makeDisabled(null != req.getParameter("disable"));
  setJDK(req.getParameter("jdk"));
  setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
      ? req.getParameter("quiet_period") : null);
  setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
      ? req.getParameter("scmCheckoutRetryCount") : null);
  setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
  setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
  if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
    // New logic for handling whether this choice came from the dropdown or textfield.
    if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
      setAppointedNode(
          new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
    } else {
      setAppointedNode(
          new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
    }
  } else {
    setAppointedNode(null);
  }
  setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
  setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
  authToken = BuildAuthorizationToken.create(req);
  setScm(SCMS.parseSCM(req, this));
  buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}

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

@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
  super.submit(req,rsp);
  makeDisabled(null != req.getParameter("disable"));
  setJDK(req.getParameter("jdk"));
  setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
    ? req.getParameter("quiet_period") : null);
  setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
    ? req.getParameter("scmCheckoutRetryCount") : null);
  setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
  setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
  if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
    // New logic for handling whether this choice came from the dropdown or textfield.
    if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
      setAppointedNode(
        new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
    } else {
      setAppointedNode(
        new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
    }
  } else {
    setAppointedNode(null);
  }
  setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
  setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
  authToken = BuildAuthorizationToken.create(req);
  setScm(SCMS.parseSCM(req,this));
  buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}

相关文章

微信公众号

最新文章

更多

AbstractProject类方法