org.opencms.xml.containerpage
Class CmsDynamicFunctionBean

java.lang.Object
  extended by org.opencms.xml.containerpage.CmsDynamicFunctionBean

public class CmsDynamicFunctionBean
extends Object

A class which contains the data parsed from a dynamic function XML content.


Nested Class Summary
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.
 
Field Summary
static String FORMATTER_PATH
          The path of the formatter which calls the JSP.
 
Constructor Summary
CmsDynamicFunctionBean(CmsDynamicFunctionBean.Format mainFormat, List<CmsDynamicFunctionBean.Format> otherFormats, Map<String,CmsXmlContentProperty> settingConfig, CmsResource resource, CmsResource functionFormatter)
          Creates a new dynamic function bean.
 
Method Summary
protected  CmsFormatterBean createFormatterBean(CmsDynamicFunctionBean.Format format)
          Helper method to create a formatter bean from a format.
 CmsDynamicFunctionBean.Format getFormatForContainer(CmsObject cms, String type, int width)
          Finds the correct format for a given container type and width.
 CmsFormatterConfiguration getFormatterConfiguration(CmsObject cms)
          Creates the formatter configuration for this dynamic function.
 CmsResource getFunctionFormatter()
          Gets the generic function formatter resource.
 CmsDynamicFunctionBean.Format getMainFormat()
          Gets the main format.
 Map<String,CmsXmlContentProperty> getSettings()
          Returns the setting configuration for this dynamic function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMATTER_PATH

public static final String FORMATTER_PATH
The path of the formatter which calls the JSP.

See Also:
Constant Field Values
Constructor Detail

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 format
otherFormats - the list of other formats
settingConfig - the setting configuration
resource - the resource from which the dynamic function bean has been read
functionFormatter - the generic formatter for dynamic functions
Method Detail

getFormatForContainer

public CmsDynamicFunctionBean.Format getFormatForContainer(CmsObject cms,
                                                           String type,
                                                           int width)
Finds the correct format for a given container type and width.

Parameters:
cms - the current CMS context
type - the container type
width - the container width
Returns:
the format for the given container type and width

getFormatterConfiguration

public CmsFormatterConfiguration getFormatterConfiguration(CmsObject cms)
Creates the formatter configuration for this dynamic function.

Parameters:
cms - the current CMS context
Returns:
the formatter configuration 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 Map<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)
Helper method to create a formatter bean from a format.

Parameters:
format - the format bean
Returns:
the formatter corresponding to the format