Enables a custom response

@param model
@param custom
@param path_id
@param clientUUID
@return
@throws Exception
197013
@RequestMapping(value = "api/edit/enable/custom", method = RequestMethod.POST)
    public
    @ResponseBody
    String enableCustomResponse(Model model, String custom, int path_id,
                                @RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID) throws Exception {
        if (custom.equals("undefined"))
            return null;
        editService.enableCustomResponse(custom, path_id, clientUUID);
        return null;
    }
40884
@RequestMapping(value = "", method = RequestMethod.GET)
    public String pathOrderHome(Model model, @PathVariable int profileId,
                                @RequestParam(value = "clientUUID", defaultValue = "-1") String clientUUID) throws Exception {

        model.addAttribute("profile_id", profileId);
        model.addAttribute("profile_name", ProfileService.getInstance().getNamefromId(profileId));
        model.addAttribute("pathnames", PathOverrideService.getInstance().getPaths(profileId, clientUUID, null));

        return "pathOrder";
    }
532710
public void reset(int profileId, String clientUUID) throws Exception {
        PreparedStatement statement = null;

        // TODO: need a better way to do this than brute force.. but the iterative approach is too slow
        try (Connection sqlConnection = sqlService.getConnection()) {

            // first remove all enabled overrides with this client uuid
            String queryString = "DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
                " WHERE " + Constants.GENERIC_CLIENT_UUID + "= ? " +
                " AND " + Constants.GENERIC_PROFILE_ID + " = ?";
            statement = sqlConnection.prepareStatement(queryString);
            statement.setString(1, clientUUID);
            statement.setInt(2, profileId);
            statement.executeUpdate();
            statement.close();

            // clean up request response table for this uuid
            queryString = "UPDATE " + Constants.DB_TABLE_REQUEST_RESPONSE +
                " SET " + Constants.REQUEST_RESPONSE_CUSTOM_REQUEST + "=?, "
                + Constants.REQUEST_RESPONSE_CUSTOM_RESPONSE + "=?, "
                + Constants.REQUEST_RESPONSE_REPEAT_NUMBER + "=-1, "
                + Constants.REQUEST_RESPONSE_REQUEST_ENABLED + "=0, "
                + Constants.REQUEST_RESPONSE_RESPONSE_ENABLED + "=0 "
                + "WHERE " + Constants.GENERIC_CLIENT_UUID + "=? " +
                " AND " + Constants.GENERIC_PROFILE_ID + "=?";
            statement = sqlConnection.prepareStatement(queryString);
            statement.setString(1, "");
            statement.setString(2, "");
            statement.setString(3, clientUUID);
            statement.setInt(4, profileId);
            statement.executeUpdate();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }

        this.updateActive(profileId, clientUUID, false);
    }
177014
public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {

		String requestedPath = (StringUtils.isEmpty(mapping)) ? helper
				.getPathWithinApplication(request) : helper
				.getPathWithinServletMapping(request);

		if (StringUtils.isNotEmpty(controllerMapping)) {
			requestedPath = requestedPath.substring(controllerMapping.length());
		}

		requestHandler.processRequest(requestedPath, request, response);
		return null;
	}
936326
public void route(HttpMethods meth, String path, API api, Code code) throws Exception {
		String version = "1.0";
		// Get Correct API Class from Mapper
		Class<?> respCls = facade1_0.mapper().getClass(api); 
		if(respCls==null) throw new Exception("Unknown class associated with " + api.getClass().getName() + ' ' + api.name());
		// setup Application API HTML ContentTypes for JSON and Route
		String application = applicationJSON(respCls, version);
		route(env,meth,path,code,application,"application/json;version="+version,"*/*");

		// setup Application API HTML ContentTypes for XML and Route
		application = applicationXML(respCls, version);
		route(env,meth,path,code.clone(facade1_0_XML),application,"application/xml;version="+version);
		
		// Add other Supported APIs here as created
	}
