OSID Logo
OSID Specifications
voting batch package
Version 3.1.0
Interfaceosid.voting.batch.VotingBatchSession
Implementsosid.voting.VotingSession
Used Byosid.voting.batch.VotingBatchManager
osid.voting.batch.VotingBatchProxyManager
Description

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.

MethodgetVoteForms
Description

Gets the vote forms for casting a bunch of new votes. A vote form is returned for each supplied race and candidate pair.

Parametersosid.voting.batch.VotePeerListpeers the vote peers
osid.type.Type[]voteRecordTypes array of vote record types to be included in each create operation or an empty list if none
Returnosid.voting.batch.VoteBatchFormList the vote forms
ErrorsNOT_FOUND a raceId or candidateId is not found
NULL_ARGUMENT peers or voteRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to request forms with given record types
Compliancemandatory This method must be implemented.
MethodcastVotes
Description

Creates a new set of Votes. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in the BatchCreateResponse.

Parametersosid.voting.batch.VoteBatchFormListvoteForms the vote forms
Returnosid.transaction.batch.CreateResponseList the create responses
ErrorsNULL_ARGUMENT voteForms is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteAllVotes
Description

Deletes all Votes in this Polls.

Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteVotes
Description

Deletes votes for the given Ids.

Parametersosid.id.IdListvoteIds the Ids of the votes to delete
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT voteIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteVotesForRace
Description

Deletes votes for the given race.

Parametersosid.id.IdraceId the Ids of a race
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT raceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteVotesForVoter
Description

Deletes votes cast by a voter.

Parametersosid.id.IdresourceId the Ids of a resource
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteVotesForBallot
Description

Deletes all votes for all races on a ballot.

Parametersosid.id.IdballotId the Ids of a ballot
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT ballotId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethoddeleteIneffectiveVotesByDate
Description

Deletes votes ineffective before the given date.

Parametersosid.calendaring.DateTimedate a date
Returnosid.transaction.batch.DeleteResponseList the delete responses
ErrorsNULL_ARGUMENT date is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodaliasVotes
Description

Adds an 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.

Parametersosid.transaction.batch.AliasRequestListaliasRequests the alias requests
Returnosid.transaction.batch.AliasResponseList the alias responses
ErrorsNULL_ARGUMENT aliasRequests is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.