OSID Logo
OSID Specifications
voting rules package
Version 3.1.0
Interfaceosid.voting.rules.RaceConstrainerAdminSession
Implementsosid.OsidSession
Used Byosid.voting.rules.VotingRulesManager
osid.voting.rules.VotingRulesProxyManager
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.Id the Polls Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Polls the polls
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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[]raceConstrainerRecordTypes array of race constrainer record types
Returnboolean true if RaceConstrainer creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT raceConstrainerRecordTypes is null
Compliancemandatory This 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[]raceConstrainerRecordTypes array of race constrainer record types
Returnosid.voting.rules.RaceConstrainerForm the race constrainer form
ErrorsNULL_ARGUMENT raceConstrainerRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateRaceConstrainer
Description

Creates a new RaceConstrainer.

Parametersosid.voting.rules.RaceConstrainerFormraceConstrainerForm the form for this RaceConstrainer
Returnosid.voting.rules.RaceConstrainer the new RaceConstrainer
ErrorsILLEGAL_STATE raceConstrainerForm already used for a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT raceConstrainerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED raceConstrainerForm did not originate from getRaceConstrainerFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IdraceConstrainerId the Id of the RaceConstrainer
Returnosid.voting.rules.RaceConstrainerForm the race constrainer form
ErrorsNOT_FOUND raceConstrainerId is not found
NULL_ARGUMENT raceConstrainerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateRaceConstrainer
Description

Updates an existing race constrainer.

Parametersosid.voting.rules.RaceConstrainerFormraceConstrainerForm the form containing the elements to be updated
ErrorsILLEGAL_STATE raceConstrainerForm already used for an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT raceConstrainerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED raceConstrainerForm did not originate from getRaceConstrainerFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteRaceConstrainer
Description

Deletes a RaceConstrainer.

Parametersosid.id.IdraceConstrainerId the Id of the RaceConstrainer to remove
ErrorsNOT_FOUND raceConstrainerId not found
NULL_ARGUMENT raceConstrainerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IdraceConstrainerId the Id of a RaceConstrainer
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND raceConstrainerId not found
NULL_ARGUMENT raceConstrainerId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.