com.jaxfront.core.dom
Class LogEntry

java.lang.Object
  extended by com.jaxfront.core.dom.LogEntry

public class LogEntry
extends java.lang.Object

A log entry holds the state of a change within the target DOM at a certain time. Every log knows the source type, old value, log level, action name and the time where the change occured.


Constructor Summary
LogEntry(Type source, DOMChangeEvent event, java.lang.String logLevel, java.lang.String oldValue)
          Createa a new LogEntry based on a source type, a logLevel and the old value.
LogEntry(Type aType, long action, java.lang.String logLevel, java.lang.String propertyName, java.lang.String oldValue, java.lang.String newValue, long time)
          Createa a new LogEntry based on a source type, a logLevel and the old value.
LogEntry(Type source, java.beans.PropertyChangeEvent event, java.lang.String logLevel, java.lang.String oldValue)
          Createa a new LogEntry based on a source type, a logLevel and the old value.
 
Method Summary
 void dump()
          Dumps the state of this log entry to the System.out.
 boolean equals(java.lang.Object obj)
           
 long getAction()
          Returns the action type of this log entry.
 java.lang.String getName()
           
 java.lang.String getNewValue()
           
 java.lang.String getOldValue()
          Returns the forerunner value of the source.
 Type getSource()
          Returns the source of the log entry.
 long getTime()
          Returns the time in millisecond when the log entry has been created or updated.
 boolean isValueChange()
           
 void refresh()
          Refreshes the occured time and the _action status.
 void refreshTime()
          Refreshes the occured time to the current time.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogEntry

public LogEntry(Type source,
                DOMChangeEvent event,
                java.lang.String logLevel,
                java.lang.String oldValue)
Createa a new LogEntry based on a source type, a logLevel and the old value.

Parameters:
source - of the change
event - DOMChangeEvent that has occured (removing or adding of a list entry)
logLevel - indicates the logLevel
oldValue - defines the forerunner value

LogEntry

public LogEntry(Type aType,
                long action,
                java.lang.String logLevel,
                java.lang.String propertyName,
                java.lang.String oldValue,
                java.lang.String newValue,
                long time)
Createa a new LogEntry based on a source type, a logLevel and the old value.

Parameters:
source - of the change
event - PropertyChangeEvent that has occured (removing or adding of a list entry)
logLevel - indicates the logLevel
oldValue - defines the forerunner value

LogEntry

public LogEntry(Type source,
                java.beans.PropertyChangeEvent event,
                java.lang.String logLevel,
                java.lang.String oldValue)
Createa a new LogEntry based on a source type, a logLevel and the old value.

Parameters:
source - of the change
event - PropertyChangeEvent that has occured (removing or adding of a list entry)
logLevel - indicates the logLevel
oldValue - defines the forerunner value
Method Detail

dump

public void dump()
Dumps the state of this log entry to the System.out.


equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getAction

public long getAction()
Returns the action type of this log entry. If no action is defined return -1.


getName

public java.lang.String getName()

getNewValue

public java.lang.String getNewValue()

getOldValue

public java.lang.String getOldValue()
Returns the forerunner value of the source.


getSource

public Type getSource()
Returns the source of the log entry.


getTime

public long getTime()
Returns the time in millisecond when the log entry has been created or updated.


isValueChange

public boolean isValueChange()

refresh

public void refresh()
Refreshes the occured time and the _action status.


refreshTime

public void refreshTime()
Refreshes the occured time to the current time.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object