public abstract class HistoryRecord
extends Object
ObjectHistory.duplicateHistory()
Modifier and Type | Field and Description |
---|---|
protected String |
description
A free-form text description.
|
static String |
GenericHistoryRecordType |
protected Object |
object
An object that's associated with this event.
|
protected CDateTime |
timestamp
When this event was first created; should be preserved through copies, saving, etc.
|
protected String |
type
What type event is this -- Charger reserves a few for itself.
|
Constructor and Description |
---|
HistoryRecord() |
Modifier and Type | Method and Description |
---|---|
void |
appendDescription(String description)
Uses newline as a separator by default.
|
void |
appendDescription(String description,
String separator)
Append a new portion to the description, separated by the separator.
|
void |
copyInfoFrom(HistoryRecord he)
Copy this event's information from the event argument.
|
String |
getDescription()
Get an explanatory note for this event.
|
Object |
getObject() |
CDateTime |
getTimestamp()
Get the date/time that this event occurred.
|
String |
getType()
The string identifier for the type of this history event.
|
org.w3c.dom.Document |
makeDocument()
Return the history event DOM tree node for the bare history event.
|
void |
setDescription(String description) |
void |
setObject(Object object) |
void |
setTimestamp(CDateTime timestamp)
Set the date and time that this event occurred.
|
void |
setType(String type) |
String |
toString() |
String |
toXML()
Create an event tag in XML for this history event.
|
public static String GenericHistoryRecordType
protected CDateTime timestamp
protected String description
protected String type
protected Object object
public void copyInfoFrom(HistoryRecord he)
he
- the event to receive the values from this event.public CDateTime getTimestamp()
public void setTimestamp(CDateTime timestamp)
public String getDescription()
public void appendDescription(String description, String separator)
description
- separator
- either a newline or some xml separator.public void appendDescription(String description)
description
- public void setDescription(String description)
public String getType()
public void setType(String type)
public Object getObject()
public void setObject(Object object)
public org.w3c.dom.Document makeDocument()
public String toXML()
indent
- prepend this to every line.public String toString()
toString
in class Object