protected ModelAndView doGet()

in server/src/jetbrains/buildServer/serverSide/priority/controllers/DeletePriorityClassController.java [45:65]


  protected ModelAndView doGet(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response) {
    String priorityClassId = request.getParameter("priorityClassId");
    ModelAndView mv = new ModelAndView(myPluginDescriptor.getPluginResourcesPath("deletePriorityClassDialog.jsp"));
    mv.getModel().put("title", "Remove Priority Class");
    mv.getModel().put("priorityClassId", priorityClassId);
    if (priorityClassId != null) {
      PriorityClass pc = myPriorityClassManager.findPriorityClassById(priorityClassId);
      List<PriorityClass> otherPriorityClasses = myPriorityClassManager.getAllPriorityClasses();
      otherPriorityClasses.remove(pc);
      otherPriorityClasses.remove(myPriorityClassManager.getPersonalPriorityClass());
      Collections.sort(otherPriorityClasses, PRIORITY_CLASS_NAME_COMPARATOR);
      if (!pc.getBuildTypes().isEmpty() && otherPriorityClasses.size() > 1) {
        mv.getModel().put("showList", true);
        mv.getModel().put("otherPriorityClasses", otherPriorityClasses);
        mv.getModel().put("configurationCount", pc.getBuildTypes().size());
      } else {
        mv.getModel().put("showList", false);
      }
    }
    return mv;
  }