Class GetResourceTag

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

public class GetResourceTag extends javax.servlet.jsp.tagext.TagSupport
Tag for retrieving resources based on either an absolute path or a relative path and a base resource.
See Also:
  • Field Summary

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

    Modifier and Type
    Method
    Description
    int
     
    org.apache.sling.api.resource.Resource
    Gets the base resource.
    Get the path of the resource to retrieve.
    protected org.apache.sling.api.resource.ResourceResolver
    Method for retrieving the ResourceResolver from the page context.
    Gets the variable name to which to save the list of children.
    void
    setBase(org.apache.sling.api.resource.Resource base)
    Sets the base resource.
    void
    Set the path of the resource to retrieve.
    void
    Sets the variable name to which to save the list of children.

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

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

    Methods inherited from class java.lang.Object

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

    • GetResourceTag

      public GetResourceTag()
  • Method Details

    • doEndTag

      public int doEndTag()
      Specified by:
      doEndTag in interface javax.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class javax.servlet.jsp.tagext.TagSupport
    • getResourceResolver

      protected org.apache.sling.api.resource.ResourceResolver getResourceResolver()
      Method for retrieving the ResourceResolver from the page context.
      Returns:
      the resource resolver
    • getBase

      public org.apache.sling.api.resource.Resource getBase()
      Gets the base resource.
      Returns:
      the base resource
    • getPath

      public String getPath()
      Get the path of the resource to retrieve.
      Returns:
      the path
    • getVar

      public String getVar()
      Gets the variable name to which to save the list of children.
      Returns:
      the variable name
    • setBase

      public void setBase(org.apache.sling.api.resource.Resource base)
      Sets the base resource.
      Parameters:
      base - the new base resource
    • setPath

      public void setPath(String path)
      Set the path of the resource to retrieve.
      Parameters:
      path - the path
    • setVar

      public void setVar(String var)
      Sets the variable name to which to save the list of children.
      Parameters:
      var - the variable name