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

This session provides methods to re-assign VoteEnabler to Polls mappings. A VoteEnabler may appear in multiple Polls catalogs and removing the last reference to a VoteEnabler is the equivalent of deleting it. Each Polls may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a VoteEnabler to another Polls is not a copy operation (eg: does not change its Id ).

MethodcanAssignVoteEnablers
Description

Tests if this user can alter vote enabler/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. T his is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

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

Tests if this user can alter vote enabler/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. T his is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IdpollsIdthe Id of the Polls
Returnbooleanfalse if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENTpollsId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignablePollsIds
Description

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

Parametersosid.id.IdpollsIdthe Id of the Polls
Returnosid.id.IdListlist of assignable polls Ids
ErrorsNULL_ARGUMENTpollsId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignablePollsIdsForVoteEnabler
Description

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

Parametersosid.id.IdpollsIdthe Id of the Polls
osid.id.IdvoteEnablerIdthe Id of the VoteEnabler
Returnosid.id.IdListlist of assignable polls Ids
ErrorsNULL_ARGUMENTpollsId or voteEnablerId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignVoteEnablerToPolls
Description

Adds an existing VoteEnabler to a Polls .

Parametersosid.id.IdvoteEnablerIdthe Id of the VoteEnabler
osid.id.IdpollsIdthe Id of the Polls
ErrorsALREADY_EXISTSvoteEnablerId is already assigned to pollsId
NOT_FOUNDvoteEnablerId or pollsId not found
NULL_ARGUMENTvoteEnablerId or pollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignVoteEnablerFromPolls
Description

Removes a VoteEnabler from a Polls .

Parametersosid.id.IdvoteEnablerIdthe Id of the VoteEnabler
osid.id.IdpollsIdthe Id of the Polls
ErrorsNOT_FOUNDvoteEnablerId or pollsId not found or voteEnablerId not assigned to pollsId
NULL_ARGUMENTvoteEnablerId or pollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignVoteEnablerToPolls
Description

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

Parametersosid.id.IdvoteEnablerIdthe Id of the VoteEnabler
osid.id.IdfromPollsIdthe Id of the current Polls
osid.id.IdtoPollsIdthe Id of the destination Polls
ErrorsALREADY_EXISTSvoteEnablerId already assigned to toPollsId
NOT_FOUNDvoteEnablerId, fromPollsId , or toPollsId not found or voteEnablerId not mapped to fromPollsId
NULL_ARGUMENTvoteEnablerId, fromPollsId , or toPollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.