Class AdaptToTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.apache.sling.scripting.jsp.taglib.AdaptToTag
-
- All Implemented Interfaces:
java.io.Serializable
,IterationTag
,JspTag
,Tag
public class AdaptToTag extends TagSupport
Tag for adapting adaptables to classes.- See Also:
- Serialized Form
-
-
Field Summary
-
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 AdaptToTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
Default processing of the end tag returning EVAL_PAGE.Adaptable
getAdaptable()
Get the adaptable object to be adapted.java.lang.String
getAdaptTo()
Gets the class name to adapt the adaptable to.java.lang.String
getVar()
Gets the variable name to save the resulting object to.void
setAdaptable(Adaptable adaptable)
Sets the adaptable object to be adapted.void
setAdaptTo(java.lang.String adaptTo)
Sets the class name to adapt the adaptable to.void
setVar(java.lang.String var)
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
-
-
-
-
Method Detail
-
doEndTag
public int doEndTag()
Description copied from class:TagSupport
Default processing of the end tag returning EVAL_PAGE.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- EVAL_PAGE
- See Also:
Tag.doEndTag()
-
getAdaptable
public Adaptable getAdaptable()
Get the adaptable object to be adapted.- Returns:
- the adaptable
-
getAdaptTo
public java.lang.String getAdaptTo()
Gets the class name to adapt the adaptable to.- Returns:
- the class to adapt to
-
getVar
public java.lang.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(java.lang.String adaptTo)
Sets the class name to adapt the adaptable to.- Parameters:
adaptTo
- the class to adapt to
-
setVar
public void setVar(java.lang.String var)
Gets the variable name to save the resulting object to.- Parameters:
var
- the variable name
-
-