org.goetz.domino.log4j
Class LogDocument

java.lang.Object
  extended byorg.goetz.domino.log4j.LogDocument

public class LogDocument
extends java.lang.Object

This class provides a container for log documents in a Domino application.

Author:
Bernd G?tz

Field Summary
protected static java.lang.String DEFAULT_FORM_NAME
          Default form name.
protected static int DEFAULT_MAX_LINES
          The number of LoggingEvents to log in a singel Domino document.
protected static int MAX_DOCUMENT_SIZE
          The maximum to write to a document is 32kB.
protected static int UPPER_SIZE_LIMIT
          The upper limit in bytes where to stop writing to a document.
 
Constructor Summary
LogDocument()
           
LogDocument(java.lang.String name, java.lang.String path, java.lang.String name2, java.lang.String name3, java.util.Date time)
           
 
Method Summary
 void add(java.lang.String s)
          Adds a single line to the document.
 java.lang.String getApplicationName()
           
 java.lang.String getApplicationPath()
           
 java.lang.String getCurrentDocId()
           
 int getCurrentLines()
           
 int getCurrentSize()
           
 java.lang.String getDatabaseName()
           
 java.util.Vector getEvents()
           
 java.util.Date getFinishTime()
           
 java.lang.String getFormName()
           
 int getMaxLines()
           
 java.lang.String getMessage()
           
 java.lang.String getServerName()
           
 java.util.Date getStartTime()
           
 boolean isDirty()
           
 boolean isFull()
           
 boolean messageContainsUserVariable()
          Returns true if the current message contains the variable "%u".
 void reset(java.util.Date startTime)
          Resets the current log document.
 void setApplicationName(java.lang.String applicationName)
           
 void setApplicationPath(java.lang.String applicationPath)
           
 void setCurrentDocId(java.lang.String currentDocId)
           
 void setDatabaseName(java.lang.String databaseName)
           
 void setFinishTime(java.util.Date finishTime)
           
 void setFormName(java.lang.String formName)
           
 void setMaxLines(int lines)
           
 void setMessage(java.lang.String message)
          Sets the message string and the
 void setServerName(java.lang.String serverName)
           
 void setStartTime(java.util.Date startTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_LINES

protected static final int DEFAULT_MAX_LINES
The number of LoggingEvents to log in a singel Domino document.

See Also:
Constant Field Values

DEFAULT_FORM_NAME

protected static final java.lang.String DEFAULT_FORM_NAME
Default form name.

See Also:
Constant Field Values

UPPER_SIZE_LIMIT

protected static final int UPPER_SIZE_LIMIT
The upper limit in bytes where to stop writing to a document.

See Also:
Constant Field Values

MAX_DOCUMENT_SIZE

protected static final int MAX_DOCUMENT_SIZE
The maximum to write to a document is 32kB.

See Also:
Constant Field Values
Constructor Detail

LogDocument

public LogDocument()

LogDocument

public LogDocument(java.lang.String name,
                   java.lang.String path,
                   java.lang.String name2,
                   java.lang.String name3,
                   java.util.Date time)
Method Detail

reset

public void reset(java.util.Date startTime)
Resets the current log document.

Parameters:
startTime -

getApplicationName

public java.lang.String getApplicationName()

getApplicationPath

public java.lang.String getApplicationPath()

getFinishTime

public java.util.Date getFinishTime()

setFinishTime

public void setFinishTime(java.util.Date finishTime)

getFormName

public java.lang.String getFormName()

getServerName

public java.lang.String getServerName()

getStartTime

public java.util.Date getStartTime()

getEvents

public java.util.Vector getEvents()

add

public void add(java.lang.String s)
Adds a single line to the document.

Parameters:
s -

getCurrentSize

public int getCurrentSize()

getCurrentLines

public int getCurrentLines()

setApplicationName

public void setApplicationName(java.lang.String applicationName)

setApplicationPath

public void setApplicationPath(java.lang.String applicationPath)

setFormName

public void setFormName(java.lang.String formName)

setServerName

public void setServerName(java.lang.String serverName)

setStartTime

public void setStartTime(java.util.Date startTime)

getDatabaseName

public java.lang.String getDatabaseName()

setDatabaseName

public void setDatabaseName(java.lang.String databaseName)

getMessage

public java.lang.String getMessage()

setMessage

public void setMessage(java.lang.String message)
Sets the message string and the

Parameters:
message -

messageContainsUserVariable

public boolean messageContainsUserVariable()
Returns true if the current message contains the variable "%u". The current value is determined by calling the method setMessage() .

Returns:
true if message contains the variable "%u"

getMaxLines

public int getMaxLines()

setMaxLines

public void setMaxLines(int lines)

isFull

public boolean isFull()

getCurrentDocId

public java.lang.String getCurrentDocId()

setCurrentDocId

public void setCurrentDocId(java.lang.String currentDocId)

isDirty

public boolean isDirty()


Copyright © -2008 . All Rights Reserved.