1290766
public static boolean setCustomResponseForDefaultProfile(String pathName, String customData) {
        try {
            return setCustomForDefaultProfile(pathName, true, customData);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }
1329349
@RequestMapping(value = "api/edit/server/{id}/src", method = RequestMethod.POST)
    public
    @ResponseBody
    ServerRedirect updateSrcRedirectUrl(Model model, @PathVariable int id, String srcUrl) throws Exception {
        ServerRedirectService.getInstance().setSourceUrl(srcUrl, id);
        return ServerRedirectService.getInstance().getRedirect(id);
    }
819621
@GetMapping("/openid/*")
    protected ModelAndView handleRequestInternal(final HttpServletRequest request,
                                                 final HttpServletResponse response) {
        return new ModelAndView("openIdProviderView",
            CollectionUtils.wrap("openid_server", casProperties.getServer().getPrefix()));
    }
1299131
def _RunClientAction(self, action, request, parser_factory, path_type):
    """"""
    responses = list(action(request))

    if parser_factory is None:
      return responses

    # parse the responses
    parsed_responses = []

    for response in responses:
      for parser in parser_factory.SingleResponseParsers():
        parsed_responses.extend(
            parser.ParseResponse(self.knowledge_base, response, path_type))

      for parser in parser_factory.SingleFileParsers():
        precondition.AssertType(response, rdf_client_fs.StatEntry)
        pathspec = response.pathspec
        with vfs.VFSOpen(pathspec) as filedesc:
          parsed_responses.extend(
              parser.ParseFile(self.knowledge_base, pathspec, filedesc))

    for parser in parser_factory.MultiResponseParsers():
      parsed_responses.extend(
          parser.ParseResponses(self.knowledge_base, responses))

    for parser in parser_factory.MultiFileParsers():
      precondition.AssertIterableType(responses, rdf_client_fs.StatEntry)
      pathspecs = [response.pathspec for response in responses]
      with vfs.VFSMultiOpen(pathspecs) as filedescs:
        parsed_responses.extend(
            parser.ParseFiles(self.knowledge_base, pathspecs, filedescs))

    return parsed_responses
271071
@RequestMapping(value = "api/edit/repeatNumber", method = RequestMethod.POST)
    public
    @ResponseBody
    String updateRepeatNumber(Model model, int newNum, int path_id,
                              @RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID) throws Exception {
        logger.info("want to update repeat number of path_id={}, to newNum={}", path_id, newNum);
        editService.updateRepeatNumber(newNum, path_id, clientUUID);
        return null;
    }
408008
@RequestMapping(value = "api/edit/server/{id}", method = RequestMethod.DELETE)
    public
    @ResponseBody
    List<ServerRedirect> deleteRedirectUrl(Model model, @PathVariable int id) throws Exception {
        // get the profile id from this redirect so we can return the remaining
        // data
        ServerRedirect redir = ServerRedirectService.getInstance().getRedirect(id);
        int profileId = redir.getProfileId();
        ServerRedirectService.getInstance().deleteRedirect(id);
        return ServerRedirectService.getInstance().tableServers(profileId);
    }
1260858
public void accessRestriction_u2f_id_enable_POST(Long id, String clientData, String signatureData) throws IOException {
		String qPath = "/me/accessRestriction/u2f/{id}/enable";
		StringBuilder sb = path(qPath, id);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "clientData", clientData);
		addBody(o, "signatureData", signatureData);
		exec(qPath, "POST", sb.toString(), o);
	}
1240183
public void execNoResponse(String id, String ... params) throws Exception {
		container.run(getCmd(id, params));
	}
1155753
public Observable<ServiceResponse<ApplicationInfoResponse>> getWithServiceResponseAsync(UUID appId) {
        if (this.client.endpoint() == null) {
            throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
        }
        if (appId == null) {
            throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
        }
        String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
        return service.get(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ApplicationInfoResponse>>>() {
                @Override
                public Observable<ServiceResponse<ApplicationInfoResponse>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<ApplicationInfoResponse> clientResponse = getDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
421763
public boolean setCustomResponse(String pathValue, String requestType, String customData) {
        try {
            JSONObject path = getPathFromEndpoint(pathValue, requestType);
            if (path == null) {
                String pathName = pathValue;
                createPath(pathName, pathValue, requestType);
                path = getPathFromEndpoint(pathValue, requestType);
            }
            String pathId = path.getString("pathId");
            resetResponseOverride(pathId);
            setCustomResponse(pathId, customData);
            return toggleResponseOverride(pathId, true);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }
845253
public static boolean setDefaultCustomResponse(String pathValue, String requestType, String customData) {
        try {
            JSONObject profile = getDefaultProfile();
            String profileName = profile.getString("name");
            PathValueClient client = new PathValueClient(profileName, false);
            return client.setCustomResponse(pathValue, requestType, customData);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }
695633
public void removeCustomOverride(int path_id, String client_uuid) throws Exception {
        updateRequestResponseTables("custom_response", "", getProfileIdFromPathID(path_id), client_uuid, path_id);
    }