Interface BallotConstrainerEnablerRuleApplicationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BallotConstrainerEnablerRuleApplicationSession extends OsidSession

This session provides methods to apply BallotConstrainerEnablers to BallotConstrainers . A BallotConstrainer with multiple BallotConstrainerEnablers means any positive rule evaluation across the enablers result in an effective BallotConstrainer .

  • 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.
    • canAssignBallotConstrainerEnablers

      boolean canAssignBallotConstrainerEnablers()
      Tests if this user can alter ballot constrainer enabler/ballot constrainer 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.
    • assignBallotConstrainerEnablerToBallotConstrainer

      void assignBallotConstrainerEnablerToBallotConstrainer(Id ballotConstrainerEnablerId, Id ballotConstrainerId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing BallotConstrainerEnabler to a BallotConstrainer .
      Parameters:
      ballotConstrainerEnablerId - the Id of the BallotConstrainerEnabler
      ballotConstrainerId - the Id of the BallotConstrainer
      Throws:
      AlreadyExistsException - ballotConstrainerEnablerId is already applied to ballotConstrainerId
      NotFoundException - ballotConstrainerEnablerId or ballotConstrainerId not found
      NullArgumentException - ballotConstrainerEnablerId or ballotConstrainerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignBallotConstrainerEnablerFromBallotConstrainer

      void unassignBallotConstrainerEnablerFromBallotConstrainer(Id ballotConstrainerEnablerId, Id ballotConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a BallotConstrainerEnabler from a BallotConstrainer .
      Parameters:
      ballotConstrainerEnablerId - the Id of the BallotConstrainerEnabler
      ballotConstrainerId - the Id of the BallotConstrainer
      Throws:
      NotFoundException - ballotConstrainerEnablerId or ballotConstrainerId not found or ballotConstrainerEnablerId not applied to ballotConstrainerId
      NullArgumentException - ballotConstrainerEnablerId or ballotConstrainerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canSequenceBallotConstrainerEnablers

      boolean canSequenceBallotConstrainerEnablers()
      Tests if this user can order BallotConstrainerEnablers . 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 BallotConstrainerEnabler ordering is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • moveBallotConstrainerEnablerAhead

      void moveBallotConstrainerEnablerAhead(Id ballotConstrainerEnablerId, Id ballotConstrainerId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Reorders ballot constrainer enablers for a ballot constrainer by moving the specified ballot constrainer enabler in front of a reference ballot constrainer enabler.
      Parameters:
      ballotConstrainerEnablerId - the Id of a BallotConstrainerEnabler
      ballotConstrainerId - the Id of a BallotConstrainer
      referenceId - the reference ballot constrainer enabler Id
      Throws:
      NotFoundException - ballotConstrainerEnablerId, ballotConstrainerId , or referenceId not found or, ballotConstrainerId or referenceId not related to ballotConstrainerId
      NullArgumentException - ballotConstrainerEnablerId, ballotConstrainerId , or referenceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • moveBallotConstrainerEnablerBehind

      void moveBallotConstrainerEnablerBehind(Id ballotConstrainerEnablerId, Id ballotConstrainerId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Reorders ballot constrainer enablers for a ballot constrainer by moving the specified ballot constrainer enabler behind a reference ballot constrainer enabler.
      Parameters:
      ballotConstrainerEnablerId - the Id of a BallotConstrainerEnabler
      ballotConstrainerId - the Id of a BallotConstrainer
      referenceId - the reference ballot constrainer enabler Id
      Throws:
      NotFoundException - ballotConstrainerEnablerId, ballotConstrainerId , or referenceId not found or, ballotConstrainerId or referenceId not related to ballotConstrainerId
      NullArgumentException - ballotConstrainerEnablerId, ballotConstrainerId , or referenceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • orderBallotConstrainerEnablers

      void orderBallotConstrainerEnablers(Id[] ballotConstrainerEnablerIds, Id ballotConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Reorders a set of ballot constrainer enablers for a ballot constrainer.
      Parameters:
      ballotConstrainerEnablerIds - the Ids for a set of BallotConstrainerEnablers
      ballotConstrainerId - the Id of a BallotConstrainer
      Throws:
      NotFoundException - ballotConstrainerId not found or, a ballotConstrainerEnablerId not related to ballotConstrainerId
      NullArgumentException - ballotConstrainerEnablerIds or ballotConstrainerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.