Class BackofficeModulesLabelLocatorInit
java.lang.Object
com.hybris.backoffice.cockpitng.util.labels.BackofficeModulesLabelLocatorInit
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.hybris.cockpitng.util.labels.ResourcesLabelLocatorcreateResourcesLabelLocator(String resourceName) Creates aResourcesLabelLocatorwith the given resource name and the current location.Returns all backoffice module extension names in build order.protected com.hybris.cockpitng.i18n.CockpitLocaleServiceprotected StringgetNormalizedLocation(String location) Removes a possible leading or trailing '/'.voidinit()Registers label locators for all backoffice module extensions.lookupCandidatePropertyFiles(String location) voidsetLocaleService(com.hybris.cockpitng.i18n.CockpitLocaleService localeService) voidsetLocation(String location) Sets the location of the localization files in resources.voidSets the prefix of the label files.
-
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
-
createResourcesLabelLocator
protected com.hybris.cockpitng.util.labels.ResourcesLabelLocator createResourcesLabelLocator(String resourceName) Creates aResourcesLabelLocatorwith the given resource name and the current location. -
getAllBackofficeExtensionNames
Returns all backoffice module extension names in build order. -
getNormalizedLocation
Removes a possible leading or trailing '/'. -
setLocation
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
Sets the prefix of the label files. Will be used to locate the labels files in the specified location (@seesetLocation(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)
-