Examples of UriInfoImpl


Examples of org.apache.clerezza.triaxrs.util.UriInfoImpl

          parameterType + " having getClass(): " +
          parameterType.getClass());
    }

    if (clazz.isAssignableFrom(UriInfo.class)) {
      return (T) new UriInfoImpl(request);
    } else if (clazz.isAssignableFrom(WebRequest.class)) {
      //this also injects javax.ws.rs.core.Request
      return (T) request;
    } else if (clazz.isAssignableFrom(HttpHeaders.class)) {
      return (T) new HttpHeadersImpl(request);
View Full Code Here

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

        throw ExceptionUtils.toNotAuthorizedException(null, null);
    }
   
    private String getAbsoluteTargetAddress(Message m) {
        if (accessTokenServiceAddress == null) {   
            return new UriInfoImpl(m).getAbsolutePath().toString();
        }
        if (!accessTokenServiceAddress.startsWith("http")) {
            String httpBasePath = (String)m.get("http.base.path");
            return UriBuilder.fromUri(httpBasePath)
                             .path(accessTokenServiceAddress)
View Full Code Here

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

        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();
            }
        }
        form.getData().remove(SAML_ELEMENT);
        form.getData().remove(SAML_RELAY_STATE);
View Full Code Here

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

        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

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

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

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

       
        if (!"GET".equals(m.get(Message.HTTP_REQUEST_METHOD))) {
            return null;
        }
       
        UriInfo ui = new UriInfoImpl(m);
        if (!ui.getQueryParameters().containsKey(WADL_QUERY)) {
            return null;
        }
       
        if (isPrivate(m)) {
            return Response.status(401).build();
        }
       
        StringBuilder sbMain = new StringBuilder();
        sbMain.append("<application xmlns=\"").append(getNamespace())
              .append("\" xmlns:xs=\"").append(XmlSchemaConstants.XSD_NAMESPACE_URI).append("\"");
        StringBuilder sbGrammars = new StringBuilder();
        sbGrammars.append("<grammars>");
       
        StringBuilder sbResources = new StringBuilder();
        sbResources.append("<resources base=\"").append(ui.getBaseUri().toString()).append("\">");
       
        List<ClassResourceInfo> cris = getResourcesList(m, resource);
       
        Set<Class<?>> allTypes =
            ResourceUtils.getAllRequestResponseTypes(cris, useJaxbContextForQnames).keySet();
View Full Code Here

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

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

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

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

        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

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

                                          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

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

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

        UriInfo ui = new UriInfoImpl(m);
        if (!ui.getQueryParameters().containsKey(WADL_QUERY)) {
            if (!docLocationMap.isEmpty()) {
                String path = ui.getPath(false);
                if (path.startsWith("/") && path.length() > 0) {
                    path = path.substring(1);
                }
                if (docLocationMap.containsKey(path)) {
                    return getExistingResource(m, ui, path);
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.