kom.gateway
Class Build.KOMthr

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--kom.gateway.KomData
                    |
                    +--kom.gateway.Build.KOMsub
                          |
                          +--kom.gateway.Build.KOMmt
                                |
                                +--kom.gateway.Build.KOMthr
Enclosing class:
Build

public class Build.KOMthr
extends Build.KOMmt

Class representing a KOM message thread. The actual thread is realized as an array of KOMmsg objects.

See Also:
Serialized Form

Field Summary
(package private)  Build.KOMmsg[] msgs
          Actual thread (message list)
 
Fields inherited from class kom.gateway.Build.KOMmt
mid
 
Fields inherited from class kom.gateway.Build.KOMsub
id, parent
 
Fields inherited from class kom.gateway.KomData
ADDKEYANY, ADDKEYFIRST, ADDKEYLAST
 
Fields inherited from class java.util.Hashtable
count, ENTRIES, entrySet, KEYS, keySet, loadFactor, modCount, serialVersionUID, table, threshold, values, VALUES
 
Constructor Summary
(package private) Build.KOMthr()
           
(package private) Build.KOMthr(Build.KOMmsg msg)
          Creates a KOMthr from a KOMmsg.
(package private) Build.KOMthr(Build.KOMthr thr)
          Clone
(package private) Build.KOMthr(java.lang.String ref, java.lang.String cont)
          Constructs object from ref or String representation
 
Method Summary
 void addThread(Build.KOMmt msg, java.lang.String pn)
          Adds a message to a thread
 Build.KOMmsg asKOMmsg(int n)
          Makes a KOMmsg from a KOMthr.
private  void displist()
          Displays thread TOC (one line per message)
(package private)  void dispmenu()
          Displays menu for a thread
private  void disppart(int part)
          Displays a message (a thread part)
private  int dispthread()
          Displays all messages in the thread
 void expand()
          Creates msgs array from thread data
 int forward(KomData rt, int pt)
          Copies a thread (or a single message) to a (new) recipient.
 Build.KOMmsg[] getMsgs()
          Gets message array (actual thread)
private  Build.KOMmsg[] getThreadArray(java.lang.String id, Build.KOMactivity act)
          Gets a thread (an array of messages) from a newsgroup
 Build.KOMmsg getThreadPart(int part)
          Gets a KOMmsg from the thread
 Build.KOMmsg getThreadPart(java.lang.String part)
          Gets a KOMmsg from the thread
private  boolean isOpen()
           
private  void modthr()
          Shows form for modifying a thread
private  void modthr1(KomData pt)
           
 void normal()
          Shows a message thread (may be just one message)
 
Methods inherited from class kom.gateway.Build.KOMmt
checkUnews, dispNewsArticle, getNewsArticle, getNewsText, publish, qlist, sendList, showNewsArticle
 
Methods inherited from class kom.gateway.Build.KOMsub
commented, dispgen, dispmemb, establishId, istype, mkcont, putid
 
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, 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
 

Field Detail

msgs

Build.KOMmsg[] msgs
Actual thread (message list)
Constructor Detail

Build.KOMthr

Build.KOMthr()

Build.KOMthr

Build.KOMthr(Build.KOMthr thr)
Clone

Build.KOMthr

Build.KOMthr(Build.KOMmsg msg)
Creates a KOMthr from a KOMmsg.
Parameters:
msg - An object created as a KOMmsg, to be transmogrified

Build.KOMthr

Build.KOMthr(java.lang.String ref,
             java.lang.String cont)
Constructs object from ref or String representation
Parameters:
ref - Thread id (used for retrieving data from database) or null
cont - Contents (toString() value), or null
Method Detail

getThreadArray

private Build.KOMmsg[] getThreadArray(java.lang.String id,
                                      Build.KOMactivity act)
Gets a thread (an array of messages) from a newsgroup
Parameters:
id - Thread id
ht - Authentication object
Returns:
KOMmsg array for the thread

getMsgs

public Build.KOMmsg[] getMsgs()
Gets message array (actual thread)
Returns:
(updated) message array

asKOMmsg

public Build.KOMmsg asKOMmsg(int n)
Makes a KOMmsg from a KOMthr.
Parameters:
n - count of sub-objects, all except the first to be removed
Returns:
First message in thread as an object

expand

public void expand()
Creates msgs array from thread data

addThread

public void addThread(Build.KOMmt msg,
                      java.lang.String pn)
Adds a message to a thread
Parameters:
msg - Data for a new message in the thread
pn - Part number in thread

dispmenu

void dispmenu()
Displays menu for a thread

normal

public void normal()
Shows a message thread (may be just one message)
Overrides:
normal in class KomData

modthr

private void modthr()
Shows form for modifying a thread

modthr1

private void modthr1(KomData pt)

dispthread

private int dispthread()
Displays all messages in the thread
Returns:
last part number displayed

isOpen

private boolean isOpen()

displist

private void displist()
Displays thread TOC (one line per message)

disppart

private void disppart(int part)
Displays a message (a thread part)
Parameters:
part - Part number in thread

getThreadPart

public Build.KOMmsg getThreadPart(java.lang.String part)
Gets a KOMmsg from the thread
Parameters:
part - Part number ("Pnr" value) as String
Returns:
Message part, or null

getThreadPart

public Build.KOMmsg getThreadPart(int part)
Gets a KOMmsg from the thread
Parameters:
part - Part number ("Pnr" value) as int
Returns:
Message part, or null

forward

public int forward(KomData rt,
                   int pt)
Copies a thread (or a single message) to a (new) recipient.
Parameters:
rt - Recipient data
pt - Part number, 0 if whole thread
Returns:
1 if recipient is an email address, 2 for a newsgroup, 0 otherwise