Class GetPropertyTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.apache.sling.scripting.jsp.taglib.GetPropertyTag
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
public class GetPropertyTag extends javax.servlet.jsp.tagext.TagSupportTag for retrieving a property from a ValueMap.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GetPropertyTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdoEndTag()java.lang.ObjectgetDefaultValue()Gets the default value to return if no value exists for the key.java.lang.StringgetKey()Gets key to retrieve the value from from the ValueMap.ValueMapgetProperties()Gets the ValueMap from which to retrieve the value.java.lang.StringgetReturnClass()Gets the name of class into which to coerce the returned value.java.lang.StringgetVar()Gets the variable name to which to save the valuevoidsetDefaultValue(java.lang.Object defaultValue)Sets the default value to return if no value exists for the key.voidsetKey(java.lang.String key)Sets the key to retrieve the value from from the ValueMap.voidsetProperties(ValueMap properties)Sets the ValueMap from which to retrieve the value.voidsetReturnClass(java.lang.String returnClass)Sets the name of class into which to coerce the returned value.voidsetVar(java.lang.String var)Sets the variable name to which to save the value.
-
-
-
Method Detail
-
doEndTag
public int doEndTag()
- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.TagSupport
-
getDefaultValue
public java.lang.Object getDefaultValue()
Gets the default value to return if no value exists for the key. If specified, this takes precedence over returnClass.- Returns:
- the default value
-
getKey
public java.lang.String getKey()
Gets key to retrieve the value from from the ValueMap.- Returns:
- the key
-
getProperties
public ValueMap getProperties()
Gets the ValueMap from which to retrieve the value.- Returns:
- the ValueMap of properties
-
getReturnClass
public java.lang.String getReturnClass()
Gets the name of class into which to coerce the returned value.- Returns:
- the class name
-
getVar
public java.lang.String getVar()
Gets the variable name to which to save the value- Returns:
- the variable name
-
setDefaultValue
public void setDefaultValue(java.lang.Object defaultValue)
Sets the default value to return if no value exists for the key. If specified, this takes precedence over returnClass.- Parameters:
defaultValue- the default value
-
setKey
public void setKey(java.lang.String key)
Sets the key to retrieve the value from from the ValueMap.- Parameters:
key- the key
-
setProperties
public void setProperties(ValueMap properties)
Sets the ValueMap from which to retrieve the value.- Parameters:
properties- the ValueMap of properties
-
setReturnClass
public void setReturnClass(java.lang.String returnClass)
Sets the name of class into which to coerce the returned value.- Parameters:
returnClass- the class name
-
setVar
public void setVar(java.lang.String var)
Sets the variable name to which to save the value.- Parameters:
var- the variable name
-
-