CMCommon
, JournalEntry
, CMObject
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class DefaultJournalEntry extends java.lang.Object implements JournalEntry
JournalEntry.JournalAttrib
Modifier and Type | Field | Description |
---|---|---|
java.util.List<java.lang.String> |
attachments |
|
long |
attributes |
|
int |
cardinal |
|
java.lang.String |
data |
|
long |
date |
|
java.lang.String |
dateStr |
|
java.lang.StringBuffer |
derivedBuildMessage |
|
long |
expiration |
|
java.lang.String |
from |
|
int |
hashCode |
|
boolean |
isLastEntry |
|
java.lang.String |
key |
|
protected java.lang.String |
knownClockName |
|
java.lang.String |
msg |
|
java.lang.String |
msgIcon |
|
java.lang.String |
parent |
|
int |
replies |
|
java.lang.String |
subj |
|
java.lang.String |
to |
|
long |
update |
|
int |
views |
idConverter
Constructor | Description |
---|---|
DefaultJournalEntry() |
Modifier and Type | Method | Description |
---|---|---|
java.util.List<java.lang.String> |
attachmentKeys() |
Returns any attachment vfs keys for this entry.
|
long |
attributes() |
The attribute flags for this entry
|
JournalEntry |
attributes(long attributes) |
Sets the attribute flags for this entry
|
int |
cardinal() |
The cardinal entry number for the journal entry.
|
JournalEntry |
cardinal(int cardinal) |
Sets the cardinal entry number for the journal entry.
|
int |
compareTo(JournalEntry o) |
Compares two journal entry objects to each other
|
int |
compareTo(CMObject o) |
|
JournalEntry |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
java.lang.String |
data() |
The "image path" or, for mailboxes, the Journal Name this mail served as a source for.
|
JournalEntry |
data(java.lang.String data) |
Sets the "image path" or, for mailboxes, the Journal Name this mail served as a source for.
|
long |
date() |
The date/time, in ms, that the message was posted
|
protected JournalEntry |
date(long date) |
|
java.lang.String |
dateStr() |
The date/time, in ms, coded, or "", that the message was posted
|
JournalEntry |
dateStr(java.lang.String date) |
Sets the date/time, in ms, coded, or "", that the message was posted
|
java.lang.StringBuffer |
derivedBuildMessage() |
The friendly viewable form of this message in the command line.
|
JournalEntry |
derivedBuildMessage(java.lang.StringBuffer msg) |
The friendly viewable form of this message in the command line.
|
long |
expiration() |
The date/time, in ms, that the message will expire
|
JournalEntry |
expiration(long expiration) |
Sets the date/time, in ms, that the message will expire
|
java.lang.String |
from() |
The author of the entry
|
JournalEntry |
from(java.lang.String from) |
Sets the author of the entry
|
TimeClock |
getKnownClock() |
If the dateStr for this message was set as an in-game clock,
then this will attempt to derive the specific clock used
and then return it.
|
java.lang.String |
getXML() |
Returns an xml representation of this entry.
|
int |
hashCode() |
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
boolean |
isLastEntry() |
Returns whether this is the last entry in the db.
|
java.lang.String |
key() |
The fully unique key for this entry, unique across all entries in all books and journals
|
JournalEntry |
key(java.lang.String key) |
Sets the fully unique key for this entry, unique across all entries in all books and journals
|
JournalEntry |
lastEntry(boolean lastEntry) |
Sets whether this is the last entry in the db
|
java.lang.String |
msg() |
The content of the entry.
|
JournalEntry |
msg(java.lang.String msg) |
Sets the content of the entry.
|
java.lang.String |
msgIcon() |
The image icon for forum entries
|
JournalEntry |
msgIcon(java.lang.String msgIcon) |
Sets the image icon for forum entries
|
java.lang.String |
name() |
The displayable name of this object.
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
java.lang.String |
parent() |
The entry key of the entry that this entry is a reply to
|
JournalEntry |
parent(java.lang.String parent) |
Sets the entry key of the entry that this entry is a reply to
|
int |
replies() |
The number of replies to this entry.
|
JournalEntry |
replies(int replies) |
Sets he number of replies to this entry.
|
void |
setXML(java.lang.String xml) |
Sets an entry based on the given xml.
|
java.lang.String |
subj() |
The subject of the entry
|
JournalEntry |
subj(java.lang.String subj) |
Sets the subject of the entry
|
java.lang.String |
to() |
Who the entry is for, usually ALL
|
JournalEntry |
to(java.lang.String to) |
Sets who the entry is for, usually ALL
|
long |
update() |
The date/time, in ms, that the message was updated
|
JournalEntry |
update(long update) |
Sets the date/time, in ms, that the message was updated
|
int |
views() |
The number of views of this entry
|
JournalEntry |
views(int views) |
Sets the number of views of this entry
|
public java.lang.String key
public java.lang.String from
public java.lang.String to
public java.lang.String subj
public java.lang.String msg
public java.lang.String dateStr
public long date
public long update
public long expiration
public java.lang.String parent
public long attributes
public java.lang.String data
public int cardinal
public java.lang.String msgIcon
public int replies
public int views
public int hashCode
public boolean isLastEntry
public java.util.List<java.lang.String> attachments
public java.lang.StringBuffer derivedBuildMessage
protected java.lang.String knownClockName
public java.lang.String ID()
CMObject
public java.lang.String name()
CMObject
name
in interface CMObject
Environmental.Name()
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public int compareTo(CMObject o)
compareTo
in interface java.lang.Comparable<CMObject>
public java.lang.String key()
JournalEntry
key
in interface JournalEntry
public JournalEntry key(java.lang.String key)
JournalEntry
key
in interface JournalEntry
key
- the keypublic java.lang.String from()
JournalEntry
from
in interface JournalEntry
public JournalEntry from(java.lang.String from)
JournalEntry
from
in interface JournalEntry
from
- author of the entrypublic java.lang.String to()
JournalEntry
to
in interface JournalEntry
public JournalEntry to(java.lang.String to)
JournalEntry
to
in interface JournalEntry
to
- who the entry is for, usually ALLpublic java.lang.String subj()
JournalEntry
subj
in interface JournalEntry
public JournalEntry subj(java.lang.String subj)
JournalEntry
subj
in interface JournalEntry
subj
- the subject of the entrypublic java.lang.String msg()
JournalEntry
msg
in interface JournalEntry
public JournalEntry msg(java.lang.String msg)
JournalEntry
msg
in interface JournalEntry
msg
- the content of the entry.public long date()
JournalEntry
date
in interface JournalEntry
protected JournalEntry date(long date)
public java.lang.String dateStr()
JournalEntry
dateStr
in interface JournalEntry
public JournalEntry dateStr(java.lang.String date)
JournalEntry
dateStr
in interface JournalEntry
date
- the date/time, in ms, coded, or "", that the message was postedpublic TimeClock getKnownClock()
JournalEntry
getKnownClock
in interface JournalEntry
public long update()
JournalEntry
update
in interface JournalEntry
public JournalEntry update(long update)
JournalEntry
update
in interface JournalEntry
update
- the date/time, in ms, that the message was updatedpublic long expiration()
JournalEntry
expiration
in interface JournalEntry
public JournalEntry expiration(long expiration)
JournalEntry
expiration
in interface JournalEntry
expiration
- the date/time, in ms, that the message will expirepublic java.lang.String parent()
JournalEntry
parent
in interface JournalEntry
public JournalEntry parent(java.lang.String parent)
JournalEntry
parent
in interface JournalEntry
parent
- the entry key of the entry that this entry is a reply topublic long attributes()
JournalEntry
attributes
in interface JournalEntry
public JournalEntry attributes(long attributes)
JournalEntry
attributes
in interface JournalEntry
attributes
- the attribute flags for this entrypublic java.lang.String data()
JournalEntry
data
in interface JournalEntry
public JournalEntry data(java.lang.String data)
JournalEntry
data
in interface JournalEntry
data
- the "image path" or, for mailboxes, the Journal Name this mail served as a source for.public int cardinal()
JournalEntry
cardinal
in interface JournalEntry
public JournalEntry cardinal(int cardinal)
JournalEntry
cardinal
in interface JournalEntry
cardinal
- the cardinal entry number for the journal entry.public java.lang.String msgIcon()
JournalEntry
msgIcon
in interface JournalEntry
public JournalEntry msgIcon(java.lang.String msgIcon)
JournalEntry
msgIcon
in interface JournalEntry
msgIcon
- the image icon for forum entriespublic int replies()
JournalEntry
replies
in interface JournalEntry
public JournalEntry replies(int replies)
JournalEntry
replies
in interface JournalEntry
replies
- the number of replies to this entry.public int views()
JournalEntry
views
in interface JournalEntry
public JournalEntry views(int views)
JournalEntry
views
in interface JournalEntry
views
- the number of views of this entrypublic java.util.List<java.lang.String> attachmentKeys()
JournalEntry
attachmentKeys
in interface JournalEntry
public boolean isLastEntry()
JournalEntry
isLastEntry
in interface JournalEntry
public JournalEntry lastEntry(boolean lastEntry)
JournalEntry
lastEntry
in interface JournalEntry
lastEntry
- whether this is the last entry in the dbpublic java.lang.StringBuffer derivedBuildMessage()
JournalEntry
derivedBuildMessage
in interface JournalEntry
public JournalEntry derivedBuildMessage(java.lang.StringBuffer msg)
JournalEntry
derivedBuildMessage
in interface JournalEntry
msg
- the friendly messagepublic int compareTo(JournalEntry o)
JournalEntry
compareTo
in interface JournalEntry
o
- another journal entry objpublic java.lang.String getXML()
JournalEntry
getXML
in interface JournalEntry
public int hashCode()
hashCode
in class java.lang.Object
public void setXML(java.lang.String xml)
JournalEntry
setXML
in interface JournalEntry
xml
- the xml to use.public JournalEntry copyOf()
CMObject
copyOf
in interface CMObject
copyOf
in interface JournalEntry