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

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

public class DefaultBuilderRule
extends Object
implements Command

This is a Command implementation that will match a HTML Node with a matching Builder implementation. This is the default rule and will always return a OutputLinkBuilder and the chain terminated. The BuilderFactory runs this command rule as part of the Globals.BUILDER_CATALOG_NAME found in the Globals.BUILDER_RESOURCE_NAME and invoking the Globals.FIND_BUILDER_COMMAND_NAME


Field Summary
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
DefaultBuilderRule()
           
 
Method Summary
 boolean execute(Context context)
           Uses the BuilderRuleContext to find the current html Node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBuilderRule

public DefaultBuilderRule()
Method Detail

execute

public boolean execute(Context context)
                throws Exception

Uses the BuilderRuleContext to find the current html Node. This is the default rule that will return a VerbatimBuilder when the node is not a comment or has a jsfid attribute. When the html node is a comment, the CommentBuilder is returned. If the node is not a comment but has a jsfid attribute, the MorphBuilder is returned.

Specified by:
execute in interface Command
Parameters:
context - commons chians
Returns:
true if final
Throws:
Exception - propagated to the top chain


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