Package com.alibaba.citrus.service.uribroker.uri

Examples of com.alibaba.citrus.service.uribroker.uri.URIBroker.addQueryData()


            buf.append('?').append(queryString);
        }

        String returnURL = buf.toString();

        response.sendRedirect(redirectURI.addQueryData(returnKey, returnURL).render());
    }

    static class Status {
        private final TurbineRunData rundata;
        private       PetstoreUser   user;
View Full Code Here


    public void noCharset() {
        service = (URIBrokerServiceImpl) factory.getBean("noDefaultCharset");

        URIBroker link1 = service.getURIBroker("a");
        assertEquals(null, link1.getCharset());
        assertEquals("http://localhost/?name=%E4%B8%AD%E5%9B%BD", link1.addQueryData("name", "中国").render()); // from context

        URIBroker link2 = service.getURIBroker("b");
        assertEquals("GBK", link2.getCharset());
        assertEquals("http://localhost/?name=%D6%D0%B9%FA", link2.addQueryData("name", "中国").render());
    }
View Full Code Here

        assertEquals(null, link1.getCharset());
        assertEquals("http://localhost/?name=%E4%B8%AD%E5%9B%BD", link1.addQueryData("name", "中国").render()); // from context

        URIBroker link2 = service.getURIBroker("b");
        assertEquals("GBK", link2.getCharset());
        assertEquals("http://localhost/?name=%D6%D0%B9%FA", link2.addQueryData("name", "中国").render());
    }

    @Test
    public void defaultCharset() {
        service = (URIBrokerServiceImpl) factory.getBean("withDefaultCharset");
View Full Code Here

    public void defaultCharset() {
        service = (URIBrokerServiceImpl) factory.getBean("withDefaultCharset");

        URIBroker link1 = service.getURIBroker("x");
        assertEquals("UTF-8", link1.getCharset());
        assertEquals("http://localhost/?name=%E4%B8%AD%E5%9B%BD", link1.addQueryData("name", "中国").render());

        URIBroker link2 = service.getURIBroker("y");
        assertEquals("GBK", link2.getCharset());
        assertEquals("http://localhost/?name=%D6%D0%B9%FA", link2.addQueryData("name", "中国").render());
    }
View Full Code Here

        assertEquals("UTF-8", link1.getCharset());
        assertEquals("http://localhost/?name=%E4%B8%AD%E5%9B%BD", link1.addQueryData("name", "中国").render());

        URIBroker link2 = service.getURIBroker("y");
        assertEquals("GBK", link2.getCharset());
        assertEquals("http://localhost/?name=%D6%D0%B9%FA", link2.addQueryData("name", "中国").render());
    }

    @Test
    public void uriBean() {
        service = (URIBrokerServiceImpl) factory.getBean("uri_bean");
View Full Code Here

    public void noCharset() {
        service = (URIBrokerServiceImpl) factory.getBean("noDefaultCharset");

        URIBroker link1 = service.getURIBroker("a");
        assertEquals(null, link1.getCharset());
        assertEquals("http://localhost/?name=%E4%B8%AD%E5%9B%BD", link1.addQueryData("name", "中国").render()); // from context

        URIBroker link2 = service.getURIBroker("b");
        assertEquals("GBK", link2.getCharset());
        assertEquals("http://localhost/?name=%D6%D0%B9%FA", link2.addQueryData("name", "中国").render());
    }
View Full Code Here

        assertEquals(null, link1.getCharset());
        assertEquals("http://localhost/?name=%E4%B8%AD%E5%9B%BD", link1.addQueryData("name", "中国").render()); // from context

        URIBroker link2 = service.getURIBroker("b");
        assertEquals("GBK", link2.getCharset());
        assertEquals("http://localhost/?name=%D6%D0%B9%FA", link2.addQueryData("name", "中国").render());
    }

    @Test
    public void defaultCharset() {
        service = (URIBrokerServiceImpl) factory.getBean("withDefaultCharset");
View Full Code Here

    public void defaultCharset() {
        service = (URIBrokerServiceImpl) factory.getBean("withDefaultCharset");

        URIBroker link1 = service.getURIBroker("x");
        assertEquals("UTF-8", link1.getCharset());
        assertEquals("http://localhost/?name=%E4%B8%AD%E5%9B%BD", link1.addQueryData("name", "中国").render());

        URIBroker link2 = service.getURIBroker("y");
        assertEquals("GBK", link2.getCharset());
        assertEquals("http://localhost/?name=%D6%D0%B9%FA", link2.addQueryData("name", "中国").render());
    }
View Full Code Here

        assertEquals("UTF-8", link1.getCharset());
        assertEquals("http://localhost/?name=%E4%B8%AD%E5%9B%BD", link1.addQueryData("name", "中国").render());

        URIBroker link2 = service.getURIBroker("y");
        assertEquals("GBK", link2.getCharset());
        assertEquals("http://localhost/?name=%D6%D0%B9%FA", link2.addQueryData("name", "中国").render());
    }

    @Test
    public void uriBean() {
        service = (URIBrokerServiceImpl) factory.getBean("uri_bean");
View Full Code Here

    }

    private void redirect(PipelineContext pipelineContext, TurbineRunData rundata, String uriBroker) {
        URIBroker urlBroker = assertNotNull(uriBrokerService.getURIBroker(uriBroker),
                                            "uriBroker get from loginLink should not be null");
        urlBroker.addQueryData(redirectParmeter, getRequestUrlWithQueryString());
        rundata.setRedirectLocation(urlBroker.render());
        pipelineContext.breakPipeline(Pipeline.TOP_LABEL);
    }

    private String getRequestUrlWithQueryString() {
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.