Redirect to a edit group page

@param model
@param groupId
@return
@throws Exception
335537
@RequestMapping(value = "group/{groupId}", method = RequestMethod.GET)
    public String editGroup(Model model, @PathVariable int groupId) throws Exception {
        model.addAttribute("groupName",
                pathOverrideService.getGroupNameFromId(groupId));
        model.addAttribute("groupId", groupId);
        ObjectMapper mapper = new ObjectMapper();
        String json = mapper.writeValueAsString(pluginManager.getMethodsNotInGroup(groupId));
        model.addAttribute("methodsNotInGroup",
                json);

        return "editGroup";
    }
507324
@ExceptionHandler(Exception.class)
    @RequestMapping(value = "api/edit/server/{id}", method = RequestMethod.POST)
    public
    @ResponseBody
    ServerRedirect updateServer(Model model, @PathVariable int id,
                                @RequestParam(required = false) Boolean enabled) throws Exception {
        logger.info("updating Server");
        if (enabled != null) {
            if (enabled) {
                Client.enableHost(ServerRedirectService.getInstance().getRedirect(id).getSrcUrl());
            } else {
                Client.disableHost(ServerRedirectService.getInstance().getRedirect(id).getSrcUrl());
            }
        }
        return ServerRedirectService.getInstance().getRedirect(id);
    }
119103
private void migrateGroups(Node startNode) throws Exception
   {
      NodeIterator iterator = ((ExtendedNode)startNode).getNodesLazily();
      GroupHandlerImpl gh = ((GroupHandlerImpl)service.getGroupHandler());
      while (iterator.hasNext())
      {
         Node oldGroupNode = iterator.nextNode();
         gh.migrateGroup(oldGroupNode);

         migrateGroups(oldGroupNode);
      }
   }
984406
protected Check<T> newCheck(String wicketId, IModel<T> model, CheckGroup<T> group)
	{
		Check<T> check = new Check<T>(wicketId, model, group);
		return check;
	}
52681
@RequestMapping(value = "api/edit/server/{id}/dest", method = RequestMethod.POST)
    public
    @ResponseBody
    ServerRedirect updateDestRedirectUrl(Model model, @PathVariable int id, String destUrl) throws Exception {
        ServerRedirectService.getInstance().setDestinationUrl(destUrl, id);
        return ServerRedirectService.getInstance().getRedirect(id);
    }
817357
public List<Method> getMethodsFromGroupId(int groupId, String[] filters) throws Exception {
        ArrayList<Method> methods = new ArrayList<Method>();
        PreparedStatement statement = null;
        ResultSet results = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "SELECT * FROM " + Constants.DB_TABLE_OVERRIDE +
                    " WHERE " + Constants.OVERRIDE_GROUP_ID + " = ?"
            );
            statement.setInt(1, groupId);
            results = statement.executeQuery();
            while (results.next()) {
                Method method = PathOverrideService.getInstance().getMethodForOverrideId(results.getInt("id"));
                if (method == null) {
                    continue;
                }

                // decide whether or not to add this method based on the filters
                boolean add = true;
                if (filters != null) {
                    add = false;
                    for (String filter : filters) {
                        if (method.getMethodType().endsWith(filter)) {
                            add = true;
                            break;
                        }
                    }
                }

                if (add && !methods.contains(method)) {
                    methods.add(method);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }

        return methods;
    }
996893
@Override
    public Result call(final Route route, final RequestContext context) throws Exception {
        URI redirectedURI = rewriteURI(context.request());
        logger.debug("Redirecting request - rewriting {} to {}", context.request().uri(), redirectedURI);
        if (redirectedURI == null) {
            return onRewriteFailed(context);
        }
        return Results.redirect(redirectedURI.toString());
    }
1155966
@SuppressWarnings("unchecked")
    public Response insert(@NotNull @Valid final MODEL model) throws Exception {
        matchedInsert(model);
        setForInsertId(model);

        executeTx(t -> {
            preInsertModel(model);
            insertModel(model);
            postInsertModel(model);
        });
        MODEL_ID id = (MODEL_ID) this.server.getBeanId(model);

        return Response.created(buildLocationUri(id)).build();
    }
87355
public void setGroupId(final String groupId) {
        if (groupId == null && this.groupId == null) {
            return;
        } else if (groupId == null) {
            removeChild(this.groupId);
            this.groupId = null;
        } else if (this.groupId == null) {
            this.groupId = new KeyValueNode<String>(CommonConstants.CS_MAVEN_GROUP_ID_TITLE, groupId);
            appendChild(this.groupId, false);
        } else {
            this.groupId.setValue(groupId);
        }
    }
