using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using GreenTree.Nachtragsmanagement.Core.Authentication; using GreenTree.Nachtragsmanagement.Core.Domain.User; namespace GreenTree.Nachtragsmanagement.Services.User { /// /// User service interface /// public interface IUserService { #region User /// /// Gets all users /// IList GetAllUsers(); /// /// Gets a user by specified Id /// /// User identifier. Core.Domain.User.User GetUserById(int id); /// /// Gets all users to the specified ids /// IList GetUsersByIds(int[] ids); /// /// Gets a user by specified customer number /// /// Customer number. Core.Domain.User.User GetUserByCustomNumber(string customNumber); /// /// Insert a user /// /// User. void InsertUser(Core.Domain.User.User user); /// /// Update a user /// /// User. void UpdateUser(Core.Domain.User.User user); /// /// Delete a user /// /// User. void DeleteUser(Core.Domain.User.User user); #endregion #region ActiveDirectory /// /// Searches the ActiveDirectory for users matching the searchValue /// /// The text to be searched for. IList SearchUsers(string searchValue); #endregion #region Role /// /// Gets all roles /// IList GetAllRoles(); /// /// Gets a user by specified Id /// /// Role identifier. Role GetRoleById(int id); /// /// Gets all roles to the specified ids /// IList GetRolesByIds(int[] ids); /// /// Gets all users to the corresponding role /// /// Role id. IList GetUsersByRole(int roleId); /// /// Insert a user /// /// Role. void InsertRole(Role role); /// /// Update a role /// /// Role. void UpdateRole(Role role); /// /// Delete a role /// /// Role. void DeleteRole(Role role); #endregion #region Function /// /// Gets all functions /// IList GetAllFunctions(); /// /// Gets a function by specified Id /// /// Function identifier. Function GetFunctionById(int id); /// /// Gets a function by specified name /// /// Function name. Function GetFunctionByName(string name); /// /// Gets all functions to the specified ids /// IList GetFunctionsByIds(int[] ids); /// /// Insert a function /// /// Function. void InsertFunction(Function function); /// /// Update a function /// /// Function. void UpdateFunction(Function function); /// /// Delete a function /// /// Function. void DeleteFunction(Function function); #endregion } }