Interface I_CmsFormatterBean

All Known Implementing Classes:
CmsFlexFormatterBean, CmsFormatterBean, CmsFunctionFormatterBean, CmsMacroFormatterBean, CmsSchemaFormatterBeanWrapper

public interface I_CmsFormatterBean
Interface representing a configured formatter.

  • Method Details

    • getAliasKeys

      Gets the set of alias keys for the formatter.
      Returns:
      the set of alias keys
    • getAllKeys

      Gets the complete set of keys for the formatter, i.e. its main key and all alias keys.
      Returns:
      the complete set of keys
    • getAttributes

      Gets the map of attributes.

      Returns:
      the attribute map
    • getContainerTypes

      Returns the formatter container type.

      If this is "*", then the formatter is a width based formatter.

      Returns:
      the formatter container type
    • getCssHeadIncludes

      Gets the CSS head includes.

      Returns:
      the CSS head includes
    • getDescription

      Gets the formatter description.

      If a locale is passed in, macros in the configured description will be resolved with a macro resolver set to that locale. If null is passed in as a locale, the raw configured description will be returned.

      Parameters:
      locale - the locale (may be null)
      Returns:
      the formatter description
    • getDisplayType

      The display type of this formatter or null in case this is not a display formatter.

      Returns:
      the display type
    • getId

      Returns the id of this formatter.

      This method may return null because the id is not always defined for formatters, e.g. for those formatters declared in a schema.

      Returns:
      the formatter id
    • getInlineCss

      Gets the inline CSS snippets.

      Returns:
      the inline CSS snippets
    • getInlineJavascript

      Gets the inline JS snippets.

      Returns:
      the inline JS snippets
    • getJavascriptHeadIncludes

      Gets the Javascript head includes.

      Returns:
      the head includes
    • getJspRootPath

      Returns the root path of the formatter JSP in the OpenCms VFS.

      Returns:
      the root path of the formatter JSP in the OpenCms VFS.

    • getJspStructureId

      Returns the structure id of the JSP resource for this formatter.

      Returns:
      the structure id of the JSP resource for this formatter
    • getKey

      Gets the formatter key, or null if no formatter key is set.

      A formatter key is used to allow dynamic switching between formatters with the same key by enabling/disabling the formatters in the sitemap configuration. I.e. if a formatter referenced in a container page has been disabled in the sitemap configuration, but a different formatter with the same key is enabled, the second formatter will be used instead when rendering the page .

      Returns:
      the formatter key, or null
    • getKeyOrId

      default String getKeyOrId()
      Helper method for getting either the key, if it exists, or the ID (as a string) if it does not.
      Returns:
      the formatter key or id
    • getLocation

      Returns the location this formatter was defined in.

      This will be an OpenCms VFS root path, either to the XML schema XSD, or the configuration file this formatter was defined in, or to the JSP that makes up this formatter.

      Returns:
      the location this formatter was defined in
    • getMaxWidth

      Returns the maximum formatter width.

      If this is not set, then Integer.MAX_VALUE is returned.

      Returns:
      the maximum formatter width
    • getMetaMappings

      Returns the meta mappings.

      Returns:
      the meta mappings
    • getMinWidth

      Returns the minimum formatter width.

      If this is not set, then -1 is returned.

      Returns:
      the minimum formatter width
    • getNiceName

      Gets the nice name for this formatter.

      Parameters:
      locale - the locale
      Returns:
      the nice name for this formatter
    • getRank

      int getRank()
      Gets the rank.

      Returns:
      the rank
    • getResourceTypeNames

      Gets the resource type names.

      Returns:
      the resource type names
    • getSettings

      Gets the defined settings.

      Parameters:
      sitemapConfig - the sitemap configuration for which the settings should be retrieved
      Returns:
      the defined settings
    • getTemplatePlugins

      Gets the template plugins.
      Returns:
      the template plugins
    • hasNestedFormatterSettings

      Returns if nested formatter settings should be displayed.

      Returns:
      true if nested formatter settings should be displayed
    • isAllowsSettingsInEditor

      Returns whether this formatter allows settings to be edited in the content editor.

      Returns:
      true in case editing the settings is allowed in the content editor
    • isAutoEnabled

      boolean isAutoEnabled()
      Returns true if the formatter is automatically enabled.

      Returns:
      true if the formatter is automatically enabled
    • isDetailFormatter

      Returns true if the formatter can be used for detail views.

      Returns:
      true if the formatter can be used for detail views
    • isDisplayFormatter

      Returns whether this formatter should be used by the 'display' tag.

      Returns:
      true if this formatter should be used by the 'display' tag
    • isFromFormatterConfigFile

      Returns true if the formatter is from a formatter configuration file.

      Returns:
      formatter f
    • isMatchAll

      boolean isMatchAll()
      Returns true if this formatter should match all type/width combinations.

      Returns:
      true if this formatter should match all type/width combinations
    • isPreviewFormatter

      Indicates if this formatter is to be used as preview in the ADE gallery GUI.
      Returns:
      true if this formatter is to be used as preview in the ADE gallery GUI
    • isSearchContent

      boolean isSearchContent()
      Returns true in case an XML content formatted with this formatter should be included in the online full text search.

      Returns:
      true in case an XML content formatted with this formatter should be included in the online full text search
    • isTypeFormatter

      boolean isTypeFormatter()
      Returns true in case this formatter is based on type information.

      Returns:
      true in case this formatter is based on type information
    • setJspStructureId

      void setJspStructureId(CmsUUID structureId)
      Sets the JSP structure id.

      Parameters:
      structureId - the jsp structure id
    • useMetaMappingsForNormalElements

      Returns true if meta mappings should be evaluated for normal container elements using this formatter, not just detail elements.

      Returns:
      true if meta mappings should be evaluated for normal container elements
    • withKeys

      If possible, returns a formatter bean that is basically a copy of this one, but has the keys supplied as a parameter.

      Note that this only works for formatters which already have a key, and can not replace the main key. If the keys already match, the current instance may be returned rather than a copy.

      If the formatter bean implementation does not support key replacement, or an error occurs, an empty Optional is returned

      Parameters:
      keys - the keys to use (should include the current key of the formatter
      Returns:
      the copy with the replaced keys