Package org.opencms.jsp.util
Class CmsResourceTypeInfoWrapper
- java.lang.Object
-
- org.opencms.jsp.util.CmsResourceTypeInfoWrapper
-
- All Implemented Interfaces:
I_CmsFormatterInfo
public class CmsResourceTypeInfoWrapper extends java.lang.Object implements I_CmsFormatterInfo
Wrapper for resource type information for use in JSPs.
-
-
Constructor Summary
Constructors Constructor Description CmsResourceTypeInfoWrapper(CmsJspStandardContextBean context, CmsObject cms, CmsADEConfigData config, I_CmsResourceType type)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
description(java.util.Locale locale)
Gets the description for the type in the given locale.java.util.List<CmsFormatterInfoWrapper>
formatterInfoForContainer(java.lang.String containerType)
Gets the formatter information beans for a specific container type.java.lang.String
getDescription()
Gets the type description in the current locale.java.lang.String
getDescriptionKey()
Returns the localization key for the description if one was used, and null otherwise.java.lang.String
getDescriptionRaw()
Gets the raw description, without resolving any macros.java.util.Set<java.lang.String>
getFormatterContainerTypes()
Gets the set of container types configured for any active formatters for this resource type.java.util.List<CmsFormatterInfoWrapper>
getFormatterInfo()
Gets the formatter information beans for all active formatters for this type.boolean
getIsActive()
Returns true if the type is active in the current sitemap configuration.boolean
getIsFormatter()
Checks if this wraps a (non-function) formatter.boolean
getIsFunction()
Checks if this wraps a dynamic function.boolean
getIsResourceType()
Checks if this wraps a resource type.java.lang.String
getName()
Gets the type name.java.lang.String
getNiceName()
Gets the user-readable nice name of the type in the current locale.java.lang.String
getNiceNameKey()
Gets the localization key for the nice name, if one was used, or null otherwise.java.lang.String
getNiceNameRaw()
Gets the raw nice name, without resolving any macros.java.lang.String
niceName(java.util.Locale locale)
Gets the nice name of the type in the given locale.
-
-
-
Constructor Detail
-
CmsResourceTypeInfoWrapper
public CmsResourceTypeInfoWrapper(CmsJspStandardContextBean context, CmsObject cms, CmsADEConfigData config, I_CmsResourceType type)
Creates a new instance.- Parameters:
context
- the standard context beancms
- the current CMS contextconfig
- the current sitemap configurationtype
- the type to wrap
-
-
Method Detail
-
description
public java.lang.String description(java.util.Locale locale)
Gets the description for the type in the given locale.- Specified by:
description
in interfaceI_CmsFormatterInfo
- Parameters:
locale
- the locale to use- Returns:
- the type description
-
formatterInfoForContainer
public java.util.List<CmsFormatterInfoWrapper> formatterInfoForContainer(java.lang.String containerType)
Gets the formatter information beans for a specific container type.- Parameters:
containerType
- the container type- Returns:
- the formatter information
-
getDescription
public java.lang.String getDescription()
Gets the type description in the current locale.- Specified by:
getDescription
in interfaceI_CmsFormatterInfo
- Returns:
- the type description
-
getDescriptionKey
public java.lang.String getDescriptionKey()
Description copied from interface:I_CmsFormatterInfo
Returns the localization key for the description if one was used, and null otherwise.- Specified by:
getDescriptionKey
in interfaceI_CmsFormatterInfo
- Returns:
- the localization key
- See Also:
I_CmsFormatterInfo.getDescriptionKey()
-
getDescriptionRaw
public java.lang.String getDescriptionRaw()
Description copied from interface:I_CmsFormatterInfo
Gets the raw description, without resolving any macros.- Specified by:
getDescriptionRaw
in interfaceI_CmsFormatterInfo
- Returns:
- the raw description
- See Also:
I_CmsFormatterInfo.getDescriptionRaw()
-
getFormatterContainerTypes
public java.util.Set<java.lang.String> getFormatterContainerTypes()
Gets the set of container types configured for any active formatters for this resource type.- Returns:
- the set of container types for formatters
-
getFormatterInfo
public java.util.List<CmsFormatterInfoWrapper> getFormatterInfo()
Gets the formatter information beans for all active formatters for this type.- Returns:
- the formatter information beans
-
getIsActive
public boolean getIsActive()
Returns true if the type is active in the current sitemap configuration.- Specified by:
getIsActive
in interfaceI_CmsFormatterInfo
- Returns:
- true if the type is active
-
getIsFormatter
public boolean 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:
I_CmsFormatterInfo.getIsFormatter()
-
getIsFunction
public boolean 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:
I_CmsFormatterInfo.getIsFunction()
-
getIsResourceType
public boolean 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:
I_CmsFormatterInfo.getIsResourceType()
-
getName
public java.lang.String getName()
Gets the type name.- Specified by:
getName
in interfaceI_CmsFormatterInfo
- Returns:
- the type name
-
getNiceName
public java.lang.String getNiceName()
Gets the user-readable nice name of the type in the current locale.- Specified by:
getNiceName
in interfaceI_CmsFormatterInfo
- Returns:
- the nice name
-
getNiceNameKey
public java.lang.String getNiceNameKey()
Description copied from interface:I_CmsFormatterInfo
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
- See Also:
I_CmsFormatterInfo.getNiceNameKey()
-
getNiceNameRaw
public java.lang.String getNiceNameRaw()
Description copied from interface:I_CmsFormatterInfo
Gets the raw nice name, without resolving any macros.- Specified by:
getNiceNameRaw
in interfaceI_CmsFormatterInfo
- Returns:
- the raw nice name
- See Also:
I_CmsFormatterInfo.getNiceNameRaw()
-
niceName
public java.lang.String niceName(java.util.Locale locale)
Gets the nice name of the type in the given locale.- Specified by:
niceName
in interfaceI_CmsFormatterInfo
- Parameters:
locale
- the locale to use- Returns:
- the nice name for the type
-
-