|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectRegistrationC
@ThreadRestricted(value="touch") public final class RegistrationC
A committable instance of a voter's input to a register. It is writeable, and its changes may be committed to the voter input table.
| Field Summary |
|---|
| Fields inherited from interface Registration |
|---|
TRUST_DESTINATIONS_MAX, WRITEABLE_ALL_DEFAULT |
| Constructor Summary | |
|---|---|
RegistrationC(String voterEmail)
Constructs a RegistrationC with default initial data. |
|
RegistrationC(String voterEmail,
String xml)
Constructs a RegistrationC from the specified initial data. |
|
RegistrationC(String voterEmail,
VoterInputTable voterInputTable)
Constructs a RegistrationC, reading its initial state from the voter input table. |
|
| Method Summary | |
|---|---|
void |
addTrustDestination(String newDestinationEmail,
ElectoralSubserver.UserSession session)
Adds a new trust destination, if not already present. |
RegistrationC |
clone()
|
void |
commit(VoterInputTable voterInputTable,
ElectoralSubserver.UserSession session)
Writes this registration to the table, if it has uncommitted changes; or removes it, if it is at default. |
(package private) void |
commit(VoterInputTable voterInputTable,
ElectoralSubserver.UserSession session,
boolean toForce)
Writes this registration to the table; or removes it, if it is at default. |
String |
getLink()
A Web link in URI format, pointing to general information about the voter. |
String |
getName()
The name of the voter. |
String |
getNote()
A short note explaining or commenting on this registration. |
String |
getResidence()
The primary residential address of the voter. |
(package private) boolean |
isWriteable(ElectoralSubserver.UserSession session,
Register register)
Returns true if this registration is writeable by the user. |
boolean |
isWriteableAll()
Returns true if the simple fields of this registration are generally writeable by other registrants, or false if they are exclusively writeable by the owning registrant. |
void |
removeTrustDestination(String oldDestinationEmail,
ElectoralSubserver.UserSession session)
Removes a trust destination, if found. |
void |
setLink(String newLink,
ElectoralSubserver.UserSession session,
Register register)
Changes the link. |
void |
setName(String newName,
ElectoralSubserver.UserSession session,
Register register)
Changes the name. |
void |
setNote(String newNote,
ElectoralSubserver.UserSession session,
Register register)
Changes the note. |
void |
setResidence(String newResidence,
ElectoralSubserver.UserSession session,
Register register)
Changes the residential address. |
List<String> |
trustDestinations()
Returns the list of voters to whom trust edges are to be extended. |
String |
voterEmail()
Identifies the voter (registrant) by email address. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegistrationC(String voterEmail,
VoterInputTable voterInputTable)
throws SQLException
voterEmail - per voterEmail()voterInputTable - of the register
SQLException
public RegistrationC(String voterEmail,
String xml)
throws XMLStreamException
voterEmail - per voterEmail()xml - the initial data from the 'xml'
column of the voter input table, or null to use defaults
XMLStreamExceptionpublic RegistrationC(String voterEmail)
voterEmail - per voterEmail()| Method Detail |
|---|
public void commit(VoterInputTable voterInputTable,
ElectoralSubserver.UserSession session)
throws SQLException,
VoterInputTable.BadInputException
voterInputTable - of the register
SQLException
VoterInputTable.BadInputException
void commit(VoterInputTable voterInputTable,
ElectoralSubserver.UserSession session,
boolean toForce)
throws SQLException,
VoterInputTable.BadInputException
voterInputTable - of the registertoForce - false to commit only if changes were made in this instance
of registration; true to force the commit, regardless
SQLException
VoterInputTable.BadInputExceptionpublic final RegistrationC clone()
clone in class Objectpublic String getLink()
Registration
getLink in interface RegistrationsetLink(String,ElectoralSubserver.UserSession,Register)
public void setLink(String newLink,
ElectoralSubserver.UserSession session,
Register register)
VotorolaSecurityException - if write permission deniedgetLink()public String getName()
Registration
getName in interface RegistrationsetName(String,ElectoralSubserver.UserSession,Register)
public void setName(String newName,
ElectoralSubserver.UserSession session,
Register register)
VotorolaSecurityException - if write permission deniedgetName()public String getNote()
Registration
getNote in interface RegistrationsetNote(String,ElectoralSubserver.UserSession,Register)
public void setNote(String newNote,
ElectoralSubserver.UserSession session,
Register register)
VotorolaSecurityException - if write permission deniedgetNote()public String getResidence()
Registration
getResidence in interface RegistrationsetResidence(String,ElectoralSubserver.UserSession,Register)
public void setResidence(String newResidence,
ElectoralSubserver.UserSession session,
Register register)
VotorolaSecurityException - if write permission deniedgetResidence()
boolean isWriteable(ElectoralSubserver.UserSession session,
Register register)
isWriteableAll()public boolean isWriteableAll()
RegistrationThe main purpose of this feature is to support pre-registration of candidates, by voters.
isWriteableAll in interface RegistrationRegistration.WRITEABLE_ALL_DEFAULTpublic List<String> trustDestinations()
Registration
trustDestinations in interface RegistrationaddTrustDestination(String,ElectoralSubserver.UserSession),
removeTrustDestination(String,ElectoralSubserver.UserSession)
public void addTrustDestination(String newDestinationEmail,
ElectoralSubserver.UserSession session)
newDestinationEmail - identifying the destination to add
IllegalStateException - if addition would exceed TRUST_DESTINATIONS_MAX
VotorolaSecurityException - if voterEmail is unequal
to session.userEmail() (failsafe bug trap)trustDestinations()
public void removeTrustDestination(String oldDestinationEmail,
ElectoralSubserver.UserSession session)
oldDestinationEmail - identifying the destination to remove
VotorolaSecurityException - if voterEmail is unequal
to session.userEmail() (failsafe bug trap)trustDestinations()public String voterEmail()
RegistrationSome parts of an email address (the domain name) are technically case insensitive. It is therefore possible for two identifiers to refer to the same mailbox (user@domain.dom and user@DoMain.com for example). Whether or not the two refer to the same person is a question for the trust network to sort out. The authentication issues are equivalent to those of someone posing under two separate mailboxes.
voterEmail in interface Registration
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||