Class DefineObjectsTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.sling.scripting.jsp.taglib.DefineObjectsTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class DefineObjectsTag extends javax.servlet.jsp.tagext.TagSupport
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Default name for the scripting variable referencing the javax.script.Bindings object (value is "bindings").
    static final String
    Default name for the scripting variable referencing the log org.slf4j.Logger (value is "log").
    static final String
    Default name for the scripting variable referencing the JCR node underlying the current Resource object if it is based on a JCR node (value is "currentNode").
    static final String
    Default name for the scripting variable referencing the SlingHttpServletRequest object (value is "slingRequest").
    static final String
    Default name for the scripting variable referencing the current Resource object (value is "resource").
    static final String
    Default name for the scripting variable referencing the current ResourceResolver (value is "resourceResolver").
    static final String
    Default name for the scripting variable referencing the SlingHttpServletResponse object (value is "slingResponse").
    static final String
    Default name for the scripting variable referencing the current SlingScriptHelper (value is "sling").

    Fields inherited from class javax.servlet.jsp.tagext.TagSupport

    id, pageContext

    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

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Creates Scripting variables for: SlingHttpServletRequest SlingHttpServletResponse current Resource current Node (if resource is adaptable to a node) current Logger current SlingScriptHelper
    void
     
    void
     
    void
     
    void
     
    void
    setPageContext(javax.servlet.jsp.PageContext pageContext)
     
    void
    setRequestName(String requestName)
     
    void
     
    void
     
    void
    setResponseName(String responseName)
     
    void
     

    Methods inherited from class javax.servlet.jsp.tagext.TagSupport

    doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_REQUEST_NAME

      public static final String DEFAULT_REQUEST_NAME
      Default name for the scripting variable referencing the SlingHttpServletRequest object (value is "slingRequest").
      See Also:
    • DEFAULT_RESPONSE_NAME

      public static final String DEFAULT_RESPONSE_NAME
      Default name for the scripting variable referencing the SlingHttpServletResponse object (value is "slingResponse").
      See Also:
    • DEFAULT_RESOURCE_NAME

      public static final String DEFAULT_RESOURCE_NAME
      Default name for the scripting variable referencing the current Resource object (value is "resource").
      See Also:
    • DEFAULT_NODE_NAME

      public static final String DEFAULT_NODE_NAME
      Default name for the scripting variable referencing the JCR node underlying the current Resource object if it is based on a JCR node (value is "currentNode").
      See Also:
    • DEFAULT_BINDINGS_NAME

      public static final String DEFAULT_BINDINGS_NAME
      Default name for the scripting variable referencing the javax.script.Bindings object (value is "bindings").
      See Also:
    • DEFAULT_LOG_NAME

      public static final String DEFAULT_LOG_NAME
      Default name for the scripting variable referencing the log org.slf4j.Logger (value is "log").
      See Also:
    • DEFAULT_SLING_NAME

      public static final String DEFAULT_SLING_NAME
      Default name for the scripting variable referencing the current SlingScriptHelper (value is "sling").
      See Also:
    • DEFAULT_RESOURCE_RESOLVER_NAME

      public static final String DEFAULT_RESOURCE_RESOLVER_NAME
      Default name for the scripting variable referencing the current ResourceResolver (value is "resourceResolver").
      See Also:
  • Constructor Details

    • DefineObjectsTag

      public DefineObjectsTag()
      Default constructor.
  • Method Details

    • doEndTag

      public int doEndTag()
      Creates Scripting variables for:
      • SlingHttpServletRequest
      • SlingHttpServletResponse
      • current Resource
      • current Node (if resource is adaptable to a node)
      • current Logger
      • current SlingScriptHelper
      Specified by:
      doEndTag in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class javax.servlet.jsp.tagext.TagSupport
      Returns:
      always Tag.EVAL_PAGE.
    • setPageContext

      public void setPageContext(javax.servlet.jsp.PageContext pageContext)
      Specified by:
      setPageContext in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      setPageContext in class javax.servlet.jsp.tagext.TagSupport
    • setRequestName

      public void setRequestName(String requestName)
    • setResponseName

      public void setResponseName(String responseName)
    • setResourceName

      public void setResourceName(String name)
    • setNodeName

      public void setNodeName(String name)
    • setLogName

      public void setLogName(String name)
    • setSlingName

      public void setSlingName(String name)
    • setResourceResolverName

      public void setResourceResolverName(String name)
    • setBindingsName

      public void setBindingsName(String name)
    • release

      public void release()
      Specified by:
      release in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      release in class javax.servlet.jsp.tagext.TagSupport