Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package cz.swi2.mendeluis.service; import cz.swi2.mendeluis.dataaccesslayer.domain.Role; import cz.swi2.mendeluis.dataaccesslayer.domain.User; import java.util.List; import org.springframework.security.core.userdetails.UserDetailsService; /** * Service for managing users. * @author Roman */ public interface IUserService extends UserDetailsService { /** * Vytvoen novho uivatele * @param name * @param username * @param password * @return */ User createNewUser(String name, String username, String password); /** * Dohledn uivatele dle jmna * @param username * @return */ User getUserByUsername(String username); /** * * Dohledn uivatele dle ID. * @param id * @return */ User getUserById(int id); /** * Dohledn uivatele dle pihlaovacch daj * @param username * @param password * @return */ User getUserByCredentials(String username, String password); /** * Dohledn vech uivatel * @return */ List<User> getAllUsers(); /** * Smazn uivatele * @param id */ void deleteUser(int id); /** * Vrati roli pro daneho uzivatele. * @param user * @return */ Role getRoleForUser(User user); }