set custom request for profile's default client

@param profileName profileName to modify
@param pathName friendly name of path
@param customData custom request data
@return true if success, false otherwise
973551
public static boolean setCustomRequestForDefaultClient(String profileName, String pathName, String customData) {
        try {
            return setCustomForDefaultClient(profileName, pathName, false, customData);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }
1156940
public void removePathnameFromProfile(int path_id, int profileId) {
        PreparedStatement statement = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
                    " WHERE " + Constants.ENABLED_OVERRIDES_PATH_ID + " = ?"
            );
            statement.setInt(1, path_id);
            statement.executeUpdate();
            statement.close();

            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_PATH +
                    " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            statement.setInt(1, path_id);
            statement.executeUpdate();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
    }
258215
public void setProfiles(java.util.Collection<ProfileData> profiles) {
        if (profiles == null) {
            this.profiles = null;
            return;
        }

        this.profiles = new java.util.ArrayList<ProfileData>(profiles);
    }
361215
ConfiguredCloseableHttpClient buildWithDefaultRequestConfiguration(String name) {
        return createClient(org.apache.http.impl.client.HttpClientBuilder.create(),
                createConnectionManager(createConfiguredRegistry(), name), name);
    }
491732
protected void setProfileFactory(final Function<Object[], P> profileFactory) {
        CommonHelper.assertNotNull("profileFactory", profileFactory);
        this.newProfile = profileFactory;
    }
1290766
public static boolean setCustomResponseForDefaultProfile(String pathName, String customData) {
        try {
            return setCustomForDefaultProfile(pathName, true, customData);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }
5872
@RequestMapping(value = "api/edit/activate", method = RequestMethod.POST)
    public
    @ResponseBody
    String activateProfile(Model model,
                           @RequestParam int profileId,
                           @RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID) throws Exception {
        clientService.updateActive(profileId, clientUUID, true);
        return null;
    }
31861
public static Profile getProfile(HttpServletRequest request) {
        Authentication auth = getAuthentication(request);
        if (auth != null) {
            return auth.getProfile();
        } else {
            return null;
        }
    }
1171208
@RequestMapping(value = "/pathname/{profileId}/{pathId}", method = RequestMethod.GET)
    public String editPathname(Model model,
                               @PathVariable int pathId, @PathVariable int profileId) throws Exception {
        model.addAttribute("profile_id", profileId);
        model.addAttribute("profile_name", ProfileService.getInstance().getNamefromId(profileId));
        model.addAttribute("endpoint", pathOverrideService.getPath(pathId));
        model.addAttribute("groups_in_path", pathOverrideService.getGroupsInPathProfile(profileId, pathId));
        model.addAttribute("groups_not_in_path", pathOverrideService.getGroupsNotInPathProfile(profileId, pathId));
        return "editPathname";
    }
977521
public void updatePathOrder(int profileId, int[] pathOrder) {
        for (int i = 0; i < pathOrder.length; i++) {
            EditService.updatePathTable(Constants.PATH_PROFILE_PATH_ORDER, (i + 1), pathOrder[i]);
        }
    }
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;
    }
994195
public void setName(int pathId, String pathName) {
        PreparedStatement statement = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "UPDATE " + Constants.DB_TABLE_PATH +
                    " SET " + Constants.PATH_PROFILE_PATHNAME + " = ?" +
                    " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            statement.setString(1, pathName);
            statement.setInt(2, pathId);
            statement.executeUpdate();
            statement.close();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
    }
587776
public static base_response delete(nitro_service client, String profilename) throws Exception {
		vpnclientlessaccessprofile deleteresource = new vpnclientlessaccessprofile();
		deleteresource.profilename = profilename;
		return deleteresource.delete_resource(client);
	}
598857
@RequestMapping(value = "api/edit/disable", method = RequestMethod.POST)
    public
    @ResponseBody
    String disableResponses(Model model, int path_id, @RequestParam(defaultValue = Constants.PROFILE_CLIENT_DEFAULT_ID) String clientUUID) throws Exception {
        OverrideService.getInstance().disableAllOverrides(path_id, clientUUID);
        //TODO also need to disable custom override if there is one of those
        editService.removeCustomOverride(path_id, clientUUID);

        return null;
    }
1144378
protected void setRequestUrl(MockServletRequest request,
			Map<String, String> variantMap, String path, JawrConfig config) {

		String domainURL = JawrConstant.HTTP_URL_PREFIX + DEFAULT_WEBAPP_URL;

		if (JawrConstant.SSL.equals(variantMap
				.get(JawrConstant.CONNECTION_TYPE_VARIANT_TYPE))) {
			// Use the contextPathSslOverride property if it's an absolute URL
			if (StringUtils.isNotEmpty(config.getContextPathSslOverride())
					&& config.getContextPathSslOverride().startsWith(
							JawrConstant.HTTPS_URL_PREFIX)) {
				domainURL = config.getContextPathSslOverride();
			} else {
				domainURL = JawrConstant.HTTPS_URL_PREFIX + DEFAULT_WEBAPP_URL;
			}
		} else {
			// Use the contextPathOverride property if it's an absolute URL
			if (StringUtils.isNotEmpty(config.getContextPathOverride())
					&& config.getContextPathOverride().startsWith(
							JawrConstant.HTTP_URL_PREFIX)) {
				domainURL = config.getContextPathOverride();
			} else {
				domainURL = JawrConstant.HTTP_URL_PREFIX + DEFAULT_WEBAPP_URL;
			}
		}

		request.setRequestUrl(PathNormalizer.joinDomainToPath(domainURL, path));
	}
1323617
public boolean setCustomResponse(String pathName, String customResponse) throws Exception {
        // figure out the new ordinal
        int nextOrdinal = this.getNextOrdinalForMethodId(-1, pathName);

        // add override
        this.addMethodToResponseOverride(pathName, "-1");

        // set argument
        return this.setMethodArguments(pathName, "-1", nextOrdinal, customResponse);
    }
1043354
@NonNull
  public DefaultDriverConfigLoaderBuilder withProfile(
      @NonNull String profileName, @NonNull Profile profile) {
    String prefix = "profiles." + profileName + ".";
    for (Map.Entry<String, Object> entry : profile.values.entrySet()) {
      this.with(prefix + entry.getKey(), entry.getValue());
    }
    return this;
  }