Package org.opencms.jsp.util
Class CmsFormatterInfoWrapper
java.lang.Object
org.opencms.jsp.util.CmsFormatterInfoWrapper
- All Implemented Interfaces:
I_CmsFormatterInfo
,I_CmsInfoWrapper
Wrapper class for accessing formatter information from JSPs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencms.jsp.util.I_CmsFormatterInfo
I_CmsFormatterInfo.ResolveMode
-
Constructor Summary
ConstructorDescriptionCmsFormatterInfoWrapper
(CmsObject cms, CmsADEConfigData config, I_CmsFormatterBean formatter) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptiondescription
(Locale locale) Gets the description of the formatter in the given locale.Gets the matching container types.Gets the path of the formatter definition XML file.Gets the localized description.Returns the localization key for the description if one was used, and null otherwise.Gets the raw description, without resolving any macros.Gets the display type of the formatter.boolean
Checks if this is active.boolean
Checks if the formatter is a detail formatter.boolean
Checks if the formatter is a display formatter.boolean
Checks if this wraps a (non-function) formatter.boolean
Checks if this wraps a dynamic function.boolean
Checks if this wraps a resource type.getJsp()
Gets the JSP path.getKey()
Gets the formatter key.static CmsMacroResolver
getMacroResolverForFormatter
(CmsObject cms, I_CmsFormatterBean formatter) Prepares the macro resolver to use for formatter info / setting info beans.int
Gets the maximum container width.int
Gets the minimum container width.getName()
Gets the name.Gets the user-readable formatter name.Gets the localization key for the nice name, if one was used, or null otherwise.Gets the raw nice name, without resolving any macros.int
getRank()
Returns the rank of the formatter.Gets a list of wrapper beans for the element setting definitions.getTypes()
Gets the resource types.Gets the nice name of the formatter in the given locale.
-
Constructor Details
-
CmsFormatterInfoWrapper
public CmsFormatterInfoWrapper(CmsObject cms, CmsADEConfigData config, I_CmsFormatterBean formatter) Creates a new instance.- Parameters:
cms
- the CMS contextconfig
- the sitemap configurationformatter
- the formatter bean to wrap
-
-
Method Details
-
getMacroResolverForFormatter
public static CmsMacroResolver getMacroResolverForFormatter(CmsObject cms, I_CmsFormatterBean formatter) Prepares the macro resolver to use for formatter info / setting info beans.- Parameters:
cms
- the CMS context to useformatter
- the formatter bean- Returns:
- the macro resolver to sue
-
description
Gets the description of the formatter in the given locale.- Specified by:
description
in interfaceI_CmsFormatterInfo
- Parameters:
locale
- the locale to use- Returns:
- the description
-
getContainerTypes
Gets the matching container types.- Returns:
- the container types the formatter fits into
-
getDefinition
Gets the path of the formatter definition XML file.- Returns:
- the path of the formatter definition XML file
-
getDescription
Gets the localized description.- Specified by:
getDescription
in interfaceI_CmsInfoWrapper
- Returns:
- the description
-
getDescriptionKey
Description copied from interface:I_CmsInfoWrapper
Returns the localization key for the description if one was used, and null otherwise.- Specified by:
getDescriptionKey
in interfaceI_CmsInfoWrapper
- Returns:
- the localization key
- See Also:
-
getDescriptionRaw
Gets the raw description, without resolving any macros.- Specified by:
getDescriptionRaw
in interfaceI_CmsInfoWrapper
- Returns:
- the raw description
-
getDisplay
Gets the display type of the formatter.- Returns:
- the display type of the formatter
-
getIsActive
Description copied from interface:I_CmsFormatterInfo
Checks if this is active.- Specified by:
getIsActive
in interfaceI_CmsFormatterInfo
- Returns:
- true if this is active
- See Also:
-
getIsDetailFormatter
Checks if the formatter is a detail formatter.- Returns:
- true if the formatter is a detail formatter
-
getIsDisplayFormatter
Checks if the formatter is a display formatter.- Returns:
- true if the formatter is a display formatter
-
getIsFormatter
Description copied from interface:I_CmsFormatterInfo
Checks if this wraps a (non-function) formatter.- Specified by:
getIsFormatter
in interfaceI_CmsFormatterInfo
- Returns:
- true if this wraps a normal formatter
- See Also:
-
getIsFunction
Description copied from interface:I_CmsFormatterInfo
Checks if this wraps a dynamic function.- Specified by:
getIsFunction
in interfaceI_CmsFormatterInfo
- Returns:
- true if this wraps a dynamic function
- See Also:
-
getIsResourceType
Description copied from interface:I_CmsFormatterInfo
Checks if this wraps a resource type.- Specified by:
getIsResourceType
in interfaceI_CmsFormatterInfo
- Returns:
- true if this is a resource type
- See Also:
-
getJsp
Gets the JSP path.- Returns:
- the JSP path
-
getKey
Gets the formatter key.- Returns:
- the formatter key
-
getMaxWidth
Gets the maximum container width.- Returns:
- the maximum container width
-
getMinWidth
Gets the minimum container width.- Returns:
- the minimum container width
-
getName
Description copied from interface:I_CmsFormatterInfo
Gets the name.- Specified by:
getName
in interfaceI_CmsFormatterInfo
- Returns:
- the name
- See Also:
-
getNiceName
Gets the user-readable formatter name.- Specified by:
getNiceName
in interfaceI_CmsFormatterInfo
- Returns:
- the user-readable name
-
getNiceNameKey
Gets the localization key for the nice name, if one was used, or null otherwise.- Specified by:
getNiceNameKey
in interfaceI_CmsFormatterInfo
- Returns:
- the localization key
-
getNiceNameRaw
Gets the raw nice name, without resolving any macros.- Specified by:
getNiceNameRaw
in interfaceI_CmsFormatterInfo
- Returns:
- the raw nice name
-
getRank
Returns the rank of the formatter.- Returns:
- the rank
-
getSettings
Gets a list of wrapper beans for the element setting definitions.- Returns:
- the element setting definition wrappers
-
getTypes
Gets the resource types.- Returns:
- the resource types
-
niceName
Gets the nice name of the formatter in the given locale.- Specified by:
niceName
in interfaceI_CmsFormatterInfo
- Parameters:
locale
- the locale to use- Returns:
- the nice name of the formatter
-