Java 类org.apache.velocity.runtime.parser.node.Node 实例源码

项目:CodeGen    文件:Split.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    String value = (String) node.jjtGetChild(0).value(context);
    String character = (String) node.jjtGetChild(1).value(context);
    int len = value.length();
    StringBuilder sb = new StringBuilder(len);
    sb.append(value.charAt(0));
    for (int i = 1; i < len; i++) {
        char c = value.charAt(i);
        if (Character.isUpperCase(c)) {
            sb.append(character).append(Character.toLowerCase(c));
        } else {
            sb.append(c);
        }
    }
    writer.write(sb.toString());
    return true;
}
项目:struts2    文件:AbstractDirective.java   
public boolean render(InternalContextAdapter ctx, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    // get the bean
    ValueStack stack = (ValueStack) ctx.get("stack");
    HttpServletRequest req = (HttpServletRequest) stack.getContext().get(ServletActionContext.HTTP_REQUEST);
    HttpServletResponse res = (HttpServletResponse) stack.getContext().get(ServletActionContext.HTTP_RESPONSE);
    Component bean = getBean(stack, req, res);
    Container container = (Container) stack.getContext().get(ActionContext.CONTAINER);
    container.inject(bean);
    // get the parameters
    Map params = createPropertyMap(ctx, node);
    bean.copyParams(params);
    //bean.addAllParameters(params);
    bean.start(writer);

    if (getType() == BLOCK) {
        Node body = node.jjtGetChild(node.jjtGetNumChildren() - 1);
        body.render(ctx, writer);
    }

    bean.end(writer, "");
    return true;
}
项目:java-framework-with-springmvc-mybatis-proxool    文件:TestDirective.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer,
        Node node) throws IOException, ResourceNotFoundException,
        ParseErrorException, MethodInvocationException 
{
    int argsNum = node.jjtGetNumChildren();
    for(int step = 0 ; step < argsNum; step++)
    {
        SimpleNode simpleNode = (SimpleNode) node.jjtGetChild(step);

        Object argObject = simpleNode.value(context);

        //传入参数
        if(argObject instanceof String)
        {
            System.out.println((String)argObject);
            writer.write((String)argObject);
            writer.flush();
        }
    }
    return true;
}
项目:htmlcompressor    文件:HtmlCompressorDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node) 
        throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {

    //render content
    StringWriter content = new StringWriter();
node.jjtGetChild(0).render(context, content);

//compress
try {
    writer.write(htmlCompressor.compress(content.toString()));
} catch (Exception e) {
    writer.write(content.toString());
    String msg = "Failed to compress content: "+content.toString();
          log.error(msg, e);
          throw new RuntimeException(msg, e);

}
return true;

  }
项目:htmlcompressor    文件:XmlCompressorDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node) 
        throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {

    //render content
    StringWriter content = new StringWriter();
node.jjtGetChild(0).render(context, content);

//compress
try {
    writer.write(xmlCompressor.compress(content.toString()));
} catch (Exception e) {
    writer.write(content.toString());
    String msg = "Failed to compress content: "+content.toString();
          log.error(msg, e);
          throw new RuntimeException(msg, e);

}
return true;

  }
项目:velocity-edit    文件:NodeVisitor.java   
/**
 * @see org.apache.velocity.runtime.parser.node.ParserVisitor#visit(org.apache.velocity.runtime.parser.node.ASTIfStatement,
 *      java.lang.Object)
 */
