Interface | osid.voting.BallotLookupSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session defines methods for retrieving ballots. A
This lookup session defines several views:
The methods Ballots may have an additional records indicated by their
respective record types. The record may not be accessed
through a cast of the | ||
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 | canLookupBallots | ||
Description |
Tests if this user can perform | ||
Return | boolean | false if lookup methods are not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | useComparativeBallotView | ||
Description |
The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | usePlenaryBallotView | ||
Description |
A complete view of the | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useFederatedPollsView | ||
Description |
Federates the view for methods in this session. A federated view will include ballots in polls which are children of this polls in the polls hierarchy. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useIsolatedPollsView | ||
Description |
Isolates the view for methods in this session. An isolated view restricts lookups to this polls only. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useActiveBallotView | ||
Description |
Only active ballots are returned from methods in this session. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useAnyStatusBallotView | ||
Description |
Borth active and inactive ballots are returned from methods in this session. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getBallot | ||
Description |
Gets the In active mode, ballots are returned that are currently active. In any status mode, active and inactive ballots are returned. | ||
Parameters | osid.id.Id | ballotId | the Id of the Ballot to retrieve |
Return | osid.voting.Ballot | the returned Ballot | |
Errors | NOT_FOUND | no Ballot found with the given Id | |
NULL_ARGUMENT | ballotId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getBallotsByIds | ||
Description |
Gets a In active mode, ballots are returned that are currently active. In any status mode, active and inactive ballots are returned. | ||
Parameters | osid.id.IdList | ballotIds | the list of Ids to retrieve |
Return | osid.voting.BallotList | the returned Ballot list | |
Errors | NOT_FOUND | an Id was not found | |
NULL_ARGUMENT | ballotIds is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getBallotsByGenusType | ||
Description |
Gets a In active mode, ballots are returned that are currently active. In any status mode, active and inactive ballots are returned. | ||
Parameters | osid.type.Type | ballotGenusType | a ballot genus type |
Return | osid.voting.BallotList | the returned Ballot list | |
Errors | NULL_ARGUMENT | ballotGenusType is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getBallotsByParentGenusType | ||
Description |
Gets a In active mode, ballots are returned that are currently active. In any status mode, active and inactive ballots are returned. | ||
Parameters | osid.type.Type | ballotGenusType | a ballot genus type |
Return | osid.voting.BallotList | the returned Ballot list | |
Errors | NULL_ARGUMENT | ballotGenusType is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getBallotsByRecordType | ||
Description |
Gets a In plenary mode, the returned list contains all known ballots or an error results. Otherwise, the returned list may contain only those ballots that are accessible through this session. In active mode, ballots are returned that are currently active. In any status mode, active and inactive ballots are returned. | ||
Parameters | osid.type.Type | ballotRecordType | a ballot record type |
Return | osid.voting.BallotList | the returned Ballot list | |
Errors | NULL_ARGUMENT | ballotRecordType is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getBallotsByProvider | ||
Description |
Gets a In plenary mode, the returned list contains all known ballots or an error results. Otherwise, the returned list may contain only those ballots that are accessible through this session. In active mode, ballots are returned that are currently active. In any status mode, active and inactive ballots are returned. | ||
Parameters | osid.id.Id | resourceId | a resource Id |
Return | osid.voting.BallotList | the returned Ballot list | |
Errors | NULL_ARGUMENT | resourceId is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getBallotsOnDate | ||
Description |
Gets a In plenary mode, the returned list contains all known ballots or an error results. Otherwise, the returned list may contain only those ballots that are accessible through this session. In active mode, ballots are returned that are currently active. In any status mode, active and inactive ballots are returned. | ||
Parameters | osid.calendaring.DateTime | from | s atsrting date |
osid.calendaring.DateTime | to | an ending date | |
Return | osid.voting.BallotList | the returned Ballot list | |
Errors | INVALID_ARGUMENT | from is greater than to | |
NULL_ARGUMENT | from or to is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getBallots | ||
Description |
Gets all In plenary mode, the returned list contains all known ballots or an error results. Otherwise, the returned list may contain only those ballots that are accessible through this session. In active mode, ballots are returned that are currently active. In any status mode, active and inactive ballots are returned. | ||
Return | osid.voting.BallotList | a list of Ballots | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |