Examples of replacePath()


Examples of javax.ws.rs.core.UriBuilder.replacePath()

    public WebResource uri(URI uri) {
        UriBuilder b = getUriBuilder();
        String path = uri.getRawPath();
        if (path != null && path.length() > 0) {
            if (path.startsWith("/")) {
                b.replacePath(path);
            } else {
                b.path(path);
            }
        }
        String query = uri.getRawQuery();
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

    public AsyncWebResource uri(URI uri) {
        UriBuilder b = getUriBuilder();
        String path = uri.getRawPath();
        if (path != null && path.length() > 0) {
            if (path.startsWith("/")) {
                b.replacePath(path);
            } else {
                b.path(path);
            }
        }
        String query = uri.getRawQuery();
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

    public AsyncViewResource uri(URI uri) {
        UriBuilder b = getUriBuilder();
        String path = uri.getRawPath();
        if (path != null && path.length() > 0) {
            if (path.startsWith("/")) {
                b.replacePath(path);
            } else {
                b.path(path);
            }
        }
        String query = uri.getRawQuery();
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

    public ViewResource uri(URI uri) {
        UriBuilder b = getUriBuilder();
        String path = uri.getRawPath();
        if (path != null && path.length() > 0) {
            if (path.startsWith("/")) {
                b.replacePath(path);
            } else {
                b.path(path);
            }
        }
        String query = uri.getRawQuery();
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

        }

        final URI baseUri;
        final URI requestUri;
        try {
            baseUri = absoluteUriBuilder.replacePath(encodedBasePath).build();
            String queryParameters = ContainerUtils.encodeUnsafeCharacters(request.getQueryString());
            if (queryParameters == null) {
                queryParameters = "";
            }
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

            String queryParameters = ContainerUtils.encodeUnsafeCharacters(request.getQueryString());
            if (queryParameters == null) {
                queryParameters = "";
            }

            requestUri = absoluteUriBuilder.replacePath(requestURI).
                    replaceQuery(queryParameters).
                    build();
        } catch (UriBuilderException ex) {
            final Response.Status badRequest = Response.Status.BAD_REQUEST;
            if (webComponent.configSetStatusOverSendError) {
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

        final UriBuilder absoluteUriBuilder = UriBuilder.fromUri(
                request.getRequestURL().toString());

        final URI baseUri = (filterContextPath == null)
                ? absoluteUriBuilder.replacePath(request.getContextPath()).
                path("/").
                build()
                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

        final URI baseUri = (filterContextPath == null)
                ? absoluteUriBuilder.replacePath(request.getContextPath()).
                path("/").
                build()
                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
                build();

        final URI requestUri = absoluteUriBuilder.replacePath(requestURI).
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

                : absoluteUriBuilder.replacePath(request.getContextPath()).
                path(filterContextPath).
                path("/").
                build();

        final URI requestUri = absoluteUriBuilder.replacePath(requestURI).
                replaceQuery(queryString).
                build();

        final int status = service(baseUri, requestUri, request, response).get();
View Full Code Here

Examples of javax.ws.rs.core.UriBuilder.replacePath()

        builder = new UriBuilderImpl();
        builder.segment("path1").segment("{var1}");
        uri = builder.build("/s1,s2");
        assertEquals("path1//s1,s2", uri.toString());

        builder.replacePath("/r1/{v1}");
        uri = builder.build("r2");
        assertEquals("/r1/r2", uri.toString());

        builder.replacePath("r1/{v1}");
        uri = builder.build("r2");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.