Retrieves the path using the endpoint value

@param pathValue - path (endpoint) value
@param requestType - "GET", "POST", etc
@return Path or null
@throws Exception exception
8917
public JSONObject getPathFromEndpoint(String pathValue, String requestType) throws Exception {
        int type = getRequestTypeFromString(requestType);
        String url = BASE_PATH;
        JSONObject response = new JSONObject(doGet(url, null));
        JSONArray paths = response.getJSONArray("paths");
        for (int i = 0; i < paths.length(); i++) {
            JSONObject path = paths.getJSONObject(i);
            if (path.getString("path").equals(pathValue) && path.getInt("requestType") == type) {
                return path;
            }
        }
        return null;
    }
401224
public String get(String requestedValue) {
        String result;
        if (defaultTemplate == null) {
            result = applyTemplate(requestedValue);
        } else {
            result = applyTemplate(defaultTemplate);
        }
        return result;
    }
235798
@Override
    public String path() {
        try {
            return new URI(request.uri()).getRawPath();
        } catch (URISyntaxException e) { //NOSONAR
            // Should never be the case.
            return uri();
        }
    }
724180
protected <T> Optional<T> executeGetRequest(URI uri, GenericType<T> returnType)
    {
        return executeGetRequest(uri, null, null, returnType);
    }
1194002
public String getRealPath(HttpServletRequest request, String path)
    {
        if (m_servlet != null)
            return m_servlet.getRealPath(request, path);
        return path;
    }
349896
public <T> T get(String restPath, Class<T> expectedResponse, Map<String, String> queryParams) {
		return call(HttpMethod.GET, restPath, expectedResponse, null, queryParams);
	}
266467
public static void get(HttpConsumer<HttpExchange> endpoint, MediaTypes... mediaTypes) {
        addResource(Methods.GET, HandlerUtil.BASE_PATH, endpoint, mediaTypes);
    }
339460
public EndpointOverride getPath(int pathId, String clientUUID, String[] filters) throws Exception {
        EndpointOverride endpoint = null;
        PreparedStatement statement = null;
        ResultSet results = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            String queryString = this.getPathSelectString();
            queryString += " AND " + Constants.DB_TABLE_PATH + "." + Constants.GENERIC_ID + "=" + pathId + ";";
            statement = sqlConnection.prepareStatement(queryString);
            statement.setString(1, clientUUID);

            results = statement.executeQuery();

            if (results.next()) {
                endpoint = this.getEndpointOverrideFromResultSet(results);
                endpoint.setFilters(filters);
            }
        } 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 endpoint;
    }
1284648
private FilterChain getChainForPath(int requestType, String pathInContext, ServletHolder servletHolder) 
    {
        if (_filterChainsCached)
        {
            synchronized(this)
            {
                if(_chainCache[requestType].containsKey(pathInContext))
                    return (FilterChain)_chainCache[requestType].get(pathInContext);
            }
        }
        
        // Build list of filters
        Object filters= null;
    
        // Path filters
        for (int i= 0; i < _pathFilters.size(); i++)
        {
            FilterMapping mapping = (FilterMapping)_pathFilters.get(i);
            if (mapping.appliesTo(pathInContext, requestType))
                filters= LazyList.add(filters, mapping.getHolder());
        }
        
        // Servlet filters
        if (servletHolder != null && _servletFilterMap.size() > 0)
        {
            Object o= _servletFilterMap.get(servletHolder.getName());
            for (int i=0; i<LazyList.size(o);i++)
            {
                FilterMapping mapping = (FilterMapping)LazyList.get(o,i);
                if (mapping.appliesTo(null,requestType))
                    filters=LazyList.add(filters,mapping.getHolder());
            }
        }
        
        FilterChain chain = null;
        if (_filterChainsCached)
        {
            synchronized(this)
            {
                if (LazyList.size(filters) > 0)
                    chain= new CachedChain(filters, servletHolder);
                _chainCache[requestType].put(pathInContext,chain);
            }
        }
        else if (LazyList.size(filters) > 0)
            chain = new Chain(filters, servletHolder);
    
        return chain;
    }
938888
public <T> T getDocumentSource(String path,Class<T> beanType) throws ElasticSearchException{
		try {
			T searchResult = (T) this.client.executeRequest(path,null,   new GetDocumentSourceResponseHandler( beanType),ClientUtil.HTTP_GET);
			return searchResult;
		}
		catch(ElasticSearchException e){
			return ResultUtil.hand404HttpRuntimeException(e,beanType,ResultUtil.OPERTYPE_getDocument);
		}
	}
391991
public <T> Optional<T> GET(String partialUrl, GenericType<T> returnType)
    {    
        URI uri = buildUri(partialUrl);   
        return executeGetRequest(uri, returnType);
    }
981799
public Object getFieldValueByType(Object fieldValue) throws Exception {
        return ClassUtils.getValeByType(field.getType(), fieldValue);
    }
915445
public String getPath() {
        if (path == null) {
            // create a URI to automatically decode the path
            URI uri = URI.create(httpServletRequest.getRequestURL().toString());
            String requestUri = uri.getPath();

            path = applicationPath.isEmpty() ? requestUri : requestUri.substring(applicationPath.length());
            if (StringUtils.isNullOrEmpty(path)) {
                path = "/";
            }
        }

        return path;
    }
1106955
@Override
    @Path("/{valueName}/{value}")
    public JSONObject get(String path, Map<String, String> headers)
            throws ServiceException, JSONException {
        Map<String, String> parameters = getParameters(headers);
        String valueName = getSegment(path, 1);
        if (valueName == null)
            throw new ServiceException("Missing path segment: {valueName}");
        String valuePattern = getSegment(path, 2);
        String ownerType = parameters.get("holderType");

        try {
            if (valuePattern == null)
                return getValues(valueName, ownerType).getJson();
            else
                return getValues(valueName, valuePattern, ownerType).getJson();
        }
        catch (Exception ex) {
            throw new ServiceException("Error loading value holders for " + valueName, ex);
        }
    }
901591
public ResourceHandle getParent(String resourceType) {
        ResourceHandle result = getResource();
        while (result.isValid() && !result.isResourceType(resourceType)) {
            result = result.getParent();
        }
        if (!result.isValid()) {
            result = getParent(resourceType, getPath()); // implicit fallback to the path
        }
        return result;
    }
612681
public String executePostRequestAndRetrieveURL(BlackDuckPath path, Request.Builder requestBuilder) throws IntegrationException {
        String uri = pieceTogetherUri(blackDuckHttpClient.getBaseUrl(), path.getPath());
        requestBuilder.uri(uri);
        return executePostRequestAndRetrieveURL(requestBuilder.build());
    }
1342245
protected Response httpGet(String path, int statusCode) {
        return httpRequest(statusCode, null).get(baseURL + PATH_PREFIX + path);
    }