public interface VoteLookupSession extends OsidSession
This session provides methods for looking up votes.
This session defines views that offer differing behaviors when retrieving multiple objects.
VoteAdminSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupVotes()
Tests if this user can access votes.
|
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
Vote |
getVote(Id voteId)
Gets a
Vote specified by its Id. |
VoteList |
getVotes()
Gets all votes.
|
VoteList |
getVotesByGenusType(Type voteGenusType)
Gets the votes for the given vote genus type.
|
VoteList |
getVotesByIds(IdList voteIds)
Gets a
VoteList corresponding to the given
IdList. |
VoteList |
getVotesByParentGenusType(Type voteGenusType)
Gets the votes for the given vote genus type and include any votes
with a genus type derived from the specified genus type.
|
VoteList |
getVotesByRecordType(Type voteRecordType)
Gets the votes for the given vote record type.
|
VoteList |
getVotesForBallot(Id ballotId)
Gets the votes cast in the given ballot.
|
VoteList |
getVotesForBallotOnDate(Id ballotId,
DateTime from,
DateTime to)
Gets a list of votes in a ballot effective during the entire given
date range inclusive but not confined to the date range.
|
VoteList |
getVotesForCandidate(Id candidateId)
Gets the
Votes for a candidate. |
VoteList |
getVotesForCandidateOnDate(Id candidateId,
DateTime from,
DateTime to)
Gets a list of votes for a candidate effective during the entire given
date range inclusive but not confined to the date range.
|
VoteList |
getVotesForRace(Id raceId)
Gets the votes cast in the given race.
|
VoteList |
getVotesForRaceOnDate(Id raceId,
DateTime from,
DateTime to)
Gets a list of votes in a race effective during the entire given date
range inclusive but not confined to the date range.
|
VoteList |
getVotesForVoter(Id resourceId)
Gets the votes cast by the given voter.
|
VoteList |
getVotesForVoterAndBallot(Id resourceId,
Id ballotId)
Gets the votes cast by the given voter and ballot.
|
VoteList |
getVotesForVoterAndBallotOnDate(Id resourceId,
Id ballotId,
DateTime from,
DateTime to)
Gets a list of votes for a voter and ballot effective during the
entire given date range inclusive but not confined to the date range.
|
VoteList |
getVotesForVoterAndCandidate(Id resourceId,
Id candidateId)
Gets the votes cast by the given voter and candidate.
|
VoteList |
getVotesForVoterAndCandidateOnDate(Id resourceId,
Id candidateId,
DateTime from,
DateTime to)
Gets a list of votes for a voter and candidate effective during the
entire given date range inclusive but not confined to the date range.
|
VoteList |
getVotesForVoterAndRace(Id resourceId,
Id raceId)
Gets the votes cast by the given voter and race.
|
VoteList |
getVotesForVoterAndRaceOnDate(Id resourceId,
Id raceId,
DateTime from,
DateTime to)
Gets a list of votes for a voter and race effective during the entire
given date range inclusive but not confined to the date range.
|
VoteList |
getVotesForVoterOnDate(Id resourceId,
DateTime from,
DateTime to)
Gets a list of votes for a voter effective during the entire given
date range inclusive but not confined to the date range.
|
VoteList |
getVotesOnDate(DateTime from,
DateTime to)
Gets a list of votes effective during the entire given date range
inclusive but not confined to the date range.
|
void |
useAnyEffectiveVoteView()
All votes of any effective dates are returned by methods in this
session.
|
void |
useComparativeVoteView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useEffectiveVoteView()
Only votes whose effective dates are current are returned by methods
in this session.
|
void |
useFederatedPollsView()
Federates the view for methods in this session.
|
void |
useIsolatedPollsView()
Isolates the view for methods in this session.
|
void |
usePlenaryVoteView()
A complete view of the vote returns is desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getPollsId()
Polls
Id
associated with this
session. Polls Id
associated with this sessionmandatory
- This method must be implemented. Polls getPolls() throws OperationFailedException, PermissionDeniedException
Polls
associated with this session. Polls
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupVotes()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer vote operations. false
if voting methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeVoteView()
mandatory
- This method is must be implemented. void usePlenaryVoteView()
mandatory
- This method is must be implemented. void useFederatedPollsView()
mandatory
- This method is must be implemented. void useIsolatedPollsView()
mandatory
- This method is must be implemented. void useEffectiveVoteView()
mandatory
- This method is must be implemented. void useAnyEffectiveVoteView()
mandatory
- This method is must be implemented. Vote getVote(Id voteId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Vote
specified by its Id.
voteId
- Id
of the Vote
NotFoundException
- voteId
not foundNullArgumentException
- voteId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. VoteList getVotesByIds(IdList voteIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
VoteList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
votes specified in the Id
list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible Votes
may be omitted from the list and may
present the elements in any order including returning a unique set.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.voteIds
- the list of Ids
to retrieve Vote
listNotFoundException
- an Id
was not foundNullArgumentException
- voteIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesByGenusType(Type voteGenusType) throws OperationFailedException, PermissionDeniedException
voteGenusType
- a vote genus typeNullArgumentException
- voteGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesByParentGenusType(Type voteGenusType) throws OperationFailedException, PermissionDeniedException
voteGenusType
- a vote genus typeNullArgumentException
- voteGenusType
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesByRecordType(Type voteRecordType) throws OperationFailedException, PermissionDeniedException
voteRecordType
- a vote record typeNullArgumentException
- voteRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
from
- start of date rangeto
- end of date range Vote
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForVoter(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id
or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible votes may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.resourceId
- Id
of a Voter
NullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForVoterOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
votes or an error results. Otherwise, the returned list may contain
only those votes that are accessible through this session.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.resourceId
- Id
of a Voter
from
- start of date rangeto
- end of date range Vote
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForCandidate(Id candidateId) throws OperationFailedException, PermissionDeniedException
Votes
for a candidate.
In plenary mode, the returned list contains all known votes or an
error results. Otherwise, the returned list may contain only those
votes that are accessible through this session.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.candidateId
- Id
of a Candidate
NullArgumentException
- candidateId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForCandidateOnDate(Id candidateId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
votes or an error results. Otherwise, the returned list may contain
only those votes that are accessible through this session.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.candidateId
- Id
of a Candidate
from
- start of date rangeto
- end of date range Vote
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- candidateId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForVoterAndCandidate(Id resourceId, Id candidateId) throws OperationFailedException, PermissionDeniedException
Id
or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible votes may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.resourceId
- Id
of a Voter
candidateId
- Id
of a Candidate
NullArgumentException
- resourceId
or
candidateId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForVoterAndCandidateOnDate(Id resourceId, Id candidateId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
votes or an error results. Otherwise, the returned list may contain
only those votes that are accessible through this session.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.resourceId
- Id
of a Voter
candidateId
- Id
of a Candidate
from
- start of date rangeto
- end of date range Vote
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, candidateId,
from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForRace(Id raceId) throws OperationFailedException, PermissionDeniedException
Id
or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible votes may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.raceId
- Id
of a Race
NullArgumentException
- ballotId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForRaceOnDate(Id raceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
votes or an error results. Otherwise, the returned list may contain
only those votes that are accessible through this session.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.raceId
- Id
of a Race
from
- start of date rangeto
- end of date range Vote
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- raceId, from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForVoterAndRace(Id resourceId, Id raceId) throws OperationFailedException, PermissionDeniedException
Id
or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible votes may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.resourceId
- Id
of a Voter
raceId
- Id
of a Race
NullArgumentException
- resourceId
or
raceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForVoterAndRaceOnDate(Id resourceId, Id raceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
votes or an error results. Otherwise, the returned list may contain
only those votes that are accessible through this session.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.resourceId
- Id
of a Voter
raceId
- Id
of a Race
from
- start of date rangeto
- end of date range Vote
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, raceId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
Id
or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible votes may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.ballotId
- Id
of a Ballot
NullArgumentException
- ballotId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForBallotOnDate(Id ballotId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
votes or an error results. Otherwise, the returned list may contain
only those votes that are accessible through this session.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.ballotId
- Id
of a Ballot
from
- start of date rangeto
- end of date range Vote
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- ballotId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForVoterAndBallot(Id resourceId, Id ballotId) throws OperationFailedException, PermissionDeniedException
Id
or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible votes may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.resourceId
- Id
of a Voter
ballotId
- Id
of a Ballot
NullArgumentException
- resourceId
or
ballotId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotesForVoterAndBallotOnDate(Id resourceId, Id ballotId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
In plenary mode, the returned list contains all known
votes or an error results. Otherwise, the returned list may contain
only those votes that are accessible through this session.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.resourceId
- Id
of a Voter
ballotId
- Id
of a Ballot
from
- start of date rangeto
- end of date range Vote
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, ballotId,
from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoteList getVotes() throws OperationFailedException, PermissionDeniedException
Id
or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible votes may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, votes are returned that are currently effective. In
any effective mode, effective votes and those currently expired are
returned.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.