public interface VotePollsAssignmentSession extends OsidSession
This session provides methods to re-assign Votes to
Polls. A Vote may map to multiple
Polls objects and removing the last reference to a Vote
is the equivalent of deleting it. Each Polls may
have its own authorizations governing who is allowed to operate on it.
Moving or adding a reference of a Vote to another
Polls is not a copy operation (eg: does not change its
Id ).
| Modifier and Type | Method and Description |
|---|---|
void |
assignVoteToPolls(Id voteId,
Id pollsId)
Adds an existing
Vote to a Polls. |
boolean |
canAssignVotes()
Tests if this user can alter vote/polls mappings.
|
boolean |
canAssignVotesToPolls(Id pollsId)
Tests if this user can alter vote/polls mappings.
|
IdList |
getAssignablePollsIds(Id pollsId)
Gets a list of polls including and under the given polls node in which
any vote can be assigned.
|
IdList |
getAssignablePollsIdsForVote(Id pollsId,
Id voteId)
Gets a list of polls including and under the given polls node in which
a specific vote can be assigned.
|
void |
unassignVoteFromPolls(Id voteId,
Id pollsId)
Removes a
Vote from a Polls. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignVotes()
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false if mapping is not authorized, true
otherwisemandatory - This method must be implemented. boolean canAssignVotesToPolls(Id pollsId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.pollsId - the Id of the Polls false if mapping is not authorized, true
otherwiseNullArgumentException - pollsId is
null mandatory - This method must be implemented. IdList getAssignablePollsIds(Id pollsId) throws OperationFailedException
pollsId - the Id of the Polls Ids NullArgumentException - pollsId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignablePollsIdsForVote(Id pollsId, Id voteId) throws OperationFailedException
pollsId - the Id of the Polls voteId - the Id of the Vote Ids NullArgumentException - pollsId or
voteId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignVoteToPolls(Id voteId, Id pollsId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Vote to a Polls. voteId - the Id of the Vote pollsId - the Id of the Polls AlreadyExistsException - voteId is
already assigned to pollsId NotFoundException - voteId or
pollsId not foundNullArgumentException - voteId or
pollsId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignVoteFromPolls(Id voteId, Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Vote from a Polls. voteId - the Id of the Vote pollsId - the Id of the Polls NotFoundException - voteId or
pollsId not found or voteId not
assigned to pollsId NullArgumentException - voteId or
pollsId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.