OSID Logo
OSID Specifications
voting package
Version 3.1.0
Interfaceosid.voting.VotePollsAssignmentSession
Implementsosid.OsidSession
Used Byosid.voting.VotingManager
osid.voting.VotingProxyManager
Description

This session provides methods to re-assign Votes to Polls. A Vote may map to multiple Polls objects and removing the last reference to a Vote is the equivalent of deleting it. Each Polls may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of a Vote to another Polls is not a copy operation (eg: does not change its Id).

MethodcanAssignVotes
Description

Tests if this user can alter vote/polls mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanAssignVotesToPolls
Description

Tests if this user can alter vote/polls mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IdpollsId the Id of the Polls
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT pollsId is null
Compliancemandatory This method must be implemented.
MethodgetAssignablePollsIds
Description

Gets a list of polls including and under the given polls node in which any vote can be assigned.

Parametersosid.id.IdpollsId the Id of the Polls
Returnosid.id.IdList list of assignable polls Ids
ErrorsNULL_ARGUMENT pollsId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetAssignablePollsIdsForVote
Description

Gets a list of polls including and under the given polls node in which a specific vote can be assigned.

Parametersosid.id.IdpollsId the Id of the Polls
osid.id.IdvoteId the Id of the Vote
Returnosid.id.IdList list of assignable polls Ids
ErrorsNULL_ARGUMENT pollsId or voteId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignVoteToPolls
Description

Adds an existing Vote to a Polls.

Parametersosid.id.IdvoteId the Id of the Vote
osid.id.IdpollsId the Id of the Polls
ErrorsALREADY_EXISTS voteId is already assigned to pollsId
NOT_FOUND voteId or pollsId not found
NULL_ARGUMENT voteId or pollsId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignVoteFromPolls
Description

Removes a Vote from a Polls.

Parametersosid.id.IdvoteId the Id of the Vote
osid.id.IdpollsId the Id of the Polls
ErrorsNOT_FOUND voteId or pollsId not found or voteId not assigned to pollsId
NULL_ARGUMENT voteId or pollsId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignVoteToPolls
Description

Moves a Vote from one Polls to another. Mappings to other Polls are unaffected.

Parametersosid.id.IdvoteId the Id of the Vote
osid.id.IdfromPollsId the Id of the current Polls
osid.id.IdtoPollsId the Id of the destination Polls
ErrorsALREADY_EXISTS voteId already assigned to toPollsId
NOT_FOUND voteId, fromPollsId, or toPollsId not found or voteId not mapped to fromPollsId
NULL_ARGUMENT voteId, fromPollsId, or toPollsId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.