Interface | osid.voting.CandidateAdminSession | ||
---|---|---|---|
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 | canCreateCandidates | ||
Description |
Tests if this user can create | ||
Return | boolean | false if Candidate creation is not
authorized, true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | canCreateCandidateWithRecordTypes | ||
Description |
Tests if this user can create a single | ||
Parameters | osid.type.Type[] | candidateRecordTypes | array of candidate record types |
Return | boolean | true if Candidate creation using the
specified Types is supported, false otherwise | |
Errors | NULL_ARGUMENT | candidateRecordTypes is null | |
Compliance | mandatory | This method must be implemented. | |
Method | getCandidateFormForCreate | ||
Description |
Gets the candidate form for creating new candidates. A new form should be requested for each create transaction. | ||
Parameters | osid.id.Id | resourceId | the resource Id |
osid.id.Id | raceId | the race Id | |
osid.type.Type[] | candidateRecordTypes | array of candidate record types | |
Return | osid.voting.CandidateForm | the candidate form | |
Errors | NOT_FOUND | resourceId or raceId is not found | |
NULL_ARGUMENT | resourceId, raceId or candidateRecordTypes 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 | createCandidate | ||
Description |
Creates a new | ||
Parameters | osid.voting.CandidateForm | candidateForm | the form for this Candidate |
Return | osid.voting.Candidate | the new Candidate | |
Errors | ILLEGAL_STATE | candidateForm already used in a create transaction | |
INVALID_ARGUMENT | one or more of the form elements is invalid | ||
NULL_ARGUMENT | candidateForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | candidateForm did not originate from
getCandidateFormForCreate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canUpdateCandidates | ||
Description |
Tests if this user can update | ||
Return | boolean | false if Candidate modification is not
authorized, true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getCandidateFormForUpdate | ||
Description |
Gets the candidate form for updating an existing candidate. A new candidate form should be requested for each update transaction. | ||
Parameters | osid.id.Id | candidateId | the Id of the Candidate |
Return | osid.voting.CandidateForm | the candidate form | |
Errors | NOT_FOUND | candidateId is not found | |
NULL_ARGUMENT | candidateId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | updateCandidate | ||
Description |
Updates an existing candidate. | ||
Parameters | osid.voting.CandidateForm | candidateForm | the form containing the elements to be updated |
Errors | ILLEGAL_STATE | candidateForm already used in an update transaction | |
INVALID_ARGUMENT | the form contains an invalid value | ||
NULL_ARGUMENT | candidateForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | candidateForm did not originate from
getCandidateFormForUpdate() | ||
Compliance | mandatory | This method must be implemented. | |
Method | canDeleteCandidates | ||
Description |
Tests if this user can delete | ||
Return | boolean | false if Candidate deletion is not
authorized, true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | deleteCandidate | ||
Description |
Deletes a | ||
Parameters | osid.id.Id | candidateId | the Id of the Candidate to remove |
Errors | NOT_FOUND | candidateId not found | |
NULL_ARGUMENT | candidateId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canManageCandidateAliases | ||
Description |
Tests if this user can manage | ||
Return | boolean | false if Candidate aliasing is not
authorized, true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | aliasCandidate | ||
Description |
Adds an | ||
Parameters | osid.id.Id | candidateId | the Id of a Candidate |
osid.id.Id | aliasId | the alias Id | |
Errors | ALREADY_EXISTS | aliasId is already assigned | |
NOT_FOUND | candidateId not found | ||
NULL_ARGUMENT | aliasId or candidateId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |