Package org.opencms.jsp
Class CmsJspTagContentInfo
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- org.opencms.jsp.CmsJspScopedVarBodyTagSuport
-
- org.opencms.jsp.CmsJspTagContentInfo
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.jsp.tagext.BodyTag
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
,I_CmsMacroResolver
public class CmsJspTagContentInfo extends CmsJspScopedVarBodyTagSuport implements I_CmsMacroResolver
Used to access and display XML content item information from the VFS.- Since:
- 6.0.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.opencms.util.I_CmsMacroResolver
MACRO_DELIMITER, MACRO_DELIMITER_OLD, MACRO_END, MACRO_END_OLD, MACRO_START, MACRO_START_OLD
-
-
Constructor Summary
Constructors Constructor Description CmsJspTagContentInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
int
doStartTag()
java.lang.String
getMacroValue(java.lang.String macro)
Resolves a single macro to the macro value, returnsnull
if the macro could not be resolved.java.lang.String
getValue()
Returns the name of the content info's value that should be printed out.boolean
isKeepEmptyMacros()
Returnstrue
if macros that could not be resolved are kept "as is" in the input String,false
if they are replaced by an empty String.void
release()
java.lang.String
resolveMacros(java.lang.String input)
Resolves all macros in the input, replacing them with the macro values.void
setValue(java.lang.String value)
Sets the name of the content info's value that should be printed out.protected void
storeContentInfoBean(CmsJspTagResourceLoad container)
Stores the container's content info bean in the page context.-
Methods inherited from class org.opencms.jsp.CmsJspScopedVarBodyTagSuport
getScope, getScopeAsInt, getScopeAsString, getScopeInt, getVar, isScopeVarSet, setScope, setVar, storeAttribute, storeAttribute
-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Constructor Detail
-
CmsJspTagContentInfo
public CmsJspTagContentInfo()
-
-
Method Detail
-
doEndTag
public int doEndTag()
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- See Also:
Tag.doEndTag()
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
- See Also:
Tag.doStartTag()
-
getMacroValue
public java.lang.String getMacroValue(java.lang.String macro)
Description copied from interface:I_CmsMacroResolver
Resolves a single macro to the macro value, returnsnull
if the macro could not be resolved.- Specified by:
getMacroValue
in interfaceI_CmsMacroResolver
- Parameters:
macro
- the macro to resolve- Returns:
- the resolved macro or
null
if the macro could not be resolved - See Also:
I_CmsMacroResolver.getMacroValue(java.lang.String)
-
getValue
public java.lang.String getValue()
Returns the name of the content info's value that should be printed out.- Returns:
- the name of the content info's value that should be printed out
-
isKeepEmptyMacros
public boolean isKeepEmptyMacros()
Description copied from interface:I_CmsMacroResolver
Returnstrue
if macros that could not be resolved are kept "as is" in the input String,false
if they are replaced by an empty String.- Specified by:
isKeepEmptyMacros
in interfaceI_CmsMacroResolver
- Returns:
true
if macros that could not be resolved are kept "as is" in the input String,false
if they are replaced by an empty String- See Also:
I_CmsMacroResolver.isKeepEmptyMacros()
-
release
public void release()
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classCmsJspScopedVarBodyTagSuport
- See Also:
Tag.release()
-
resolveMacros
public java.lang.String resolveMacros(java.lang.String input)
Description copied from interface:I_CmsMacroResolver
Resolves all macros in the input, replacing them with the macro values.The flag
I_CmsMacroResolver.isKeepEmptyMacros()
controls how to deal with macros found in the input that can not be resolved.- Specified by:
resolveMacros
in interfaceI_CmsMacroResolver
- Parameters:
input
- the input to resolve the macros in- Returns:
- the input with all macros resolved
- See Also:
I_CmsMacroResolver.resolveMacros(java.lang.String)
-
setValue
public void setValue(java.lang.String value)
Sets the name of the content info's value that should be printed out.- Parameters:
value
- the name of the content info's value that should be printed out
-
storeContentInfoBean
protected void storeContentInfoBean(CmsJspTagResourceLoad container)
Stores the container's content info bean in the page context.- Parameters:
container
- the parent container
-
-