Package org.opencms.file
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 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
Constructors 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 inm_properties
, but returns the localized variant.java.lang.Object
transform(java.lang.Object propertyName)
-
-
-
Constructor Detail
-
CmsPropertyLocaleTransformer
public CmsPropertyLocaleTransformer(java.util.Map<java.lang.String,java.lang.String> properties, java.util.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 Detail
-
transform
public java.lang.Object transform(java.lang.Object propertyName)
- Specified by:
transform
in interfaceorg.apache.commons.collections.Transformer
- See Also:
Transformer.transform(java.lang.Object)
-
readProperty
protected java.lang.String readProperty(java.lang.String propertyName)
Looks up a property inm_properties
, but returns the localized variant.- Parameters:
propertyName
- the property to look up- Returns:
- the value of the property
-
-