@RequestMapping(value = "/group/{groupId}/edit")
  public ModelAndView editGroup(@PathVariable("groupId") final String groupId) {
    final DeployGroup group = this.service.getGroup(groupId);

    if (group == null) {
      return CommonController.createNotFound("Deploy Group", groupId);
    }

    final Map<String, Object> model = new HashMap<>();

    model.put("command", DeployGroupBean.fromGroup(group));
    addBreadcrumbs("Edit", groupId, model);

    return new ModelAndView("editGroup", model);
  }
  @RequestMapping(value = "/group/{groupId}/edit", method = RequestMethod.POST)
  public ModelAndView editGroupPost(
      @PathVariable("groupId") final String groupId,
      @Valid @FormData("command") final DeployGroupBean group,
      final BindingResult result) {
    final Map<String, Object> model = new HashMap<>(1);

    if (!result.hasErrors()) {
      this.service.updateGroup(groupId, group.getName());
    }

    model.put("command", group);
    addBreadcrumbs("Edit", groupId, model);

    return new ModelAndView("editGroup", model);
  }