Class BaseApplicationBean

java.lang.Object
com.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseApplicationBean

public class BaseApplicationBean extends BaseFacesBean

Base class for web and portlet application bean. Provides access to application resources.

Client applications should subclass this base class.

  • Field Details

    • m_sCategory

      protected String m_sCategory
      The text used in the output logs as the category.
    • m_sSubCat

      protected String m_sSubCat
      The text used in the output logs as the sub category.
    • m_LoggerFactoryContext

      protected com.webmethods.sc.logging.log4j2.logger.LoggerFactoryContext m_LoggerFactoryContext
      The logger context.
    • m_LoggerFactory

      protected com.webmethods.sc.logging.log4j2.logger.WmLoggerFactory m_LoggerFactory
      The logger factory.
    • m_JournalLogger

      protected com.webmethods.sc.logging.log4j2.logger.WmJournalLogger m_JournalLogger
      Reference to the logger which is used to log messages in the caf.log file.
  • Constructor Details

    • BaseApplicationBean

      public BaseApplicationBean()
      Default Constructor
  • Method Details

    • getApplicationResources

      @Deprecated public IContentProvider getApplicationResources()
      Deprecated.
    • getApplicationResourcesProvider

      public ResourceBundleContentProvider getApplicationResourcesProvider()
      Returns ResourceBundleContentProvider for this web application for the current locale. The locale is specified by UIViewRoot.getLocale(). The resource bundle base name is specified in Application.getMessageBundle(). If resource bundle cannot be loaded the returned provider is empty.
      Returns:
      instance of ResourceBundleContentProvider for application resource bundle.
    • setJLogFactoryContext

      protected void setJLogFactoryContext()
      Create the logger context from settings in the resource bundle.
    • setLogger

      protected void setLogger()
      Initialized a logger factory with the factory context. Creates a new journal logger using the factory context.
    • setCategoryName

      public void setCategoryName(String sValue)
      Set the String value for the Logging Category.
      Parameters:
      sValue - The text used in the output logs as the category.
    • getCategoryName

      public String getCategoryName()
      Get the String value for the Logging Category.
      Returns:
      The text used in the output logs as the category.
    • setSubCategoryName

      public void setSubCategoryName(String sValue)
      Set the String value for the Logging Sub Category.
      Parameters:
      sValue - The text used in the output logs as the sub category.
    • getSubCategoryName

      public String getSubCategoryName()
      Get the String value for the Logging Sub Category.
      Returns:
      The text used in the output logs as the sub category.
    • getJournalLogger

      public com.webmethods.sc.logging.log4j2.logger.WmJournalLogger getJournalLogger()
      Return a logger that will allow you to log messages to the caf.log file. Any localized resource go into the application resource bundle, not the view resource bundle.
      Returns:
      WmJournalLogger
    • reloadJournalLogger

      public void reloadJournalLogger()
      Releases this copy of the Journal Logger. The next call to getJournalLogger method will get a new logger instance from the logging factory, with the current Category and Project values.