| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- 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
- {
- /// <summary>
- /// User service interface
- /// </summary>
- public interface IUserService
- {
- #region User
- /// <summary>
- /// Gets all users
- /// </summary>
- IList<Core.Domain.User.User> GetAllUsers();
- /// <summary>
- /// Gets a user by specified Id
- /// </summary>
- /// <param name="id">User identifier.</param>
- Core.Domain.User.User GetUserById(int id);
- /// <summary>
- /// Gets all users to the specified ids
- /// </summary>
- IList<Core.Domain.User.User> GetUsersByIds(int[] ids);
- /// <summary>
- /// Gets a user by specified customer number
- /// </summary>
- /// <param name="customNumber">Customer number.</param>
- Core.Domain.User.User GetUserByCustomNumber(string customNumber);
- /// <summary>
- /// Insert a user
- /// </summary>
- /// <param name="user">User.</param>
- void InsertUser(Core.Domain.User.User user);
- /// <summary>
- /// Update a user
- /// </summary>
- /// <param name="user">User.</param>
- void UpdateUser(Core.Domain.User.User user);
- /// <summary>
- /// Delete a user
- /// </summary>
- /// <param name="user">User.</param>
- void DeleteUser(Core.Domain.User.User user);
- #endregion
- #region ActiveDirectory
- /// <summary>
- /// Searches the ActiveDirectory for users matching the searchValue
- /// </summary>
- /// <param name="searchValue">The text to be searched for.</param>
- IList<ActiveDirectoryUser> SearchUsers(string searchValue);
- #endregion
- #region Role
- /// <summary>
- /// Gets all roles
- /// </summary>
- IList<Role> GetAllRoles();
- /// <summary>
- /// Gets a user by specified Id
- /// </summary>
- /// <param name="id">Role identifier.</param>
- Role GetRoleById(int id);
- /// <summary>
- /// Gets all roles to the specified ids
- /// </summary>
- IList<Role> GetRolesByIds(int[] ids);
- /// <summary>
- /// Gets all users to the corresponding role
- /// </summary>
- /// <param name="roleId">Role id.</param>
- IList<Core.Domain.User.User> GetUsersByRole(int roleId);
- /// <summary>
- /// Insert a user
- /// </summary>
- /// <param name="role">Role.</param>
- void InsertRole(Role role);
- /// <summary>
- /// Update a role
- /// </summary>
- /// <param name="role">Role.</param>
- void UpdateRole(Role role);
- /// <summary>
- /// Delete a role
- /// </summary>
- /// <param name="role">Role.</param>
- void DeleteRole(Role role);
- #endregion
- #region Function
- /// <summary>
- /// Gets all functions
- /// </summary>
- IList<Function> GetAllFunctions();
- /// <summary>
- /// Gets a function by specified Id
- /// </summary>
- /// <param name="id">Function identifier.</param>
- Function GetFunctionById(int id);
- /// <summary>
- /// Gets a function by specified name
- /// </summary>
- /// <param name="name">Function name.</param>
- Function GetFunctionByName(string name);
- /// <summary>
- /// Gets all functions to the specified ids
- /// </summary>
- IList<Function> GetFunctionsByIds(int[] ids);
- /// <summary>
- /// Insert a function
- /// </summary>
- /// <param name="function">Function.</param>
- void InsertFunction(Function function);
- /// <summary>
- /// Update a function
- /// </summary>
- /// <param name="function">Function.</param>
- void UpdateFunction(Function function);
- /// <summary>
- /// Delete a function
- /// </summary>
- /// <param name="function">Function.</param>
- void DeleteFunction(Function function);
- #endregion
- }
- }
|