Package org.apache.hop.ui.i18n
Class BundlesStore
- java.lang.Object
-
- org.apache.hop.ui.i18n.BundlesStore
-
public class BundlesStore extends Object
-
-
Constructor Summary
Constructors Constructor Description BundlesStore()BundlesStore(String rootFolder)Let's look at all the messages bundle package root folders.BundlesStore(List<String> bundleRootFolders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBundleFile(String packageName, String language, BundleFile bundleFile)voidaddTranslation(String sourceFolder, String packageName, String locale, String key, String value)voidfindAllMessagesBundles()BundleFilefindBundleFile(String packageName, String locale)Map<String,String>findTranslations(String packageName, String key)List<BundleFile>getBundleFiles(String packageName, String locale)Get the bundle file for the given package of all bundles for the locale if the package name is null.List<String>getBundleRootFolders()Gets bundleRootFoldersList<BundleFile>getChangedBundleFiles()Map<String,Map<String,BundleFile>>getPackageLanguageBundleMap()Gets packageLanguageBundleMapStringlookupTranslation(String packageName, String locale, String key)voidremoveTranslation(String packageName, String locale, String key)voidsetBundleRootFolders(List<String> bundleRootFolders)voidsetPackageLanguageBundleMap(Map<String,Map<String,BundleFile>> packageLanguageBundleMap)
-
-
-
Constructor Detail
-
BundlesStore
public BundlesStore()
-
BundlesStore
public BundlesStore(String rootFolder) throws HopException
Let's look at all the messages bundle package root folders. We only look at src/main/resources/ Avoid impl folders- Parameters:
rootFolder-- Throws:
HopException
-
-
Method Detail
-
findAllMessagesBundles
public void findAllMessagesBundles() throws HopException- Throws:
HopException
-
addBundleFile
public void addBundleFile(String packageName, String language, BundleFile bundleFile)
-
addTranslation
public void addTranslation(String sourceFolder, String packageName, String locale, String key, String value)
-
getChangedBundleFiles
public List<BundleFile> getChangedBundleFiles()
-
getBundleFiles
public List<BundleFile> getBundleFiles(String packageName, String locale)
Get the bundle file for the given package of all bundles for the locale if the package name is null.- Parameters:
packageName- The package name or null if you want all files for a localelocale- The locale to search for- Returns:
- The bundle files
-
findBundleFile
public BundleFile findBundleFile(String packageName, String locale)
-
getBundleRootFolders
public List<String> getBundleRootFolders()
Gets bundleRootFolders- Returns:
- value of bundleRootFolders
-
setBundleRootFolders
public void setBundleRootFolders(List<String> bundleRootFolders)
- Parameters:
bundleRootFolders- The bundleRootFolders to set
-
getPackageLanguageBundleMap
public Map<String,Map<String,BundleFile>> getPackageLanguageBundleMap()
Gets packageLanguageBundleMap- Returns:
- value of packageLanguageBundleMap
-
setPackageLanguageBundleMap
public void setPackageLanguageBundleMap(Map<String,Map<String,BundleFile>> packageLanguageBundleMap)
- Parameters:
packageLanguageBundleMap- The packageLanguageBundleMap to set
-
-