Class GetParentTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.apache.sling.scripting.jsp.taglib.GetParentTag
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
public class GetParentTag extends javax.servlet.jsp.tagext.TagSupportTag for retrieving a parent resource based on the absolute parent level- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GetParentTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdoEndTag()java.lang.StringgetLevel()Get the level of the parent resource to retrieve.ResourcegetResource()Gets the resource.java.lang.StringgetVar()Gets the variable name to which to save the list of children.voidsetLevel(java.lang.String level)Set the level of the parent resource to retrieve.voidsetResource(Resource resource)Sets the resource.voidsetVar(java.lang.String var)Sets the variable name to which to save the parent resource.
-
-
-
Method Detail
-
doEndTag
public int doEndTag()
- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.TagSupport
-
getResource
public Resource getResource()
Gets the resource.- Returns:
- the resource
-
getLevel
public java.lang.String getLevel()
Get the level of the parent resource to retrieve.- Returns:
- the level
-
getVar
public java.lang.String getVar()
Gets the variable name to which to save the list of children.- Returns:
- the variable name
-
setResource
public void setResource(Resource resource)
Sets the resource.- Parameters:
resource- the new resource
-
setLevel
public void setLevel(java.lang.String level)
Set the level of the parent resource to retrieve.- Parameters:
level- the level
-
setVar
public void setVar(java.lang.String var)
Sets the variable name to which to save the parent resource.- Parameters:
var- the variable name
-
-