Class BasicRule
java.lang.Object
com.opensymphony.module.sitemesh.html.BasicRule
- All Implemented Interfaces:
TagRule
- Direct Known Subclasses:
BlockExtractingRule,BodyTagRule,FramesetRule,HtmlAttributesRule,MetaTagRule,ParameterExtractingRule,StateTransitionRule,TagReplaceRule
The Class BasicRule.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SitemeshBufferFragment.BuilderCurrent buffer.protected StringGets the current buffer content.voidsetContext(HTMLProcessorContext context) Sets the context.booleanshouldProcess(String name) Called by the HTMLProcessor to determine if a rule should be called for a given tag.
-
Field Details
-
context
The context.
-
-
Constructor Details
-
BasicRule
Instantiates a new basic rule.- Parameters:
acceptableTagNames- the acceptable tag names
-
BasicRule
Instantiates a new basic rule.- Parameters:
acceptableTagName- the acceptable tag name
-
BasicRule
protected BasicRule()Instantiates a new basic rule.
-
-
Method Details
-
setContext
Description copied from interface:TagRuleSets the context.- Specified by:
setContextin interfaceTagRule- Parameters:
context- the new context
-
shouldProcess
Description copied from interface:TagRuleCalled by the HTMLProcessor to determine if a rule should be called for a given tag. The name parameter will always be passed in lowercase.- Specified by:
shouldProcessin interfaceTagRule- Parameters:
name- the name- Returns:
- true, if successful
-
currentBuffer
Current buffer.- Returns:
- the sitemesh buffer fragment. builder
-
getCurrentBufferContent
Gets the current buffer content.- Returns:
- the current buffer content
-