org.apache.shale.clay.parser.builder.chain
Class DirectiveBuilderRule

java.lang.Object
  extended by org.apache.shale.clay.parser.builder.chain.DirectiveBuilderRule
All Implemented Interfaces:
Command

public class DirectiveBuilderRule
extends Object
implements Command

This builder will be ordered first in the rule registration list. If the node has a jsfid attribute, and its value is "ignore", or "void" then special assumptions will be made. Beside the clay "ignore" and "void" directives, handles all "jsp:" nodes. Most are are assigned to the clay "void" directive except the "jsp:include" and "jsp:directive.include" elements. The include and directive.include are converted into a nested clay components.


Field Summary
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
DirectiveBuilderRule()
           
 
Method Summary
 boolean execute(Context context)
          If the node has a jsfid attribute, and its value is "ignore", child elements will be rendered as comment/verbatim content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectiveBuilderRule

public DirectiveBuilderRule()
Method Detail

execute

public boolean execute(Context context)
                throws Exception

If the node has a jsfid attribute, and its value is "ignore", child elements will be rendered as comment/verbatim content. The enclosing tag will not be rendered in the document, only it's children. If the jsfid is "void", the element will not be rendered but its children will keep their original characteristics.

All "jsp:" nodes are assigned to the clay void directive except the "jsp:include" and "jsp:directive.include". These are converted into a nested clay component. Nodes with a jsp prefix must be in the "http://java.sun.com/JSP/Page" namespace to be eligible for this processing.

Specified by:
execute in interface Command
Parameters:
context - commons chains
Returns:
true if the command ends the chain
Throws:
Exception - pushes an exception back to the invoking Command


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.