Class ExtensionLocalizationProperties

java.lang.Object
de.hybris.platform.integrationservices.util.files.ExtensionLocalizationProperties
All Implemented Interfaces:
LocalizedProperties

public class ExtensionLocalizationProperties extends Object implements LocalizedProperties
Represents localization properties in a resource/localization/<extension_name>-locales_<language_code>.properties file. This implementation is not aware of the possible property keys in a backoffice extensions and can be used only for testing item type and attribute localization.
  • Method Details

    • getItemProperties

      public Collection<PropertyKey> getItemProperties()
      Description copied from interface: LocalizedProperties
      Retrieves all properties in this file localizing item types.
      Specified by:
      getItemProperties in interface LocalizedProperties
      Returns:
      item type properties in this file or an empty collection, if this file does not contain item type properties.
    • getPropertiesNotMatchingNamingConventions

      public Collection<String> getPropertiesNotMatchingNamingConventions()
      Retrieves all properties that do not match naming conventions accepted for this localization properties file.

      This method finds all invalid, i.e. not following the naming conventions, properties in this file.

      Specified by:
      getPropertiesNotMatchingNamingConventions in interface LocalizedProperties
      Returns:
      localization property keys that do not match the naming convention or an empty collection, if all properties match the naming conventions for this localization properties file or, if this file is empty and does not contain any localization properties.
      See Also:
    • keyExistsForItem

      public boolean keyExistsForItem(String itemType)
      Description copied from interface: LocalizedProperties
      Verifies if there is a key in the relevant property file for the specified item type.
      Specified by:
      keyExistsForItem in interface LocalizedProperties
      Parameters:
      itemType - the item type which we are verifying that exists in the properties file
      Returns:
      whether the key is present or not in the file
    • keyExistsForAttribute

      public boolean keyExistsForAttribute(String itemType, String attribute)
      Description copied from interface: LocalizedProperties
      Verifies if there is a key in the relevant property file for the specified item type attribute.
      Specified by:
      keyExistsForAttribute in interface LocalizedProperties
      Parameters:
      itemType - the item type of the attribute which we are looking for
      attribute - the attribute which we are verifying that exists in the properties file
      Returns:
      whether the attribute is present or not in the file
    • getAttributeProperties

      public Collection<PropertyKey> getAttributeProperties()
      Description copied from interface: LocalizedProperties
      Retrieves all property keys for an item attribute localization in this file.
      Specified by:
      getAttributeProperties in interface LocalizedProperties
      Returns:
      a collection of all attribute properties in this file or an empty collection, if this file does not contain attribute properties.
    • getValidPropertiesWithoutValues

      public Collection<String> getValidPropertiesWithoutValues()
      Description copied from interface: LocalizedProperties
      Retrieves all properties with names following the naming conventions for this localization file but not having values.
      Specified by:
      getValidPropertiesWithoutValues in interface LocalizedProperties
      Returns:
      a collection of properties without localized values or an empty collection, if all properties are localized or this file is empty.