Class AdaptToTag

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

public class AdaptToTag extends javax.servlet.jsp.tagext.TagSupport
Tag for adapting adaptables to classes.
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.adapter.Adaptable
    Get the adaptable object to be adapted.
    Gets the class name to adapt the adaptable to.
    protected ClassLoader
    Method for retrieving the classloader from the OSGi console.
    Gets the variable name to save the resulting object to.
    void
    setAdaptable(org.apache.sling.api.adapter.Adaptable adaptable)
    Sets the adaptable object to be adapted.
    void
    setAdaptTo(String adaptTo)
    Sets the class name to adapt the adaptable to.
    void
    Gets the variable name to save the resulting object to.

    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

    • AdaptToTag

      public AdaptToTag()
  • 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
    • getAdaptable

      public org.apache.sling.api.adapter.Adaptable getAdaptable()
      Get the adaptable object to be adapted.
      Returns:
      the adaptable
    • getAdaptTo

      public String getAdaptTo()
      Gets the class name to adapt the adaptable to.
      Returns:
      the class to adapt to
    • getClassLoader

      protected ClassLoader getClassLoader()
      Method for retrieving the classloader from the OSGi console.
      Returns:
      the classloader
    • getVar

      public String getVar()
      Gets the variable name to save the resulting object to.
      Returns:
      the variable name
    • setAdaptable

      public void setAdaptable(org.apache.sling.api.adapter.Adaptable adaptable)
      Sets the adaptable object to be adapted.
      Parameters:
      adaptable - the object to adapt
    • setAdaptTo

      public void setAdaptTo(String adaptTo)
      Sets the class name to adapt the adaptable to.
      Parameters:
      adaptTo - the class to adapt to
    • setVar

      public void setVar(String var)
      Gets the variable name to save the resulting object to.
      Parameters:
      var - the variable name