org.naftulin.configmgr.content
Class Log4JRecordImpl

java.lang.Object
  extended by org.naftulin.configmgr.content.AbstractRecordImpl
      extended by org.naftulin.configmgr.content.Log4JRecordImpl

public class Log4JRecordImpl
extends AbstractRecordImpl

Represents a log4j entry, with it's key and log4j file name. Intended to mirror master configuration rules for log4j xml or properties configuration. The external configuraton xml is:

        <log4j key="log4j_key" fileName="log4j xml or property file name" />
 

Since:
1.0
Author:
Henry Henry

Constructor Summary
Log4JRecordImpl()
          Constructs a record without specifying the key or file name.
Log4JRecordImpl(java.lang.String key, java.lang.String fileName)
          Constructs a record with the key and file name specified.
 
Method Summary
 ConfigEntryParser getParser()
          Returns an instance of either Dom or properties parser that can parse the log4j file and (re)initialize log4j.
 
Methods inherited from class org.naftulin.configmgr.content.AbstractRecordImpl
getFileName, getKey, isGetUrlForFile, setFileName, setKey, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Log4JRecordImpl

public Log4JRecordImpl()
Constructs a record without specifying the key or file name.


Log4JRecordImpl

public Log4JRecordImpl(java.lang.String key,
                       java.lang.String fileName)
Constructs a record with the key and file name specified.

Parameters:
key - the key associated with the record.
fileName - the file name associated with the record.
Method Detail

getParser

public ConfigEntryParser getParser()
                            throws ConfigurationManagerException
Returns an instance of either Dom or properties parser that can parse the log4j file and (re)initialize log4j.

Specified by:
getParser in class AbstractRecordImpl
Returns:
the parser that can parse the file to extract the configuration.
Throws:
ConfigurationManagerException - if an error occured while instantiating the parser.


Copyright © 2009. All Rights Reserved.