@Test @SuppressWarnings("deprecation") public void testDisableHostResolution() { HttpServletRequest mockedRequest = mockRequest(); String resolvedUri = OSLC4JUtils.resolveURI(mockedRequest, true); assertEquals("https: }
@Deprecated public static String resolveURI(HttpServletRequest request, boolean includePath) { UriBuilder builder; final String pathInfo = request.getPathInfo(); final String servletPath = request.getServletPath(); final String configuredPublicURI = getPublicURI(); if (configuredPublicURI != null && !configuredPublicURI.isEmpty()) { String uriToBuild = configuredPublicURI; if (includePath) { uriToBuild = configuredPublicURI + "/" + servletPath + pathInfo; } builder = UriBuilder.fromUri(uriToBuild); } else { final String hostname = guessHostname(request); String contextPath = request.getContextPath(); String pathToBuild = contextPath; if (includePath) { pathToBuild = contextPath + servletPath + pathInfo; } builder = UriBuilder.fromPath(pathToBuild) .scheme(request.getScheme()) .host(hostname) .port(request.getServerPort()); } URI resolvedURI = builder.build().normalize(); return resolvedURI.toString(); }
OSLC4JUtils { @Deprecated public static String resolveURI(HttpServletRequest request, boolean includePath) { UriBuilder builder; final String pathInfo = request.getPathInfo(); final String servletPath = request.getServletPath(); final String configuredPublicURI = getPublicURI(); if (configuredPublicURI != null && !configuredPublicURI.isEmpty()) { String uriToBuild = configuredPublicURI; if (includePath) { uriToBuild = configuredPublicURI + "/" + servletPath + pathInfo; } builder = UriBuilder.fromUri(uriToBuild); } else { final String hostname = guessHostname(request); String contextPath = request.getContextPath(); String pathToBuild = contextPath; if (includePath) { pathToBuild = contextPath + servletPath + pathInfo; } builder = UriBuilder.fromPath(pathToBuild) .scheme(request.getScheme()) .host(hostname) .port(request.getServerPort()); } URI resolvedURI = builder.build().normalize(); return resolvedURI.toString(); } }
OSLC4JUtils { @Deprecated public static String resolveURI(HttpServletRequest request, boolean includePath) { UriBuilder builder; final String pathInfo = request.getPathInfo(); final String servletPath = request.getServletPath(); final String configuredPublicURI = getPublicURI(); if (configuredPublicURI != null && !configuredPublicURI.isEmpty()) { String uriToBuild = configuredPublicURI; if (includePath) { uriToBuild = configuredPublicURI + "/" + servletPath + pathInfo; } builder = UriBuilder.fromUri(uriToBuild); } else { final String hostname = guessHostname(request); String contextPath = request.getContextPath(); String pathToBuild = contextPath; if (includePath) { pathToBuild = contextPath + servletPath + pathInfo; } builder = UriBuilder.fromPath(pathToBuild) .scheme(request.getScheme()) .host(hostname) .port(request.getServerPort()); } URI resolvedURI = builder.build().normalize(); return resolvedURI.toString(); }  }
OSLC4JUtils { @Deprecated public static String resolveURI(HttpServletRequest request, boolean includePath) { UriBuilder builder; final String pathInfo = request.getPathInfo(); final String servletPath = request.getServletPath(); final String configuredPublicURI = getPublicURI(); if (configuredPublicURI != null && !configuredPublicURI.isEmpty()) { String uriToBuild = configuredPublicURI; if (includePath) { uriToBuild = configuredPublicURI + "/" + servletPath + pathInfo; } builder = UriBuilder.fromUri(uriToBuild); } else { final String hostname = guessHostname(request); String contextPath = request.getContextPath(); String pathToBuild = contextPath; if (includePath) { pathToBuild = contextPath + servletPath + pathInfo; } builder = UriBuilder.fromPath(pathToBuild) .scheme(request.getScheme()) .host(hostname) .port(request.getServerPort()); } URI resolvedURI = builder.build().normalize(); return resolvedURI.toString(); }  static boolean useStrictDatatypes(); static boolean alwaysAbbrevXML(); static boolean relativeURIsAreDisabled(); static Object getValueBasedOnResourceShapeType(final HashSet<String> rdfTypesList,
			final QName propertyQName, final Object originalValue); static String getPublicURI(); static void setPublicURI(final String newPublicURI); static String getServletPath(); @Deprecated static String resolveURI(HttpServletRequest request, boolean includePath); static String getServletURI(); static boolean useBeanClassForParsing(); static String getUseBeanClassForParsing(); static List<ResourceShape> getShapes(); static boolean inferTypeFromShape(); static String getInferTypeFromShape(); static void setShapes(List<ResourceShape> shapes); static boolean isHostResolutionDisabled(); static boolean isQueryResultListAsContainer(); static void setUseBeanClassForParsing(String useBeanClassForParsing); static void setHostResolutionDisabled(boolean hostResDisabled); static String resolveFullUri(HttpServletRequest request); static String resolveServletUri(HttpServletRequest request); static void setServletPath(String newServletPath); static void setInferTypeFromShape(String inferTypeFromShape); static RDFDatatype getDataTypeBasedOnResourceShapeType(final HashSet<String>
			rdfTypesList,
			final Property property ); }
OSLC4JUtils { @Deprecated public static String resolveURI(HttpServletRequest request, boolean includePath) { UriBuilder builder; final String pathInfo = request.getPathInfo(); final String servletPath = request.getServletPath(); final String configuredPublicURI = getPublicURI(); if (configuredPublicURI != null && !configuredPublicURI.isEmpty()) { String uriToBuild = configuredPublicURI; if (includePath) { uriToBuild = configuredPublicURI + "/" + servletPath + pathInfo; } builder = UriBuilder.fromUri(uriToBuild); } else { final String hostname = guessHostname(request); String contextPath = request.getContextPath(); String pathToBuild = contextPath; if (includePath) { pathToBuild = contextPath + servletPath + pathInfo; } builder = UriBuilder.fromPath(pathToBuild) .scheme(request.getScheme()) .host(hostname) .port(request.getServerPort()); } URI resolvedURI = builder.build().normalize(); return resolvedURI.toString(); }  static boolean useStrictDatatypes(); static boolean alwaysAbbrevXML(); static boolean relativeURIsAreDisabled(); static Object getValueBasedOnResourceShapeType(final HashSet<String> rdfTypesList,
			final QName propertyQName, final Object originalValue); static String getPublicURI(); static void setPublicURI(final String newPublicURI); static String getServletPath(); @Deprecated static String resolveURI(HttpServletRequest request, boolean includePath); static String getServletURI(); static boolean useBeanClassForParsing(); static String getUseBeanClassForParsing(); static List<ResourceShape> getShapes(); static boolean inferTypeFromShape(); static String getInferTypeFromShape(); static void setShapes(List<ResourceShape> shapes); static boolean isHostResolutionDisabled(); static boolean isQueryResultListAsContainer(); static void setUseBeanClassForParsing(String useBeanClassForParsing); static void setHostResolutionDisabled(boolean hostResDisabled); static String resolveFullUri(HttpServletRequest request); static String resolveServletUri(HttpServletRequest request); static void setServletPath(String newServletPath); static void setInferTypeFromShape(String inferTypeFromShape); static RDFDatatype getDataTypeBasedOnResourceShapeType(final HashSet<String>
			rdfTypesList,
			final Property property );  }