Class CmsMessageToBundleIndex

java.lang.Object
org.opencms.i18n.CmsMessageToBundleIndex

public class CmsMessageToBundleIndex extends Object
A lookup table used to find out which VFS based message bundles (XML/property bundles) contain a given key.
  • Constructor Details

    • CmsMessageToBundleIndex

      public CmsMessageToBundleIndex(Collection<String> bundleNames, Locale locale)
      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 information
      locale - the locale to use
  • Method Details

    • read

      public static CmsMessageToBundleIndex read(CmsObject cms) throws CmsException
      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