OSID Logo
OSID Specifications
voting rules package
Version 3.0.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.Idthe Polls Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Pollsthe polls
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.

Returnbooleanfalse if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodassignVoteEnablerToVote
Description

Adds an existing VoteEnabler to a Vote .

Parametersosid.id.IdvoteEnablerIdthe Id of the VoteEnabler
osid.id.IdvoteIdthe Id of the Vote
ErrorsALREADY_EXISTSvoteEnablerId already applied to voteId
NOT_FOUNDvoteEnablerId or voteId not found
NULL_ARGUMENTvoteEnablerId or voteId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignVoteEnablerFromVote
Description

Removes an existing VoteEnabler from a Vote .

Parametersosid.id.IdvoteEnablerIdthe Id of the VoteEnabler
osid.id.IdvoteIdthe Id of the Vote
ErrorsNOT_FOUNDvoteEnablerId or voteId not found or voteEnablerId already applied to voteId
NULL_ARGUMENTvoteEnablerId or voteId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.

Returnbooleanfalse if VoteEnabler ordering is not authorized, true otherwise
CompliancemandatoryThis 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.IdvoteEnablerIdthe Id of the VoteEnabler
osid.id.IdvoteIdthe Id of the Vote
osid.id.IdreferenceIdthe reference vote enabler Id
ErrorsNOT_FOUNDvoteEnablerId, voteId , or referenceId not found or, voteEnablerId or referenceId not related to voteId
NULL_ARGUMENTvoteEnablerId, voteId , or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.IdvoteEnablerIdthe Id of the VoteEnabler
osid.id.IdvoteIdthe Id of the Vote
osid.id.IdreferenceIdthe reference vote enabler Id
ErrorsNOT_FOUNDvoteEnablerId, voteId , or referenceId not found or, voteEnablerId or referenceId not related to voteId
NULL_ARGUMENTvoteEnablerId, voteId , or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodorderVoteEnablers
Description

Reorders a set of vote enablers for a vote.

Parametersosid.id.Id[]voteEnablerIdsthe Ids for a set of VoteEnablers
osid.id.IdvoteIdthe Id of the Vote
ErrorsNOT_FOUNDvoteEnablerId, voteId , or referenceId not found or, voteEnablerId or referenceId not related to voteId
NULL_ARGUMENTvoteEnablerIds, voteId , or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.