Package org.apache.cxf.jaxrs.impl

Examples of org.apache.cxf.jaxrs.impl.UriInfoImpl


        // more to come
    }
   
    public Response handleRequest(Message m, ClassResourceInfo resourceClass) {
       
        UriInfo uriInfo = new UriInfoImpl(m, null);
        handleTypeQuery(m, uriInfo.getQueryParameters());
       
       
        return null;
    }
View Full Code Here


        if (!"GET".equals(m.get(Message.HTTP_REQUEST_METHOD))) {
            return null;
        }

        UriInfo ui = new UriInfoImpl(m);
        if (!ui.getQueryParameters().containsKey(WADL_QUERY)) {
            if (!schemaLocationMap.isEmpty()) {
                String path = ui.getPath(false);
                if (path.startsWith("/") && path.length() > 0) {
                    path = path.substring(1);
                }
                if (schemaLocationMap.containsKey(path)) {
                    return getExistingSchema(m, ui, path);
View Full Code Here

   
    @SuppressWarnings("unchecked")
    private static UriInfo createUriInfo(Message m) {
        MultivaluedMap<String, String> templateParams =
            (MultivaluedMap<String, String>)m.get(URITemplate.TEMPLATE_PARAMETERS);
        return new UriInfoImpl(m, templateParams);
    }
View Full Code Here

                                          boolean decode) {
        String queryName = queryParam.value();

        if ("".equals(queryName)) {
            return InjectionUtils.handleBean(paramType,
                                             new UriInfoImpl(m, null).getQueryParameters(),
                                             ParameterType.QUERY, m);
        } else {
            List<String> results = getStructuredParams((String)m.get(Message.QUERY_STRING),
                                       "&",
                                       decode).get(queryName);
View Full Code Here

            return;
        }
       
        RequestPreprocessor rp = ProviderFactory.getInstance(message).getRequestPreprocessor();
        if (rp != null) {
            rp.preprocess(message, new UriInfoImpl(message, null));
        }
       
        String requestContentType = (String)message.get(Message.CONTENT_TYPE);
        if (requestContentType == null) {
            requestContentType = "*/*";
 
View Full Code Here

        String samlRequestURI = form.getData().getFirst(SAML_RELAY_STATE);
        if (samlRequestURI != null) {
            // RelayState may actually represent a reference to a transient local state
            // containing the actual REQUEST URI client was using before being redirected
            // back to IDP - at the moment assume it's URI
            UriInfoImpl ui = new UriInfoImpl(message);
            if (!samlRequestURI.startsWith(ui.getBaseUri().toString())) {
                return Response.status(302).location(URI.create(samlRequestURI)).build();
            }
        }
        // restore input stream
        CachedOutputStream os = new CachedOutputStream();
View Full Code Here

        if (!"GET".equals(m.get(Message.HTTP_REQUEST_METHOD))) {
            return null;
        }

        UriInfo ui = new UriInfoImpl(m);
        if (!ui.getQueryParameters().containsKey(WADL_QUERY)) {
            if (!schemaLocationMap.isEmpty()) {
                String path = ui.getPath(false);
                if (path.startsWith("/") && path.length() > 0) {
                    path = path.substring(1);
                }
                if (schemaLocationMap.containsKey(path)) {
                    return getExistingSchema(m, ui, path);
View Full Code Here

            query += "&_codeType=grammar";
        }
        Message m = mockMessage("http://localhost:8080/baz", "/bar", query, null);
        try {
            cgp.removeCode(cri);
            cgp.setUriInfo(new UriInfoImpl(m, null));
            cgp.handleRequest(m, cri);
           
            File tmpdir = FileUtils.getDefaultTempDir();
            File classes = new File(tmpdir, cgp.getStem(cri, "classes"));
            if (!classes.mkdir()) {
View Full Code Here

        if (MessageUtils.isRequestor(m)) {
            m = m.getExchange() != null ? m.getExchange().getOutMessage() : m;
        }
        MultivaluedMap<String, String> templateParams =
            (MultivaluedMap<String, String>)m.get(URITemplate.TEMPLATE_PARAMETERS);
        return new UriInfoImpl(m, templateParams);
    }
View Full Code Here

                                          Annotation[] paramAnns,
                                          Message m,
                                          String defaultValue,
                                          boolean decode) {
       
        MultivaluedMap<String, String> queryMap = new UriInfoImpl(m, null).getQueryParameters(decode);
       
        if ("".equals(queryName)) {
            return InjectionUtils.handleBean(paramType, paramAnns, queryMap, ParameterType.QUERY, m, false);
        } else {
            return InjectionUtils.createParameterObject(queryMap.get(queryName),
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.impl.UriInfoImpl

Copyright © 2018 www.massapicom. 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.