Examples of ExtendedUriInfo


Examples of org.glassfish.jersey.server.ExtendedUriInfo

    @Override
    public Set<String> getFilteringScopes(final Annotation[] entityAnnotations, final boolean defaultIfNotFound) {
        Set<String> filteringScope = super.getFilteringScopes(entityAnnotations, false);

        if (filteringScope.isEmpty()) {
            final ExtendedUriInfo uriInfo = uriInfoProvider.get();
            final String path = uriInfo.getPath();

            if (uriToContexts.containsKey(path)) {
                return uriToContexts.get(path);
            }
View Full Code Here

Examples of org.glassfish.jersey.server.ExtendedUriInfo

        @Override
        protected WebTarget get(HttpContext context) {
            // no need for try-catch - unlike for @*Param annotations, any issues with @Uri would usually be caused
            // by incorrect server code, so the default runtime exception mapping to 500 is appropriate
            final ExtendedUriInfo uriInfo = context.getUriInfo();
            URI uri = UriBuilder.fromUri(this.uri).buildFromEncodedMap(Maps.transformValues(
                    uriInfo.getPathParameters(),
                    new Function<List<String>, Object>() {
                        @Override
                        public Object apply(List<String> input) {
                            return input.isEmpty() ? null : input.get(0);
                        }
                    }
            ));

            ManagedClient mc = client.get();

            if (!uri.isAbsolute()) {
                String rootUri = (mc.customBaseUri.isEmpty()) ? uriInfo.getBaseUri().toString() : mc.customBaseUri;
                uri = UriBuilder.fromUri(rootUri).path(uri.toString()).build();
            }

            return mc.instance.target(uri);
        }
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.