public Object visit(ASTIfStatement aNode, Object aData)
{
    // Check for first embedded #ELSE or #ELSEIF directive to get end line
    int endLine = aNode.getLastToken().endLine;
    int numChildren = aNode.jjtGetNumChildren();
    for (int i = 1; i < numChildren; i++)
    {
        Node node = aNode.jjtGetChild(i);
        if (node instanceof ASTElseStatement || node instanceof ASTElseIfStatement)
        {
            endLine = node.getFirstToken().beginLine - 1;
            break;
        }
    }
    Directive directive = new Directive(Directive.TYPE_IF, aNode.jjtGetChild(0).literal(), "", (ITreeNode) fCurrentBlock, aNode.getFirstToken().beginLine, endLine);
    return visitBlockDirective(aNode, aData, directive, false);
}
项目:velocity-edit    文件:NodeVisitor.java   
private Object visitBlockDirective(Node aNode, Object aData, Directive aDirective, boolean anAddToParentBlock)
{
    if (anAddToParentBlock && fCurrentBlock instanceof Directive)
    {
        IBlock parent = (IBlock) ((Directive) fCurrentBlock).getParent();
        parent.addDirective(aDirective);
    } else
    {
        fCurrentBlock.addDirective(aDirective);
    }
    fBlocks.push(fCurrentBlock);
    fCurrentBlock = aDirective;
    aData = aNode.childrenAccept(this, aData);
    fCurrentBlock = (IBlock) fBlocks.pop();
    return aData;
}
项目:sundrio    文件:ClassDirective.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException {
    String block = "";
    TypeDef clazz = null;
    for (int i = 0; i < node.jjtGetNumChildren(); i++) {
        if (node.jjtGetChild(i) != null) {
            if (!(node.jjtGetChild(i) instanceof ASTBlock)) {
                //reading and casting inline parameters
                if (i == 0) {
                    clazz = (TypeDef) node.jjtGetChild(i).value(context);
                } else {
                    break;
                }
            } else {
                //reading block content and rendering it
                StringWriter blockContent = new StringWriter();
                node.jjtGetChild(i).render(context, blockContent);

                block = blockContent.toString();
                break;
            }
        }
    }
    writeClazz(writer, clazz, block);
    return true;
}
项目:guzz    文件:EscapeJavascriptDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    if(node.jjtGetNumChildren() != 1){
        throw new RuntimeException(getName() + " only and must accept one parameter!") ;
    }

    Object param2 = node.jjtGetChild(0).value(context) ;

    //如果为null,则什么都不输出。
    if(param2 != null){
        String param = String.valueOf(param2) ;
        param = StringUtil.replaceStringIgnoreCase(param, "<script", "< script") ;
        param = StringUtil.replaceStringIgnoreCase(param, "</script", "</ script") ;

        writer.append(param) ;
    }

       return true;
}
项目:guzz    文件:IsEmptyDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    Object value = node.jjtGetChild(0).value(context);

    boolean isEmpty = false ;
    if(value == null){
        isEmpty = true ;
    }else{
        if(value instanceof String){
            isEmpty = StringUtil.isEmpty((String) value) ;
        }else if(value instanceof Collection){
            isEmpty = ((Collection) value).isEmpty() ;
        }else if(value.getClass().isArray()){
            isEmpty = Array.getLength(value) > 0 ;
        }
    }

       if (isEmpty) {
           Node content = node.jjtGetChild(1);
           content.render(context, writer);
       }

       return true;
}
项目:guzz    文件:GuzzAddLimitDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    if(node.jjtGetNumChildren() != 2){
        throw new RuntimeException(getName() + " accepts 2 parameters. The first is a boolean value indicating whether or not to add this conditon; the second is a List containing your conditions!") ;
    }

    Boolean test = (Boolean) node.jjtGetChild(0).value(context) ;
    if(Boolean.FALSE.equals(test)){ //ignore this condition.
        return true ;
    }

    Collection conditions = (Collection) node.jjtGetChild(1).value(context) ;

    BoundaryChain chain = (BoundaryChain) context.get(GuzzBoundaryDirective.BOUNDARY_CONTEXT_NAME) ;
    if(chain == null){
        throw new ParseErrorException(getName() + " must be resided inside a guzzBoundary directive.") ;
    }

    chain.addLimitConditions(conditions) ;

       return true;
}
项目:guzz    文件:NotEmptyDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    Object value = node.jjtGetChild(0).value(context);


    boolean isEmpty = false ;
    if(value == null){
        isEmpty = true ;
    }else{
        if(value instanceof String){
            isEmpty = StringUtil.isEmpty((String) value) ;
        }else if(value instanceof Collection){
            isEmpty = ((Collection) value).isEmpty() ;
        }else if(value.getClass().isArray()){
            isEmpty = Array.getLength(value) > 0 ;
        }
    }
    if (!isEmpty) {
           Node content = node.jjtGetChild(1);
           content.render(context, writer);
       }

       return true;
}
项目:jresplus    文件:JsCodeDirective.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer,
        Node node) throws IOException, ResourceNotFoundException,
        ParseErrorException, MethodInvocationException {
    Node bodyNode = getBodyNode(context, node);
    if (AsynchronousContain.isAsyncConext()) {
        StringWriter sw = new StringWriter();
        bodyNode.render(context, sw);
        PipelineTask task = (PipelineTask) context
                .get(PipelineTask.ATTR_KEY);
        task.addJsCode(sw.toString());
    } else {
        writer.write("<script type=\"text/javascript\">\r\n");
        bodyNode.render(context, writer);
        writer.write("</script>\r\n");
    }
    return true;
}
项目:jasper-xml-to-pdf-generator    文件:MoneyUAHDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node)
        throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {

    //setting default params
    String moneyValue = null;

    //reading params
    if (node.jjtGetChild(0) != null) {
        moneyValue = node.jjtGetChild(0).value(context) == null ? null : String.valueOf(node.jjtGetChild(0).value(context));
    }

    //truncate and write result to writer
    writer.write(moneyUAH(moneyValue));
    return true;

}
项目:jasper-xml-to-pdf-generator    文件:UkrToLatinDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node)
        throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {

    //setting default params
    String ukrValue = null;

    //reading params
    if (node.jjtGetChild(0) != null) {
        ukrValue = node.jjtGetChild(0).value(context) == null ? null : String.valueOf(node.jjtGetChild(0).value(context));
    }

    if (ukrValue == null) {
        return false;
    }
    //truncate and write result to writer
    writer.write(UkrainianToLatin.generateLat(ukrValue));
    return true;

}
项目:jasper-xml-to-pdf-generator    文件:MoneyToStrDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node)
        throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {

    //setting default params
    String moneyValue = null;

    //reading params
    if (node.jjtGetChild(0) != null) {
        moneyValue = String.valueOf(node.jjtGetChild(0).value(context));
    }

    //truncate and write result to writer
    writer.write(moneyToStrUAH(moneyValue));
    return true;

}
项目:jasper-xml-to-pdf-generator    文件:DateDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node)
        throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {

    //setting default params
    String dateValue = null;

    //reading params
    if (node.jjtGetChild(0) != null) {
        dateValue = String.valueOf(node.jjtGetChild(0).value(context));
    }

    //truncate and write result to writer
    writer.write(date(dateValue));
    return true;

}
项目:velocity-scripting    文件:WhereDirective.java   
@Override
protected Params getParams(InternalContextAdapter context, Node node) throws IOException {
  final Params params = new Params();
  params.setPrefix("WHERE");
  params.setPrefixOverrides("AND |OR |AND\n|OR\n|AND\r|OR\r");
  if (node.jjtGetNumChildren() == 1) {
    final Node child = node.jjtGetChild(0);
    if (child instanceof ASTBlock) {
      StringWriter blockContent = new StringWriter();
      child.render(context, blockContent);
      params.setBody(blockContent.toString().trim());
      return params;
    }
  }
  return null;
}
项目:velocity-scripting    文件:InDirective.java   
@Override
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) {
  super.init(rs, context, node);
  final int n = node.jjtGetNumChildren() - 1;
  for (int i = 1; i < n; i++) {
    Node child = node.jjtGetChild(i);
    if (i == 1) {
      if (child.getType() == ParserTreeConstants.JJTREFERENCE) {
        this.var = ((ASTReference) child).getRootString();
      }
      else {
        throw new TemplateInitException("Syntax error", getTemplateName(), getLine(), getColumn());
      }
    }
    else if (child.getType() == ParserTreeConstants.JJTSTRINGLITERAL) {
      String value = (String) ((ASTStringLiteral) child).value(context);
      if (i == 2) {
        this.column = value;
      }
    }
    else {
      throw new TemplateInitException("Syntax error", getTemplateName(), getLine(), getColumn());
    }
  }
  this.uberInfo = new Info(this.getTemplateName(), getLine(), getColumn());
}
项目:velocity-scripting    文件:SetDirective.java   
@Override
protected Params getParams(InternalContextAdapter context, Node node) throws IOException {
  final Params params = new Params();
  params.setPrefix("SET");
  params.setSuffixOverrides(",");
  if (node.jjtGetNumChildren() == 1) {
    final Node child = node.jjtGetChild(0);
    if (child instanceof ASTBlock) {
      StringWriter blockContent = new StringWriter();
      child.render(context, blockContent);
      params.setBody(blockContent.toString().trim());
      return params;
    }
  }
  return null;
}
项目:nh-micro    文件:MicroSqlReplace.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node)
        throws IOException, ResourceNotFoundException, ParseErrorException,
        MethodInvocationException {
    List placeList=(List) context.get("placeList");
    if(placeList==null){
        return true;
    }
    Object value=node.jjtGetChild(0).value(context);
    placeList.add(value);
    writer.write("?");
    return true;
}
项目:CodeGen    文件:LowerCase.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    String value = (String) node.jjtGetChild(0).value(context);
    String result = value.replaceFirst(value.substring(0, 1), value.substring(0, 1).toLowerCase());
    writer.write(result);
    return true;
}
项目:CodeGen    文件:ImportPackage.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    String clazz = (String) node.jjtGetChild(0).value(context);
    if (context.containsKey(clazz)) {
        String packagePath = context.get(clazz).toString();
        packagePath = new StringBuilder("import ").append(packagePath).append(";\n").toString();
        writer.write(packagePath);
        return true;
    }
    return false;
}
项目:CodeGen    文件:Append.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    String prefix = (String) node.jjtGetChild(0).value(context);
    String str = (String) node.jjtGetChild(1).value(context);
    String suffix = (String) node.jjtGetChild(2).value(context);
    writer.write(String.valueOf(prefix + str + suffix));
    return true;
}
项目:CodeGen    文件:UpperCase.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    String value = (String) node.jjtGetChild(0).value(context);
    String result = value.replaceFirst(value.substring(0, 1), value.substring(0, 1).toUpperCase());
    writer.write(result);
    return true;
}
项目:mblog    文件:BaseDirective.java   
/** 
 * 重载init方法,初始自定义指令的配制参数 
 */  
@Override  
public void init(RuntimeServices rs, InternalContextAdapter context, Node node)  
    throws TemplateInitException {  
    super.init(rs, context, node);

    initBean();
}
项目:mblog    文件:RenderHandler.java   
public int getIntParameter(int index) {
    if (node.jjtGetNumChildren() > index && node.jjtGetChild(index) != null) {
        Node n = node.jjtGetChild(index);

        return toInt(n.value(context));
    }
    return 0;
}
项目:mblog    文件:RenderHandler.java   
public long getLongParameter(int index) {
    if (node.jjtGetNumChildren() > index && node.jjtGetChild(index) != null) {
        Node n = node.jjtGetChild(index);
        return toLong(n.value(context));
    }
    return 0;
}
项目:mblog    文件:RenderHandler.java   
public String getStringParameter(int index) {
    if (node.jjtGetNumChildren() > index && node.jjtGetChild(index) != null) {
        Node n = node.jjtGetChild(index);
        return (String) n.value(context);
    }
    return null;
}
项目:struts2    文件:AbstractDirective.java   
/**
 * <p>
 * Create a Map of properties that the user has passed in. For example:
 * </p>
 *
 * <pre>
 * #xxx("name=hello" "value=world" "template=foo")
 * </pre>
 *
 * <p>
 * would yield a params that contains {["name", "hello"], ["value", "world"], ["template", "foo"]}
 * </p>
 * @param contextAdapter the context adapter
 * @param node the Node passed in to the render method
 * @return a Map of the user specified properties
 * @throws org.apache.velocity.exception.ParseErrorException
 *          if the was an error in the format of the property
 */
