Votorola

votorola.a
Class Pollserver

java.lang.Object
  extended by Pollserver

@ThreadSafe
public final class Pollserver
extends Object

A server that provides polls and other voter services.

See Also:
../s/manual.xht#pollserver

Nested Class Summary
static class Pollserver.ConstructionContext
          A context for configuring a pollserver.
static class Pollserver.DatabaseCC
          A context for configuring a PostgreSQL database for a pollserver.
 class Pollserver.Run
          A run of the pollserver.
static class Pollserver.TestUseMode
          A mode of test usage for a pollserver.
static interface Pollserver.UserSession
          A session between a user and a running pollserver.
 
Constructor Summary
Pollserver(String name)
          Constructs a Pollserver.
 
Method Summary
 File codeDirectory()
          The directory ~/votorola/code in which pollserver's runtime code is stored.
 DiffCache diffCache()
          The cache of diff output.
 File inDirectory()
          The base directory ~/votorola/in of the file portion of the input store.
 String name()
          The login name of the local host account, under which the pollserver's data is stored and its processes are run.
 File outDirectory()
          The base directory ~/votorola/out of the file portion of the output store.
 Poll.PollserverScope scopePoll()
          API for all polls within the scope of this pollserver.
 String serverName()
          The fully qualified name of the computer on which this pollserver is hosted.
 String shortTitle()
          A short version of the title, restricted to roughly SHORT_STRING_LENGTH_MAX characters.
(package private)  File startupConfigurationFile()
          The startup configuration file for this pollserver.
 String summaryDescription()
          A brief description of this pollserver, in sentence form.
 Pollserver.TestUseMode testUseMode()
          The test use mode of this pollserver.
 String title()
          The title of this pollserver, in wiki-style title case (leading letter only).
 File votorolaDirectory()
          The base directory ~/votorola of all pollserver configuration files, where ~ is the home directory of the pollserver account.
 WikiCache wikiCache()
          The cache of data from the wiki.
 URI wikiLocation()
          The base URI for requesting pages from the associated wiki, without a trailing slash (/).
 String wikiPassword()
          The password for this pollserver's wiki account, which goes by the username Vobot.
 URI wikiScriptLocation()
          The base URI for script execution in the associated wiki, without a trailing slash (/).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pollserver

public Pollserver(String name)
           throws IOException,
                  ScriptException,
                  URISyntaxException
Constructs a Pollserver.

Throws:
IOException
ScriptException
URISyntaxException
Method Detail

codeDirectory

public File codeDirectory()
The directory ~/votorola/code in which pollserver's runtime code is stored.


diffCache

public DiffCache diffCache()
The cache of diff output.


inDirectory

public File inDirectory()
The base directory ~/votorola/in of the file portion of the input store.

See Also:
InputStore

name

public String name()
The login name of the local host account, under which the pollserver's data is stored and its processes are run.

See Also:
serverName(), ../s/manual.xht#pollserver-name

outDirectory

public File outDirectory()
The base directory ~/votorola/out of the file portion of the output store.

See Also:
OutputStore

scopePoll

public Poll.PollserverScope scopePoll()
API for all polls within the scope of this pollserver.


serverName

public String serverName()
The fully qualified name of the computer on which this pollserver is hosted. For example "pollserver.mydomain.dom". It is used to construct service and return email addresses for the various "serviceEmail" methods.

See Also:
name(), Pollserver.ConstructionContext.setServerName(String)

shortTitle

public String shortTitle()
A short version of the title, restricted to roughly SHORT_STRING_LENGTH_MAX characters. For example, "Toronto".

See Also:
title(), Pollserver.ConstructionContext.setTitle(String,String)

startupConfigurationFile

File startupConfigurationFile()
The startup configuration file for this pollserver. It is located at:

votorolaDirectory/pollserver.js

The language is JavaScript. There are restrictions on the character encoding.


summaryDescription

public String summaryDescription()
A brief description of this pollserver, in sentence form. It is intended for display, for example, as an introductory paragraph.

See Also:
Pollserver.ConstructionContext.setSummaryDescription(String)

testUseMode

public Pollserver.TestUseMode testUseMode()
The test use mode of this pollserver.

See Also:
Pollserver.ConstructionContext.setTestUseMode(Pollserver.TestUseMode)

title

public String title()
The title of this pollserver, in wiki-style title case (leading letter only). Normally it includes the informal name of the pollserver's overall district, such as the town or region. For example, "City of Toronto".

See Also:
shortTitle(), Pollserver.ConstructionContext.setTitle(String,String)

votorolaDirectory

public File votorolaDirectory()
The base directory ~/votorola of all pollserver configuration files, where ~ is the home directory of the pollserver account.


wikiCache

public WikiCache wikiCache()
The cache of data from the wiki.


wikiLocation

public URI wikiLocation()
The base URI for requesting pages from the associated wiki, without a trailing slash (/). This is either the standard access URI ending in index.php; or a pretty alias per $wgUsePathInfo. In either case, page requests are made either by appending an HTTP query component (?title=Main_page) or, equivalently, the path to the page (/Main_page).

See Also:
Pollserver.ConstructionContext.setWikiLocation(String), Pollserver.ConstructionContext.setWikiLocation(URI)

wikiPassword

public String wikiPassword()
The password for this pollserver's wiki account, which goes by the username Vobot.

See Also:
Pollserver.ConstructionContext.setWikiPassword(String)

wikiScriptLocation

public URI wikiScriptLocation()
The base URI for script execution in the associated wiki, without a trailing slash (/). Script requests are made either by appending the script path and parameters (/index.php?title=Main_page).

See Also:
Pollserver.ConstructionContext.setWikiScriptLocation(String), Pollserver.ConstructionContext.setWikiScriptLocation(URI)

Votorola