public interface VoterAllocationLookupSession extends OsidSession
This session provides methods for looking up voter allocations.
This session defines views that offer differing behaviors when retrieving multiple objects.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupVoterAllocations()
Tests if this user can access voter allocations.
|
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
VoterAllocation |
getVoterAllocation(Id raceId,
Id resourceId)
Gets a
VoterAllocation specified by the race and voter. |
VoterAllocationList |
getVoterAllocations()
Gets all
VoterAllocations on this ballot. |
VoterAllocationList |
getVoterAllocationsByRace(Id raceId)
Gets the
VoterAllocations in a race. |
VoterAllocationList |
getVoterAllocationsByRecordType(Type voterAllocationRecordType)
Gets the voter allocations for the voter allocation record type.
|
VoterAllocationList |
getVoterAllocationsByVoter(Id resourceId)
Gets the
VoterAllocations for a voter. |
VoterAllocationList |
getVoterAllocationsByVoterForBallot(Id ballotId,
Id resourceId)
Gets the
VoterAllocations for a voter on a ballot. |
void |
useComparativeVoterAllocationView()
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 |
usePlenaryVoterAllocationView()
A complete view of the voter allocation 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.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupVoterAllocations()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer relationship operations. false
if voter allocation lookup methods are
not authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeVoterAllocationView()
mandatory
- This method is must be implemented. void usePlenaryVoterAllocationView()
mandatory
- This method is must be implemented. VoterAllocation getVoterAllocation(Id raceId, Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
VoterAllocation
specified by the race and voter.raceId
- Id
of the Race
resourceId
- Id
of the Resource
NotFoundException
- raceId
or
resourceId
not foundNullArgumentException
- raceId
or
resourceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. VoterAllocationList getVoterAllocationsByRecordType(Type voterAllocationRecordType) throws OperationFailedException, PermissionDeniedException
voterAllocationRecordType
- a voter allocation record typeNullArgumentException
-
voterAllocationRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoterAllocationList getVoterAllocationsByRace(Id raceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
VoterAllocations
in a race.raceId
- Id
of a Race
NotFoundException
- candidateId
is not
foundNullArgumentException
- candidateId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoterAllocationList getVoterAllocationsByVoter(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
VoterAllocations
for a voter.resourceId
- Id
of a Resource
NotFoundException
- resourceId
is not
foundNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoterAllocationList getVoterAllocationsByVoterForBallot(Id ballotId, Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
VoterAllocations
for a voter on a ballot.ballotId
- Id
of a Ballot
resourceId
- Id
of a Resource
NotFoundException
- ballotId
or
resourceId
is not foundNullArgumentException
- ballotId
or
resourceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. VoterAllocationList getVoterAllocations() throws OperationFailedException, PermissionDeniedException
VoterAllocations
on this ballot.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.