protected Map createPropertyMap(InternalContextAdapter contextAdapter, Node node) throws ParseErrorException, MethodInvocationException {
    Map propertyMap;

    int children = node.jjtGetNumChildren();
    if (getType() == BLOCK) {
        children--;
    }

    // Velocity supports an on-the-fly Map-definition syntax that leads
    // to more readable and faster code:
    //
    //    #url({'id':'url', 'action':'MyAction'})
    //
    // We support this syntax by checking for a single Map argument
    // to any directive and using that as the property map instead
    // of building one from individual name-value pair strings.
    Node firstChild = null;
    Object firstValue = null;
    if(children == 1
       && null != (firstChild = node.jjtGetChild(0))
       && null != (firstValue = firstChild.value(contextAdapter))
       && firstValue instanceof Map) {
        propertyMap = (Map)firstValue;
    } else {
        propertyMap = new HashMap();

        for (int index = 0, length = children; index < length; index++) {
            this.putProperty(propertyMap, contextAdapter, node.jjtGetChild(index));
        }
    }

    return propertyMap;
}
项目:nh-micro    文件:MicroSqlReplace.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node)
        throws IOException, ResourceNotFoundException, ParseErrorException,
        MethodInvocationException {
    List placeList=(List) context.get("placeList");
    if(placeList==null){
        return true;
    }
    Object value=node.jjtGetChild(0).value(context);
    placeList.add(value);
    writer.write("?");
    return true;
}
项目:LegendsBrowser    文件:Decorate.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node)
        throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
    StringWriter sw = new StringWriter();
    node.jjtGetChild(1).render(context, sw);
    // store the contents against the variable
    context.put("body_content", sw.toString());
    return super.render(context, writer, node);
}
项目:htmlcompressor    文件:JavaScriptCompressorDirective.java   
@Override
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException {
    super.init(rs, context, node);
    log = rs.getLog();

    //set compressor properties
    enabled = rs.getBoolean("userdirective.compressJs.enabled", true);
    jsCompressor = rs.getString("userdirective.compressHtml.jsCompressor", HtmlCompressor.JS_COMPRESSOR_YUI);
    yuiJsNoMunge = rs.getBoolean("userdirective.compressJs.yuiJsNoMunge", false);
    yuiJsPreserveAllSemiColons = rs.getBoolean("userdirective.compressJs.yuiJsPreserveAllSemiColons", false);
    yuiJsLineBreak = rs.getInt("userdirective.compressJs.yuiJsLineBreak", -1);
    closureOptLevel = rs.getString("userdirective.compressHtml.closureOptLevel", ClosureJavaScriptCompressor.COMPILATION_LEVEL_SIMPLE);
}
项目:htmlcompressor    文件:CssCompressorDirective.java   
@Override
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException {
    super.init(rs, context, node);
    log = rs.getLog();

    //set compressor properties
    enabled = rs.getBoolean("userdirective.compressCss.enabled", true);
    yuiCssLineBreak = rs.getInt("userdirective.compressCss.yuiCssLineBreak", -1);
}
项目:htmlcompressor    文件:CssCompressorDirective.java   
public boolean render(InternalContextAdapter context, Writer writer, Node node) 
        throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {

    //render content
    StringWriter content = new StringWriter();
node.jjtGetChild(0).render(context, content);

//compress
if(enabled) {
    try {

        YuiCssCompressor compressor = new YuiCssCompressor();
        compressor.setLineBreak(yuiCssLineBreak);
        String result = compressor.compress(content.toString());

        writer.write(result);
    } catch (Exception e) {
        writer.write(content.toString());
        String msg = "Failed to compress content: "+content.toString();
           log.error(msg, e);
           throw new RuntimeException(msg, e);

    }
} else {
    writer.write(content.toString());
}

return true;

  }
