Package org.opencms.i18n
Class CmsMessageToBundleIndex
java.lang.Object
org.opencms.i18n.CmsMessageToBundleIndex
A lookup table used to find out which VFS based message bundles (XML/property bundles) contain a given key.
-
Constructor Summary
ConstructorDescriptionCmsMessageToBundleIndex
(Collection<String> bundleNames, Locale locale) Creates a new instance that will read its data from a given set of bundles. -
Method Summary
Modifier and TypeMethodDescriptionGets the root path of the bundle file for the given message key.static CmsMessageToBundleIndex
Reads the bundle information for the whole system.
-
Constructor Details
-
CmsMessageToBundleIndex
Creates a new instance that will read its data from a given set of bundles.- Parameters:
bundleNames
- the set of bundle names from which to read the informationlocale
- the locale to use
-
-
Method Details
-
read
Reads the bundle information for the whole system.This uses the request context locale of the CmsObject passed as an argument.
- Parameters:
cms
- the CMS context to use- Returns:
- the bundle information
- Throws:
CmsException
- if something goes wrong
-
getBundlesPathForKey
Gets the root path of the bundle file for the given message key.If no bundle is found, null is returned.
- Parameters:
key
- the message key- Returns:
- the bundle root path
-