public interface VotePollsSession extends OsidSession
This session provides methods to retrieve Vote to
Polls mappings. A Vote 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 |
canLookupVotePollsMappings()
Tests if this user can perform lookups of vote/polls mappings.
|
PollsList |
getPollsByVote(Id voteId)
Gets the list of
Polls objects mapped to a Vote. |
IdList |
getPollsIdsByVote(Id voteId)
Gets the list of
Polls Ids mapped to a
Vote. |
IdList |
getVoteIdsByPolls(Id pollsId)
Gets the list of
Vote Ids associated
with a Polls. |
VoteList |
getVotesByPolls(Id pollsId)
Gets the list of
Votess associated with a Polls. |
VoteList |
getVotesByPolls(IdList pollsIds)
Gets the list of
Votes corresponding to a list of
Polls. |
IdList |
getVotesIdsByPolls(IdList pollsIds)
Gets the list of
Vote Ids corresponding to a list of
Polls objects. |
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
Vote 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()
Vote 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 canLookupVotePollsMappings()
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 getVoteIdsByPolls(Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Vote 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. VoteList getVotesByPolls(Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Votess 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 getVotesIdsByPolls(IdList pollsIds) throws OperationFailedException, PermissionDeniedException
Vote 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. VoteList getVotesByPolls(IdList pollsIds) throws OperationFailedException, PermissionDeniedException
Votes 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 getPollsIdsByVote(Id voteId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Polls Ids mapped to a
Vote. voteId - Id of a Vote Ids NotFoundException - voteId is not foundNullArgumentException - voteId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. PollsList getPollsByVote(Id voteId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Polls objects mapped to a Vote.
voteId - Id of a Vote NotFoundException - voteId is not foundNullArgumentException - voteId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.