346460
public void deleteGroup(Integer groupId) throws IOException {
        String tailUrl = GitlabGroup.URL + "/" + groupId;
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
48053
public function setGroupId($group_id)
    {
        if ($group_id instanceof GroupId) {
            $this->group_id = $group_id->getGroupId();
        } else {
            if (!is_int($group_id)) {
                throw new TypeException(
                    '$group_id must be an instance of Twilio SendGrid\Mail\GroupId or of type int.'
                );
            }
            $this->group_id = new GroupId($group_id);
        }
        return;
    }
682457
protected function redirect($request, $model)
    {
        if (is_array($model)) {
            $model = end($model);
        }
        $redirectUrl = $request->get('exit') ? $model->indexUrl() : $model->editUrl();

        return redirect($redirectUrl);
    }
933119
public void project_serviceName_instance_group_groupId_DELETE(String serviceName, String groupId) throws IOException {
		String qPath = "/cloud/project/{serviceName}/instance/group/{groupId}";
		StringBuilder sb = path(qPath, serviceName, groupId);
		exec(qPath, "DELETE", sb.toString(), null);
	}
1089192
def update
      group = find_group
      group.update!(group_params)

      flash[:notice] = t("socializer.model.update", model: "Group")
      redirect_to group_path(group)
    end
371727
public static void editModelPage(final String resourcePath, boolean isModelGroup) {

        if (CmsSitemapView.getInstance().getController().getData().isShowModelEditConfirm()) {
            I_CmsConfirmDialogHandler handler = new I_CmsConfirmDialogHandler() {

                public void onClose() {

                    // noop
                }

                public void onOk() {

                    openEditor(resourcePath);
                }
            };
            String dialogTitle;
            String dialogContent;
            if (isModelGroup) {
                dialogTitle = Messages.get().key(Messages.GUI_EDIT_MODEL_GROUPS_CONFIRM_TITLE_0);
                dialogContent = Messages.get().key(Messages.GUI_EDIT_MODEL_GROUP_CONFIRM_CONTENT_0);
            } else {
                dialogTitle = Messages.get().key(Messages.GUI_EDIT_MODELPAGE_CONFIRM_TITLE_0);
                dialogContent = Messages.get().key(Messages.GUI_EDIT_MODELPAGE_CONFIRM_CONTENT_0);
            }
            String buttonText = Messages.get().key(Messages.GUI_EDIT_MODELPAGE_OK_0);

            CmsConfirmDialog dialog = new CmsConfirmDialog(dialogTitle, dialogContent);
            dialog.getOkButton().setText(buttonText);
            dialog.setHandler(handler);
            dialog.center();
        } else {
            openEditor(resourcePath);
        }
    }
613714
private void doStartGroup(String groupID) {
    DefaultConnectionOutputGroup group = groups.get(groupID);
    if (group != null) {
      group.handleStart();
    }
  }
581054
@RequestMapping(value = "api/servergroup/{id}", method = RequestMethod.POST)
    public
    @ResponseBody
    ServerGroup updateServerGroup(Model model,
                                  @PathVariable int id,
                                  @RequestParam(required = false) Integer profileId,
                                  @RequestParam(required = false) String name,
                                  @RequestParam(required = false) Boolean activate,
                                  @RequestParam(required = false) String clientUUID,
                                  @RequestParam(value = "profileIdentifier", required = false) String profileIdentifier) throws Exception {
        if (profileId == null && profileIdentifier == null) {
            throw new Exception("profileId required");
        }
        if (profileId == null) {
            profileId = ProfileService.getInstance().getIdFromName(profileIdentifier);
        }
        if (name != null) {
            ServerRedirectService.getInstance().setGroupName(name, id);
        }

        if (activate != null) {
            if (clientUUID == null) {
                throw new Exception("clientUUID required");
            }

            int clientId = ClientService.getInstance().findClient(clientUUID, profileId).getId();

            if (activate) {
                ServerRedirectService.getInstance().activateServerGroup(id, clientId);
            } else {
                ServerRedirectService.getInstance().activateServerGroup(0, clientId);
            }
        }

        return ServerRedirectService.getInstance().getServerGroup(id, profileId);
    }