Examples of PullService


Examples of com.alibaba.citrus.service.pull.PullService

    /**
     * ȡ��template context��
     */
    private TemplateContext getTemplateContext() {
        if (templateContext == null) {
            PullService pullService = getPullService();
            PullContext pullContext = null;

            if (pullService != null) {
                pullContext = pullService.getContext();
            }

            templateContext = new TemplateContextAdapter(getMailBuilder(), pullContext);

            populateTemplateContext(templateContext);
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

        assertEquals("http://localhost/?str=%D6%D0%B9%FA", uri.addQueryData("str", "中国").render());
    }

    @Test
    public void linkWithInterceptor_URIBroker() {
        PullService pull = (PullService) factory.getBean("pullService");

        // 确保uri interceptor在render之前没有被执行过
        // 曾经的bug:pull service在logging为debug时,会提前执行uri.interceptors。
        uri = (GenericURIBroker) pull.getContext().pull("linkWithInterceptor");
        assertTrue(uri.addQueryData("path", "hello").render().startsWith("http://www.mydomain.com/hello?path=hello&r="));

        assertTrue(uri.toString().startsWith("http://localhost/"));
        assertTrue(uri.render().startsWith("http://www.mydomain.com/abc?r="));
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

    }

    @Before
    public void init() throws Exception {
        getFormService("form1");
        PullService pullService = (PullService) factory.getBean("pullService");

        tool = (FormTool) pullService.getTools().get("form");
        assertNotNull(tool);

        tool5 = (FormTool) pullService.getTools().get("tool5");
        assertNotNull(tool5);

        newForm();
    }
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

    @Before
    public void init() {
        getFormService("form1");

        PullService pullService = (PullService) factory.getBean("pullService");
        tool = (FormTool) pullService.getTools().get("form");
        assertNotNull(tool);
    }
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

        sortedMap.putAll(map);
        return sortedMap;
    }

    private void initServiceWithParent() {
        PullService parent = service;
        service = new PullServiceImpl();

        Map<String, Object> factories = createHashMap();

        factories.put("singleton.3", newToolFactory(true, "singleton.3"));
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

    protected final T getTool() throws Exception {
        getInvocationContext("http://localhost/app1/1.html");
        initRequestContext();

        PullService pull = (PullService) factory.getBean("pullService");
        T tool = getToolType().cast(pull.getTools().get(toolName()));

        assertNotNull(tool);

        return tool;
    }
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

        assertEquals("http://localhost/?str=%D6%D0%B9%FA", uri.addQueryData("str", "中国").render());
    }

    @Test
    public void linkWithInterceptor_URIBroker() {
        PullService pull = (PullService) factory.getBean("pullService");

        // 确保uri interceptor在render之前没有被执行过
        // 曾经的bug:pull service在logging为debug时,会提前执行uri.interceptors。
        uri = (GenericURIBroker) pull.getContext().pull("linkWithInterceptor");
        assertTrue(uri.addQueryData("path", "hello").render().startsWith("http://www.mydomain.com/hello?path=hello&r="));

        assertTrue(uri.toString().startsWith("http://localhost/"));
        assertTrue(uri.render().startsWith("http://www.mydomain.com/abc?r="));
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

    }

    /** 取得template context。 */
    private TemplateContext getTemplateContext() {
        if (templateContext == null) {
            PullService pullService = getPullService();
            PullContext pullContext = null;

            if (pullService != null) {
                pullContext = pullService.getContext();
            }

            templateContext = new TemplateContextAdapter(getMailBuilder(), pullContext);

            populateTemplateContext(templateContext);
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

                component = assertNotNull(getCurrentComponent().getWebxComponents().getComponent(componentName),
                                          "could not find webx component: %s", componentName);
            }

            ApplicationContext context = component.getApplicationContext();
            PullService pullService;

            try {
                pullService = (PullService) context.getBean("pullService", PullService.class);
            } catch (NoSuchBeanDefinitionException e) {
                pullService = null;
View Full Code Here

Examples of com.alibaba.citrus.service.pull.PullService

    public Context getContext(String componentName) {
        componentName = normalizeComponentName(componentName);
        Context context = contexts.get(componentName);

        if (context == null) {
            PullService pullService = getPullService(componentName);

            if (pullService != null) {
                context = new PullableMappedContext(pullService.getContext());
            } else {
                context = new MappedContext();
            }

            contexts.put(componentName, context);
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.