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

public abstract class BasicRule extends Object implements TagRule
The Class BasicRule.
  • Field Details

  • Constructor Details

    • BasicRule

      protected BasicRule(String[] acceptableTagNames)
      Instantiates a new basic rule.
      Parameters:
      acceptableTagNames - the acceptable tag names
    • BasicRule

      protected BasicRule(String acceptableTagName)
      Instantiates a new basic rule.
      Parameters:
      acceptableTagName - the acceptable tag name
    • BasicRule

      protected BasicRule()
      Instantiates a new basic rule.
  • Method Details

    • setContext

      public void setContext(HTMLProcessorContext context)
      Description copied from interface: TagRule
      Sets the context.
      Specified by:
      setContext in interface TagRule
      Parameters:
      context - the new context
    • shouldProcess

      public boolean shouldProcess(String name)
      Description copied from interface: TagRule
      Called 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:
      shouldProcess in interface TagRule
      Parameters:
      name - the name
      Returns:
      true, if successful
    • currentBuffer

      protected SitemeshBufferFragment.Builder currentBuffer()
      Current buffer.
      Returns:
      the sitemesh buffer fragment. builder
    • getCurrentBufferContent

      protected String getCurrentBufferContent()
      Gets the current buffer content.
      Returns:
      the current buffer content