OSID Logo
OSID Specifications
voting rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.rules.BallotConstrainerEnablerPollsAssignmentSession
Implementsosid.OsidSession
Description

This session provides methods to re-assign BallotConstrainerEnabler to Polls mappings. A BallotConstrainerEnabler may appear in multiple Polls objects and removing the last reference to a BallotConstrainerEnabler 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 BallotConstrainerEnabler to another Polls is not a copy operation (eg: does not change its Id ).

MethodcanAssignBallotConstrainerEnablers
Description

Tests if this user can alter ballot constrainer 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. 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
CompliancemandatoryThis method must be implemented.
MethodcanAssignBallotConstrainerEnablersToPolls
Description

Tests if this user can alter ballot constrainer 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. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

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

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

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

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

Parametersosid.id.IdpollsIdthe Id of the Polls
osid.id.IdballotConstrainerEnablerIdthe Id of the BallotConstrainerEnabler
Returnosid.id.IdListlist of assignable polls Ids
ErrorsNULL_ARGUMENT pollsId or ballotConstrainerEnablerId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignBallotConstrainerEnablerToPolls
Description

Adds an existing BallotConstrainerEnabler to a Polls.

Parametersosid.id.IdballotConstrainerEnablerIdthe Id of the BallotConstrainerEnabler
osid.id.IdpollsIdthe Id of the Polls
ErrorsALREADY_EXISTS ballotConstrainerEnablerId is already assigned to pollsId
NOT_FOUND ballotConstrainerEnablerId or pollsId not found
NULL_ARGUMENT ballotConstrainerEnablerId or pollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignBallotConstrainerEnablerFromPolls
Description

Removes a BallotConstrainerEnabler from a Polls.

Parametersosid.id.IdballotConstrainerEnablerIdthe Id of the BallotConstrainerEnabler
osid.id.IdpollsIdthe Id of the Polls
ErrorsNOT_FOUND ballotConstrainerEnablerId or pollsId not found or ballotConstrainerEnablerId not assigned to pollsId
NULL_ARGUMENT ballotConstrainerEnablerId or pollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignBallotConstrainerEnablerToPolls
Description

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

Parametersosid.id.IdballotConstrainerEnablerIdthe Id of the BallotConstrainerEnabler
osid.id.IdfromPollsIdthe Id of the current Polls
osid.id.IdtoPollsIdthe Id of the destination Polls
ErrorsNOT_FOUND ballotConstrainerEnablerId, fromPollsId, or toPollsId not found or ballotConstrainerEnablerId not mapped to fromPollsId
NULL_ARGUMENT BallotConstrainerEnablerId, fromPollsId, or toPollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.