org.webdocwf.util.loader
Class EchoElement

java.lang.Object
  |
  +--org.webdocwf.util.loader.EchoElement

public class EchoElement
extends java.lang.Object

EchoElement - Element in parallel to importDefinitions and sql's. The message is to be printed in the log output (screen and logfile) in logmode normal and logmode full.


Field Summary
static java.lang.String LOGMODE_FULL
           
static java.lang.String LOGMODE_NONE
           
static java.lang.String LOGMODE_NORMAL
           
 
Constructor Summary
EchoElement()
          Public constructor of EchoElement class.
EchoElement(java.io.File output)
          Public constructor of EchoElement class.
EchoElement(java.lang.String mode)
          Public constructor of EchoElement class.
EchoElement(java.lang.String mode, java.io.File output)
          Public constructor of EchoElement class.
 
Method Summary
 boolean createLog(java.lang.String logDir, java.lang.String fileName)
          Metod createLog is used to create log file.
 java.io.File getLogFile()
          Read log file
 java.lang.String getLogMode()
          Read logMode
 java.lang.String getMessage(java.lang.String key)
          Metod getMessage is used to read echo message from Hashtable for key value
 void setLogFile(java.io.File output)
          Set Log file.
 void setLogMode(java.lang.String mode)
          Set log mode.
 boolean setMessage(java.lang.String key, java.lang.String value)
          Metod setMessage is used to put echo message into Hashtable
 boolean writeEcho(java.lang.String strLogTxt)
          Metod writeEcho is used to put strLogTxt into log file and on screen depending on the logMode.
 boolean writeToLog(java.lang.String strLogMode, java.lang.String strLogTxt)
          Metod writeToLog is used to put strLogTxt into log file and on screen depending on the logMode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGMODE_NORMAL

public static final java.lang.String LOGMODE_NORMAL
See Also:
Constant Field Values

LOGMODE_NONE

public static final java.lang.String LOGMODE_NONE
See Also:
Constant Field Values

LOGMODE_FULL

public static final java.lang.String LOGMODE_FULL
See Also:
Constant Field Values
Constructor Detail

EchoElement

public EchoElement()
Public constructor of EchoElement class.


EchoElement

public EchoElement(java.io.File output)
Public constructor of EchoElement class. Constructor set log file.


EchoElement

public EchoElement(java.lang.String mode)
Public constructor of EchoElement class. Constructor set log mode value.


EchoElement

public EchoElement(java.lang.String mode,
                   java.io.File output)
Public constructor of EchoElement class. Constructor set log mode and log file.

Method Detail

getLogMode

public java.lang.String getLogMode()
Read logMode

Returns:
String mode value

setLogMode

public void setLogMode(java.lang.String mode)
Set log mode.


getLogFile

public java.io.File getLogFile()
Read log file

Returns:
File log file

setLogFile

public void setLogFile(java.io.File output)
Set Log file.


setMessage

public boolean setMessage(java.lang.String key,
                          java.lang.String value)
Metod setMessage is used to put echo message into Hashtable

Parameters:
key - Key value for messages (e.g number of echo element in import definition.
value - String message.

getMessage

public java.lang.String getMessage(java.lang.String key)
Metod getMessage is used to read echo message from Hashtable for key value

Parameters:
key - Key value for message.
Returns:
value String message.

writeEcho

public boolean writeEcho(java.lang.String strLogTxt)
Metod writeEcho is used to put strLogTxt into log file and on screen depending on the logMode. If status param logMode is equal or greater then the logMode defined in XML, the exportToLOg method will be done.

Parameters:
strLogTxt - Text for the screen and log.

writeToLog

public boolean writeToLog(java.lang.String strLogMode,
                          java.lang.String strLogTxt)
Metod writeToLog is used to put strLogTxt into log file and on screen depending on the logMode. If status param logMode is equal or greater then the logMode defined in XML, the exportToLOg method will be done.

Parameters:
strLogMode - Log modes defined in XML file are "none", "normal" or "full"
strLogTxt - Text for the screen and log.

createLog

public boolean createLog(java.lang.String logDir,
                         java.lang.String fileName)
                  throws LoaderException
Metod createLog is used to create log file. Name of the file include day, month, year, our and minute of the moment the load method is started. File is created in Directory LoaderLog that is subdirectory of working directory or directory that is argument of Loader.

Parameters:
logDir - log directory
fileName - Name of log file - if value is "default" Loader creates default lo file.
LoaderException


Copyright © 2002-2003 Together - the Workgroup. All Rights Reserved.