com.webmethods.caf.faces.bean
Class BaseApplicationBean

java.lang.Object
  extended by com.webmethods.caf.faces.bean.BaseFacesBean
      extended by 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 Summary
protected  WmJournalLogger m_JournalLogger
          Reference to the logger which is used to log messages in the caf.log file.
protected  WmLoggerFactory m_LoggerFactory
          The logger factory.
protected  LoggerFactoryContext m_LoggerFactoryContext
          The logger context.
protected  String m_sCategory
          The text used in the output logs as the category.
protected  String m_sSubCat
          The text used in the output logs as the sub category.
 
Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
DATA_BINDING_CLIENTS, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
 
Constructor Summary
BaseApplicationBean()
          Default Constructor
 
Method Summary
 IContentProvider getApplicationResources()
          Deprecated.  
 ResourceBundleContentProvider getApplicationResourcesProvider()
          Returns ResourceBundleContentProvider for this web application for the current locale.
 String getCategoryName()
          Get the String value for the Logging Category.
 WmJournalLogger getJournalLogger()
          Return a logger that will allow you to log messages to the caf.log file.
 String getSubCategoryName()
          Get the String value for the Logging Sub Category.
 void reloadJournalLogger()
          Releases this copy of the Journal Logger.
 void setCategoryName(String sValue)
          Set the String value for the Logging Category.
protected  void setJLogFactoryContext()
          Create the logger context from settings in the resource bundle.
protected  void setLogger()
          Initialized a logger factory with the factory context.
 void setSubCategoryName(String sValue)
          Set the String value for the Logging Sub Category.
 
Methods inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
createMethodBinding, createValueBinding, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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 LoggerFactoryContext m_LoggerFactoryContext
The logger context.


m_LoggerFactory

protected WmLoggerFactory m_LoggerFactory
The logger factory.


m_JournalLogger

protected WmJournalLogger m_JournalLogger
Reference to the logger which is used to log messages in the caf.log file.

Constructor Detail

BaseApplicationBean

public BaseApplicationBean()
Default Constructor

Method Detail

getApplicationResources

public IContentProvider getApplicationResources()
Deprecated. 

Use BaseApplicationBean.getApplicationResourcesProvider()


getApplicationResourcesProvider

public ResourceBundleContentProvider getApplicationResourcesProvider()
Returns ResourceBundleContentProvider for this web application for the current locale. The locale is specified by UIViewRoot. The resource bundle base name is specified in Application. 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 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.