org.opencms.jsp
Class CmsJspTagParse

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.opencms.jsp.CmsJspTagParse
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class CmsJspTagParse
extends javax.servlet.jsp.tagext.BodyTagSupport

Implements the <cms:parse></cms:parse> tag to allow parsing of nested HTML with the A_CmsConfiguredHtmlParser} implementation specified by the "parserClass" attribute.

Since:
6.1.3
Version:
$Revision: 1.3 $
Author:
Achim Westermann
See Also:
Serialized Form

Field Summary
static java.lang.String ATT_VISITOR_CLASS
          The name of the mandatory Tag attribute for the visitor class an instance of will be guided throught the body content.
static java.lang.String TAG_NAME
          Tag name constant for log output.
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
CmsJspTagParse()
           
 
Method Summary
 int doEndTag()
           
 java.lang.String getNoAutoCloseTags()
          Getter for the attribute "noAutoCloseTags" of the <cms:parse> tag.
 java.lang.String getParam()
          Returns the param.
 java.lang.String getParserClass()
          Returns the fully qualified class name of the A_CmsConfiguredHtmlParser class to use for parsing.
 java.lang.String parseTagAction(java.lang.String content, javax.servlet.jsp.PageContext context, A_CmsConfiguredHtmlParser parser)
          Internal action method.
 void release()
           
 void setNoAutoCloseTags(java.lang.String noAutoCloseTagList)
          Setter for the attribute "noAutoCloseTags" of the <cms:parse> tag.
 void setParam(java.lang.String param)
          Sets the param.
 void setParserClass(java.lang.String parserClass)
          Sets the fully qualified class name of the A_CmsConfiguredHtmlParser class to use for parsing.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

ATT_VISITOR_CLASS

public static final java.lang.String ATT_VISITOR_CLASS
The name of the mandatory Tag attribute for the visitor class an instance of will be guided throught the body content.

See Also:
Constant Field Values

TAG_NAME

public static final java.lang.String TAG_NAME
Tag name constant for log output.

See Also:
Constant Field Values
Constructor Detail

CmsJspTagParse

public CmsJspTagParse()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Returns:
EVAL_PAGE
Throws:
javax.servlet.jsp.JspException - in case soemthing goes wrong
See Also:
Tag.doEndTag()

getNoAutoCloseTags

public java.lang.String getNoAutoCloseTags()
Getter for the attribute "noAutoCloseTags" of the <cms:parse> tag.

Returns a String that consists of the comma-separated upper case tag names for which this tag will not correct missing closing tags.

Returns:
a String that consists of the comma-separated upper case tag names for which this tag will not correct missing closing tags.

getParam

public java.lang.String getParam()
Returns the param.

Returns:
the param

getParserClass

public java.lang.String getParserClass()
Returns the fully qualified class name of the A_CmsConfiguredHtmlParser class to use for parsing.

Returns:
the parserrClass

parseTagAction

public java.lang.String parseTagAction(java.lang.String content,
                                       javax.servlet.jsp.PageContext context,
                                       A_CmsConfiguredHtmlParser parser)
Internal action method.

Parses (and potentially transforms) a HTMl content block.

Parameters:
content - the content to be parsed / transformed.
context - needed for getting the encoding / the locale.
parser - the visitor / parser to use.
Returns:
the transformed content.

release

public void release()
See Also:
Tag.release()

setNoAutoCloseTags

public void setNoAutoCloseTags(java.lang.String noAutoCloseTagList)
Setter for the attribute "noAutoCloseTags" of the <cms:parse> tag.

Awaits a String that consists of the comma-separated upper case tag names for which this tag should not correct missing closing tags.

Parameters:
noAutoCloseTagList - a String that consists of the comma-separated upper case tag names for which this tag should not correct missing closing tags.

setParam

public void setParam(java.lang.String param)
Sets the param.

Parameters:
param - the param to set

setParserClass

public void setParserClass(java.lang.String parserClass)
Sets the fully qualified class name of the A_CmsConfiguredHtmlParser class to use for parsing.

Parameters:
parserClass - the fully qualified class name of the A_CmsConfiguredHtmlParser class to use for parsing.