Examples of UriInfoImpl


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;
        }
       
        StringBuilder sbMain = new StringBuilder();
        sbMain.append("<application xmlns=\"").append(WADL_NS)
              .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<?>> jaxbTypes = ResourceUtils.getAllRequestResponseTypes(cris, true).keySet();
        JAXBContext context = createJaxbContext(jaxbTypes);
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 (!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

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 (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

        super.close();
    }
   
    private String getIssuerId(Message m) {
        if (issuerId == null) {
            return new UriInfoImpl(m).getBaseUri().toString();
        } else {
            return issuerId;
        }
    }
View Full Code Here

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

       
        SamlRequestInfo info = new SamlRequestInfo();
        info.setSamlRequest(authnRequestEncoded);
       
        String webAppContext = getWebAppContext(m);
        String originalRequestURI = new UriInfoImpl(m).getRequestUri().toString();
       
        RequestState requestState = new RequestState(originalRequestURI,
                                                     getIdpServiceAddress(),
                                                     authnRequest.getID(),
                                                     getIssuerId(m),
View Full Code Here

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

    protected abstract void signAuthnRequest(AuthnRequest authnRequest) throws Exception;
   
    private String getAbsoluteAssertionServiceAddress(Message m) {
        if (assertionConsumerServiceAddress == null) {
            if (Boolean.TRUE.equals(JAXRSUtils.getCurrentMessage().get(SSOConstants.RACS_IS_COLLOCATED))) {
                assertionConsumerServiceAddress = new UriInfoImpl(m).getAbsolutePath().toString();   
            } else {
                reportError("MISSING_ASSERTION_SERVICE_URL");
                throw ExceptionUtils.toInternalServerErrorException(null, null);
            }
        }
View Full Code Here

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

    }

    private String getWebAppContext(Message m) {
        if (addWebAppContext) {
            if (addEndpointAddressToContext) {
                return new UriInfoImpl(m).getBaseUri().getRawPath();
            } else {
                String httpBasePath = (String)m.get("http.base.path");
                return URI.create(httpBasePath).getRawPath();
            }
        } else {
View Full Code Here

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

    public static Object createHttpContextValue(Message m, Class<?> clazz) {
               
        if (UriInfo.class.isAssignableFrom(clazz)) {
            MultivaluedMap<String, String> templateParams =
                (MultivaluedMap<String, String>)m.get(URITemplate.TEMPLATE_PARAMETERS);
            return new UriInfoImpl(m, templateParams);
        }
        if (HttpHeaders.class.isAssignableFrom(clazz)) {
            return new HttpHeadersImpl(m);
        }
        if (Request.class.isAssignableFrom(clazz)) {
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.