Class AdaptToTag

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

public class AdaptToTag extends TagSupport
Tag for adapting adaptables to classes.
See Also:
  • Constructor Details

    • AdaptToTag

      public AdaptToTag()
  • Method Details

    • doEndTag

      public int doEndTag()
      Description copied from class: TagSupport
      Default processing of the end tag returning EVAL_PAGE.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Returns:
      EVAL_PAGE
      See Also:
    • getAdaptable

      public 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
    • getVar

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

      public void setAdaptable(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