Package org.antlr.stringtemplate

Examples of org.antlr.stringtemplate.AutoIndentWriter


        return new CustomTemplate();
    }
   
    public StringTemplateWriter getStringTemplateWriter(Writer w)
    {
        return new AutoIndentWriter(w);
    }
View Full Code Here


        StringTemplate template = new StringTemplate(text);
        template.setAttributes(variableMap);
        if (log.isDebugEnabled()) {
            log.debug("StringTemplate is writing using attributes: " + variableMap);
        }
        template.write(new AutoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut(true);
        out.setBody(buffer.toString());
        out.setHeader("org.apache.camel.stringtemplate.resource", getResource());
View Full Code Here

        // TODO we might wanna add some kinda resource caching of the template
        String text = IOConverter.toString(getResource().getInputStream());
        StringTemplate template = new StringTemplate(text);
        template.setAttributes(variableMap);
        template.write(new AutoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut(true);
        out.setBody(buffer.toString());
        out.setHeader("org.apache.camel.stringtemplate.resource", getResource());
View Full Code Here

        StringTemplate template = new StringTemplate(text);
        template.setAttributes(variableMap);
        if (log.isDebugEnabled()) {
            log.debug("StringTemplate is writing using attributes: " + variableMap);
        }
        template.write(new AutoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeader(StringTemplateConstants.STRINGTEMPLATE_RESOURCE, getResource());
View Full Code Here

        // getResourceAsInputStream also considers the content cache
        String text = exchange.getContext().getTypeConverter().mandatoryConvertTo(String.class, getResourceAsInputStream());
        StringTemplate template = new StringTemplate(text);
        template.setAttributes(variableMap);
        log.debug("StringTemplate is writing using attributes: {}", variableMap);
        template.write(new AutoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeaders(exchange.getIn().getHeaders());
View Full Code Here

        StringTemplate template = new StringTemplate(text);
        template.setAttributes(variableMap);
        if (log.isDebugEnabled()) {
            log.debug("StringTemplate is writing using attributes: " + variableMap);
        }
        template.write(new AutoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeader(StringTemplateConstants.STRINGTEMPLATE_RESOURCE, getResource());
View Full Code Here

          pageSt.setAttribute("pagetitle", rt.getPageTitle());
          pageSt.setAttribute("body", unsafeHtmlString(stContent));

          addEmbedded(embeddedContent, pageSt);

          pageSt.write(new AutoIndentWriter(w));

        } else {
          throw new RuntimeException("Task " + t + " is of unknown type");
        }
      } finally {
View Full Code Here

        StringTemplate template = new StringTemplate(text);
        template.setAttributes(variableMap);
        if (log.isDebugEnabled()) {
            log.debug("StringTemplate is writing using attributes: " + variableMap);
        }
        template.write(new AutoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeader(StringTemplateConstants.STRINGTEMPLATE_RESOURCE, getResource());
View Full Code Here

        StringTemplate template = new StringTemplate(text);
        template.setAttributes(variableMap);
        if (log.isDebugEnabled()) {
            log.debug("StringTemplate is writing using attributes: " + variableMap);
        }
        template.write(new AutoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeader(StringTemplateConstants.STRINGTEMPLATE_RESOURCE, getResource());
View Full Code Here

        // getResourceAsInputStream also considers the content cache
        String text = exchange.getContext().getTypeConverter().mandatoryConvertTo(String.class, getResourceAsInputStream());
        StringTemplate template = new StringTemplate(text);
        template.setAttributes(variableMap);
        log.debug("StringTemplate is writing using attributes: {}", variableMap);
        template.write(new AutoIndentWriter(buffer));

        // now lets output the results to the exchange
        Message out = exchange.getOut();
        out.setBody(buffer.toString());
        out.setHeaders(exchange.getIn().getHeaders());
View Full Code Here

TOP

Related Classes of org.antlr.stringtemplate.AutoIndentWriter

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.