Interface RaceProcessor

All Superinterfaces:
Browsable, Extensible, Identifiable, Operable, OsidObject, OsidProcessor, OsidRule

public interface RaceProcessor extends OsidProcessor

A RaceProcessor describes the rules for managing the behavior of a race.

  • Method Details

    • hasMaximumWinners

      boolean hasMaximumWinners()
      Tests if there is a limit on the number of winners in a race.
      Returns:
      true if a limit on the number of winners, false if no limit exists
      Compliance:
      mandatory - This method must be implemented.
    • getMaximumWinners

      long getMaximumWinners()
      Gets the number of maximum winners in a race.
      Returns:
      the maximum number of winners permitted
      Throws:
      IllegalStateException - hasMaximumWinners() is false
      Compliance:
      mandatory - This method must be implemented.
    • getMinimumPercentageToWin

      long getMinimumPercentageToWin()
      Gets the minimum percentage (0-100) of total votes to be declared a winner in a race.
      Returns:
      the minimum percentage
      Compliance:
      mandatory - This method must be implemented.
    • getMinimumVotesToWin

      long getMinimumVotesToWin()
      Gets the minimum votesl votes to be declared a winner in a race.
      Returns:
      the minimum votes
      Compliance:
      mandatory - This method must be implemented.
    • getRaceProcessorRecord

      RaceProcessorRecord getRaceProcessorRecord(Type raceProcessorRecordType) throws OperationFailedException
      Gets the race processor record corresponding to the given RaceProcessor record Type .This method is used to retrieve an object implementing the requested record. The raceProcessorRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(raceProcessorRecordType) is true .
      Parameters:
      raceProcessorRecordType - the type of race processor record to retrieve
      Returns:
      the race processor record
      Throws:
      NullArgumentException - raceProcessorRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(raceProcessorRecordType) is false
      Compliance:
      mandatory - This method must be implemented.