OSID Logo
OSID Specifications
voting rules package
Version 3.1.0
Interfaceosid.voting.rules.VoteEnablerRuleApplicationSession
Implementsosid.OsidSession
Used Byosid.voting.rules.VotingRulesManager
osid.voting.rules.VotingRulesProxyManager
Description

This session provides methods to apply VoteEnablers to Votes. Multiple VoteEnablers applied to an Vote may be sequenced such that the first positive evaluation results in the VoteEnablers used.

MethodgetPollsId
Description

Gets the Polls Id associated with this session.

Returnosid.id.Id the Polls Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Polls the polls
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanAssignVoteEnablers
Description

Tests if this user can alter vote enabler/vote 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 lookup operations to unauthorized users.

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

Adds an existing VoteEnabler to a Vote.

Parametersosid.id.IdvoteEnablerId the Id of the VoteEnabler
osid.id.IdvoteId the Id of the Vote
ErrorsALREADY_EXISTS voteEnablerId already applied to voteId
NOT_FOUND voteEnablerId or voteId not found
NULL_ARGUMENT voteEnablerId or voteId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignVoteEnablerFromVote
Description

Removes an existing VoteEnabler from a Vote.

Parametersosid.id.IdvoteEnablerId the Id of the VoteEnabler
osid.id.IdvoteId the Id of the Vote
ErrorsNOT_FOUND voteEnablerId or voteId not found or voteEnablerId already applied to voteId
NULL_ARGUMENT voteEnablerId or voteId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanSequenceVoteEnablers
Description

Tests if this user can order VoteEnablers . A return of true does not guarantee successful authorization. A return of false indicates that it is known sequencing operations will result in a PERMISSION_DENIED.This is intended as a hint to an application that may opt not to offer sequencing operations to an unauthorized user.

Returnboolean false if VoteEnabler ordering is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodmoveVoteEnablerAhead
Description

Reorders vote enablers for a vote by moving the specified vote enabler in front of a reference vote enabler.

Parametersosid.id.IdvoteEnablerId the Id of the VoteEnabler
osid.id.IdvoteId the Id of the Vote
osid.id.IdreferenceId the reference vote enabler Id
ErrorsNOT_FOUND voteEnablerId, voteId, or referenceId not found or, voteEnablerId or referenceId not related to voteId
NULL_ARGUMENT voteEnablerId, voteId, or referenceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodmoveVoteEnablerBehind
Description

Reorders vote enablers for a vote by moving the specified vote enabler behind a reference vote enabler.

Parametersosid.id.IdvoteEnablerId the Id of the VoteEnabler
osid.id.IdvoteId the Id of the Vote
osid.id.IdreferenceId the reference vote enabler Id
ErrorsNOT_FOUND voteEnablerId, voteId, or referenceId not found or, voteEnablerId or referenceId not related to voteId
NULL_ARGUMENT voteEnablerId, voteId, or referenceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodorderVoteEnablers
Description

Reorders a set of vote enablers for a vote.

Parametersosid.id.Id[]voteEnablerIds the Ids for a set of VoteEnablers
osid.id.IdvoteId the Id of the Vote
ErrorsNOT_FOUND voteEnablerId, voteId, or referenceId not found or, voteEnablerId or referenceId not related to voteId
NULL_ARGUMENT voteEnablerIds, voteId, or referenceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.