项目:htmlcompressor    文件:XmlCompressorDirective.java   
@Override
public void init(RuntimeServices rs, InternalContextAdapter context, Node node) throws TemplateInitException {
    super.init(rs, context, node);
    log = rs.getLog();

    //set compressor properties
    xmlCompressor.setEnabled(rs.getBoolean("userdirective.compressXml.enabled", true));
    xmlCompressor.setRemoveComments(rs.getBoolean("userdirective.compressXml.removeComments", true));
    xmlCompressor.setRemoveIntertagSpaces(rs.getBoolean("userdirective.compressXml.removeIntertagSpaces", true));
}
项目:sundrio    文件:FieldDirective.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException {
    String block = "";
    Property field = null;
    //reading params
    if (node.jjtGetChild(0) != null) {
        field = (Property) node.jjtGetChild(0).value(context);
    }
    writeField(writer, field, block);
    return true;
}
项目:sundrio    文件:MethodDirective.java   
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException {
    String block = "";
    Method method = null;
    Boolean isInterface = false;
    for (int i = 0; i < node.jjtGetNumChildren(); i++) {
        if (node.jjtGetChild(i) != null) {
            if (!(node.jjtGetChild(i) instanceof ASTBlock)) {
                //reading and casting inline parameters
                if (i == 0) {
                    method = (Method) node.jjtGetChild(i).value(context);
                } else if (i == 1) {
                    isInterface = (Boolean) node.jjtGetChild(i).value(context);
                } else {
                    break;
                }
            } else {
                //reading block content and rendering it
                StringWriter blockContent = new StringWriter();
                node.jjtGetChild(i).render(context, blockContent);

                block = blockContent.toString();
                break;
            }
        }
    }
    writeMethod(writer, method, block, isInterface);
    return true;
}
项目:incubator-taverna-common-activities    文件:ProduceDirective.java   
@Override
public boolean render(final InternalContextAdapter context,
        final Writer writer, final Node node) throws IOException,
        ResourceNotFoundException, ParseErrorException,
        MethodInvocationException {
    return true;
}
项目:incubator-taverna-common-activities    文件:RequireDirective.java   
@Override
public boolean render(final InternalContextAdapter context,
        final Writer writer, final Node node) throws IOException,
        ResourceNotFoundException, ParseErrorException,
        MethodInvocationException {
    return true;
}