diff --git a/src/main/java/cz/muni/fi/pa165/icehockeymanager/facades/TeamManagerFacade.java b/src/main/java/cz/muni/fi/pa165/icehockeymanager/facades/TeamManagerFacade.java index 9021b8fac2c8e7ec0cc1bba872ab6b3e217db07e..d19a8616311ea3173b39ab1f281b4100df576fdc 100644 --- a/src/main/java/cz/muni/fi/pa165/icehockeymanager/facades/TeamManagerFacade.java +++ b/src/main/java/cz/muni/fi/pa165/icehockeymanager/facades/TeamManagerFacade.java @@ -2,16 +2,47 @@ package cz.muni.fi.pa165.icehockeymanager.facades; import cz.muni.fi.pa165.icehockeymanager.dto.PlayerCreateDTO; import cz.muni.fi.pa165.icehockeymanager.dto.PlayerDTO; +import cz.muni.fi.pa165.icehockeymanager.exceptions.UnknownPlayerException; +import cz.muni.fi.pa165.icehockeymanager.exceptions.UnknownTeamException; import java.util.Collection; +/** + * Facade with functionality for the team manager, + * such as managing players within team. + */ public interface TeamManagerFacade { + /** + * Creates new player and adds it to team given by teamId + * + * @param playerCreateDTO DTO object for creating new player + * @param teamId ID of the team to add the player to + */ void recruitNewPlayer(PlayerCreateDTO playerCreateDTO, long teamId); + /** + * Adds player with playerId to team with teamId + * + * @param playerId Identifier of the player + * @param teamId Identifier of the team + */ void recruitVeteranPlayer(long playerId, long teamId); + /** + * Retrieve all players without team + * + * @return Collection of free players + */ Collection<PlayerDTO> getFreePlayers(); + /** + * Delete player with playerId from team with teamId + * + * @param playerId Identifier of player + * @param teamId Identifier of team + * @throws UnknownPlayerException If playerId does not match any player + * @throws UnknownTeamException If teamId does not match any team + */ void firePlayer(long playerId, long teamId); }