Interface ParticipantService

    • Method Detail

      • getParticipants

        java.util.List<Participant> getParticipants​(Tournament tournament)
                                             throws DataAccessException
        Retrieve a tournament's participant list.
        Parameters:
        tournament - The tournament to get the participants from. Must contain tournament id
        Returns:
        The tournaments participants
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • getParticipants

        void getParticipants​(Tournament tournament,
                             Callback<java.util.List<Participant>> onSuccess,
                             Callback<DataAccessException> onFailure)
        Retrieve a tournament's participant list.
        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

        Participant getParticipant​(Tournament tournament,
                                   long participantId,
                                   boolean includeMatches)
                            throws DataAccessException
        Retrieve a single participant record for a tournament.
        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

        void getParticipant​(Tournament tournament,
                            long participantId,
                            boolean includeMatches,
                            Callback<Participant> onSuccess,
                            Callback<DataAccessException> onFailure)
        Retrieve a single participant record for a tournament.
        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
      • addParticipant

        Participant addParticipant​(Tournament tournament,
                                   ParticipantQuery data)
                            throws DataAccessException
        Add a participant to a tournament (up until it is started).
        Parameters:
        tournament - The tournament to add the participant to. Must contain tournament id
        data - The participant data
        Returns:
        The added participant
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • addParticipant

        void addParticipant​(Tournament tournament,
                            ParticipantQuery data,
                            Callback<Participant> onSuccess,
                            Callback<DataAccessException> onFailure)
        Add a participant to a tournament (up until it is started).
        Parameters:
        tournament - The tournament to add the participant 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
      • bulkAddParticipants

        java.util.List<Participant> bulkAddParticipants​(Tournament tournament,
                                                        java.util.List<ParticipantQuery> data)
                                                 throws DataAccessException
        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.
        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

        void bulkAddParticipants​(Tournament tournament,
                                 java.util.List<ParticipantQuery> data,
                                 Callback<java.util.List<Participant>> onSuccess,
                                 Callback<DataAccessException> onFailure)
        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.
        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
      • updateParticipant

        Participant updateParticipant​(Participant participant,
                                      ParticipantQuery data)
                               throws DataAccessException
        Update the attributes of a tournament participant.
        Parameters:
        participant - The participant to update. Must contain the tournament id and the participant's id
        data - The participant data
        Returns:
        The updates participant
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • updateParticipant

        void updateParticipant​(Participant participant,
                               ParticipantQuery data,
                               Callback<Participant> onSuccess,
                               Callback<DataAccessException> onFailure)
        Update the attributes of a tournament participant.
        Parameters:
        participant - The participant to update. Must contain the tournament id and the participant's id
        data - The participant data
        onSuccess - Called with result if call was successful
        onFailure - Called with exception if call was not successful
      • checkInParticipant

        Participant checkInParticipant​(Participant participant)
                                throws DataAccessException
        Checks a participant in, setting checked_in_at to the current time.
        Parameters:
        participant - The participant to check in. Must contain the tournament id and the participant's id
        Returns:
        The checked in participant
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • checkInParticipant

        void checkInParticipant​(Participant participant,
                                Callback<Participant> onSuccess,
                                Callback<DataAccessException> onFailure)
        Checks a participant in, setting checked_in_at to the current time.
        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

        Participant undoCheckInParticipant​(Participant participant)
                                    throws DataAccessException
        Marks a participant as having not checked in, setting checked_in_at to nil.
        Parameters:
        participant - The participant to check in. Must contain the tournament id and the participant's id
        Returns:
        The checked out participant
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • undoCheckInParticipant

        void undoCheckInParticipant​(Participant participant,
                                    Callback<Participant> onSuccess,
                                    Callback<DataAccessException> onFailure)
        Marks a participant as having not checked in, setting checked_in_at to nil.
        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

        Participant deleteParticipant​(Participant participant)
                               throws DataAccessException
        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.
        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

        void deleteParticipant​(Participant participant,
                               Callback<Participant> onSuccess,
                               Callback<DataAccessException> onFailure)
        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.
        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

        java.util.List<Participant> randomizeParticipants​(Tournament tournament)
                                                   throws DataAccessException
        Randomize seeds among participants. Only applicable before a tournament has started.
        Parameters:
        tournament - The tournament to randomize. Must contain the tournament id
        Returns:
        The randomized participants
        Throws:
        DataAccessException - Exchange with the rest api or validation failed
      • randomizeParticipants

        void randomizeParticipants​(Tournament tournament,
                                   Callback<java.util.List<Participant>> onSuccess,
                                   Callback<DataAccessException> onFailure)
        Randomize seeds among participants. Only applicable before a tournament has started.
        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