hudson.model.Hudson.doFieldCheck()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(110)

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

Hudson.doFieldCheck介绍

[英]Checks if the value for a field is set; if not an error or warning text is displayed. If the parameter "value" is not set then the parameter "errorText" is displayed as an error text. If the parameter "errorText" is not set, then the parameter "warningText" is displayed as a warning text.

If the text is set and the parameter "type" is set, it will validate that the value is of the correct type. Supported types are "number, "number-positive" and "number-negative".
[中]检查是否设置了字段的值;如果没有,则显示错误或警告文本。如果未设置参数“值”,则参数“errorText”显示为错误文本。如果未设置参数“errorText”,则参数“warningText”显示为警告文本。
如果设置了文本并设置了参数“type”,则将验证该值是否为正确的类型。支持的类型有“数字”、“正数字”和“负数字”。

代码示例

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

/**
 * @deprecated as of 1.294
 *      Define your own check method, instead of relying on this generic one.
 */
@Deprecated
public void doFieldCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
  doFieldCheck(
      fixEmpty(req.getParameter("value")),
      fixEmpty(req.getParameter("type")),
      fixEmpty(req.getParameter("errorText")),
      fixEmpty(req.getParameter("warningText"))).generateResponse(req,rsp,this);
}

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

/**
 * @deprecated as of 1.294
 *      Define your own check method, instead of relying on this generic one.
 */
@Deprecated
public void doFieldCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
  doFieldCheck(
      fixEmpty(req.getParameter("value")),
      fixEmpty(req.getParameter("type")),
      fixEmpty(req.getParameter("errorText")),
      fixEmpty(req.getParameter("warningText"))).generateResponse(req,rsp,this);
}

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

/**
 * @deprecated as of 1.294 Define your own check method, instead of relying
 * on this generic one.
 */
public void doFieldCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
  doFieldCheck(
      fixEmpty(req.getParameter("value")),
      fixEmpty(req.getParameter("type")),
      fixEmpty(req.getParameter("errorText")),
      fixEmpty(req.getParameter("warningText"))).generateResponse(req, rsp, this);
}

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

/**
 * @deprecated as of 1.294
 *      Define your own check method, instead of relying on this generic one.
 */
public void doFieldCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
  doFieldCheck(
      Util.fixEmpty(req.getParameter("value")),
      Util.fixEmpty(req.getParameter("type")),
      Util.fixEmpty(req.getParameter("errorText")),
      Util.fixEmpty(req.getParameter("warningText"))).generateResponse(req, rsp, this);
}

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

/**
 * @deprecated as of 1.294
 *      Define your own check method, instead of relying on this generic one.
 */
public void doFieldCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
  doFieldCheck(
      fixEmpty(req.getParameter("value")),
      fixEmpty(req.getParameter("type")),
      fixEmpty(req.getParameter("errorText")),
      fixEmpty(req.getParameter("warningText"))).generateResponse(req, rsp, this);
}

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

/**
 * @deprecated as of 1.294
 *      Define your own check method, instead of relying on this generic one.
 */
public void doFieldCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
  doFieldCheck(
      Util.fixEmpty(req.getParameter("value")),
      Util.fixEmpty(req.getParameter("type")),
      Util.fixEmpty(req.getParameter("errorText")),
      Util.fixEmpty(req.getParameter("warningText"))).generateResponse(req, rsp, this);
}

相关文章

Hudson类方法