Class GetPropertyTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.sling.scripting.jsp.taglib.GetPropertyTag
- All Implemented Interfaces:
Serializable,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
public class GetPropertyTag
extends javax.servlet.jsp.tagext.TagSupport
Tag for retrieving a property from a ValueMap.
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()protected ClassLoaderMethod for retrieving the classloader from the OSGi console.Gets the default value to return if no value exists for the key.getKey()Gets key to retrieve the value from from the ValueMap.org.apache.sling.api.resource.ValueMapGets the ValueMap from which to retrieve the value.Gets the name of class into which to coerce the returned value.getVar()Gets the variable name to which to save the valuevoidsetDefaultValue(Object defaultValue) Sets the default value to return if no value exists for the key.voidSets the key to retrieve the value from from the ValueMap.voidsetProperties(org.apache.sling.api.resource.ValueMap properties) Sets the ValueMap from which to retrieve the value.voidsetReturnClass(String returnClass) Sets the name of class into which to coerce the returned value.voidSets the variable name to which to save the value.Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
Constructor Details
-
GetPropertyTag
public GetPropertyTag()
-
-
Method Details
-
doEndTag
public int doEndTag()- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.TagSupport
-
getClassLoader
Method for retrieving the classloader from the OSGi console.- Returns:
- the classloader
-
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
Gets key to retrieve the value from from the ValueMap.- Returns:
- the key
-
getProperties
public org.apache.sling.api.resource.ValueMap getProperties()Gets the ValueMap from which to retrieve the value.- Returns:
- the ValueMap of properties
-
getReturnClass
Gets the name of class into which to coerce the returned value.- Returns:
- the class name
-
getVar
Gets the variable name to which to save the value- Returns:
- the variable name
-
setDefaultValue
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
Sets the key to retrieve the value from from the ValueMap.- Parameters:
key- the key
-
setProperties
public void setProperties(org.apache.sling.api.resource.ValueMap properties) Sets the ValueMap from which to retrieve the value.- Parameters:
properties- the ValueMap of properties
-
setReturnClass
Sets the name of class into which to coerce the returned value.- Parameters:
returnClass- the class name
-
setVar
Sets the variable name to which to save the value.- Parameters:
var- the variable name
-