Class ConfigurationManager
- java.lang.Object
-
- org.apache.log4j.lf5.viewer.configure.ConfigurationManager
-
public class ConfigurationManager extends java.lang.Object
ConfigurationManager handles the storage and retrival of the state of the CategoryExplorer
-
-
Field Summary
Fields Modifier and Type Field Description private LogBrokerMonitor
_monitor
private LogTable
_table
private static java.lang.String
BLUE
private static java.lang.String
CATEGORY
private static java.lang.String
COLORLEVEL
private static java.lang.String
COLUMN
private static java.lang.String
CONFIG_FILE_NAME
private static java.lang.String
EXPANDED
private static java.lang.String
FIRST_CATEGORY_NAME
private static java.lang.String
GREEN
private static java.lang.String
LEVEL
private static java.lang.String
NAME
private static java.lang.String
NDCTEXTFILTER
private static java.lang.String
PATH
private static java.lang.String
RED
private static java.lang.String
SELECTED
-
Constructor Summary
Constructors Constructor Description ConfigurationManager(LogBrokerMonitor monitor, LogTable table)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
closeConfigurationXML(java.lang.StringBuffer xml)
protected void
collapseTree()
protected void
deleteConfigurationFile()
private void
exportLogLevelColorXMLElement(java.lang.String label, java.awt.Color color, java.lang.StringBuffer xml)
private void
exportLogLevelXMLElement(java.lang.String label, boolean selected, java.lang.StringBuffer xml)
private void
exportLogTableColumnXMLElement(java.lang.String label, boolean selected, java.lang.StringBuffer xml)
private void
exportXMLElement(CategoryNode node, javax.swing.tree.TreePath path, java.lang.StringBuffer xml)
protected java.lang.String
getFilename()
protected java.lang.String
getValue(org.w3c.dom.NamedNodeMap map, java.lang.String attr)
protected void
load()
private void
openConfigurationXML(java.lang.StringBuffer xml)
private void
openXMLDocument(java.lang.StringBuffer xml)
protected void
processCategories(org.w3c.dom.Document doc)
private void
processConfigurationNode(CategoryNode node, java.lang.StringBuffer xml)
private void
processLogLevelColors(java.util.Map logLevelMenuItems, java.util.Map logLevelColors, java.lang.StringBuffer xml)
protected void
processLogLevelColors(org.w3c.dom.Document doc)
private void
processLogLevels(java.util.Map logLevelMenuItems, java.lang.StringBuffer xml)
protected void
processLogLevels(org.w3c.dom.Document doc)
private void
processLogRecordFilter(java.lang.String text, java.lang.StringBuffer xml)
private void
processLogTableColumns(java.util.List logTableColumnMenuItems, java.lang.StringBuffer xml)
protected void
processLogTableColumns(org.w3c.dom.Document doc)
protected void
processRecordFilter(org.w3c.dom.Document doc)
void
reset()
void
save()
protected void
selectAllNodes()
protected void
store(java.lang.String s)
static java.lang.String
treePathToString(javax.swing.tree.TreePath path)
-
-
-
Field Detail
-
CONFIG_FILE_NAME
private static final java.lang.String CONFIG_FILE_NAME
- See Also:
- Constant Field Values
-
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
-
PATH
private static final java.lang.String PATH
- See Also:
- Constant Field Values
-
SELECTED
private static final java.lang.String SELECTED
- See Also:
- Constant Field Values
-
EXPANDED
private static final java.lang.String EXPANDED
- See Also:
- Constant Field Values
-
CATEGORY
private static final java.lang.String CATEGORY
- See Also:
- Constant Field Values
-
FIRST_CATEGORY_NAME
private static final java.lang.String FIRST_CATEGORY_NAME
- See Also:
- Constant Field Values
-
LEVEL
private static final java.lang.String LEVEL
- See Also:
- Constant Field Values
-
COLORLEVEL
private static final java.lang.String COLORLEVEL
- See Also:
- Constant Field Values
-
RED
private static final java.lang.String RED
- See Also:
- Constant Field Values
-
GREEN
private static final java.lang.String GREEN
- See Also:
- Constant Field Values
-
BLUE
private static final java.lang.String BLUE
- See Also:
- Constant Field Values
-
COLUMN
private static final java.lang.String COLUMN
- See Also:
- Constant Field Values
-
NDCTEXTFILTER
private static final java.lang.String NDCTEXTFILTER
- See Also:
- Constant Field Values
-
_monitor
private LogBrokerMonitor _monitor
-
_table
private LogTable _table
-
-
Constructor Detail
-
ConfigurationManager
public ConfigurationManager(LogBrokerMonitor monitor, LogTable table)
-
-
Method Detail
-
save
public void save()
-
reset
public void reset()
-
treePathToString
public static java.lang.String treePathToString(javax.swing.tree.TreePath path)
-
load
protected void load()
-
processRecordFilter
protected void processRecordFilter(org.w3c.dom.Document doc)
-
processCategories
protected void processCategories(org.w3c.dom.Document doc)
-
processLogLevels
protected void processLogLevels(org.w3c.dom.Document doc)
-
processLogLevelColors
protected void processLogLevelColors(org.w3c.dom.Document doc)
-
processLogTableColumns
protected void processLogTableColumns(org.w3c.dom.Document doc)
-
getValue
protected java.lang.String getValue(org.w3c.dom.NamedNodeMap map, java.lang.String attr)
-
collapseTree
protected void collapseTree()
-
selectAllNodes
protected void selectAllNodes()
-
store
protected void store(java.lang.String s)
-
deleteConfigurationFile
protected void deleteConfigurationFile()
-
getFilename
protected java.lang.String getFilename()
-
processConfigurationNode
private void processConfigurationNode(CategoryNode node, java.lang.StringBuffer xml)
-
processLogLevels
private void processLogLevels(java.util.Map logLevelMenuItems, java.lang.StringBuffer xml)
-
processLogLevelColors
private void processLogLevelColors(java.util.Map logLevelMenuItems, java.util.Map logLevelColors, java.lang.StringBuffer xml)
-
processLogTableColumns
private void processLogTableColumns(java.util.List logTableColumnMenuItems, java.lang.StringBuffer xml)
-
processLogRecordFilter
private void processLogRecordFilter(java.lang.String text, java.lang.StringBuffer xml)
-
openXMLDocument
private void openXMLDocument(java.lang.StringBuffer xml)
-
openConfigurationXML
private void openConfigurationXML(java.lang.StringBuffer xml)
-
closeConfigurationXML
private void closeConfigurationXML(java.lang.StringBuffer xml)
-
exportXMLElement
private void exportXMLElement(CategoryNode node, javax.swing.tree.TreePath path, java.lang.StringBuffer xml)
-
exportLogLevelXMLElement
private void exportLogLevelXMLElement(java.lang.String label, boolean selected, java.lang.StringBuffer xml)
-
exportLogLevelColorXMLElement
private void exportLogLevelColorXMLElement(java.lang.String label, java.awt.Color color, java.lang.StringBuffer xml)
-
exportLogTableColumnXMLElement
private void exportLogTableColumnXMLElement(java.lang.String label, boolean selected, java.lang.StringBuffer xml)
-
-