Interface BallotConstrainerEnablerPollsSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BallotConstrainerEnablerPollsSession extends OsidSession

This session provides methods to retrieve BallotConstrainerEnabler to Polls mappings. A BallotConstrainerEnabler may appear in multiple Polls objects. Each polls may have its own authorizations governing who is allowed to look at it.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • Method Details

    • canLookupBallotConstrainerEnablerPollsMappings

      boolean canLookupBallotConstrainerEnablerPollsMappings()
      Tests if this user can perform lookups of ballot constrainer enabler/polls mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup 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 looking up mappings is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeBallotConstrainerEnablerPollsView

      void useComparativeBallotConstrainerEnablerPollsView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryBallotConstrainerEnablerPollsView

      void usePlenaryBallotConstrainerEnablerPollsView()
      A complete view of the BallotConstrainerEnabler 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.
      Compliance:
      mandatory - This method is must be implemented.
    • getBallotConstrainerEnablerIdsByPolls

      IdList getBallotConstrainerEnablerIdsByPolls(Id pollsId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of BallotConstrainerEnablerIds associated with a Polls .
      Parameters:
      pollsId - Id of the Polls
      Returns:
      list of related ballot constrainer enabler Ids
      Throws:
      NotFoundException - pollsId is not found
      NullArgumentException - pollsId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBallotConstrainerEnablersByPolls

      Gets the list of ballot constrainer enablers associated with a Polls .
      Parameters:
      pollsId - Id of the Polls
      Returns:
      list of related ballot constrainer enablers
      Throws:
      NotFoundException - pollsId is not found
      NullArgumentException - pollsId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBallotConstrainerEnablerIdsByPolls

      IdList getBallotConstrainerEnablerIdsByPolls(IdList pollsIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of BallotConstrainerEnablerIds corresponding to a list of Polls .
      Parameters:
      pollsIds - list of polls Ids
      Returns:
      list of ballot constrainer enabler Ids
      Throws:
      NullArgumentException - pollsIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getBallotConstrainerEnablersByPolls

      BallotConstrainerEnablerList getBallotConstrainerEnablersByPolls(IdList pollsIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of ballot constrainer enablers corresponding to a list of Polls .
      Parameters:
      pollsIds - list of polls Ids
      Returns:
      list of ballot constrainer enablers
      Throws:
      NullArgumentException - pollsIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPollsIdsByBallotConstrainerEnabler

      IdList getPollsIdsByBallotConstrainerEnabler(Id ballotConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the Polls Ids mapped to a BallotConstrainerEnabler .
      Parameters:
      ballotConstrainerEnablerId - Id of a BallotConstrainerEnabler
      Returns:
      list of polls
      Throws:
      NotFoundException - ballotConstrainerEnablerId is not found
      NullArgumentException - ballotConstrainerEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getPollsByBallotConstrainerEnabler

      PollsList getPollsByBallotConstrainerEnabler(Id ballotConstrainerEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the Polls mapped to a BallotConstrainerEnabler .
      Parameters:
      ballotConstrainerEnablerId - Id of a BallotConstrainerEnabler
      Returns:
      list of polls
      Throws:
      NotFoundException - ballotConstrainerEnablerId is not found
      NullArgumentException - ballotConstrainerEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.