Interface VotingBatchSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession, VotingSession

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 .