votorola.a.register
Class Register.ConfigurationContext

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

@ThreadSafe
public static final class Register.ConfigurationContext
extends Object

A context for configuring a register. Each register is configured by its configuration file, which contains a script (s) for that purpose. During construction of the register, an instance of this context (registerCC) is passed to s, via s::configureRegister(registerCC).


Method Summary
 void addPrimaryTrust(String voter1Email, int edgeCount)
          Adds primary trust edges to the neighbourhood network.
 long getElectorateSize()
           
 String getElectorateSizeExplanation()
           
 String getFieldDescription_link()
           
 String getFieldDescription_name()
           
 String getFieldDescription_note()
           
 String getFieldDescription_residence()
           
 String getFieldExample_link()
           
 String getFieldExample_name()
           
 String getFieldExample_note()
           
 String getFieldExample_residence()
           
 Geocode.GoogleGeocoding getGeocodingMethod()
           
 String getListSummaryDescription()
          Deprecated. 
 int getPreRegistrationTrustLevel()
           
 TrustEdge.Primary[] getPrimaryTrustArray()
           
 String getSummaryDescription()
           
 String getTitle()
           
 ElectoralSubserver.DatabaseCC listDatabase()
          The context for configuring the register's list database.
 void setElectorateSize(long electorateSize)
          Sets the estimated size of the electorate.
 void setElectorateSizeExplanation(String electorateSizeExplanation)
          Sets the electorate size explanation.
 void setFieldDescription_link(String fieldDescription_link)
          Sets the description of the link field.
 void setFieldDescription_name(String fieldDescription_name)
          Sets the description of the name field.
 void setFieldDescription_note(String fieldDescription_note)
          Sets the description of the note field.
 void setFieldDescription_residence(String fieldDescription_residence)
          Sets the description of the residence field.
 void setFieldExample_link(String fieldExample_link)
          Sets the description of the link field.
 void setFieldExample_name(String fieldExample_name)
          Sets the description of the name field.
 void setFieldExample_note(String fieldExample_note)
          Sets the description of the note field.
 void setFieldExample_residence(String fieldExample_residence)
          Sets the description of the residence field.
 void setGeocodingMethodGoogle(String key)
          Sets the geocoding method of the register to GoogleGeocoding.
 void setListSummaryDescription(String listSummaryDescription)
          Deprecated. 
 void setPreRegistrationTrustLevel(int preRegistrationTrustLevel)
          Sets the pre-registration trust level.
 void setSummaryDescription(String summaryDescription)
          Sets the summary description of the register.
 void setTitle(String title)
          Sets the title of the register.
 ElectoralSubserver.DatabaseCC voterInputDatabase()
          The context for configuring the database of the register's voter input table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getElectorateSize

public long getElectorateSize()
See Also:
Register.electorateSize(), setElectorateSize(long)

setElectorateSize

@ThreadRestricted(value="constructor")
public void setElectorateSize(long electorateSize)
Sets the estimated size of the electorate. The default value is zero, meaning unknown.

See Also:
Register.electorateSize()

getElectorateSizeExplanation

public String getElectorateSizeExplanation()
See Also:
Register.electorateSizeExplanation(), setElectorateSizeExplanation(String)

setElectorateSizeExplanation

@ThreadRestricted(value="constructor")
public void setElectorateSizeExplanation(String electorateSizeExplanation)
Sets the electorate size explanation. The default value is "number of potential registrants".

See Also:
Register.electorateSizeExplanation()

getFieldDescription_link

public String getFieldDescription_link()
See Also:
Register.fieldDescription_link(), setFieldDescription_link(String)

setFieldDescription_link

@ThreadRestricted(value="constructor")
public void setFieldDescription_link(String fieldDescription_link)
Sets the description of the link field. The default value depends on the server's locale.

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

getFieldExample_link

public String getFieldExample_link()
See Also:
Register.fieldExample_link(), setFieldExample_link(String)

setFieldExample_link

@ThreadRestricted(value="constructor")
public void setFieldExample_link(String fieldExample_link)
Sets the description of the link field. The default value depends on the server's locale.

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

getFieldDescription_name

