Save This Page
Home » velocity-1.5 » org.apache » velocity » runtime » directive » [javadoc | source]
org.apache.velocity.runtime.directive
public class: Parse [javadoc | source]
java.lang.Object
   org.apache.velocity.runtime.directive.Directive
      org.apache.velocity.runtime.directive.InputBase
         org.apache.velocity.runtime.directive.Parse

All Implemented Interfaces:
    Cloneable, DirectiveConstants

Pluggable directive that handles the #parse() statement in VTL.
Notes:
-----
1) The parsed source material can only come from somewhere in
the TemplateRoot tree for security reasons. There is no way
around this. If you want to include content from elsewhere on
your disk, use a link from somwhere under Template Root to that
content.

2) There is a limited parse depth. It is set as a property
"parse_directive.maxdepth = 10" for example. There is a 20 iteration
safety in the event that the parameter isn't set.
Fields inherited from org.apache.velocity.runtime.directive.Directive:
rsvc
Method from org.apache.velocity.runtime.directive.Parse Summary:
getName,   getType,   render
Methods from org.apache.velocity.runtime.directive.InputBase:
getInputEncoding
Methods from org.apache.velocity.runtime.directive.Directive:
getColumn,   getLine,   getName,   getType,   init,   render,   setLocation
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.velocity.runtime.directive.Parse Detail:
 public String getName() 
    Return name of this directive.
 public int getType() 
    Return type of this directive.
 public boolean render(InternalContextAdapter context,
    Writer writer,
    Node node) throws MethodInvocationException, IOException, ResourceNotFoundException, ParseErrorException 
    iterates through the argument list and renders every argument that is appropriate. Any non appropriate arguments are logged, but render() continues.