Class TestBodyContentTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class TestBodyContentTag
    extends javax.servlet.jsp.tagext.BodyTagSupport
    This custom tag is for testing purposes only. It takes the name of a file and its path which will serve as base for comparing it against the HTML code that will be generated as body of this tag. If the contents are the same, a PASS text will be displayed, otherwise, it will indicate FALSE.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    See Also:
    Serialized Form
    • Field Summary

      • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int doAfterBody()
      This method is called after the JSP engine processes the body content of the tag.
      int doEndTag()
      Called after the JSP engine finished processing the tag.
      int doStartTag()
      Called when the JSP engine encounters the start tag.
      void setFileName​(java.lang.String value)
      Specifies the file name to use for comparing the HTML output.
      void setPath​(java.lang.String value)
      Defines the path to use for the test.
      boolean shouldEvaluateRestOfPageAfterEndTag()
      Evaluates if the rest of the page should be processed or not.
      boolean theBodyShouldBeEvaluated()
      Evaluates if the contents of the tag should be processed or not.
      boolean theBodyShouldBeEvaluatedAgain()
      Evaluates if the content of the tag should be processed again or not.
      void writeTagBodyContent​(javax.servlet.jsp.JspWriter out, javax.servlet.jsp.tagext.BodyContent bodyContent)
      Processes the body content and attributes of the tag to specify what to display.
      • Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        doInitBody, getBodyContent, getPreviousOut, release, 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
    • Constructor Detail

      • TestBodyContentTag

        public TestBodyContentTag()
    • Method Detail

      • theBodyShouldBeEvaluated

        public boolean theBodyShouldBeEvaluated()
        Evaluates if the contents of the tag should be processed or not.
        Returns:
        True if the body should be evaluated. Otherwise, returns False
      • shouldEvaluateRestOfPageAfterEndTag

        public boolean shouldEvaluateRestOfPageAfterEndTag()
        Evaluates if the rest of the page should be processed or not.
        Returns:
        True if the rest of the page should be processed. Otherwise, returns False
      • theBodyShouldBeEvaluatedAgain

        public boolean theBodyShouldBeEvaluatedAgain()
        Evaluates if the content of the tag should be processed again or not.
        Returns:
        True if there are more elements to display on the shortcut list. Otherwise, returns False
      • writeTagBodyContent

        public void writeTagBodyContent​(javax.servlet.jsp.JspWriter out,
                                        javax.servlet.jsp.tagext.BodyContent bodyContent)
                                 throws java.io.IOException
        Processes the body content and attributes of the tag to specify what to display.
        Parameters:
        out - JspWriter instance
        Throws:
        java.io.IOException - if an error is risen when displaying the custom tag contents
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Called when the JSP engine encounters the start tag.
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Returns:
        EVAL_BODY_BUFFERED if the JSP engine should evaluate the tag body, otherwise return SKIP_BODY.
        Throws:
        javax.servlet.jsp.JspException - if an error is risen when displaying the custom tag contents
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Called after the JSP engine finished processing the tag.
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Returns:
        EVAL_PAGE if the JSP engine should continue evaluating the JSP page, otherwise return SKIP_PAGE.
        Throws:
        javax.servlet.jsp.JspException - if an error is risen when displaying the custom tag contents
      • doAfterBody

        public int doAfterBody()
                        throws javax.servlet.jsp.JspException
        This method is called after the JSP engine processes the body content of the tag.
        Specified by:
        doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
        Overrides:
        doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
        Returns:
        EVAL_BODY_AGAIN if the JSP engine should evaluate the tag body again, otherwise return SKIP_BODY.
        Throws:
        javax.servlet.jsp.JspException - if an error is risen when displaying the custom tag contents
      • setFileName

        public void setFileName​(java.lang.String value)
        Specifies the file name to use for comparing the HTML output.
        Parameters:
        value - name of the file to use for the test
      • setPath

        public void setPath​(java.lang.String value)
        Defines the path to use for the test.
        Parameters:
        value - path to define where the file to use is located