org.opencms.xml.containerpage
public class CmsDynamicFunctionParser extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FORMATTER_PATH
The path of the formatter which calls the JSP.
|
static java.lang.String |
N_CONTAINER_SETTINGS
The node name for the formatter settings.
|
static java.lang.String |
TYPE_FUNCTION
The resource type for dynamic functions.
|
Constructor and Description |
---|
CmsDynamicFunctionParser() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<CmsDynamicFunctionBean.Format> |
getAdditionalFormats(CmsObject cms,
I_CmsXmlContentLocation location,
CmsResource functionRes)
Parses all the additional formats from the XML content.
|
protected CmsResource |
getFunctionFormatter(CmsObject cms)
Gets the function formatter resource, possibly from the cache.
|
protected java.util.Locale |
getLocaleToUse(CmsObject cms,
CmsXmlContent xmlContent)
Gets the locale to use for parsing the dynamic function.
|
protected CmsDynamicFunctionBean.Format |
getMainFormat(CmsObject cms,
I_CmsXmlContentLocation location,
CmsResource functionRes)
Parses the main format from the XML content.
|
protected java.lang.String |
getString(CmsObject cms,
I_CmsXmlContentValueLocation location)
Gets the string value of an XML content location.
|
protected java.lang.String |
getStringValue(CmsObject cms,
I_CmsXmlContentValueLocation location,
java.lang.String defaultValue)
Converts a (possibly null) content value location to a string.
|
protected CmsDynamicFunctionBean.Format |
parseAdditionalFormat(CmsObject cms,
I_CmsXmlContentValueLocation location,
CmsResource functionRes)
Parses an additional format from the XML content.
|
CmsDynamicFunctionBean |
parseFunctionBean(CmsObject cms,
CmsResource res)
Parses a dynamic function bean given a resource.
|
CmsDynamicFunctionBean |
parseFunctionBean(CmsObject cms,
CmsXmlContent content)
Parses a dynamic function bean from an in-memory XML content object.
|
protected CmsDynamicFunctionBean |
parseFunctionBean(CmsObject cms,
I_CmsXmlContentLocation location,
CmsResource functionRes,
CmsResource functionFormatter)
Parses a dynamic function bean.
|
protected CmsPair<java.lang.String,java.lang.String> |
parseParameter(CmsObject cms,
I_CmsXmlContentValueLocation valueLocation)
Parses a request parameter for the JSP from the XML content.
|
protected java.util.Map<java.lang.String,java.lang.String> |
parseParameters(CmsObject cms,
I_CmsXmlContentLocation location,
java.lang.String name)
Parses all parameters for the JSP from the XML content.
|
protected CmsXmlContentProperty |
parseProperty(CmsObject cms,
I_CmsXmlContentLocation field)
Helper method for parsing a settings definition.
|
protected java.util.Map<java.lang.String,CmsXmlContentProperty> |
parseSettings(CmsObject cms,
I_CmsXmlContentLocation location,
CmsResource functionResource)
Parses the settings for the dynamic function from the XML content.
|
public static final java.lang.String FORMATTER_PATH
public static final java.lang.String N_CONTAINER_SETTINGS
public static final java.lang.String TYPE_FUNCTION
public CmsDynamicFunctionBean parseFunctionBean(CmsObject cms, CmsResource res) throws CmsException
cms
- the current CMS contextres
- the resource from which to read the dynamic functionCmsException
- if something goes wrongpublic CmsDynamicFunctionBean parseFunctionBean(CmsObject cms, CmsXmlContent content) throws CmsException
cms
- the current CMS contextcontent
- the XML content from which to read the dynamic function beanCmsException
- if something goes wrongprotected java.util.List<CmsDynamicFunctionBean.Format> getAdditionalFormats(CmsObject cms, I_CmsXmlContentLocation location, CmsResource functionRes)
cms
- the current CMS contextlocation
- the location from which to parse the additional formatsfunctionRes
- the dynamic function resourceprotected CmsResource getFunctionFormatter(CmsObject cms) throws CmsException
cms
- the current CMS contextCmsException
- if something goes wrongprotected java.util.Locale getLocaleToUse(CmsObject cms, CmsXmlContent xmlContent)
cms
- the current CMS contextxmlContent
- the xml content from which the dynamic function should be readprotected CmsDynamicFunctionBean.Format getMainFormat(CmsObject cms, I_CmsXmlContentLocation location, CmsResource functionRes)
cms
- the current CMS contextlocation
- the location from which to parse main formatfunctionRes
- the dynamic function resourceprotected java.lang.String getString(CmsObject cms, I_CmsXmlContentValueLocation location)
cms
- the current CMS contextlocation
- an XML content locationprotected java.lang.String getStringValue(CmsObject cms, I_CmsXmlContentValueLocation location, java.lang.String defaultValue)
cms
- the current CMS contextlocation
- the content value locationdefaultValue
- the value to return if the location is nullprotected CmsDynamicFunctionBean.Format parseAdditionalFormat(CmsObject cms, I_CmsXmlContentValueLocation location, CmsResource functionRes)
cms
- the current CMS contextlocation
- the location from which to parse the additional formatfunctionRes
- the dynamic function resourceprotected CmsDynamicFunctionBean parseFunctionBean(CmsObject cms, I_CmsXmlContentLocation location, CmsResource functionRes, CmsResource functionFormatter)
cms
- the current CMS contextlocation
- the location from which to parse the dynamic function beanfunctionRes
- the dynamic function resourcefunctionFormatter
- the function formatter resourceprotected CmsPair<java.lang.String,java.lang.String> parseParameter(CmsObject cms, I_CmsXmlContentValueLocation valueLocation)
cms
- the current CMS contextvalueLocation
- the location from which to parse the parameterprotected java.util.Map<java.lang.String,java.lang.String> parseParameters(CmsObject cms, I_CmsXmlContentLocation location, java.lang.String name)
cms
- the current CMS contextlocation
- the location from which to read the parametersname
- the name of the tag from which to read the parametersprotected CmsXmlContentProperty parseProperty(CmsObject cms, I_CmsXmlContentLocation field)
cms
- the current CMS contextfield
- the node from which to read the settings definitionprotected java.util.Map<java.lang.String,CmsXmlContentProperty> parseSettings(CmsObject cms, I_CmsXmlContentLocation location, CmsResource functionResource)
cms
- the current CMS contextlocation
- the location from which to read the dynamic function settingsfunctionResource
- the dynamic function resource