Package com.webmethods.caf.faces.bean
Class BaseApplicationBean
java.lang.Object
com.webmethods.caf.faces.bean.BaseFacesBean
com.webmethods.caf.faces.bean.BaseApplicationBean
Base class for web and portlet application bean. Provides access to application resources.
Client applications should subclass this base class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.webmethods.sc.logging.log4j2.logger.WmJournalLogger
Reference to the logger which is used to log messages in the caf.log file.protected com.webmethods.sc.logging.log4j2.logger.WmLoggerFactory
The logger factory.protected com.webmethods.sc.logging.log4j2.logger.LoggerFactoryContext
The logger context.protected String
The text used in the output logs as the category.protected String
The text used in the output logs as the sub category.Fields inherited from class com.webmethods.caf.faces.bean.BaseFacesBean
DATA_BINDING_CLIENTS, EMPTY_RESOURCES, OUTCOME_ERROR, OUTCOME_OK, resourcesProviders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.ReturnsResourceBundleContentProvider
for this web application for the current locale.Get the String value for the Logging Category.com.webmethods.sc.logging.log4j2.logger.WmJournalLogger
Return a logger that will allow you to log messages to the caf.log file.Get the String value for the Logging Sub Category.void
Releases this copy of the Journal Logger.void
setCategoryName
(String sValue) Set theString
value for the Logging Category.protected void
Create the logger context from settings in the resource bundle.protected void
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, createMethodExpression, createValueBinding, createValueExpression, createValueExpression, error, error, error, error, error, getBean, getFacesContext, getLocale, getResourceInputStream, getResources, getResourcesProvider, getRootCause, getStackTrace, getTreeAttribute, isUserInRole, log, log, log, putTreeAttribute, resetDataBindingClients, resolveDataBinding, resolveDataBinding, resolveExpression, setValue
-
Field Details
-
m_sCategory
The text used in the output logs as the category. -
m_sSubCat
The text used in the output logs as the sub category. -
m_LoggerFactoryContext
protected com.webmethods.sc.logging.log4j2.logger.LoggerFactoryContext m_LoggerFactoryContextThe logger context. -
m_LoggerFactory
protected com.webmethods.sc.logging.log4j2.logger.WmLoggerFactory m_LoggerFactoryThe logger factory. -
m_JournalLogger
protected com.webmethods.sc.logging.log4j2.logger.WmJournalLogger m_JournalLoggerReference 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. -
getApplicationResourcesProvider
ReturnsResourceBundleContentProvider
for this web application for the current locale. The locale is specified byUIViewRoot.getLocale()
. The resource bundle base name is specified inApplication.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
Set theString
value for the Logging Category.- Parameters:
sValue
- The text used in the output logs as the category.
-
getCategoryName
Get the String value for the Logging Category.- Returns:
- The text used in the output logs as the category.
-
setSubCategoryName
Set the String value for the Logging Sub Category.- Parameters:
sValue
- The text used in the output logs as the sub category.
-
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.
-