public interface RaceProcessor extends OsidProcessor
A RaceProcessor
describes the rules for managing the
behavior of a race.
Modifier and Type | Method and Description |
---|---|
long |
getMaximumWinners()
Gets the number of maximum winners in a race.
|
long |
getMinimumPercentageToWin()
Gets the minimum percentage (0-100) of total votes to be declared a
winner in a race.
|
long |
getMinimumVotesToWin()
Gets the minimum votesl votes to be declared a winner in a race.
|
RaceProcessorRecord |
getRaceProcessorRecord(Type raceProcessorRecordType)
Gets the race processor record corresponding to the given
RaceProcessor record Type. |
boolean |
hasMaximumWinners()
Tests if there is a limit on the number of winners in a race.
|
getDescription, getDisplayName, getGenusType, isOfGenusType
getId, isCurrent
getRecordTypes, hasRecordType
getProperties, getPropertiesByRecordType
isActive, isDisabled, isEnabled, isOperational
boolean hasMaximumWinners()
true
if a limit on the number of winners,
false
if no limit existsmandatory
- This method must be implemented. long getMaximumWinners()
IllegalStateException
- hasMaximumWinners()
is false
mandatory
- This method must be implemented. long getMinimumPercentageToWin()
mandatory
- This method must be implemented. long getMinimumVotesToWin()
mandatory
- This method must be implemented. RaceProcessorRecord getRaceProcessorRecord(Type raceProcessorRecordType) throws OperationFailedException
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
.raceProcessorRecordType
- the type of race processor record to
retrieveNullArgumentException
- raceProcessorRecordType
is null
OperationFailedException
- unable to complete requestUnsupportedException
-
hasRecordType(raceProcessorRecordType)
is false
mandatory
- This method must be implemented.