sunlabs.brazil.sunlabs

Class ExpContentTemplate

public class ExpContentTemplate extends ContentTemplate

Allow extracted content to be filtered through regular expressions. Many sites use comment conventions to demarcate the headers and footer information in their pages. This template allows regular expressions to be used to process the "content" value extracted by the ContentTemplate.

Request properties:

extract
A regular expression to match the extracted content
replace
A regular expression substitution string used to replace the content, if the expression matched.
urlPrefix
A prefix the url must match to be considered for rewriting

Version: 2.2

Author: Stephen Uhler

Method Summary
booleandone(RewriteContext hr)
Run the content through a regexp to do further extraction.
booleaninit(RewriteContext hr)

Method Detail

done

public boolean done(RewriteContext hr)
Run the content through a regexp to do further extraction. If the regexp didn't match, leave the existing content alone.

init

public boolean init(RewriteContext hr)