Interface VoteEnablerRuleApplicationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to apply VoteEnablers to
Votes . Multiple VoteEnablers applied to an Vote may be
sequenced such that the first positive evaluation results in the
VoteEnablers used.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignVoteEnablerToVote(Id voteEnablerId, Id voteId) Adds an existingVoteEnablerto aVote.booleanTests if this user can alter vote enabler/vote mappings.booleanTests if this user can orderVoteEnablers.getPolls()Gets thePollsassociated with this session.Gets thePollsIdassociated with this session.voidmoveVoteEnablerAhead(Id voteEnablerId, Id voteId, Id referenceId) Reorders vote enablers for a vote by moving the specified vote enabler in front of a reference vote enabler.voidmoveVoteEnablerBehind(Id voteEnablerId, Id voteId, Id referenceId) Reorders vote enablers for a vote by moving the specified vote enabler behind a reference vote enabler.voidorderVoteEnablers(Id[] voteEnablerIds, Id voteId) Reorders a set of vote enablers for a vote.voidunassignVoteEnablerFromVote(Id voteEnablerId, Id voteId) Removes an existingVoteEnablerfrom aVote.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getPollsId
Id getPollsId()Gets thePollsIdassociated with this session.- Returns:
- the
Polls Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getPolls
Gets thePollsassociated with this session.- Returns:
- the polls
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canAssignVoteEnablers
boolean canAssignVoteEnablers()Tests if this user can alter vote enabler/vote mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED.This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
assignVoteEnablerToVote
void assignVoteEnablerToVote(Id voteEnablerId, Id voteId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingVoteEnablerto aVote.- Parameters:
voteEnablerId- theIdof theVoteEnablervoteId- theIdof theVote- Throws:
AlreadyExistsException-voteEnablerIdalready applied tovoteIdNotFoundException-voteEnablerIdorvoteIdnot foundNullArgumentException-voteEnablerIdorvoteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignVoteEnablerFromVote
void unassignVoteEnablerFromVote(Id voteEnablerId, Id voteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes an existingVoteEnablerfrom aVote.- Parameters:
voteEnablerId- theIdof theVoteEnablervoteId- theIdof theVote- Throws:
NotFoundException-voteEnablerIdorvoteIdnot found orvoteEnablerIdalready applied tovoteIdNullArgumentException-voteEnablerIdorvoteIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canSequenceVoteEnablers
boolean canSequenceVoteEnablers()Tests if this user can orderVoteEnablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known sequencing operations will result in aPERMISSION_DENIED.This is intended as a hint to an application that may opt not to offer sequencing operations to an unauthorized user.- Returns:
falseifVoteEnablerordering is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
moveVoteEnablerAhead
void moveVoteEnablerAhead(Id voteEnablerId, Id voteId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders vote enablers for a vote by moving the specified vote enabler in front of a reference vote enabler.- Parameters:
voteEnablerId- theIdof theVoteEnablervoteId- theIdof theVotereferenceId- the reference vote enablerId- Throws:
NotFoundException-voteEnablerId, voteId, orreferenceIdnot found or,voteEnablerIdorreferenceIdnot related tovoteIdNullArgumentException-voteEnablerId, voteId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
moveVoteEnablerBehind
void moveVoteEnablerBehind(Id voteEnablerId, Id voteId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders vote enablers for a vote by moving the specified vote enabler behind a reference vote enabler.- Parameters:
voteEnablerId- theIdof theVoteEnablervoteId- theIdof theVotereferenceId- the reference vote enablerId- Throws:
NotFoundException-voteEnablerId, voteId, orreferenceIdnot found or,voteEnablerIdorreferenceIdnot related tovoteIdNullArgumentException-voteEnablerId, voteId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
orderVoteEnablers
void orderVoteEnablers(Id[] voteEnablerIds, Id voteId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders a set of vote enablers for a vote.- Parameters:
voteEnablerIds- theIdsfor a set ofVoteEnablersvoteId- theIdof theVote- Throws:
NotFoundException-voteEnablerId, voteId, orreferenceIdnot found or,voteEnablerIdorreferenceIdnot related tovoteIdNullArgumentException-voteEnablerIds, voteId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-