Class BackofficeModulesLabelLocatorInit


  • public class BackofficeModulesLabelLocatorInit
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.hybris.cockpitng.util.labels.ResourcesLabelLocator createResourcesLabelLocator​(java.lang.String resourceName)
      Creates a ResourcesLabelLocator with the given resource name and the current location.
      protected java.util.List<java.lang.String> getAllBackofficeExtensionNames()
      Returns all backoffice module extension names in build order.
      protected com.hybris.cockpitng.i18n.CockpitLocaleService getLocaleService()  
      protected java.lang.String getNormalizedLocation​(java.lang.String location)
      Removes a possible leading or trailing '/'.
      void init()
      Registers label locators for all backoffice module extensions.
      protected java.util.Set<java.lang.String> lookupCandidatePropertyFiles​(java.lang.String location)  
      void setLocaleService​(com.hybris.cockpitng.i18n.CockpitLocaleService localeService)  
      void setLocation​(java.lang.String location)
      Sets the location of the localization files in resources.
      void setName​(java.lang.String name)
      Sets the prefix of the label files.
      • Methods inherited from class java.lang.Object

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

      • BackofficeModulesLabelLocatorInit

        public BackofficeModulesLabelLocatorInit()
    • Method Detail

      • 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 java.util.Set<java.lang.String> lookupCandidatePropertyFiles​(java.lang.String location)
      • createResourcesLabelLocator

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

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

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

        public void setLocation​(java.lang.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​(java.lang.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)