Class CmsProperty.CmsPropertyLocaleTransformer

  • All Implemented Interfaces:
    Enclosing class:

    public static class CmsProperty.CmsPropertyLocaleTransformer
    extends java.lang.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 Summary

      Constructor Description
      CmsPropertyLocaleTransformer​(java.util.Map<java.lang.String,​java.lang.String> properties, java.util.Locale locale)
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String readProperty​(java.lang.String propertyName)
      Looks up a property in m_properties, but returns the localized variant.
      java.lang.Object transform​(java.lang.Object propertyName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CmsPropertyLocaleTransformer

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

      • transform

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

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