Package org.springframework.extensions.webscripts

Examples of org.springframework.extensions.webscripts.TemplateProcessorRegistry


  /* Utility operations */

  protected Runtime createRuntime() {
    final FTLTemplateProcessor ftlTemplateProcessor = mock(FTLTemplateProcessor.class);
    when(ftlTemplateProcessor.hasTemplate(anyString())).thenReturn(true);
    final TemplateProcessorRegistry templateProcessorRegistry = new TemplateProcessorRegistry();
    templateProcessorRegistry.registerTemplateProcessor(ftlTemplateProcessor, "ftl", "Freemarker");
    final Container container = mock(Container.class);
    when(container.getTemplateProcessorRegistry()).thenReturn(templateProcessorRegistry);
    final Runtime runtime = mock(Runtime.class);
    when(runtime.getContainer()).thenReturn(container);
    return runtime;
View Full Code Here


        model.put(URL_VARIABLE, new UrlModel(request));
        model.put(JSON_UTILS, new JSONUtils());
    }

    protected TemplateProcessor getTemplateProcessor(AnnotationWebScriptRequest request) {
        final TemplateProcessorRegistry templateProcessorRegistry = request.getRuntime().getContainer()
            .getTemplateProcessorRegistry();
        return templateProcessorRegistry.getTemplateProcessorByExtension("ftl");
    }
View Full Code Here

TOP

Related Classes of org.springframework.extensions.webscripts.TemplateProcessorRegistry

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.