com.ibm.commerce.pagelayout.cache

Class PageLayoutWidgetCacheTag

  • java.lang.Object
    • javax.servlet.jsp.tagext.TagSupport
      • com.ibm.commerce.pagelayout.cache.PageLayoutWidgetCacheTag
  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag


    public class PageLayoutWidgetCacheTag
    extends javax.servlet.jsp.tagext.TagSupport
    This tag class is used to assist in deciding whether to consume the widget or not. When a cache entry is made for widget in cachespec.xml the default value for do-not-consume should be true and for do-not-cache should be true. This specifies to not cache the widget JSP fragment. This class will dynamically set the widget JSP fragment to be consumed if the dependency ids defined for the cache entry contains a special dependency id with name ignoreDoNotConsume like below:

    <dependency-id>ignoreDoNotConsume</dependency-id>

    Widget JSP Parent JSP Dependency Id Widget JSP behavior
    Marked do-not-consume cached ignoreDoNotConsume present consumed by parent JSP
    Marked do-not-consume not cached ignoreDoNotConsume present not cached and not consumed
    Marked do-not-consume cached ignoreDoNotConsume not present not consumed
    Marked do-not-consume not cached ignoreDoNotConsume not present not consumed

    Here is an example of including this tag on the widget JSP:

      <wcpgl:pageLayoutWidgetCache />
     
      If the contents are cached, then this tag class also adds PageLayout:WidgetId:<plwidgetId> as one of the dependencyId to the cache entry
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASS_NAME
      The name of this class.
      static java.lang.String COPYRIGHT
      COPYRIGHT
      • 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 and Description
      int doEndTag()
      This method performs no actions.
      int doStartTag()
      Check for special dependencyId with name ignoreDoNotConsume.
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        The name of this class.
    • Constructor Detail

      • PageLayoutWidgetCacheTag

        public PageLayoutWidgetCacheTag()
    • Method Detail

      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspTagException
        Check for special dependencyId with name ignoreDoNotConsume. If present, then set the widget fragment to be consumed by parent.
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.TagSupport
        Returns:
        Always returns the SKIP_BODY constant.
        Throws:
        javax.servlet.jsp.JspTagException
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspTagException
        This method performs no actions.
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.TagSupport
        Returns:
        Always returns the EVAL_PAGE constant.
        Throws:
        javax.servlet.jsp.JspTagException