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

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

MethodcanAssignRaces
Description

Tests if this user can alter race/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.

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

Tests if this user can alter race/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.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 race 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.
MethodgetAssignablePollsIdsForRace
Description

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

Parametersosid.id.IdpollsIdthe Id of the Polls
osid.id.IdraceIdthe Id of the Race
Returnosid.id.IdListlist of assignable polls Ids
ErrorsNULL_ARGUMENTpolls or raceId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignRaceToPolls
Description

Adds an existing Race to a Polls .

Parametersosid.id.IdraceIdthe Id of the Race
osid.id.IdpollsIdthe Id of the Polls
ErrorsALREADY_EXISTSraceId is already assigned to pollsId
NOT_FOUNDraceId or pollsId not found
NULL_ARGUMENTraceId or pollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignRaceFromPolls
Description

Removes a Race from a Polls .

Parametersosid.id.IdraceIdthe Id of the Race
osid.id.IdpollsIdthe Id of the Polls
ErrorsNOT_FOUNDraceId or pollsId not found or raceId not assigned to pollsId
NULL_ARGUMENTraceId or pollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignRaceToPolls
Description

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

Parametersosid.id.IdraceIdthe Id of the Race
osid.id.IdfromPollsIdthe Id of the current Polls
osid.id.IdtoPollsIdthe Id of the destination Polls
ErrorsALREADY_EXISTSraceId already assigned to toPollsId
NOT_FOUNDraceId, fromPollsId , or toPollsId not found or raceId not mapped to fromPollsId
NULL_ARGUMENTraceId, fromPollsId , or toPollsId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.