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 -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
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.getVar()
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
-
Constructor Details
-
AdaptToTag
public AdaptToTag()
-
-
Method Details
-
doEndTag
public int doEndTag()- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.TagSupport
-
getAdaptable
public org.apache.sling.api.adapter.Adaptable getAdaptable()Get the adaptable object to be adapted.- Returns:
- the adaptable
-
getAdaptTo
Gets the class name to adapt the adaptable to.- Returns:
- the class to adapt to
-
getClassLoader
Method for retrieving the classloader from the OSGi console.- Returns:
- the classloader
-
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
Sets the class name to adapt the adaptable to.- Parameters:
adaptTo
- the class to adapt to
-
setVar
Gets the variable name to save the resulting object to.- Parameters:
var
- the variable name
-