Class CmsSchemaFormatterBeanWrapper
- All Implemented Interfaces:
I_CmsFormatterBean
-
Constructor Summary
ConstructorDescriptionCmsSchemaFormatterBeanWrapper
(CmsObject cms, I_CmsFormatterBean wrappedBean, I_CmsXmlContentHandler contentHandler, CmsResource resource) Creates a new wrapper instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the set of alias keys for the formatter.Gets the complete set of keys for the formatter, i.e.Gets the map of attributes.Returns the formatter container type.Gets the CSS head includes.getDescription
(Locale locale) Gets the formatter description.The display type of this formatter ornull
in case this is not a display formatter.getId()
Returns the id of this formatter.Gets the inline CSS snippets.Gets the inline JS snippets.Gets the Javascript head includes.Returns the root path of the formatter JSP in the OpenCms VFS.Returns the structure id of the JSP resource for this formatter.getKey()
Gets the formatter key, or null if no formatter key is set.Returns the location this formatter was defined in.int
Returns the maximum formatter width.Returns the meta mappings.int
Returns the minimum formatter width.getNiceName
(Locale locale) Gets the nice name for this formatter.int
getRank()
Gets the rank.Gets the resource type names.getSettings
(CmsADEConfigData config) Gets the defined settings.Gets the template plugins.boolean
Returns if nested formatter settings should be displayed.boolean
Returns whether this formatter allows settings to be edited in the content editor.boolean
Returns true if the formatter is automatically enabled.boolean
Returns true if the formatter can be used for detail views.boolean
Returns whether this formatter should be used by the 'display' tag.boolean
Returns true if the formatter is from a formatter configuration file.boolean
Returns true if this formatter should match all type/width combinations.boolean
Indicates if this formatter is to be used as preview in the ADE gallery GUI.boolean
Returnstrue
in case an XML content formatted with this formatter should be included in the online full text search.boolean
Returnstrue
in case this formatter is based on type information.void
setJspStructureId
(CmsUUID jspStructureId) Sets the JSP structure id.boolean
Returns true if meta mappings should be evaluated for normal container elements using this formatter, not just detail elements.withKeys
(Collection<String> keys) If possible, returns a formatter bean that is basically a copy of this one, but has the keys supplied as a parameter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opencms.xml.containerpage.I_CmsFormatterBean
getKeyOrId
-
Constructor Details
-
CmsSchemaFormatterBeanWrapper
public CmsSchemaFormatterBeanWrapper(CmsObject cms, I_CmsFormatterBean wrappedBean, I_CmsXmlContentHandler contentHandler, CmsResource resource) Creates a new wrapper instance.- Parameters:
cms
- the CMS context to usewrappedBean
- the wrapped formattercontentHandler
- the content handler to ask for additional informationresource
- the resource which should be used to ask the content handler for additional information
-
-
Method Details
-
getAliasKeys
Description copied from interface:I_CmsFormatterBean
Gets the set of alias keys for the formatter.- Specified by:
getAliasKeys
in interfaceI_CmsFormatterBean
- Returns:
- the set of alias keys
- See Also:
-
getAllKeys
Description copied from interface:I_CmsFormatterBean
Gets the complete set of keys for the formatter, i.e. its main key and all alias keys.- Specified by:
getAllKeys
in interfaceI_CmsFormatterBean
- Returns:
- the complete set of keys
- See Also:
-
getAttributes
Description copied from interface:I_CmsFormatterBean
Gets the map of attributes.- Specified by:
getAttributes
in interfaceI_CmsFormatterBean
- Returns:
- the attribute map
- See Also:
-
getContainerTypes
Description copied from interface:I_CmsFormatterBean
Returns the formatter container type.If this is "*", then the formatter is a width based formatter.
- Specified by:
getContainerTypes
in interfaceI_CmsFormatterBean
- Returns:
- the formatter container type
- See Also:
-
getCssHeadIncludes
Description copied from interface:I_CmsFormatterBean
Gets the CSS head includes.- Specified by:
getCssHeadIncludes
in interfaceI_CmsFormatterBean
- Returns:
- the CSS head includes
- See Also:
-
getDescription
Description copied from interface:I_CmsFormatterBean
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.
- Specified by:
getDescription
in interfaceI_CmsFormatterBean
- Parameters:
locale
- the locale (may be null)- Returns:
- the formatter description
- See Also:
-
getDisplayType
Description copied from interface:I_CmsFormatterBean
The display type of this formatter ornull
in case this is not a display formatter.- Specified by:
getDisplayType
in interfaceI_CmsFormatterBean
- Returns:
- the display type
- See Also:
-
getId
Description copied from interface:I_CmsFormatterBean
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.
- Specified by:
getId
in interfaceI_CmsFormatterBean
- Returns:
- the formatter id
- See Also:
-
getInlineCss
Description copied from interface:I_CmsFormatterBean
Gets the inline CSS snippets.- Specified by:
getInlineCss
in interfaceI_CmsFormatterBean
- Returns:
- the inline CSS snippets
- See Also:
-
getInlineJavascript
Description copied from interface:I_CmsFormatterBean
Gets the inline JS snippets.- Specified by:
getInlineJavascript
in interfaceI_CmsFormatterBean
- Returns:
- the inline JS snippets
- See Also:
-
getJavascriptHeadIncludes
Description copied from interface:I_CmsFormatterBean
Gets the Javascript head includes.- Specified by:
getJavascriptHeadIncludes
in interfaceI_CmsFormatterBean
- Returns:
- the head includes
- See Also:
-
getJspRootPath
Description copied from interface:I_CmsFormatterBean
Returns the root path of the formatter JSP in the OpenCms VFS.- Specified by:
getJspRootPath
in interfaceI_CmsFormatterBean
- Returns:
- the root path of the formatter JSP in the OpenCms VFS.
- See Also:
-
getJspStructureId
Description copied from interface:I_CmsFormatterBean
Returns the structure id of the JSP resource for this formatter.- Specified by:
getJspStructureId
in interfaceI_CmsFormatterBean
- Returns:
- the structure id of the JSP resource for this formatter
- See Also:
-
getKey
Description copied from interface:I_CmsFormatterBean
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 .
- Specified by:
getKey
in interfaceI_CmsFormatterBean
- Returns:
- the formatter key, or null
- See Also:
-
getLocation
Description copied from interface:I_CmsFormatterBean
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.
- Specified by:
getLocation
in interfaceI_CmsFormatterBean
- Returns:
- the location this formatter was defined in
- See Also:
-
getMaxWidth
Description copied from interface:I_CmsFormatterBean
Returns the maximum formatter width.If this is not set, then
Integer.MAX_VALUE
is returned.- Specified by:
getMaxWidth
in interfaceI_CmsFormatterBean
- Returns:
- the maximum formatter width
- See Also:
-
getMetaMappings
Description copied from interface:I_CmsFormatterBean
Returns the meta mappings.- Specified by:
getMetaMappings
in interfaceI_CmsFormatterBean
- Returns:
- the meta mappings
- See Also:
-
getMinWidth
Description copied from interface:I_CmsFormatterBean
Returns the minimum formatter width.If this is not set, then
-1
is returned.- Specified by:
getMinWidth
in interfaceI_CmsFormatterBean
- Returns:
- the minimum formatter width
- See Also:
-
getNiceName
Description copied from interface:I_CmsFormatterBean
Gets the nice name for this formatter.- Specified by:
getNiceName
in interfaceI_CmsFormatterBean
- Parameters:
locale
- the locale- Returns:
- the nice name for this formatter
- See Also:
-
getRank
Description copied from interface:I_CmsFormatterBean
Gets the rank.- Specified by:
getRank
in interfaceI_CmsFormatterBean
- Returns:
- the rank
- See Also:
-
getResourceTypeNames
Description copied from interface:I_CmsFormatterBean
Gets the resource type names.- Specified by:
getResourceTypeNames
in interfaceI_CmsFormatterBean
- Returns:
- the resource type names
- See Also:
-
getSettings
Description copied from interface:I_CmsFormatterBean
Gets the defined settings.- Specified by:
getSettings
in interfaceI_CmsFormatterBean
- Parameters:
config
- the sitemap configuration for which the settings should be retrieved- Returns:
- the defined settings
- See Also:
-
getTemplatePlugins
Description copied from interface:I_CmsFormatterBean
Gets the template plugins.- Specified by:
getTemplatePlugins
in interfaceI_CmsFormatterBean
- Returns:
- the template plugins
- See Also:
-
hasNestedFormatterSettings
Description copied from interface:I_CmsFormatterBean
Returns if nested formatter settings should be displayed.- Specified by:
hasNestedFormatterSettings
in interfaceI_CmsFormatterBean
- Returns:
true
if nested formatter settings should be displayed- See Also:
-
isAllowsSettingsInEditor
Description copied from interface:I_CmsFormatterBean
Returns whether this formatter allows settings to be edited in the content editor.- Specified by:
isAllowsSettingsInEditor
in interfaceI_CmsFormatterBean
- Returns:
true
in case editing the settings is allowed in the content editor- See Also:
-
isAutoEnabled
Description copied from interface:I_CmsFormatterBean
Returns true if the formatter is automatically enabled.- Specified by:
isAutoEnabled
in interfaceI_CmsFormatterBean
- Returns:
- true if the formatter is automatically enabled
- See Also:
-
isDetailFormatter
Description copied from interface:I_CmsFormatterBean
Returns true if the formatter can be used for detail views.- Specified by:
isDetailFormatter
in interfaceI_CmsFormatterBean
- Returns:
- true if the formatter can be used for detail views
- See Also:
-
isDisplayFormatter
Description copied from interface:I_CmsFormatterBean
Returns whether this formatter should be used by the 'display' tag.- Specified by:
isDisplayFormatter
in interfaceI_CmsFormatterBean
- Returns:
true
if this formatter should be used by the 'display' tag- See Also:
-
isFromFormatterConfigFile
Description copied from interface:I_CmsFormatterBean
Returns true if the formatter is from a formatter configuration file.- Specified by:
isFromFormatterConfigFile
in interfaceI_CmsFormatterBean
- Returns:
- formatter f
- See Also:
-
isMatchAll
Description copied from interface:I_CmsFormatterBean
Returns true if this formatter should match all type/width combinations.- Specified by:
isMatchAll
in interfaceI_CmsFormatterBean
- Returns:
- true if this formatter should match all type/width combinations
- See Also:
-
isPreviewFormatter
Description copied from interface:I_CmsFormatterBean
Indicates if this formatter is to be used as preview in the ADE gallery GUI.- Specified by:
isPreviewFormatter
in interfaceI_CmsFormatterBean
- Returns:
true
if this formatter is to be used as preview in the ADE gallery GUI- See Also:
-
isSearchContent
Description copied from interface:I_CmsFormatterBean
Returnstrue
in case an XML content formatted with this formatter should be included in the online full text search.- Specified by:
isSearchContent
in interfaceI_CmsFormatterBean
- Returns:
true
in case an XML content formatted with this formatter should be included in the online full text search- See Also:
-
isTypeFormatter
Description copied from interface:I_CmsFormatterBean
Returnstrue
in case this formatter is based on type information.- Specified by:
isTypeFormatter
in interfaceI_CmsFormatterBean
- Returns:
true
in case this formatter is based on type information- See Also:
-
setJspStructureId
Description copied from interface:I_CmsFormatterBean
Sets the JSP structure id.- Specified by:
setJspStructureId
in interfaceI_CmsFormatterBean
- Parameters:
jspStructureId
- the jsp structure id- See Also:
-
useMetaMappingsForNormalElements
Description copied from interface:I_CmsFormatterBean
Returns true if meta mappings should be evaluated for normal container elements using this formatter, not just detail elements.- Specified by:
useMetaMappingsForNormalElements
in interfaceI_CmsFormatterBean
- Returns:
- true if meta mappings should be evaluated for normal container elements
- See Also:
-
withKeys
Description copied from interface:I_CmsFormatterBean
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
- Specified by:
withKeys
in interfaceI_CmsFormatterBean
- Parameters:
keys
- the keys to use (should include the current key of the formatter- Returns:
- the copy with the replaced keys
- See Also:
-