package info.bukova.isspst.services.users;

import java.util.List;

import info.bukova.isspst.data.Role;
import info.bukova.isspst.data.User;
import info.bukova.isspst.data.UserSettingsData;
import info.bukova.isspst.security.AuthMethod;
import info.bukova.isspst.services.Service;

import org.springframework.security.core.userdetails.UserDetailsService;

public interface UserService extends UserDetailsService, Service<User> {
	
	public void setPassword(User user, String password);
	public boolean hasRole(User user, String authority);
	public void saveWithPwd(User user, String password);
	public List<User> getUsersWithRole(Role r);
	public User getCurrent();
	public String encodePassword(User user, String plain);
	public void grantAdmin();
	public void removeAccess();
	public void loadAuthorities(User user);
	public String[] getEmailsForSend(List<User> users);
	public UserSettingsData getUserSettings(User user);
	public UserSettingsData getUserSettings();
	public void setUserSettings(UserSettingsData settings);
	public void setAuthMethod(AuthMethod method);
	public AuthMethod getAuthMethod();
	public List<User> getUsersForCombo();
	
}
