Interface | osid.voting.RaceAdminSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session creates, updates, and deletes Create and update operations differ in their usage. To
create a For updates, The delete operations delete This session includes an | ||
Method | getPollsId | ||
Description |
Gets the | ||
Return | osid.id.Id | the Polls Id associated with this session | |
Compliance | mandatory | This method must be implemented. | |
Method | getPolls | ||
Description |
Gets the | ||
Return | osid.voting.Polls | the Polls associated with this session | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canCreateRaces | ||
Description |
Tests if this user can create | ||
Return | boolean | false if Race creation is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | canCreateRaceWithRecordTypes | ||
Description |
Tests if this user can create a single | ||
Parameters | osid.type.Type[] | raceRecordTypes | array of race record types |
Return | boolean | true if Race creation using the specified
record Types is supported, false otherwise | |
Errors | NULL_ARGUMENT | raceRecordTypes is null | |
Compliance | mandatory | This method must be implemented. | |
Method | getRaceFormForCreate | ||
Description |
Gets the race form for creating new races. A new form should be requested for each create transaction. | ||
Parameters | osid.id.Id | ballotId | a ballot Id |
osid.type.Type[] | raceRecordTypes | array of race record types | |
Return | osid.voting.RaceForm | the race form | |
Errors | NOT_FOUND | raceId is not found | |
NULL_ARGUMENT | raceId or raceRecordTypes is null
| ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | unable to get form with requested record types | ||
Compliance | mandatory | This method must be implemented. | |
Method | createRace | ||
Description |
Creates a new | ||
Parameters | osid.voting.RaceForm | raceForm | the form for this Race |
Return | osid.voting.Race | the new Race | |
Errors | ILLEGAL_STATE | raceForm already used in a create transaction | |
INVALID_ARGUMENT | one or more of the form elements is invalid | ||
NULL_ARGUMENT | raceForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | raceForm did not originate from
getRaceFormForCreate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canUpdateRaces | ||
Description |
Tests if this user can update | ||
Return | boolean | false if Race modification is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getRaceFormForUpdate | ||
Description |
Gets the race form for updating an existing race. A new race form should be requested for each update transaction. | ||
Parameters | osid.id.Id | raceId | the Id of the Race |
Return | osid.voting.RaceForm | the race form | |
Errors | NOT_FOUND | raceId is not found | |
NULL_ARGUMENT | raceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | updateRace | ||
Description |
Updates an existing race. | ||
Parameters | osid.voting.RaceForm | raceForm | the form containing the elements to be updated |
Errors | ILLEGAL_STATE | raceForm already used in an update transaction | |
INVALID_ARGUMENT | the form contains an invalid value | ||
NULL_ARGUMENT | raceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | raceForm did not originate from
getRaceFormForUpdate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canDeleteRaces | ||
Description |
Tests if this user can delete | ||
Return | boolean | false if Race deletion is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | deleteRace | ||
Description |
Deletes a | ||
Parameters | osid.id.Id | raceId | the Id of the Race to remove |
Errors | NOT_FOUND | raceId is not found | |
NULL_ARGUMENT | raceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canManageRaceAliases | ||
Description |
Tests if this user can manage | ||
Return | boolean | false if Race aliasing is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | aliasRace | ||
Description |
Adds an | ||
Parameters | osid.id.Id | raceId | the Id of a Race |
osid.id.Id | aliasId | the alias Id | |
Errors | ALREADY_EXISTS | aliasId is already assigned | |
NOT_FOUND | raceId not found | ||
NULL_ARGUMENT | raceId or aliasId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |