public interface BallotPollsSession extends OsidSession
This session provides methods to retrieve Ballot to
Polls mappings. A Ballot may appear in
multiple Polls. Each Polls may have its own
authorizations governing who is allowed to look at it.
This lookup session defines several views:
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupBallotPollsMappings()
Tests if this user can perform lookups of ballot/polls mappings.
|
IdList |
getBallotIdsByPolls(Id pollsId)
Gets the list of
Ballot Ids associated
with a Polls. |
IdList |
getBallotIdsByPolls(IdList pollsIds)
Gets the list of
Ballot Ids corresponding to a list of
Polls objects. |
BallotList |
getBallotsByPolls(Id pollsId)
Gets the list of
Ballots associated with a
Polls. |
BallotList |
getBallotsByPolls(IdList pollsIds)
Gets the list of
Ballots corresponding to a list of
Polls. |
PollsList |
getPollsByBallot(Id ballotId)
Gets the list of
Polls objects mapped to a
Ballot. |
IdList |
getPollsIdsByBallot(Id ballotId)
Gets the list of
Polls Ids mapped to a
Ballot. |
void |
useComparativePollsView()
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 |
usePlenaryPollsView()
A complete view of the
Ballot and Polls
returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsclosevoid useComparativePollsView()
mandatory - This method is must be implemented. void usePlenaryPollsView()
Ballot and Polls
returns is desired. Methods will return what is requested or result in
an error. This view is used when greater precision is desired at the
expense of interoperability.mandatory - This method is must be implemented. boolean canLookupBallotPollsMappings()
PERMISSION_DENIED. This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false if looking up mappings is not authorized,
true otherwisemandatory - This method must be implemented. IdList getBallotIdsByPolls(Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ballot Ids associated
with a Polls. pollsId - Id of a Polls Ids NotFoundException - pollsId is not foundNullArgumentException - pollsId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BallotList getBallotsByPolls(Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ballots associated with a
Polls. pollsId - Id of a Polls NotFoundException - pollsId is not foundNullArgumentException - pollsId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getBallotIdsByPolls(IdList pollsIds) throws OperationFailedException, PermissionDeniedException
Ballot Ids corresponding to a list of
Polls objects.pollsIds - list of polls Ids Ids NullArgumentException - pollsIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BallotList getBallotsByPolls(IdList pollsIds) throws OperationFailedException, PermissionDeniedException
Ballots corresponding to a list of
Polls. pollsIds - list of polls Ids NullArgumentException - pollsIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. IdList getPollsIdsByBallot(Id ballotId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Polls Ids mapped to a
Ballot. ballotId - Id of a Ballot Ids NotFoundException - ballotId is not
foundNullArgumentException - ballotId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PollsList getPollsByBallot(Id ballotId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Polls objects mapped to a
Ballot. ballotId - Id of a Ballot NotFoundException - ballotId is not
foundNullArgumentException - ballotId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.