private AttachConfigurationsBean getBean()

in server/src/jetbrains/buildServer/serverSide/priority/controllers/AttachBuildTypesController.java [117:140]


  private AttachConfigurationsBean getBean(final HttpServletRequest request) {
    AttachConfigurationsBean bean = FormUtil.getOrCreateForm(request, AttachConfigurationsBean.class,
            new FormUtil.FormCreator<AttachConfigurationsBean>() {
              public AttachConfigurationsBean createForm(final HttpServletRequest request) {
                return new AttachConfigurationsBean();
              }
            });

    assert bean != null;

    String pClassId = request.getParameter("pClassId");
    if (pClassId != null) {
      bean.setPriorityClass(myPriorityClassManager.findPriorityClassById(pClassId));
    }
    if ("true".equals(request.getParameter("openDialog"))) {
      //on dialog open search for configurations only if previous search string was not empty
      //otherwise dialog could be opened too slow
      bean.setSearchStringSubmitted(!StringUtil.isEmptyOrSpaces(bean.getSearchString()));
    } else {
      bean.setSearchString(request.getParameter("searchString"));
      bean.setSearchStringSubmitted("true".equals(request.getParameter("searchStringSubmitted")));
    }
    return bean;
  }