Class SimpleParticipantService

    • Constructor Detail

    • Method Detail

      • getParticipants

        public void getParticipants​(Tournament tournament,
                                    Callback<java.util.List<Participant>> onSuccess,
                                    Callback<DataAccessException> onFailure)
        Description copied from interface: ParticipantService
        Retrieve a tournament's participant list.
        Specified by:
        getParticipants in interface ParticipantService
        Parameters:
        tournament - The tournament to get the participants from. Must contain tournament id
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • getParticipant

        public Participant getParticipant​(Tournament tournament,
                                          long participantId,
                                          boolean includeMatches)
                                   throws DataAccessException
        Description copied from interface: ParticipantService
        Retrieve a single participant record for a tournament.
        Specified by:
        getParticipant in interface ParticipantService
        Parameters:
        tournament - The tournament to get the participant from. Must contain tournament id
        participantId - The participant's unique ID
        includeMatches - Includes an array of associated match records
        Returns:
        The requested participant
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • getParticipant

        public void getParticipant​(Tournament tournament,
                                   long participantId,
                                   boolean includeMatches,
                                   Callback<Participant> onSuccess,
                                   Callback<DataAccessException> onFailure)
        Description copied from interface: ParticipantService
        Retrieve a single participant record for a tournament.
        Specified by:
        getParticipant in interface ParticipantService
        Parameters:
        tournament - The tournament to get the participant from. Must contain tournament id
        participantId - The participant's unique ID
        includeMatches - Includes an array of associated match records
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • bulkAddParticipants

        public java.util.List<Participant> bulkAddParticipants​(Tournament tournament,
                                                               java.util.List<ParticipantQuery> data)
                                                        throws DataAccessException
        Description copied from interface: ParticipantService
        Bulk add participants to a tournament (up until it is started). If an invalid participant is detected, bulk participant creation will halt and any previously added participants (from this API request) will be rolled back.
        Specified by:
        bulkAddParticipants in interface ParticipantService
        Parameters:
        tournament - The tournament to add the participants to. Must contain tournament id
        data - The participant data
        Returns:
        The added participants
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • bulkAddParticipants

        public void bulkAddParticipants​(Tournament tournament,
                                        java.util.List<ParticipantQuery> data,
                                        Callback<java.util.List<Participant>> onSuccess,
                                        Callback<DataAccessException> onFailure)
        Description copied from interface: ParticipantService
        Bulk add participants to a tournament (up until it is started). If an invalid participant is detected, bulk participant creation will halt and any previously added participants (from this API request) will be rolled back.
        Specified by:
        bulkAddParticipants in interface ParticipantService
        Parameters:
        tournament - The tournament to add the participants to. Must contain tournament id
        data - The participant data
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • checkInParticipant

        public void checkInParticipant​(Participant participant,
                                       Callback<Participant> onSuccess,
                                       Callback<DataAccessException> onFailure)
        Description copied from interface: ParticipantService
        Checks a participant in, setting checked_in_at to the current time.
        Specified by:
        checkInParticipant in interface ParticipantService
        Parameters:
        participant - The participant to check in. Must contain the tournament id and the participant's id
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • undoCheckInParticipant

        public void undoCheckInParticipant​(Participant participant,
                                           Callback<Participant> onSuccess,
                                           Callback<DataAccessException> onFailure)
        Description copied from interface: ParticipantService
        Marks a participant as having not checked in, setting checked_in_at to nil.
        Specified by:
        undoCheckInParticipant in interface ParticipantService
        Parameters:
        participant - The participant to check in. Must contain the tournament id and the participant's id
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • deleteParticipant

        public Participant deleteParticipant​(Participant participant)
                                      throws DataAccessException
        Description copied from interface: ParticipantService
        If the tournament has not started, delete a participant, automatically filling in the abandoned seed number. If tournament is underway, mark a participant inactive, automatically forfeiting his/her remaining matches.
        Specified by:
        deleteParticipant in interface ParticipantService
        Parameters:
        participant - The participant to delete. Must contain the tournament id and the participant's id
        Returns:
        The deleted participant
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • deleteParticipant

        public void deleteParticipant​(Participant participant,
                                      Callback<Participant> onSuccess,
                                      Callback<DataAccessException> onFailure)
        Description copied from interface: ParticipantService
        If the tournament has not started, delete a participant, automatically filling in the abandoned seed number. If tournament is underway, mark a participant inactive, automatically forfeiting his/her remaining matches.
        Specified by:
        deleteParticipant in interface ParticipantService
        Parameters:
        participant - The participant to delete. Must contain the tournament id and the participant's id
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • randomizeParticipants

        public void randomizeParticipants​(Tournament tournament,
                                          Callback<java.util.List<Participant>> onSuccess,
                                          Callback<DataAccessException> onFailure)
        Description copied from interface: ParticipantService
        Randomize seeds among participants. Only applicable before a tournament has started.
        Specified by:
        randomizeParticipants in interface ParticipantService
        Parameters:
        tournament - The tournament to randomize. Must contain the tournament id
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful