Interface VoteEnablerRuleApplicationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface VoteEnablerRuleApplicationSession extends 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 Details

    • getPollsId

      Id getPollsId()
      Gets the Polls Id associated with this session.
      Returns:
      the Polls Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getPolls

      Gets the Polls associated with this session.
      Returns:
      the polls
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 a PERMISSION_DENIED .This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • assignVoteEnablerToVote

      void assignVoteEnablerToVote(Id voteEnablerId, Id voteId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing VoteEnabler to a Vote .
      Parameters:
      voteEnablerId - the Id of the VoteEnabler
      voteId - the Id of the Vote
      Throws:
      AlreadyExistsException - voteEnablerId already applied to voteId
      NotFoundException - voteEnablerId or voteId not found
      NullArgumentException - voteEnablerId or voteId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignVoteEnablerFromVote

      void unassignVoteEnablerFromVote(Id voteEnablerId, Id voteId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an existing VoteEnabler from a Vote .
      Parameters:
      voteEnablerId - the Id of the VoteEnabler
      voteId - the Id of the Vote
      Throws:
      NotFoundException - voteEnablerId or voteId not found or voteEnablerId already applied to voteId
      NullArgumentException - voteEnablerId or voteId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canSequenceVoteEnablers

      boolean canSequenceVoteEnablers()
      Tests if this user can order VoteEnablers . A return of true does not guarantee successful authorization. A return of false indicates that it is known sequencing operations will result in a PERMISSION_DENIED .This is intended as a hint to an application that may opt not to offer sequencing operations to an unauthorized user.
      Returns:
      false if VoteEnabler ordering is not authorized, true otherwise
      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 - the Id of the VoteEnabler
      voteId - the Id of the Vote
      referenceId - the reference vote enabler Id
      Throws:
      NotFoundException - voteEnablerId, voteId , or referenceId not found or, voteEnablerId or referenceId not related to voteId
      NullArgumentException - voteEnablerId, voteId , or referenceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Id of the VoteEnabler
      voteId - the Id of the Vote
      referenceId - the reference vote enabler Id
      Throws:
      NotFoundException - voteEnablerId, voteId , or referenceId not found or, voteEnablerId or referenceId not related to voteId
      NullArgumentException - voteEnablerId, voteId , or referenceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - the Ids for a set of VoteEnablers
      voteId - the Id of the Vote
      Throws:
      NotFoundException - voteEnablerId, voteId , or referenceId not found or, voteEnablerId or referenceId not related to voteId
      NullArgumentException - voteEnablerIds, voteId , or referenceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.