/** * Delete the team object with the specified teamname * * @param teamname * @return true if successful * @since 0.8.0 */ @Override public boolean deleteTeam(String teamname) { TeamModel team = userService.getTeamModel(teamname); if (userService.deleteTeam(teamname)) { callDeleteTeamListeners(team); return true; } return false; }
/** * Updates/writes and replaces a complete team object keyed by teamname. This method allows for * renaming a team. * * @param teamname the old teamname * @param model the team object to use for teamname * @return true if update is successful * @since 0.8.0 */ @Override public boolean updateTeamModel(String teamname, TeamModel model) { final boolean isCreate = null == userService.getTeamModel(teamname); if (userService.updateTeamModel(teamname, model)) { if (isCreate) { callCreateTeamListeners(model); } return true; } return false; }
/** * Retrieve the team object for the specified team name. * * @param teamname * @return a team object or null * @since 0.8.0 */ @Override public TeamModel getTeamModel(String teamname) { TeamModel team = userService.getTeamModel(teamname); return team; }