public interface VoterAllocationAdminSession extends OsidSession
This session manages voter allocations. All voters are assumed to have
a default allocation form such that this session only provides an update
mechanism. The data for update is provided via the
VoterAllocationForm.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canManageVoterAllocations()
Tests if this user can manage voter allocation.
|
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
VoterAllocationForm |
getVoterAllocationFormForUpdate(Id raceId,
Id resourceId)
Gets the voter allocation form.
|
void |
updateVoterAllocation(VoterAllocationForm voterAllocationForm)
Updates an allocation for a voter.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId 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 canManageVoterAllocations()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer allocation operations to an
unauthorized user. false if voter allocation is not authorized,
true otherwisemandatory - This method must be implemented. VoterAllocationForm getVoterAllocationFormForUpdate(Id raceId, Id resourceId) throws NotFoundException, OperationFailedException
raceId - the Id of the Race resourceId - the Id of the Voter NotFoundException - raceId or
resourceId is not foundNullArgumentException - raceId or
resourceId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void updateVoterAllocation(VoterAllocationForm voterAllocationForm) throws OperationFailedException, PermissionDeniedException
voterAllocationForm - the form containing the elements to be
updatedIllegalStateException - voterAllocationForm
already used in a create transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - voterAllocationForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - voterAllocationForm
did not originate from
getVoterAllocationFormForUpdate() mandatory - This method must be implemented.