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

This session creates and removes race constrainers. The data for create and update is provided via the RaceConstrainerForm.

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.
MethodcanCreateRaceConstrainer
Description

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

Returnboolean false if RaceConstrainer creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateRaceConstrainerWithRecordTypes
Description

Tests if this user can create a single RaceConstrainer using the desired record types. While VotingRulesManager.getRaceConstrainerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific RaceConstrainer. Providing an empty array tests if a RaceConstrainer can be created with no records.

Parametersosid.type.Type[]raceConstrainerRecordTypesarray of race constrainer record types
Returnboolean true if RaceConstrainer creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT raceConstrainerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetRaceConstrainerFormForCreate
Description

Gets the race constrainer form for creating new race constrainers. A new form should be requested for each create transaction.

Parametersosid.type.Type[]raceConstrainerRecordTypesarray of race constrainer record types
Returnosid.voting.rules.RaceConstrainerFormthe race constrainer form
ErrorsNULL_ARGUMENT raceConstrainerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateRaceConstrainer
Description

Creates a new RaceConstrainer.

Parametersosid.voting.rules.RaceConstrainerFormraceConstrainerFormthe form for this RaceConstrainer
Returnosid.voting.rules.RaceConstrainerthe new RaceConstrainer
ErrorsILLEGAL_STATE raceConstrainerForm already used for a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT raceConstrainerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED raceConstrainerForm did not originate from getRaceConstrainerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateRaceConstrainers
Description

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

Returnboolean false if RaceConstrainer modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRaceConstrainerFormForUpdate
Description

Gets the race constrainer form for updating an existing race constrainer. A new race constrainer form should be requested for each update transaction.

Parametersosid.id.IdraceConstrainerIdthe Id of the RaceConstrainer
Returnosid.voting.rules.RaceConstrainerFormthe race constrainer form
ErrorsNOT_FOUND raceConstrainerId is not found
NULL_ARGUMENT raceConstrainerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateRaceConstrainer
Description

Updates an existing race constrainer.

Parametersosid.voting.rules.RaceConstrainerFormraceConstrainerFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE raceConstrainerForm already used for an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT raceConstrainerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED raceConstrainerForm did not originate from getRaceConstrainerFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteRaceConstrainers
Description

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

Returnboolean false if RaceConstrainer deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteRaceConstrainer
Description

Deletes a RaceConstrainer.

Parametersosid.id.IdraceConstrainerIdthe Id of the RaceConstrainer to remove
ErrorsNOT_FOUND raceConstrainerId not found
NULL_ARGUMENT raceConstrainerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageRaceConstrainerAliases
Description

Tests if this user can manage Id aliases for race constrainers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if RaceConstrainer aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasRaceConstrainer
Description

Adds a Id to a RaceConstrainer for the purpose of creating compatibility. The primary Id of the RaceConstrainer is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another race constrainer. it is reassigned to the given race constrainer Id.

Parametersosid.id.IdraceConstrainerIdthe Id of a RaceConstrainer
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND raceConstrainerId not found
NULL_ARGUMENT raceConstrainerId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.