|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kom.gateway.DBLow | +--kom.gateway.DBHigh | +--kom.gateway.KOMutil | +--kom.gateway.Form | +--kom.gateway.Chat | +--kom.gateway.Grade | +--kom.gateway.News | +--kom.gateway.Build | +--kom.gateway.SendMail | +--kom.gateway.Action
Processes HTTP requests.
The main method is process
, which returns the result of a POST
request as an HTTP InputStream containing an HTML page.
Inner classes inherited from class kom.gateway.Build |
Build.KOMactivity,
Build.KOMcategory,
Build.KOMhome,
Build.KOMmsg,
Build.KOMmt,
Build.KOMquery,
Build.KOMsub,
Build.KOMthr,
Build.KOMuser |
Inner classes inherited from class kom.gateway.KOMutil |
KOMutil.LookupTables,
KOMutil.UFtable |
Field Summary | |
(package private) static java.lang.String |
CR
|
(package private) static java.lang.String |
CRLF
|
(package private) static java.lang.String |
LF
|
private Overview[] |
ovwt
Table of Usenet News information for current newsgroup |
(package private) HTTPRequestParser |
parser
Provides access to name=value pairs from the request |
Fields inherited from class kom.gateway.Build |
curract,
kBalt,
kBalt2,
kBintro,
kBintro2,
kBrespondents,
kBscale,
kBscale2,
kCnameq,
kCnameq2,
kCnewlocname,
kCnewmembermail,
khead,
kPlogin,
kPloginpw,
kPnewloccat,
kPnewlocshort,
kPopenness,
kPsecret,
kPsecret2,
kstephead,
ksteptail,
ktail,
modified,
qrytable,
SM |
Fields inherited from class kom.gateway.News |
format,
HTML,
limit,
NEWSLIMIT,
PLAIN,
REGULAR,
userObject |
Fields inherited from class kom.gateway.Chat |
oldbody,
oldpres,
reverseChat |
Fields inherited from class kom.gateway.Form |
acceptform,
added,
bodytext,
curform,
formcodes,
isHTML,
isVote,
kBase,
kBbody,
kCname,
kCuser,
kDColor,
kFBase,
KFC,
kHColor,
kIcons,
kKFC,
kLColor,
kPboard,
kPcomm,
kPdate,
kPhtml,
kPhtmldef,
kPinterval,
kPnotif,
kPshort,
kPtype,
kServer,
kTarea,
oldOutput,
outputText,
submitted,
substkey |
Fields inherited from class kom.gateway.KOMutil |
ACT,
anyAccess,
arglist,
argsep,
argtab,
attachments,
BOK,
BOUNDARYSTART,
CAT,
CHA,
cidTable,
CLO,
config,
curNgd,
DIC,
environment,
gateway,
gavePassword,
GEN,
GRA,
GRP,
inlineCurr,
inlines,
INT,
LINE_CUTOFF,
LINE_FUDGE,
LIS,
lt,
MAILIT,
messageRecipientTypeCode,
MIM,
MOD,
N_RECTY,
N_RECTYPECODE,
newsclient,
newsClients,
newsData,
nntpAuth,
NWS,
NWSART,
objCache,
oCurr,
oldnews,
POSTIT,
RAT,
REC_BCC,
REC_CC,
REC_TO,
recTypeCode,
REP,
response,
rLoc,
savednews,
sCursor,
servletBase,
session,
THR,
userData,
USR,
VOT |
Fields inherited from class kom.gateway.DBHigh |
AdminURL,
cache,
HomeURL,
UsersURL |
Fields inherited from class kom.gateway.DBLow |
absCDBpath,
config,
fSep,
fSeparator,
msgAuth,
msgParts |
Constructor Summary | |
Action(ServerConfig config,
HTTPResponse response,
Gateway gateway)
Class constructor |
Method Summary | |
(package private) java.io.InputStream |
Accept()
Accepts or rejects some messages according to form data |
private java.lang.String |
addAddress(java.lang.String addr,
KomData obj,
java.lang.String atyp,
java.lang.String vis)
Adds a recipient record to an object. |
private boolean |
addBatchOfEntries(KomData obj)
Adds a batch of entries to an activity |
private boolean |
addBatchOfUsers(KomData obj)
Adds a batch of users to an activity |
(package private) java.io.InputStream |
AddChat()
Creates a chat entry |
(package private) java.io.InputStream |
AddGen()
Processes a genealogy form to add family data |
(package private) java.io.InputStream |
AddGrades()
Adds grades on some messages |
private void |
addm(KomData ht,
java.lang.String memb,
boolean org,
boolean add,
boolean subrec)
Adds/subtracts a member to/from an activity and vice versa |
(package private) java.io.InputStream |
AddMemb()
Action for ADDMEMB (adds a member or organizer to an activity) |
private void |
addOneEntry(KomData obj,
java.lang.String name,
java.lang.String body)
|
private void |
addOneUser(KomData obj,
java.lang.String name,
java.lang.String login,
java.lang.String email,
java.lang.String pass)
|
(package private) java.io.InputStream |
AddRec()
Forwards a message or thread according to an address form |
(package private) void |
addReceiver(KomData obj,
java.lang.String rectype,
java.lang.String rec,
java.lang.String type,
java.lang.String name)
Adds a recipient record to an object. |
private java.lang.String |
addtype(java.lang.String type,
java.lang.String key,
java.lang.String code,
java.lang.String ptyp)
Updates type codes according to parser data and parent object type |
(package private) void |
addUser()
Adds current user object (defined by userData) to user category |
void |
authData(KomData obj)
Gets author data |
(package private) java.io.InputStream |
CastVote()
Records a vote |
(package private) java.io.InputStream |
CheckMsgPwd()
Checks if the correct password is given for access to a message |
private java.lang.String |
checkNews(java.lang.String name,
KomData obj)
When creating a newsgroup forum, tries to load latest news. |
(package private) java.io.InputStream |
Create()
Creates some object (category, forum, message, etc) |
private boolean |
create1(KomData obj,
java.lang.String name,
java.lang.String pid,
java.lang.String type)
|
java.io.InputStream |
CreateForm()
Creates a query object |
java.lang.String |
createForum(Build.KOMquery q)
Creates a new forum in the Kom database. |
(package private) KomData |
createObject(java.lang.String type)
Creates an object which is an instance of KomData or a subclass of KomData, depending on the type parameter. |
(package private) void |
creUser(java.lang.String pass)
Creates a user object from userData |
private void |
deleteObj(KomData obj)
Marks a message as deleted. |
(package private) java.io.InputStream |
display(java.lang.String uri)
Causes the page corresponding to the uri to be displayed |
(package private) java.io.InputStream |
display(java.lang.String uri,
java.lang.String arg)
Causes the page corresponding to the uri to be displayed |
private void |
distribute(KomData obj,
java.lang.String oldobj)
Distributes an object to its recipients |
(package private) java.lang.String |
emailCheck(java.lang.String em)
Makes sure of no illegal characters (i e embedded spaces) in an e-mail address. |
(package private) KomData |
findDraftObject(java.lang.String ref,
java.lang.String xnr)
Creates an object from a draft |
private java.lang.String |
findRef(java.lang.String name)
|
private java.lang.String |
getAddress(KomData obj,
java.lang.String vis)
Gets addresses from To: and Cc: form input text fields. |
private java.lang.String |
getAllRecs(KomData obj)
Gathers recipients for an object from the submission form |
private java.lang.String |
getBoard(java.lang.String type)
Gets "board id" (object classification) |
private void |
getEmail(java.lang.String name,
java.lang.String loginid,
java.lang.String email)
Determines user email address and saves it in userData. |
private java.lang.String |
getRecs(KomData obj,
java.lang.String vis)
Updates message recipients from form data. |
private boolean |
getShort(java.lang.String type,
java.lang.String name,
KomData obj,
java.lang.String pid)
Gets a short name, suitable as mailbox part of an email address, for the new object. |
(package private) java.lang.String |
getType()
Determines a type code string from form data and parent type. |
private java.lang.String |
getUser(java.lang.String name,
java.lang.String login,
java.lang.String email,
java.lang.String board,
java.lang.String pass)
Gets/creates a user reference |
private java.lang.String |
getXrecs(KomData obj,
java.lang.String vis)
Updates recipient list for message from ticked boxes |
(package private) java.io.InputStream |
Login()
Processes a login form |
private KomData |
makeAddress(java.lang.String addr)
Makes an "address object" |
java.io.InputStream |
process()
Creates an HTTP stream according to value of "command" in URL |
(package private) java.io.InputStream |
queryinvite(Build.KOMthr thr,
java.lang.String rec)
|
(package private) java.io.InputStream |
Register()
Processes a registration form |
(package private) void |
resetUpdate(java.util.Vector ngrcv)
Resets update time for some newsgroup(s) to trigger prompt reload |
(package private) void |
setPartHeaders(Upload u,
java.lang.String uid,
java.lang.String desc,
java.lang.String imgloc)
|
(package private) java.io.InputStream |
SnetLogin()
Processes a Seniornet login form |
Methods inherited from class kom.gateway.SendMail |
addmailaddr,
addRecipients,
addReferences,
closed,
disconnected,
getFrom,
getSender,
inetAddr,
makeCid,
makeContent,
makeMime,
messageDelivered,
messageNotDelivered,
messagePartiallyDelivered,
mkIadd,
opened,
post,
reduceRecipients,
sameAddr,
sendEmail |
Methods inherited from class kom.gateway.Build |
addParts,
addrecs,
build,
buildReferences,
checkCDB,
contentHeaders,
copyParts,
delete,
dispdelete,
dispexcl,
disphelp,
dispinfo,
displogin,
dispmain,
dispnormal,
dispparent,
disppreview,
disprecs,
dispreg,
doLogin,
expunge,
getAct,
getHier,
getKOMmsg,
getKOMmsg,
getMessageId,
getMimeRef,
getMt,
getNewsClient,
getNewsGroupData,
getObj,
getRecop,
getThreads,
getUserNews,
handleOverviews,
history,
logout,
makeBodyPart,
makecont,
makeform,
makehtml,
makeoper,
makerec,
makerec,
makerec,
makeRelatedPart,
makeSimpleHTMLpart,
menufoot,
menuhead,
messageid,
messageid,
mimeChange,
mkmbox,
mkmbox,
moderate,
modifytype,
newMimeBodyPart,
nntpServer,
outpreview,
page,
setDefault,
setDefaults,
setUserValue,
showatts,
special,
store,
xform,
xform,
xform,
xform |
Methods inherited from class kom.gateway.News |
addMem,
bookmarks,
checkNewMemb,
checkUnseen,
countmod,
dispActNews,
dispBook,
dispCatNews,
dispForumNews,
dispLetterNews,
dispModNews,
dispMods,
dispPersNews,
dispSavedNews,
dispSavedQueries,
getRead,
makeNews,
markCat,
markPres,
markrecs,
markSeen,
newVote,
nextUnread,
putShort,
storeNews,
threadno |
Methods inherited from class kom.gateway.Grade |
catover,
cretab,
fetchGrade,
fetchRate,
getEvaluation,
getgrade,
isTeacher,
listover,
newGrade,
printRatings,
showcat,
showgrades,
shownumbers,
showover,
showstud,
showuser |
Methods inherited from class kom.gateway.Chat |
addChat,
chat,
chatFetch,
chatHeader,
chatIndex,
chatInput,
chatList,
chatOut,
chatOutput,
chatStore,
checkEnter,
enter,
isActive,
leave,
leaveChat,
pres,
qchat,
setUser,
transform |
Methods inherited from class kom.gateway.Form |
|
Methods inherited from class kom.gateway.KOMutil |
a,
accessCont,
accessCont,
accessObj,
addInfoData,
addrToLocal,
changeEnvironment,
cidReplace,
contType,
decodeText,
deleted,
dispMailMessage,
doAction,
equal,
excluded,
fetchNews,
findId,
findId,
findlocal,
findLogin,
findOwner,
findUser,
getActId,
getcont,
getcont,
getcontV,
getcontV,
getCurNgd,
getmemb,
getMsgParts,
getMsgText,
getNews,
getNewsAuth,
getobj,
getobject,
getold,
getParent,
getPart,
getSimpleFileName,
getSimpleFileName,
getStream,
getTail,
getTextPart,
getVal,
getVal,
isAllowed,
isarg,
isMember,
isOrganizer,
isOrganizer,
ispunct,
isType,
isValidEmailAddress,
loggedIn,
mailDate,
mailDate,
mimeMessage,
mimeMessageStream,
mkdate,
mkdate,
noQuote,
parseArglist,
parseArgs,
setCids,
setNewsAuth,
setValidMsgPwd,
showBody,
showHeader,
showHeader,
showHeaders,
showInputStream,
showMailMessage,
showMessage,
showMultipart,
toString,
transbody,
urlexpand,
userGavePassword,
userGavePassword,
wrap |
Methods inherited from class kom.gateway.DBHigh |
addContent,
addContent,
addDraft,
addInfo,
addLast,
addMember,
addNews,
addObj,
addObj,
addObject,
addObject,
addQuery,
cleanDrafts,
contentCount,
createNews,
depth,
expungeRef,
findContent,
findDraft,
findDraftData,
findInfo,
findMemb,
findNews,
findObject,
findObject,
findQuery,
getFormContents,
getQryDefault,
getQueries,
getseq,
getStringValues,
getValues,
invalidateCount,
isEmpty,
isStandard,
listDraft,
makeArea,
modObject,
msgExists,
nextDraft,
queryExists,
ref2path,
refExists,
removeDraft,
removeQuery,
replaceObject,
Stream2String,
String2Stream,
StringBuffer2Stream,
updateCount,
updCount,
updref,
updseq |
Methods inherited from class kom.gateway.DBLow |
accessPart,
addFile,
areaExists,
basedRef,
createArea,
debugLog,
errorLog,
expungeFile,
File2Stream,
File2String,
findPart,
getFile,
getFileContents,
getFileStream,
getPath,
getStandard,
isMailSpool,
lastModified,
length,
listFiles,
makePart,
msgPartStream,
partfile,
partpath,
printStackTrace,
readObject,
removeFile,
replaceMime,
updseq1,
validate,
validate,
writeObject |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
Field Detail |
private Overview[] ovwt
HTTPRequestParser parser
static final java.lang.String LF
static final java.lang.String CR
static final java.lang.String CRLF
Constructor Detail |
public Action(ServerConfig config, HTTPResponse response, Gateway gateway)
config
- Configuration dataresponse
- HTTP response data and methodsgateway
- Thread supervisor and reference to common data for this
KOM server instanceMethod Detail |
public java.io.InputStream process()
java.io.InputStream CheckMsgPwd()
java.io.InputStream Register()
private void getEmail(java.lang.String name, java.lang.String loginid, java.lang.String email)
name
- "Common" (free-form) nameloginid
- Short name suitable as a mailbox partemail
- If non-empty, use this (disregarding name and loginid)java.lang.String emailCheck(java.lang.String em)
void creUser(java.lang.String pass)
pass
- password stringvoid addUser()
java.io.InputStream Login()
public java.io.InputStream CreateForm()
public java.lang.String createForum(Build.KOMquery q)
java.io.InputStream SnetLogin()
java.io.InputStream Create()
java.io.InputStream queryinvite(Build.KOMthr thr, java.lang.String rec)
void setPartHeaders(Upload u, java.lang.String uid, java.lang.String desc, java.lang.String imgloc)
private boolean create1(KomData obj, java.lang.String name, java.lang.String pid, java.lang.String type)
KomData createObject(java.lang.String type)
type
- Object type codejava.lang.String getType()
private final java.lang.String addtype(java.lang.String type, java.lang.String key, java.lang.String code, java.lang.String ptyp)
type
- Current type code stringkey
- Parser keycode
- New type code to be added, if not already thereptyp
- Parent object type code(s)private java.lang.String getBoard(java.lang.String type)
type
- type code(s)private boolean getShort(java.lang.String type, java.lang.String name, KomData obj, java.lang.String pid)
type
- Object typename
- Long (presentation) nameobj
- The (new) objectpid
- Object idprivate java.lang.String checkNews(java.lang.String name, KomData obj)
name
- Newsgroup nameobj
- (New) object for the forumpublic void authData(KomData obj)
obj
- Object to updateprivate java.lang.String getAllRecs(KomData obj)
obj
- Object to be displayed/distributedprivate java.lang.String getRecs(KomData obj, java.lang.String vis)
obj
- Object to be sent to recipientsvis
- Current value for "visible" recipientvoid addReceiver(KomData obj, java.lang.String rectype, java.lang.String rec, java.lang.String type, java.lang.String name)
obj
- Object to be updatedrectype
- Type of recipient (rec* or cc*)rec
- Recipient idtype
- Recipient type codename
- Recipient (common) nameprivate java.lang.String getAddress(KomData obj, java.lang.String vis)
obj
- Current objectvis
- Current "primary" addressprivate java.lang.String addAddress(java.lang.String addr, KomData obj, java.lang.String atyp, java.lang.String vis)
addr
- Recipient reference/email addressobj
- Current objectatyp
- Type of address ("rec*" or "cc*")vis
- Current "primary" addressprivate java.lang.String findRef(java.lang.String name)
private java.lang.String getXrecs(KomData obj, java.lang.String vis)
obj
- Object to be sent to recipientsvis
- Current value for "visible" recipientprivate boolean addBatchOfEntries(KomData obj)
obj
- Defines where to put (distribute) entriesprivate void addOneEntry(KomData obj, java.lang.String name, java.lang.String body)
private void distribute(KomData obj, java.lang.String oldobj)
obj
- Object (usually a message)oldobj
- Ref to old version of the object, or nullvoid resetUpdate(java.util.Vector ngrcv)
ngrcv
- Vector of newsgroup recipients in String formprivate void deleteObj(KomData obj)
obj
- Message datajava.io.InputStream AddRec()
java.io.InputStream AddGen()
private KomData makeAddress(java.lang.String addr)
addr
- An internal reference or an e-mail addressjava.io.InputStream AddMemb()
private void addm(KomData ht, java.lang.String memb, boolean org, boolean add, boolean subrec)
ht
- Activity datamemb
- Member reforg
- True for organizeradd
- True for additions, false for subtractionssubrec
- True when removing an Open For linkprivate boolean addBatchOfUsers(KomData obj)
obj
- Defines where to put usersprivate void addOneUser(KomData obj, java.lang.String name, java.lang.String login, java.lang.String email, java.lang.String pass)
private java.lang.String getUser(java.lang.String name, java.lang.String login, java.lang.String email, java.lang.String board, java.lang.String pass)
name
- Common name of userlogin
- Login id of useremail
- E-mail addressboard
- Type of user (icon reference)pass
- User passwordjava.io.InputStream Accept()
java.io.InputStream CastVote()
java.io.InputStream AddChat()
java.io.InputStream AddGrades()
java.io.InputStream display(java.lang.String uri)
uri
- URL of pagejava.io.InputStream display(java.lang.String uri, java.lang.String arg)
uri
- URL of pagearg
- Arguments to be appended to the urlKomData findDraftObject(java.lang.String ref, java.lang.String xnr)
ref
- Object refxnr
- Draft id
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |