hudson.model.Messages.View_MissingMode()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(113)

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

Messages.View_MissingMode介绍

[英]No view type is specified
[中]未指定视图类型

代码示例

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

return v;
} else
  throw new Failure(Messages.View_MissingMode());

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

public static View create(StaplerRequest req, StaplerResponse rsp, ViewGroup owner)
      throws FormException, IOException, ServletException {
    String name = req.getParameter("name");
    checkGoodName(name);
    if(owner.getView(name)!=null)
      throw new FormException(Messages.Hudson_ViewAlreadyExists(name),"name");

    String mode = req.getParameter("mode");
    if (mode==null || mode.length()==0)
      throw new FormException(Messages.View_MissingMode(),"mode");

    // create a view
    View v = all().findByName(mode).newInstance(req,req.getSubmittedForm());
    v.owner = owner;

    // redirect to the config screen
    rsp.sendRedirect2(req.getContextPath()+'/'+v.getUrl()+v.getPostConstructLandingPage());

    return v;
  }
}

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

public static View create(StaplerRequest req, StaplerResponse rsp, ViewGroup owner)
      throws FormException, IOException, ServletException {
    String name = req.getParameter("name");
    checkGoodName(name);
    if(owner.getView(name)!=null)
      throw new FormException(Messages.Hudson_ViewAlreadyExists(name),"name");

    String mode = req.getParameter("mode");
    if (mode==null || mode.length()==0)
      throw new FormException(Messages.View_MissingMode(),"mode");

    // create a view
    View v = all().findByName(mode).newInstance(req,req.getSubmittedForm());
    v.owner = owner;

    // redirect to the config screen
    rsp.sendRedirect2(req.getContextPath()+'/'+v.getUrl()+v.getPostConstructLandingPage());

    return v;
  }
}

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

public static View create(StaplerRequest req, StaplerResponse rsp, ViewGroup owner)
      throws FormException, IOException, ServletException {
    String name = req.getParameter("name");
    checkGoodName(name);
    if(owner.getView(name)!=null)
      throw new FormException(Messages.Hudson_ViewAlreadyExists(name),"name");

    String mode = req.getParameter("mode");
    if (mode==null || mode.length()==0)
      throw new FormException(Messages.View_MissingMode(),"mode");

    // create a view
    View v = all().findByName(mode).newInstance(req,req.getSubmittedForm());
    v.owner = owner;

    // redirect to the config screen
    rsp.sendRedirect2(req.getContextPath()+'/'+v.getUrl()+v.getPostConstructLandingPage());

    return v;
  }
}

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

return v;
} else
  throw new Failure(Messages.View_MissingMode());

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

public static View create(StaplerRequest req, StaplerResponse rsp, ViewGroup owner)
    throws FormException, IOException, ServletException {
  String name = req.getParameter("name");
  checkGoodName(name);
  if (owner.getView(name) != null) {
    throw new FormException(Messages.Hudson_ViewAlreadyExists(name), "name");
  }
  String mode = req.getParameter("mode");
  if (mode == null || mode.length() == 0) {
    throw new FormException(Messages.View_MissingMode(), "mode");
  }
  // create a view
  View v = all().findByName(mode).newInstance(req, req.getSubmittedForm());
  v.owner = owner;
  
  if (!(owner instanceof MyViewsProperty)) {
    //TODO: Get teamname to add from view creation UI
    addToTeam(v.getViewName(), null);
  }
  // redirect to the config screen
  rsp.sendRedirect2(req.getContextPath() + '/' + v.getUrl() + v.getPostConstructLandingPage());
  return v;
}

相关文章

Messages类方法