issrg.SAWS
Class LogFilenameClass

java.lang.Object
  extended by issrg.SAWS.LogFilenameClass

public class LogFilenameClass
extends java.lang.Object

Author:
W.Xu

Constructor Summary
LogFilenameClass()
          Creates a new instance of LogFilenameClass
LogFilenameClass(int debugLevel)
           
 
Method Summary
 java.lang.String findLatestLogFileName(java.lang.String logFileRoot)
          This method is for finding the latest log file name in the log root directory.
 java.lang.String generateNewLogFileName()
          This method is for generating the new log file name in UTC format in the log root directory.
 int getLastLogSequence()
          This method is for finding out the last sequence number of the log files in the destination directory.
 java.lang.String getPreviousLogFilename(java.lang.String logFileRoot, java.lang.String logFilename)
          This method is for finding the latest log file name created prior to the given logFilename in the log root directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogFilenameClass

public LogFilenameClass()
Creates a new instance of LogFilenameClass


LogFilenameClass

public LogFilenameClass(int debugLevel)
Method Detail

generateNewLogFileName

public java.lang.String generateNewLogFileName()
This method is for generating the new log file name in UTC format in the log root directory.

Returns:
the new log file name in UTC format.

getPreviousLogFilename

public java.lang.String getPreviousLogFilename(java.lang.String logFileRoot,
                                               java.lang.String logFilename)
This method is for finding the latest log file name created prior to the given logFilename in the log root directory.

Parameters:
logFilename - String is the given log filename.
Returns:
the latest log file name created prior to the given logFilename. If not exists, return null.

findLatestLogFileName

public java.lang.String findLatestLogFileName(java.lang.String logFileRoot)
This method is for finding the latest log file name in the log root directory.

Parameters:
null -
Returns:
the current log file name. If not exists, return null.

getLastLogSequence

public int getLastLogSequence()
This method is for finding out the last sequence number of the log files in the destination directory.

Parameters:
null -
Returns:
the sequence number in the name string of the last log file; if non exists, then return -1.