public String getFieldDescription_name()
See Also:
Register.fieldDescription_name(), setFieldDescription_name(String)

setFieldDescription_name

@ThreadRestricted(value="constructor")
public void setFieldDescription_name(String fieldDescription_name)
Sets the description of the name field. The default value depends on the server's locale.

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

getFieldExample_name

public String getFieldExample_name()
See Also:
Register.fieldExample_name(), setFieldExample_name(String)

setFieldExample_name

@ThreadRestricted(value="constructor")
public void setFieldExample_name(String fieldExample_name)
Sets the description of the name field. The default value depends on the server's locale.

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

getFieldDescription_note

public String getFieldDescription_note()
See Also:
Register.fieldDescription_note(), setFieldDescription_note(String)

setFieldDescription_note

@ThreadRestricted(value="constructor")
public void setFieldDescription_note(String fieldDescription_note)
Sets the description of the note field. The default value depends on the server's locale.

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

getFieldExample_note

public String getFieldExample_note()
See Also:
Register.fieldExample_note(), setFieldExample_note(String)

setFieldExample_note

@ThreadRestricted(value="constructor")
public void setFieldExample_note(String fieldExample_note)
Sets the description of the note field. The default value depends on the server's locale.

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

getFieldDescription_residence

public String getFieldDescription_residence()
See Also:
Register.fieldDescription_residence(), setFieldDescription_residence(String)

setFieldDescription_residence

@ThreadRestricted(value="constructor")
public void setFieldDescription_residence(String fieldDescription_residence)
Sets the description of the residence field. The default value depends on the server's locale.

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

getFieldExample_residence

public String getFieldExample_residence()
See Also:
Register.fieldExample_residence(), setFieldExample_residence(String)

setFieldExample_residence

@ThreadRestricted(value="constructor")
public void setFieldExample_residence(String fieldExample_residence)
Sets the description of the residence field. The default value depends on the server's locale.

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

getGeocodingMethod

public Geocode.GoogleGeocoding getGeocodingMethod()
See Also:
Register.geocodingMethod(), setGeocodingMethodGoogle(String)

setGeocodingMethodGoogle

@ThreadRestricted(value="constructor")
public void setGeocodingMethodGoogle(String key)
Sets the geocoding method of the register to GoogleGeocoding.

Parameters:
key - per key()
See Also:
Register.geocodingMethod()

getListSummaryDescription

@Deprecated
public String getListSummaryDescription()
Deprecated. 

See Also:
VoterList.summaryDescription(), setListSummaryDescription(String)

setListSummaryDescription

@Deprecated
@ThreadRestricted(value="constructor")
public void setListSummaryDescription(String listSummaryDescription)
Deprecated. 

Sets the summary description for newly compiled voter lists. 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:
VoterList.summaryDescription()

getPreRegistrationTrustLevel

public int getPreRegistrationTrustLevel()
See Also:
Register.preRegistrationTrustLevel(), setPreRegistrationTrustLevel(int)

setPreRegistrationTrustLevel

@ThreadRestricted(value="constructor")
public void setPreRegistrationTrustLevel(int preRegistrationTrustLevel)
Sets the pre-registration trust level. The default value is zero.

See Also:
Register.preRegistrationTrustLevel()

getPrimaryTrustArray

public TrustEdge.Primary[] getPrimaryTrustArray()
See Also:
Register.primaryTrustList(), addPrimaryTrust(String,int)

addPrimaryTrust

@ThreadRestricted(value="constructor")
public void addPrimaryTrust(String voter1Email,
                                                  int edgeCount)
Adds primary trust edges to the neighbourhood network. By default, there are no primary trust edges (and therefore no trust in the network).

Parameters:
voter1Email - per TrustEdge.Primary.voter1Email()
edgeCount - per TrustEdge.Primary.edgeCount()
See Also:
Register.primaryTrustList()

getSummaryDescription

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

setSummaryDescription

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

getTitle

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

setTitle

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

See Also:
Register.title()

listDatabase

public ElectoralSubserver.DatabaseCC listDatabase()
The context for configuring the register's list database.


voterInputDatabase

public ElectoralSubserver.DatabaseCC voterInputDatabase()
The context for configuring the database of the register's voter input table.