public interface VotingBatchSession extends VotingSession
This session votes in bulk. The data for create and update is provided
by the consumer via the form object. OsidForms are
requested for eachupdate and may not be reused.
Create and update operations differ in their usage. To create a
Vote, a VoteForm is requested using
getVoteForms() specifying the desired race, candidate, and record
Types or none if no record Types are needed.
Each of the returned VoteForms will indicate that it is to
be used with a create operation and can be used to examine metdata or
validate data prior to creation. Once a VoteForm is
submiited to a create operation, it cannot be reused with another create
operation unless the first operation was unsuccessful. Each
VoteForm corresponds to an attempted transaction.
The VoteForms returned from getVoteForms()
may be linked to the originating request through the peer
Ids of the VoteForm. In the case where there may be
duplicates, any VoteForm of the same peer Ids
may be used for a create operation.
Once a batch of VoteForms are submitted for create, a
CreateResponse is returned for each VoteForm,
although the ordering is not defined. Only errors that pertain to
the entire create operation are returned from castVotes()
errors specific to an individual VoteForm are indicated in
the corresponding CreateResponse. CreateResponses
may be linked to the originating VoteForm through
the VoteForm Id .
The delete operations delete Votes in bulk. Bulk delete
operations return the results in DeleteResponses.
| Modifier and Type | Method and Description |
|---|---|
AliasResponseList |
aliasVotes(AliasRequestList aliasRequests)
Adds an
Id to a Vote for the purpose of
creating compatibility. |
CreateResponseList |
castVotes(VoteBatchFormList voteForms)
Creates a new set of
Votes. |
DeleteResponseList |
deleteAllVotes()
Deletes all
Votes in this Polls . |
DeleteResponseList |
deleteIneffectiveVotesByDate(DateTime date)
Deletes votes ineffective before the given date.
|
DeleteResponseList |
deleteVotes(IdList voteIds)
Deletes votes for the given
Ids. |
DeleteResponseList |
deleteVotesForBallot(Id ballotId)
Deletes all votes for all races on a ballot.
|
DeleteResponseList |
deleteVotesForRace(Id raceId)
Deletes votes for the given race.
|
DeleteResponseList |
deleteVotesForVoter(Id resourceId)
Deletes votes cast by a voter.
|
VoteBatchFormList |
getVoteForms(VotePeerList peers,
Type[] voteRecordTypes)
Gets the vote forms for casting a bunch of new votes.
|
canRevote, canVote, canVoteWithRecordTypes, deleteMyVote, getMyUncastRacesForBallot, getMyVotesForBallot, getMyVotesForRace, getPolls, getPollsId, getRace, getRacesForBallot, getVoteForm, getVotingAllocation, isOpen, votegetAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseVoteBatchFormList getVoteForms(VotePeerList peers, Type[] voteRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
peers - the vote peersvoteRecordTypes - array of vote record types to be included in
each create operation or an empty list if noneNotFoundException - a raceId or
candidateId is not foundNullArgumentException - peers or
voteRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to request forms with
given record typesmandatory - This method must be implemented. CreateResponseList castVotes(VoteBatchFormList voteForms) throws OperationFailedException, PermissionDeniedException
Votes. This method returns an
error if the entire operation fails. Otherwise, the status of an
individual create operation is indicated in the
BatchCreateResponse .voteForms - the vote formsNullArgumentException - voteForms is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteAllVotes() throws OperationFailedException, PermissionDeniedException
Votes in this Polls .OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteVotes(IdList voteIds) throws OperationFailedException, PermissionDeniedException
Ids. voteIds - the Ids of the votes to deleteNullArgumentException - voteIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteVotesForRace(Id raceId) throws OperationFailedException, PermissionDeniedException
raceId - the Ids of a raceNullArgumentException - raceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteVotesForVoter(Id resourceId) throws OperationFailedException, PermissionDeniedException
resourceId - the Ids of a resourceNullArgumentException - resourceId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteVotesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
ballotId - the Ids of a ballotNullArgumentException - ballotId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. DeleteResponseList deleteIneffectiveVotesByDate(DateTime date) throws OperationFailedException, PermissionDeniedException
date - a dateNullArgumentException - date is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. AliasResponseList aliasVotes(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException
Id to a Vote for the purpose of
creating compatibility. The primary Id of the
Vote is determined by the provider. The new Id
is an alias to the primary Id. If the alias is a
pointer to another vote, it is reassigned to the given vote Id.
aliasRequests - the alias requestsNullArgumentException - aliasRequests is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.