Skip to content
Snippets Groups Projects
Commit 9f1982ed authored by Ján Dovjak's avatar Ján Dovjak
Browse files

doc: TeamManagerFacade

parent 489fc013
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment