Class CmsProperty.CmsPropertyLocaleTransformer

java.lang.Object
org.opencms.file.CmsProperty.CmsPropertyLocaleTransformer
All Implemented Interfaces:
org.apache.commons.collections.Transformer
Enclosing class:
CmsProperty

public static class CmsProperty.CmsPropertyLocaleTransformer extends Object implements org.apache.commons.collections.Transformer
Transforms a given properties map, to a map where the returned values for a property are dependent on the locale.
  • Constructor Details

    • CmsPropertyLocaleTransformer

      public CmsPropertyLocaleTransformer(Map<String,String> properties, Locale locale)
      Default constructor.
      Parameters:
      properties - the "raw" properties map as read for a resource.
      locale - the locale w.r.t. which the properties should be accessed.
  • Method Details

    • transform

      public Object transform(Object propertyName)
      Specified by:
      transform in interface org.apache.commons.collections.Transformer
      See Also:
      • Transformer.transform(java.lang.Object)
    • readProperty

      protected String readProperty(String propertyName)
      Looks up a property in m_properties, but returns the localized variant.
      Parameters:
      propertyName - the property to look up
      Returns:
      the value of the property