kom.gateway
Class ServerConfig

java.lang.Object
  |
  +--kom.tools.config.Config
        |
        +--kom.tools.web.HTTPConfig
              |
              +--kom.gateway.ServerConfig

public class ServerConfig
extends HTTPConfig

Configuration data for KOM 2000


Field Summary
 boolean allowForward
          True if forwarding should be allowed
 boolean allowQueries
          True if queries should be allowed
 boolean anonymous
          True if anonymous contributions are allowed
 boolean createCategory
          True if anybody should be able to create a category
 boolean createForum
          True if anybody should be able to create a forum
 boolean createQueryAnon
          True if anonymous user should be able to create a query
 java.lang.String darkColor
          Colour code for dark background and some links in HTML pages
(package private)  boolean dispLocation
          If set, rely on the Location header to cause the page to be displayed
(package private)  boolean doRating
          If true, deploy rating additions to HTML pages
(package private)  boolean formDebug
          If true, ids of used form templates are shown in HTML comments
 boolean handleNews
          True if it should be possible to connect to UseNet News
 java.lang.String headColor
          Colour code for header and menu backgrounds in HTML pages
 java.lang.String iconBase
          Icon URI relative to document root
 java.lang.String komMailDom
          Domain for email to/from this KOM 2000 server
 java.lang.String komMailDomAlias
          Domain alias for email to this KOM 2000 server
protected  java.lang.String komSection
          Id of KOM part of config
 java.lang.String lightColor
          Colour code for light background in HTML pages
 int mailCheckingInterval
          Interval for checking the incoming mail spool, seconds
 int mailDebug
          Non-zero for debugging of mail interface
 java.lang.String mailDir
          Spool directory for incoming mail
 java.lang.String mailHost
          Mail server (MTA) domain
 int mailNotificationInterval
          Interval for the mail notification process, seconds
 int maxClients
          Max no of connected clients
 java.lang.String nntpLoad
          Default number of NEWS articles to download on connection
 java.lang.String nntpServer
          Domain of preferred NNTP server, i e "news@some.org".
 boolean notifyByEmail
          True if this server should send news notifications by email
 boolean publicGrades
          True if grades are public by default
 java.lang.String selectTexttype
          Text type for entries.
 java.lang.String serverName
          The "published" name of the KOM 2000 server
 java.lang.String servletBase
          Servlet root (designation of this KOM 2000 server) relative to document root
 boolean showUsers
          True if the category Users is to be shown
 java.lang.String snetChatURL
          Special URL for SeniorNet chat
 int timeout
          Timeout for the gateway, in seconds
 java.lang.String uiLang
          Interface language designation, i e "sv", "en"
 
Fields inherited from class kom.tools.web.HTTPConfig
admin, allowHosts, debugLogFile, debugWriter, defaultThreads, denyHosts, errorFile, fSeparator, host, KOMroot, maxThreads, minThreads, numThreads, port, preload, timeOut, uploadDir
 
Fields inherited from class kom.tools.config.Config
currentParameter, currentSection, errorCode, errorLine, FILE_OPEN_ERROR, fileName, NO_ERROR, sections, SYNTAX_ERROR
 
Constructor Summary
ServerConfig(java.lang.String fileName)
          Constructor
 
Method Summary
 java.lang.String getHelp(java.lang.String htmlPage)
          Gets the name of the html help file for the specified html page (type)
 boolean read()
          Reads and parses the configuration file
private  void settings()
          Converts configuration file data to internal form
 
Methods inherited from class kom.tools.web.HTTPConfig
debugLog, errorLog, errorMsg
 
Methods inherited from class kom.tools.config.Config
getPara, getPara, getPara, getPara, getSections, getValue, getValues, handleLine, main, section
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

maxClients

public int maxClients
Max no of connected clients

timeout

public int timeout
Timeout for the gateway, in seconds

uiLang

public java.lang.String uiLang
Interface language designation, i e "sv", "en"

serverName

public java.lang.String serverName
The "published" name of the KOM 2000 server

handleNews

public boolean handleNews
True if it should be possible to connect to UseNet News

nntpServer

public java.lang.String nntpServer
Domain of preferred NNTP server, i e "news@some.org". May also specify port (default "domain:119")

nntpLoad

public java.lang.String nntpLoad
Default number of NEWS articles to download on connection

komMailDom

public java.lang.String komMailDom
Domain for email to/from this KOM 2000 server

komMailDomAlias

public java.lang.String komMailDomAlias
Domain alias for email to this KOM 2000 server

mailDir

public java.lang.String mailDir
Spool directory for incoming mail

mailCheckingInterval

public int mailCheckingInterval
Interval for checking the incoming mail spool, seconds

servletBase

public java.lang.String servletBase
Servlet root (designation of this KOM 2000 server) relative to document root

iconBase

public java.lang.String iconBase
Icon URI relative to document root

mailDebug

public int mailDebug
Non-zero for debugging of mail interface

mailHost

public java.lang.String mailHost
Mail server (MTA) domain

notifyByEmail

public boolean notifyByEmail
True if this server should send news notifications by email

mailNotificationInterval

public int mailNotificationInterval
Interval for the mail notification process, seconds

anonymous

public boolean anonymous
True if anonymous contributions are allowed

publicGrades

public boolean publicGrades
True if grades are public by default

createCategory

public boolean createCategory
True if anybody should be able to create a category

createForum

public boolean createForum
True if anybody should be able to create a forum

createQueryAnon

public boolean createQueryAnon
True if anonymous user should be able to create a query

showUsers

public boolean showUsers
True if the category Users is to be shown

allowQueries

public boolean allowQueries
True if queries should be allowed

allowForward

public boolean allowForward
True if forwarding should be allowed

selectTexttype

public java.lang.String selectTexttype
Text type for entries. Possible values: all: Let the user choose no: Always simple text, HTML not allowed smart: Guess if simple text or HTML yes: Always HTML

snetChatURL

public java.lang.String snetChatURL
Special URL for SeniorNet chat

lightColor

public java.lang.String lightColor
Colour code for light background in HTML pages

darkColor

public java.lang.String darkColor
Colour code for dark background and some links in HTML pages

headColor

public java.lang.String headColor
Colour code for header and menu backgrounds in HTML pages

dispLocation

boolean dispLocation
If set, rely on the Location header to cause the page to be displayed

doRating

boolean doRating
If true, deploy rating additions to HTML pages

formDebug

boolean formDebug
If true, ids of used form templates are shown in HTML comments

komSection

protected final java.lang.String komSection
Id of KOM part of config
Constructor Detail

ServerConfig

public ServerConfig(java.lang.String fileName)
Constructor
Parameters:
fileName - path to configuration file, which will be parsed
Method Detail

settings

private void settings()
Converts configuration file data to internal form
Overrides:
settings in class HTTPConfig

getHelp

public java.lang.String getHelp(java.lang.String htmlPage)
Gets the name of the html help file for the specified html page (type)
Parameters:
htmlPage - Page id

read

public boolean read()
Reads and parses the configuration file
Overrides:
read in class HTTPConfig
Returns:
true if syntax was ok