Sets the body filter for this ID

@param pathId ID of path
@param bodyFilter Body filter to set
502819
public void setBodyFilter(int pathId, String bodyFilter) {
        PreparedStatement statement = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "UPDATE " + Constants.DB_TABLE_PATH +
                    " SET " + Constants.PATH_PROFILE_BODY_FILTER + " = ? " +
                    " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            statement.setString(1, bodyFilter);
            statement.setInt(2, pathId);
            statement.executeUpdate();
            statement.close();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
    }
981676
function setCurrentFilter(filter) {
    var token = cache.get('token');
    var dfrd = Q.defer();
    var id;
    if (!token) {
      dfrd.reject(MODULE_ERRORS.undefinedToken);
    } else {
      id = typeof filter === 'string' ? filter : filter.id;
      request(format(URLs.setCurrentFilter, PROTOCOL, conf.host, id,
        token), function(err, res, body) {
        if (err) {
          dfrd.reject(err);
        } else {
          _extractEmptyResponse(body, dfrd);
          dfrd.resolve(true);
        }
      });
    }
    return dfrd.promise;
  }
202463
public void setFilters(java.util.Collection<QueryFilter> filters) {
        if (filters == null) {
            this.filters = null;
            return;
        }

        this.filters = new java.util.ArrayList<QueryFilter>(filters);
    }
1030456
public void setDependencyFilter(ObjectNode filter) {
        if (filter == null) {
            return;
        }
        final JsonNode patterns = filter.get("patterns");
        if (patterns != null && patterns.isArray()) {
            List<String> ids = new ArrayList<>();
            for (JsonNode exclusion : patterns) {
                ids.add(exclusion.asText());
            }
            setDependencyFilter(new ExcludesArtifactFilter(ids));
        }
    }
396561
void setRequestedSessionId(String pathParams)
    {
        _requestedSessionId=null;
        
        // try cookies first
        if (_servletHandler.isUsingCookies())
        {
            Cookie[] cookies=_httpRequest.getCookies();
            if (cookies!=null && cookies.length>0)
            {
                for (int i=0;i<cookies.length;i++)
                {
                    if (SessionManager.__SessionCookie.equalsIgnoreCase(cookies[i].getName()))
                    {
                        if (_requestedSessionId!=null)
                        {
                            // Multiple jsessionid cookies. Probably due to
                            // multiple paths and/or domains. Pick the first
                            // known session or the last defined cookie.
                            SessionManager manager = _servletHandler.getSessionManager();
                            if (manager!=null && manager.getHttpSession(_requestedSessionId)!=null)
                                break;
                            log.debug("multiple session cookies");
                        }
                        
                        _requestedSessionId=cookies[i].getValue();
                        _sessionIdState = __SESSIONID_COOKIE;
                        if(log.isDebugEnabled())log.debug("Got Session "+_requestedSessionId+" from cookie");
                    }
                }
            }
        }
            
        // check if there is a url encoded session param.
        if (pathParams!=null && pathParams.startsWith(SessionManager.__SessionURL))
        {
            String id =
                pathParams.substring(SessionManager.__SessionURL.length()+1);
            if(log.isDebugEnabled())log.debug("Got Session "+id+" from URL");
            
            if (_requestedSessionId==null)
            {
                _requestedSessionId=id;
                _sessionIdState = __SESSIONID_URL;
            }
            else if (!id.equals(_requestedSessionId))
                log.debug("Mismatched session IDs");
        }
        
        if (_requestedSessionId == null)
            _sessionIdState = __SESSIONID_NONE;        
    }
445955
public void setUrlPattern(String filterURI) {
        // determine what type of filter uri we have and set the mapping type
        if (filterURI.equals("/"))
            mappingType = WebAppFilterManager.FMI_MAPPING_SINGLE_SLASH;
        else if (filterURI.startsWith("/") && filterURI.endsWith("/*")) {
            mappingType = WebAppFilterManager.FMI_MAPPING_PATH_MATCH;

            // go ahead and strip the /* for later matching
            filterURI = filterURI.substring(0, filterURI.length() - 2);
        } else if (filterURI.startsWith("*."))
            mappingType = WebAppFilterManager.FMI_MAPPING_EXTENSION_MATCH;
        // PK57083 START
        else if (WCCustomProperties.MAP_FILTERS_TO_ASTERICK && filterURI.equals("*")) {
            mappingType = WebAppFilterManager.FMI_MAPPING_PATH_MATCH;
            filterURI = "";
        }
        // PK57083 END
        else
            mappingType = WebAppFilterManager.FMI_MAPPING_EXACT_MATCH;

        this.urlPattern = filterURI;
    }
830762
def update_filter(self, filter_id, body, params=None):
        
        for param in (filter_id, body):
            if param in SKIP_IN_PATH:
                raise ValueError("Empty value passed for a required argument.")
        return self.transport.perform_request(
            "POST",
            _make_path("_ml", "filters", filter_id, "_update"),
            params=params,
            body=body,
        )
812953
public void setPathQuery(String path) {
        _uri = null;
        _path = null;
        _decodedPath = null;
        _param = null;
        _fragment = null;
        if (path != null)
            parse(State.PATH, path, 0, path.length());
    }
1128204
public ServerFilter where(Predicate<ServerMetadata> filter) {
        checkNotNull(filter, "Filter must be not a null");

        predicate = predicate.and(filter);

        return this;
    }
470222
public void setFilter(String filter) {
		if(filter == null || filter.length() == 0 ) {
			this.filter = null;
		} else {
			this.filter = filter;
		}
		
		// Reload the list of files.
		this.loadFolder(this.currentFolder);
	}
520828
func (a *RequestEntriesArgs) SetPathFilter(pathFilter string) *RequestEntriesArgs {
	a.PathFilter = &pathFilter
	return a
}
533604
func (s *ProvisionProductInput) SetPathId(v string) *ProvisionProductInput {
	s.PathId = &v
	return s
}
408637
public void setPathInfo(String pathinfo) {
		int qp = pathinfo.indexOf('?');
		if(qp<0) {
			client.setContext(isProxy?("/proxy"+pathinfo):pathinfo);
		} else {
			client.setContext(isProxy?("/proxy"+pathinfo.substring(0,qp)):pathinfo.substring(0,qp));
			client.setQueryParams(pathinfo.substring(qp+1));
		}
	}
1250770
public void setBody(String body)
    {
    	String xbody = body;
    	String [] row = xbody.split("\n");
    	for(int i=0; i<row.length; i++){
    		this.m_xbody.add(row[i]);
    	}
    }
1312777
private void addFilter(Filter filter) {
        boolean exists = false;
        for (Filter initedFilter : this.filters) {
            if (initedFilter.getClass() == filter.getClass()) {
                exists = true;
                break;
            }
        }

        if (!exists) {
            filter.init(this);
            this.filters.add(filter);
        }

    }
1359051
public void setProcessPath(java.util.Collection<StringFilter> processPath) {
        if (processPath == null) {
            this.processPath = null;
            return;
        }

        this.processPath = new java.util.ArrayList<StringFilter>(processPath);
    }
1217885
@SuppressWarnings("unchecked")
    protected void cullPathsByBodyFilter(History history) throws Exception {
        RequestInformation requestInfo = requestInformation.get();
        try {
            String requestBody = history.getRequestPostData();
            ArrayList<EndpointOverride> removePaths = new ArrayList<EndpointOverride>();

            // requestInformation.get().selectedResponsePaths
            for (EndpointOverride selectedPath : requestInfo.selectedResponsePaths) {
                String pathBodyFilter = selectedPath.getBodyFilter();
                // check selective post/put filters.
                if (pathBodyFilter != null && pathBodyFilter.length() > 0) {
                    Pattern pattern = Pattern.compile(pathBodyFilter);
                    Matcher matcher = pattern.matcher(requestBody);

                    // if request body doesn't match path body filter, add to remove list
                    if (!matcher.matches()) {
                        removePaths.add(selectedPath);
                    }
                }
            }

            // remove paths that do not match filter
            for (EndpointOverride removePath : removePaths) {
                requestInfo.selectedResponsePaths.remove(removePath);
            }
        } catch (Exception e) {
            logger.info("ERROR: failure culling paths");
        }
    }