Class CmsVfsBundleManager

java.lang.Object
org.opencms.i18n.CmsVfsBundleManager
All Implemented Interfaces:
I_CmsEventListener

public class CmsVfsBundleManager extends Object implements I_CmsEventListener
Manages message bundles loaded from the VFS.

  • Field Details

  • Constructor Details

  • Method Details

    • getNameAndLocale

      Extracts the locale and base name from a resource's file name.

      Parameters:
      bundleRes - the resource for which to get the base name and locale
      Returns:
      a bean containing the base name and locale
    • cmsEvent

      public void cmsEvent(CmsEvent event)
      Description copied from interface: I_CmsEventListener
      Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class.
      Specified by:
      cmsEvent in interface I_CmsEventListener
      Parameters:
      event - CmsEvent that has occurred
      See Also:
    • isReloadScheduled

      public boolean isReloadScheduled()
      Indicates if a reload thread is currently scheduled.
      Returns:
      true if a reload is currently scheduled
    • reload

      public void reload(boolean isStartup)
      Re-initializes the resource bundles.

      Parameters:
      isStartup - true when this is called during startup
    • setReloadScheduled

      public void setReloadScheduled(boolean reloadIsScheduled)
      Sets the information if a reload thread is currently scheduled.
      Parameters:
      reloadIsScheduled - if true there is a reload currently scheduled
    • shutDown

      public void shutDown()
      Shuts down the VFS bundle manager.

      This will cause the internal reloading Thread not reload in case it is still running.

    • logError

      protected void logError(Exception e, boolean logToErrorChannel)
      Logs an exception that occurred.

      Parameters:
      e - the exception to log
      logToErrorChannel - if true erros should be written to the error channel instead of the info channel