Interface VoteSearchOrder

All Superinterfaces:
Extensible, OsidBrowsableSearchOrder, OsidExtensibleSearchOrder, OsidIdentifiableSearchOrder, OsidObjectSearchOrder, OsidRelationshipSearchOrder, OsidSearchOrder, OsidTemporalSearchOrder, Suppliable

public interface VoteSearchOrder extends OsidRelationshipSearchOrder

An interface for specifying the ordering of search results.

  • Method Details

    • orderByCandidate

      void orderByCandidate(SearchOrderStyle style)
      Specified a preference for ordering results by the candidate.
      Parameters:
      style - search order style
      Throws:
      NullArgumentException - style is null
      Compliance:
      mandatory - This method must be implemented.
    • supportsCandidateSearchOrder

      boolean supportsCandidateSearchOrder()
      Tests if a CandidateSearchOrder is available.
      Returns:
      true if a candidate search order is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCandidateSearchOrder

      CandidateSearchOrder getCandidateSearchOrder()
      Gets the search order interface for a candidate.
      Returns:
      the candidate search order
      Throws:
      UnimplementedException - supportsCandidateSearchOrder() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCandidateSearchOrder()} is {@code true} .
    • orderByVoter

      void orderByVoter(SearchOrderStyle style)
      Specified a preference for ordering results by the voter.
      Parameters:
      style - search order style
      Throws:
      NullArgumentException - style is null
      Compliance:
      mandatory - This method must be implemented.
    • supportsVoterSearchOrder

      boolean supportsVoterSearchOrder()
      Tests if a ResourceSearchOrder is available.
      Returns:
      true if a resource search order is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getVoterSearchOrder

      ResourceSearchOrder getVoterSearchOrder()
      Gets the search order for a resource.
      Returns:
      the resource search order
      Throws:
      UnimplementedException - supportsVoterSearchOrder() is false
      Compliance:
      optional - This method must be implemented if {@code supportsVoterSearchOrder()} is {@code true} .
    • orderByVotingAgent

      void orderByVotingAgent(SearchOrderStyle style)
      Specified a preference for ordering results by the voteing agent.
      Parameters:
      style - search order style
      Throws:
      NullArgumentException - style is null
      Compliance:
      mandatory - This method must be implemented.
    • supportsVotingAgentSearchOrder

      boolean supportsVotingAgentSearchOrder()
      Tests if an AgentSearchOrder is available.
      Returns:
      true if an agent search order is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getVotingAgentSearchOrder

      AgentSearchOrder getVotingAgentSearchOrder()
      Gets the search order for an agent.
      Returns:
      the agent search order
      Throws:
      UnimplementedException - supportsVotingAgentSearchOrder() is false
      Compliance:
      optional - This method must be implemented if {@code supportsVotingAgentSearchOrder()} is {@code true} .
    • orderByVotes

      void orderByVotes(SearchOrderStyle style)
      Specified a preference for ordering results by the number of votes.
      Parameters:
      style - search order style
      Throws:
      NullArgumentException - style is null
      Compliance:
      mandatory - This method must be implemented.
    • getVoteSearchOrderRecord

      VoteSearchOrderRecord getVoteSearchOrderRecord(Type voteRecordType) throws OperationFailedException
      Gets the vote search order record corresponding to the given vote record Type . Multiple retrievals return the same underlying object.
      Parameters:
      voteRecordType - a vote record type
      Returns:
      the vote search order record
      Throws:
      NullArgumentException - voteRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(VoteRecordType) is false
      Compliance:
      mandatory - This method must be implemented.