org.wings.template.parser
Interface SpecialTagHandler

All Known Implementing Classes:
LabelTagHandler, RangeTagHandler, SimpleTagHandler

public interface SpecialTagHandler


Method Summary
 void executeTag(ParseContext context, InputStream input)
          actually perform the action associated with this tag.
 long getTagLength()
          Get the length of the area in the sourcefile.
 long getTagStart()
          Get start position of the area in the sourcefile this handler processes.
 SGMLTag parseTag(ParseContext context, PositionReader input, long startPos, SGMLTag startTag)
          Parse tag.
 

Method Detail

parseTag

SGMLTag parseTag(ParseContext context,
                 PositionReader input,
                 long startPos,
                 SGMLTag startTag)
                 throws IOException
Parse tag. This method is invoked if a tag with a name this class is registered for is found. It gets the ServletConfiguration of the PageParser servet and a PositionReader, placed after name of the current tag.

The parseTag() method is called before any processing is done. Its purpose is to parse the area this tag spans and probably read in parameters used at execution time.

This method returns the last tag belonging to the area handled by this handler (for server side included servlets, this would be </SERVLET>). For simple one-tag Handlers this is simply the tag passed to this method. If the Handler decides not to handle this tag, this method should return null.

Parameters:
context - The context used while parsing; contains at least the HttpServletRequest and HttpServletResponse.
input - The PositionReader, located after the Name token of the Tag
startPos - The Position parsing of this token began
startTag - the SGMLTag found in the file.
Throws:
IOException

getTagStart

long getTagStart()
Get start position of the area in the sourcefile this handler processes. This is usually the position of the "<" of the <SpecialTag> within the inputfile.


getTagLength

long getTagLength()
Get the length of the area in the sourcefile. The area this handler processes is skipped in the inputfile. Usually this represents the length of the single <SpecialTag> or the area <SpecialTag>...</SpecialTag>


executeTag

void executeTag(ParseContext context,
                InputStream input)
                throws Exception
actually perform the action associated with this tag.

Throws:
Exception - anything can happen .. and throw an Exception which is caught in PageParser


wingS Swings ;-)