|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.xml.containerpage.CmsDynamicFunctionParser
public class CmsDynamicFunctionParser
The parser class for creating dynamic function beans from XML contents.
| Field Summary | |
|---|---|
static String |
FORMATTER_PATH
The path of the formatter which calls the JSP. |
static String |
N_CONTAINER_SETTINGS
The node name for the formatter settings. |
static String |
TYPE_FUNCTION
The resource type for dynamic functions. |
| Constructor Summary | |
|---|---|
CmsDynamicFunctionParser()
|
|
| Method Summary | |
|---|---|
protected 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 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 String |
getString(CmsObject cms,
I_CmsXmlContentValueLocation location)
Gets the string value of an XML content location. |
protected String |
getStringValue(CmsObject cms,
I_CmsXmlContentValueLocation location,
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<String,String> |
parseParameter(CmsObject cms,
I_CmsXmlContentValueLocation valueLocation)
Parses a request parameter for the JSP from the XML content. |
protected Map<String,String> |
parseParameters(CmsObject cms,
I_CmsXmlContentLocation location,
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 Map<String,CmsXmlContentProperty> |
parseSettings(CmsObject cms,
I_CmsXmlContentLocation location,
CmsResource functionResource)
Parses the settings for the dynamic function from the XML content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FORMATTER_PATH
public static final String N_CONTAINER_SETTINGS
public static final String TYPE_FUNCTION
| Constructor Detail |
|---|
public CmsDynamicFunctionParser()
| Method Detail |
|---|
public CmsDynamicFunctionBean parseFunctionBean(CmsObject cms,
CmsResource res)
throws CmsException
cms - the current CMS contextres - the resource from which to read the dynamic function
CmsException - if something goes wrong
public CmsDynamicFunctionBean parseFunctionBean(CmsObject cms,
CmsXmlContent content)
throws CmsException
cms - the current CMS contextcontent - the XML content from which to read the dynamic function bean
CmsException - if something goes wrong
protected 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 resource
protected CmsResource getFunctionFormatter(CmsObject cms)
throws CmsException
cms - the current CMS context
CmsException - if something goes wrong
protected Locale getLocaleToUse(CmsObject cms,
CmsXmlContent xmlContent)
cms - the current CMS contextxmlContent - the xml content from which the dynamic function should be read
protected 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 resource
protected String getString(CmsObject cms,
I_CmsXmlContentValueLocation location)
cms - the current CMS contextlocation - an XML content location
protected String getStringValue(CmsObject cms,
I_CmsXmlContentValueLocation location,
String defaultValue)
cms - the current CMS contextlocation - the content value locationdefaultValue - the value to return if the location is null
protected 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 resource
protected 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 resource
protected CmsPair<String,String> parseParameter(CmsObject cms,
I_CmsXmlContentValueLocation valueLocation)
cms - the current CMS contextvalueLocation - the location from which to parse the parameter
protected Map<String,String> parseParameters(CmsObject cms,
I_CmsXmlContentLocation location,
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 parameters
protected CmsXmlContentProperty parseProperty(CmsObject cms,
I_CmsXmlContentLocation field)
cms - the current CMS contextfield - the node from which to read the settings definition
protected Map<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
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||