Class BackofficeModulesLabelLocatorInit
- java.lang.Object
-
- com.hybris.backoffice.cockpitng.util.labels.BackofficeModulesLabelLocatorInit
-
public class BackofficeModulesLabelLocatorInit extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BackofficeModulesLabelLocatorInit()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.hybris.cockpitng.util.labels.ResourcesLabelLocatorcreateResourcesLabelLocator(java.lang.String resourceName)Creates aResourcesLabelLocatorwith 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.CockpitLocaleServicegetLocaleService()protected java.lang.StringgetNormalizedLocation(java.lang.String location)Removes a possible leading or trailing '/'.voidinit()Registers label locators for all backoffice module extensions.protected java.util.Set<java.lang.String>lookupCandidatePropertyFiles(java.lang.String location)voidsetLocaleService(com.hybris.cockpitng.i18n.CockpitLocaleService localeService)voidsetLocation(java.lang.String location)Sets the location of the localization files in resources.voidsetName(java.lang.String name)Sets the prefix of the label files.
-
-
-
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 aResourcesLabelLocatorwith 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 (@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)
-
-