Package org.opencms.xml.containerpage
Class CmsDynamicFunctionBean
java.lang.Object
org.opencms.xml.containerpage.CmsDynamicFunctionBean
A class which contains the data parsed from a dynamic function XML content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA bean which contains a single format for a dynamic function, which contains of the function JSP, the container settings and the parameters. -
Constructor Summary
ConstructorsConstructorDescriptionCmsDynamicFunctionBean(CmsDynamicFunctionBean.Format mainFormat, List<CmsDynamicFunctionBean.Format> otherFormats, Map<String, CmsXmlContentProperty> settingConfig, CmsResource resource, CmsResource functionFormatter) Creates a new dynamic function bean. -
Method Summary
Modifier and TypeMethodDescriptionprotected CmsFormatterBeancreateFormatterBean(CmsDynamicFunctionBean.Format format, boolean isPreview) Helper method to create a formatter bean from a format.getFormatForContainer(CmsObject cms, String type, int width) Finds the correct format for a given container type and width.Creates the formatter list for this dynamic function.Gets the generic function formatter resource.Gets the main format.Returns the setting configuration for this dynamic function.
-
Constructor Details
-
CmsDynamicFunctionBean
public CmsDynamicFunctionBean(CmsDynamicFunctionBean.Format mainFormat, List<CmsDynamicFunctionBean.Format> otherFormats, Map<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 Details
-
getFormatForContainer
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
Creates the formatter list for this dynamic function.- Returns:
- the formatter list for this dynamic function
-
getFunctionFormatter
Gets the generic function formatter resource.- Returns:
- the generic function formatter resource
-
getMainFormat
Gets the main format.- Returns:
- the main format
-
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
-