com.ibm.commerce.ras
Class LogConfiguration

java.lang.Object
  |
  +--com.ibm.commerce.ras.LogConfiguration

public final class LogConfiguration
extends java.lang.Object

Stores the configuration data for WCS Logging Service. The WCS Logging Service retrieve all the configuration data from an unique instance of LogConfiguration class.


Nested Class Summary
static class LogConfiguration.Parameters
          Defines the parameters used for WCS Logging Service configuration
 
Field Summary
static java.lang.String COPYRIGHT
          IBM copyright notice field.
 
Constructor Summary
protected LogConfiguration()
          Constructor for LogConfiguration .
 
Method Summary
 void disableLoadingXMLNode()
          Disables loading the XML node
protected  void enableLoadingXMLNode()
          Enables loading the XML node
 AS400 getAs400()
          Returns the as400 object.
 org.w3c.dom.Node getConfigNode()
          Returns the configuration node return configuration node
 boolean getJrasEnabled()
          Gets the jrasEnabled.
 java.util.Vector getProperties(java.lang.String propertyKey)
          Returns Vector of properties based on the specified key
static  LogConfiguration getUniqueInstance()
          Gets an unqiue instance of LogConfiguration.
 void initialize(java.lang.String xmlConfigFileName)
          Initializes the log configuration.
 void initialize(java.lang.String xmlConfigFileName, AS400 as400)
          Initializes the log configuration.
 void initialize(java.lang.String xmlConfigFileName, java.lang.String instanceName, boolean jras)
          Initializes the log configuration by parsing the xml
static void main(java.lang.String[] args)
          Runs a testing.
 void messageEnable(boolean enable)
          Loads the status of message logging.
 void setAs400(AS400 as400)
          Sets the as400 object.
 void setCompactFormat(boolean enableCompact)
          Sets the compact format of message log.
 void setConfigNode(org.w3c.dom.Node newConfigNode)
          Sets the configuration node.
 void setInstanceName(java.lang.String instanceName)
          Sets the instance name.
 void setJrasEnabled(boolean jrasEnabled)
          Sets the jras enabled status.
 void setLogFileName(java.lang.String logFileName)
          Sets the file name of the log file.
 void setLogFileSize(long MBsize)
          Sets the file size of the Log file
 void setLogSeverity(java.util.Vector severities)
          Sets the message logging severities.
 void setNotificationEnable(boolean enableNotification)
          Sets the status of error notification.
 void setTraceComponents(java.util.Vector components)
          Sets the status of tracing components.
 void setTraceFileName(java.lang.String logFileName)
          Sets the file name of the Trace file.
 void setTraceFileSize(long MBsize)
          Sets the file size of the Trace file.
 void traceEnable(boolean enable)
          Sets the status of tracing subsystem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM copyright notice field.
See Also:
Constant Field Values
Constructor Detail

LogConfiguration

protected LogConfiguration()
Constructor for LogConfiguration .
Method Detail

disableLoadingXMLNode

public void disableLoadingXMLNode()
Disables loading the XML node

enableLoadingXMLNode

protected void enableLoadingXMLNode()
Enables loading the XML node

getConfigNode

public org.w3c.dom.Node getConfigNode()
Returns the configuration node return configuration node

getProperties

public java.util.Vector getProperties(java.lang.String propertyKey)
Returns Vector of properties based on the specified key
Parameters:
propertyKey - properties key
Returns:
vector of properties

getUniqueInstance

public static LogConfiguration getUniqueInstance()
Gets an unqiue instance of LogConfiguration.
Returns:
unqiue instance of LogConfiguration

initialize

public void initialize(java.lang.String xmlConfigFileName)
Initializes the log configuration.
Parameters:
xmlConfigFileName - log configuration file

initialize

public void initialize(java.lang.String xmlConfigFileName,
                       AS400 as400)
Initializes the log configuration.
Parameters:
xmlConfigFileName - log configuration file

initialize

public void initialize(java.lang.String xmlConfigFileName,
                       java.lang.String instanceName,
                       boolean jras)
Initializes the log configuration by parsing the xml
Parameters:
xmlConfigFileName - log configuration file
instanceName - instance name
jras - true if JRas is used as logging mechanism; false otherwise

main

public static void main(java.lang.String[] args)
Runs a testing.

messageEnable

public void messageEnable(boolean enable)
Loads the status of message logging.
Parameters:
enable - true if message logging is enabled

setCompactFormat

public void setCompactFormat(boolean enableCompact)
Sets the compact format of message log.
Parameters:
enableCompact - true if compact format is used; false otherwise

setConfigNode

public void setConfigNode(org.w3c.dom.Node newConfigNode)
Sets the configuration node.
Parameters:
newConfigNode - configuration node

setInstanceName

public void setInstanceName(java.lang.String instanceName)
Sets the instance name.
Parameters:
instanceName - instance name

setLogFileName

public void setLogFileName(java.lang.String logFileName)
Sets the file name of the log file.
Parameters:
logFileName - output log file name

setLogFileSize

public void setLogFileSize(long MBsize)
Sets the file size of the Log file
Parameters:
MBsize - maximum size of the log file

setLogSeverity

public void setLogSeverity(java.util.Vector severities)
Sets the message logging severities.
Parameters:
severities - message logging severities

setNotificationEnable

public void setNotificationEnable(boolean enableNotification)
Sets the status of error notification.
Parameters:
enableNotification - true if error notification is enabled; false otherwise

setTraceComponents

public void setTraceComponents(java.util.Vector components)
Sets the status of tracing components.
Parameters:
components - list of tracing components.

setTraceFileName

public void setTraceFileName(java.lang.String logFileName)
Sets the file name of the Trace file.
Parameters:
logFileName - trace file name

setTraceFileSize

public void setTraceFileSize(long MBsize)
Sets the file size of the Trace file.
Parameters:
MBsize - maximum trace file size

traceEnable

public void traceEnable(boolean enable)
Sets the status of tracing subsystem.
Parameters:
enable - true if tracing subsystem is enabled; false otherise

getJrasEnabled

public boolean getJrasEnabled()
Gets the jrasEnabled.
Returns:
true if jras is used for logging; false otherwise

setJrasEnabled

public void setJrasEnabled(boolean jrasEnabled)
Sets the jras enabled status.
Parameters:
jrasEnabled - true if jras is used for logging; false otherwise

getAs400

public AS400 getAs400()
Returns the as400 object.
Returns:
An AS400 object.

setAs400

public void setAs400(AS400 as400)
Sets the as400 object.
Parameters:
as400 - The as400 to set.