Votorola

votorola.a
Class Pollserver.ConstructionContext

java.lang.Object
  extended by Pollserver.ConstructionContext
Enclosing class:
Pollserver

@ThreadSafe
public static final class Pollserver.ConstructionContext
extends Object

A context for configuring a pollserver. The pollserver is configured by its startup configuration file, which contains a script (s) for that purpose. During construction of the pollserver, an instance of this context (psCC) is passed to s, via s::contructingPollserver(psCC).


Method Summary
 Pollserver.DatabaseCC geocodeDatabase()
          The context for configuring the database of the pollserver's geocode table.
 String getDistrictName()
          Deprecated. 
 String getServerName()
           
 String getShortTitle()
           
 String getSummaryDescription()
           
 Pollserver.TestUseMode getTestUseMode()
           
 String getTitle()
           
 URI getWikiLocation()
           
 String name()
          The name of the pollserver.
 Pollserver.DatabaseCC outputDatabase()
          The context for configuring the pollserver's output database.
 void setDistrictName(String title)
          Deprecated. 
 void setServerName(String serverName)
          Specifies the fully qualified name of the computer on which this pollserver is hosted.
 void setSummaryDescription(String summaryDescription)
          Sets the summary description of the pollserver.
 void setTestUseMode(Pollserver.TestUseMode testUseMode)
          Sets the test use mode of the pollserver.
 void setTitle(String title, String shortTitle)
          Sets the title of the pollserver.
 void setWikiLocation(String wikiLocationString)
          Sets the location of the pollwiki.
 void setWikiLocation(URI wikiLocation)
          Sets the location of the pollwiki.
 Pollserver.DatabaseCC userDatabase()
          The context for configuring the pollserver's user database.
 Pollserver.DatabaseCC voterInputDatabase()
          The context for configuring the pollserver's voter input database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

geocodeDatabase

public Pollserver.DatabaseCC geocodeDatabase()
The context for configuring the database of the pollserver's geocode table. At runtime, a table named "geocode" is created in this database, if it does not already exist.


getDistrictName

@Deprecated
public String getDistrictName()
Deprecated. 

See Also:
getTitle()

setDistrictName

@Deprecated
@ThreadRestricted(value="constructor")
public void setDistrictName(String title)
Deprecated. 

See Also:
setTitle(String,String)

getServerName

public String getServerName()
See Also:
Pollserver.serverName(), setServerName(String)

setServerName

@ThreadRestricted(value="constructor")
public void setServerName(String serverName)
Specifies the fully qualified name of the computer on which this pollserver is hosted. The default value is the system hostname as determined at runtime, or failing that "localhost".

See Also:
Pollserver.serverName()

getShortTitle

public String getShortTitle()
See Also:
Pollserver.shortTitle(), setTitle(String,String)

getSummaryDescription

public String getSummaryDescription()
See Also:
Pollserver.summaryDescription(), setSummaryDescription(String)

setSummaryDescription

@ThreadRestricted(value="constructor")
public void setSummaryDescription(String summaryDescription)
Sets the summary description of the pollserver. The default value is a placeholder with configuration instructions for the administrator.

Throws:
IllegalArgumentException - if the description contains any newline characters, because they might render inconsistently across different types of user interface
See Also:
Pollserver.summaryDescription()

getTestUseMode

public Pollserver.TestUseMode getTestUseMode()
See Also:
Pollserver.testUseMode(), setTestUseMode(Pollserver.TestUseMode)

setTestUseMode

@ThreadRestricted(value="constructor")
public void setTestUseMode(Pollserver.TestUseMode testUseMode)
Sets the test use mode of the pollserver. The default value is TestUseMode.OFF.

See Also:
Pollserver.testUseMode()

getTitle

public String getTitle()
See Also:
Pollserver.title(), setTitle(String,String)

setTitle

@ThreadRestricted(value="constructor")
public void setTitle(String title,
                                           String shortTitle)
Sets the title of the pollserver. The default value for the long and short titles is "Local region" and "Local".

See Also:
Pollserver.title(), Pollserver.shortTitle()

getWikiLocation

public URI getWikiLocation()
Returns:
location of the pollwiki, or null for the default location
See Also:
Pollserver.wikiLocation(), setWikiLocation(String), setWikiLocation(URI)

setWikiLocation

@ThreadRestricted(value="constructor")
public void setWikiLocation(String wikiLocationString)
                     throws URISyntaxException
Sets the location of the pollwiki. Only MediaWiki is supported. The default value is null, which translates at runtime to "http://serverName/wiki/".

Throws:
URISyntaxException
See Also:
Pollserver.wikiLocation()

setWikiLocation

@ThreadRestricted(value="constructor")
public void setWikiLocation(URI wikiLocation)
Sets the location of the pollwiki. The default value is null, which translates at runtime to "http://serverName/wiki/".

Throws:
IllegalArgumentException - if the URI does not end with a slash '/' character
See Also:
Pollserver.wikiLocation()

name

public String name()
The name of the pollserver.

See Also:
Pollserver.name()

outputDatabase

public Pollserver.DatabaseCC outputDatabase()
The context for configuring the pollserver's output database. At runtime, backing tables are created in this database, in support of various mounted service facilities, such as poll counts and voter lists.

See Also:
Pollserver.Run.outputDatabase()

userDatabase

public Pollserver.DatabaseCC userDatabase()
The context for configuring the pollserver's user database. At runtime, a table named "user" is created in this database, if it does not already exist.

See Also:
Pollserver.Run.userTable()

voterInputDatabase

public Pollserver.DatabaseCC voterInputDatabase()
The context for configuring the pollserver's voter input database. At runtime, tables such as in_registration and in_vote are created in this database, if they do not already exist.

See Also:
Pollserver.Run.voterInputDatabase()

Votorola