kom.gateway
Class Build.KOMmt
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--kom.gateway.KomData
|
+--kom.gateway.Build.KOMsub
|
+--kom.gateway.Build.KOMmt
- Direct Known Subclasses:
- Build.KOMmsg, Build.KOMthr
- Enclosing class:
- Build
- public class Build.KOMmt
- extends Build.KOMsub
Class common to threads and messages
- See Also:
- Serialized Form
Field Summary |
(package private) java.lang.String |
mid
|
Fields inherited from class java.util.Hashtable |
count,
ENTRIES,
entrySet,
KEYS,
keySet,
loadFactor,
modCount,
serialVersionUID,
table,
threshold,
values,
VALUES |
Method Summary |
(package private) void |
checkUnews(java.lang.String orig)
Checks if obj is a Usenet News item. |
java.lang.String |
dispNewsArticle(java.lang.StringBuffer sb)
Displays a Usenet News article |
(package private) javax.mail.internet.MimeMessage |
getNewsArticle(java.lang.StringBuffer error)
Gets a NEWS article |
(package private) java.lang.StringBuffer |
getNewsText(java.lang.StringBuffer error,
java.lang.String orig)
Gets a news article from a news server or from a saved copy. |
void |
publish(java.lang.String orig)
Publishes a thread: Starts a thread in an activity |
private boolean |
qlist(Build.KOMmt thr)
Checks if thread/message is part of a "mailing list". |
private void |
sendList(Build.KOMmt thr)
Sends thread/message via email to external members of a
"mailing list". |
java.lang.String |
showNewsArticle(java.lang.StringBuffer sb)
Shows (the relevant parts of) a Usenet News article |
Methods inherited from class kom.gateway.KomData |
add,
create,
debugLog,
display,
disppriv,
errorLog,
get,
getAllData,
getBDATA,
getCDATA,
getData,
getElem,
getKeyList,
getKeys,
getName,
getPDATA,
getStringValues,
getStringVector,
getValues,
init,
isEmpty,
mayput,
normal,
put,
put,
putBDATA,
putCDATA,
putData,
putfirst,
putlast,
putPDATA,
putValue,
qput,
remove,
setName,
setValue,
toString |
Methods inherited from class java.util.Hashtable |
clear,
clone,
contains,
containsKey,
containsValue,
elements,
entrySet,
equals,
get,
hashCode,
isEmpty,
keys,
keySet,
put,
putAll,
readObject,
rehash,
remove,
size,
values,
writeObject |
Methods inherited from class java.lang.Object |
,
finalize,
getClass,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
mid
java.lang.String mid
Build.KOMmt
Build.KOMmt()
Build.KOMmt
Build.KOMmt(java.lang.String ref,
java.lang.String cont)
Build.KOMmt
Build.KOMmt(Build.KOMmt mt)
publish
public void publish(java.lang.String orig)
- Publishes a thread: Starts a thread in an activity
- Overrides:
- publish in class Build.KOMsub
- Parameters:
orig
- Original ref if forwarding
Fields in thrTab (not all are mandatory):
Pid Reference to the thread: /cat/act/thr/ (all numeric)
Ptype Type of object (THR = "t" for thread)
Pmid Message id
Pboard Object type ("plain" for ordinary message)
Cname Subject of message
Pdate Internal date + time (seconds since epoch start)
Phtml "no" for plain text
Bbody Body text (usually)
Pself Author reference
Pauth Author shortname
Pemail Author external email (not essential)
Creal Author plain name (not aliased)
Cuser Author plain name (may be an alias)
rec*: Recipient record, containing
Pid, Ptype for recipient
Prec Recipient object ref
Cname Recipient object plain name
Publish a message (a reply): As above, plus
Pcom: number of referred message in thread.
Pboard = "reply", Ptype = REP, usually.
Pid includes new number in thread.
This method does the following:
Assigns Pnr = number in thread (= 1)
addObject Creates thread object in database: /C/A/T/obj
addThread Adds the object to the "obj*" vector in the thread object
Adds a "cont*" entry to the activity (updates /C/A/cont)
Adds a "U"user"*" record (user from Pself) to /C/A/obj
(markrecs:) Notifies recipients about the new thread.
makecont Updates category contents
qlist
private boolean qlist(Build.KOMmt thr)
- Checks if thread/message is part of a "mailing list".
- Parameters:
thr
- Thread or message- Returns:
- true if it is part of a "mailing list"
sendList
private void sendList(Build.KOMmt thr)
- Sends thread/message via email to external members of a
"mailing list".
- Parameters:
thr
- Thread or message
checkUnews
void checkUnews(java.lang.String orig)
- Checks if obj is a Usenet News item. Retrieves and saves the article
for further reference if so.
- Parameters:
orig
- Pid of original if forwarding
getNewsText
java.lang.StringBuffer getNewsText(java.lang.StringBuffer error,
java.lang.String orig)
- Gets a news article from a news server or from a saved copy.
- Parameters:
obj
- Object referring to the articleerror
- Buffer for any error messageorig
- If we are forwarding, orig refers to original message.
dispNewsArticle
public java.lang.String dispNewsArticle(java.lang.StringBuffer sb)
- Displays a Usenet News article
- Parameters:
sb
- StringBuffer where message text will be appended- Returns:
- message text String, suitable to be used for citation
showNewsArticle
public java.lang.String showNewsArticle(java.lang.StringBuffer sb)
- Shows (the relevant parts of) a Usenet News article
- Parameters:
obj
- Internal data about article (from XOVER, etc)sb
- String buffer- Returns:
- Body text
getNewsArticle
javax.mail.internet.MimeMessage getNewsArticle(java.lang.StringBuffer error)
- Gets a NEWS article
- Parameters:
error
- Buffer for returning any error message- Returns:
- MimeMessage containing the current NEWS article, or null