Package org.opencms.xml.containerpage
Class CmsDynamicFunctionBean
- java.lang.Object
-
- org.opencms.xml.containerpage.CmsDynamicFunctionBean
-
public class CmsDynamicFunctionBean extends java.lang.Object
A class which contains the data parsed from a dynamic function XML content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CmsDynamicFunctionBean.Format
A bean which contains a single format for a dynamic function, which contains of the function JSP, the container settings and the parameters.
-
Constructor Summary
Constructors Constructor Description CmsDynamicFunctionBean(CmsDynamicFunctionBean.Format mainFormat, java.util.List<CmsDynamicFunctionBean.Format> otherFormats, java.util.Map<java.lang.String,CmsXmlContentProperty> settingConfig, CmsResource resource, CmsResource functionFormatter)
Creates a new dynamic function bean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CmsFormatterBean
createFormatterBean(CmsDynamicFunctionBean.Format format, boolean isPreview)
Helper method to create a formatter bean from a format.CmsDynamicFunctionBean.Format
getFormatForContainer(CmsObject cms, java.lang.String type, int width)
Finds the correct format for a given container type and width.java.util.List<CmsFormatterBean>
getFormatters()
Creates the formatter list for this dynamic function.CmsResource
getFunctionFormatter()
Gets the generic function formatter resource.CmsDynamicFunctionBean.Format
getMainFormat()
Gets the main format.java.util.Map<java.lang.String,CmsXmlContentProperty>
getSettings()
Returns the setting configuration for this dynamic function.
-
-
-
Constructor Detail
-
CmsDynamicFunctionBean
public CmsDynamicFunctionBean(CmsDynamicFunctionBean.Format mainFormat, java.util.List<CmsDynamicFunctionBean.Format> otherFormats, java.util.Map<java.lang.String,CmsXmlContentProperty> settingConfig, CmsResource resource, CmsResource functionFormatter)
Creates a new dynamic function bean.- Parameters:
mainFormat
- the primary formatotherFormats
- the list of other formatssettingConfig
- the setting configurationresource
- the resource from which the dynamic function bean has been readfunctionFormatter
- the generic formatter for dynamic functions
-
-
Method Detail
-
getFormatForContainer
public CmsDynamicFunctionBean.Format getFormatForContainer(CmsObject cms, java.lang.String type, int width)
Finds the correct format for a given container type and width.- Parameters:
cms
- the current CMS contexttype
- the container typewidth
- the container width- Returns:
- the format for the given container type and width
-
getFormatters
public java.util.List<CmsFormatterBean> getFormatters()
Creates the formatter list for this dynamic function.- Returns:
- the formatter list for this dynamic function
-
getFunctionFormatter
public CmsResource getFunctionFormatter()
Gets the generic function formatter resource.- Returns:
- the generic function formatter resource
-
getMainFormat
public CmsDynamicFunctionBean.Format getMainFormat()
Gets the main format.- Returns:
- the main format
-
getSettings
public java.util.Map<java.lang.String,CmsXmlContentProperty> getSettings()
Returns the setting configuration for this dynamic function.- Returns:
- the setting configuration for this dynamic function
-
createFormatterBean
protected CmsFormatterBean createFormatterBean(CmsDynamicFunctionBean.Format format, boolean isPreview)
Helper method to create a formatter bean from a format.- Parameters:
format
- the format beanisPreview
- if true, the formatter returned will be marked as a preview formatter- Returns:
- the formatter corresponding to the format
-
-