votorola.a.election.district
Class District.ConfigurationContext

java.lang.Object
  extended by District.ConfigurationContext
Enclosing class:
District

@ThreadSafe
public static final class District.ConfigurationContext
extends Object

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


Method Summary
 String getSchemeConfigurationPath()
           
 String getShortTitle()
           
 String getSummaryDescription()
           
 String getTitle()
           
 void setSchemeConfigurationPath(String schemeConfigurationPath)
          Sets the path to the configuration file of this district's scheme.
 void setShortTitle(String shortTitle)
          Sets the short title of the district.
 void setSummaryDescription(String summaryDescription)
          Sets the summary description of the district.
 void setTitle(String title)
          Sets the title of the district.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSchemeConfigurationPath

public String getSchemeConfigurationPath()
See Also:
District.regionalScheme(), setSchemeConfigurationPath(String)

setSchemeConfigurationPath

@ThreadRestricted(value="constructor")
public void setSchemeConfigurationPath(String schemeConfigurationPath)
Sets the path to the configuration file of this district's scheme. It must be absolute, and must not contain any shell variable, or tilde ~. The default value is votorolaDirectory/regional-scheme.js.

See Also:
District.regionalScheme(), RegionalScheme.configurationFile()

getShortTitle

public String getShortTitle()
See Also:
District.shortTitle(), setShortTitle(String)

setShortTitle

@ThreadRestricted(value="constructor")
public void setShortTitle(String shortTitle)
Sets the short title of the district. The default value is the placeholder "District".

See Also:
District.shortTitle()

getSummaryDescription

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

setSummaryDescription

@ThreadRestricted(value="constructor")
public void setSummaryDescription(String summaryDescription)
Sets the summary description of the district. 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:
District.summaryDescription()

getTitle

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

setTitle

@ThreadRestricted(value="constructor")
public void setTitle(String title)
Sets the title of the district. The default value is the placeholder "Electoral District".

See Also:
District.title()