Class BackofficeModulesLabelLocatorInit

java.lang.Object
com.hybris.backoffice.cockpitng.util.labels.BackofficeModulesLabelLocatorInit

public class BackofficeModulesLabelLocatorInit extends Object
  • Constructor Details

    • BackofficeModulesLabelLocatorInit

      public BackofficeModulesLabelLocatorInit()
  • Method Details

    • init

      public void init()
      Registers label locators for all backoffice module extensions. Should be specified as init-method if this will be registered as a spring bean.
    • lookupCandidatePropertyFiles

      protected Set<String> lookupCandidatePropertyFiles(String location)
    • createResourcesLabelLocator

      protected com.hybris.cockpitng.util.labels.ResourcesLabelLocator createResourcesLabelLocator(String resourceName)
      Creates a ResourcesLabelLocator with the given resource name and the current location.
    • getAllBackofficeExtensionNames

      protected List<String> getAllBackofficeExtensionNames()
      Returns all backoffice module extension names in build order.
    • getNormalizedLocation

      protected String getNormalizedLocation(String location)
      Removes a possible leading or trailing '/'.
    • setLocation

      public void setLocation(String location)
      Sets the location of the localization files in resources. It must point to the package which contain the files. Example: '/my/path/in/resources/labels'.
      Parameters:
      location - location of the localization files within resources (a package)
    • setName

      public void setName(String name)
      Sets the prefix of the label files. Will be used to locate the labels files in the specified location (@see setLocation(String)). For example: setting the name to 'labels' will look for files with naming scheme labels_.properties where is the code of the current locale. (The default fallback file will be labels.properties in this case.)
      Parameters:
      name - prefix of the label files
    • getLocaleService

      protected com.hybris.cockpitng.i18n.CockpitLocaleService getLocaleService()
    • setLocaleService

      public void setLocaleService(com.hybris.cockpitng.i18n.CockpitLocaleService localeService)