sunlabs.brazil.sunlabs
Class SnarfTemplate

java.lang.Object
  extended by sunlabs.brazil.template.Template
      extended by sunlabs.brazil.sunlabs.SnarfTemplate (view source)
All Implemented Interfaces:
TemplateInterface

public class SnarfTemplate
extends Template

Template class for extracting content out of <snarf property=xxx> ... </snarf> pairs. xxx is the name of the property to append the snarfed content to. Defaults to [prepend].snarf. All snarf'ed content is deleted.

Properties:

prepend
The string to prepend all properties with. Defaults to the handler's prefix.
debug
If set, the snarf tags will be replaced by comments.


Constructor Summary
SnarfTemplate()
           
 
Method Summary
 boolean init(RewriteContext hr)
          Get the debug flag and reset page.
 void tag_slash_snarf(RewriteContext hr)
          Save the content gathered so far.
 void tag_snarf(RewriteContext hr)
          Mark the current location in the document.
 
Methods inherited from class sunlabs.brazil.template.Template
done
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnarfTemplate

public SnarfTemplate()
Method Detail

init

public boolean init(RewriteContext hr)
Get the debug flag and reset page.

Specified by:
init in interface TemplateInterface
Overrides:
init in class Template

tag_snarf

public void tag_snarf(RewriteContext hr)
Mark the current location in the document.


tag_slash_snarf

public void tag_slash_snarf(RewriteContext hr)
Save the content gathered so far.


Version Kenai-svn-r24, Generated 08/18/09
Copyright (c) 2001-2009, Sun Microsystems.