123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ServiceModel;
- using Aitex.Core.Util;
- namespace Aitex.Core.Account
- {
- /// <summary>
- /// This interface defines operation contracts for user account management.
- /// </summary>
- [ServiceContract]
- public interface IAccountService
- {
- /// <summary>
- /// User calls this method to login the server.
- /// </summary>
- /// <param name="accountId"></param>
- /// <param name="password"></param>
- [OperationContract]
- LoginResult Login(string accountId, string password);
- /// <summary>
- /// User calls this method to logout from the server.
- /// </summary>
- /// <param name="accountId"></param>
- [OperationContract]
- void Logout(string accountId);
- /// <summary>
- /// Administrator user calls this method to create a new account.
- /// </summary>
- /// <param name="newAccount"></param>
- /// <returns></returns>
- [OperationContract]
- CreateAccountResult CreateAccount(Account newAccount);
- /// <summary>
- /// Administrator user calls this method to delete an account.
- /// </summary>
- /// <param name="accountId"></param>
- /// <returns></returns>
- [OperationContract]
- DeleteAccountResult DeleteAccount(string accountId);
- /// <summary>
- /// get current login user's account data
- /// </summary>
- /// <returns></returns>
- //[OperationContract]
- //Account GetCurrentUser();
- /// <summary>
- /// get user data by accountId
- /// </summary>
- /// <param name="accountId"></param>
- /// <returns></returns>
- [OperationContract]
- GetAccountInfoResult GetAccountInfo(string accountId);
- /// <summary>
- /// update account
- /// </summary>
- /// <param name="account"></param>
- /// <returns></returns>6
- [OperationContract]
- UpdateAccountResult UpdateAccount(Account account);
- /// <summary>
- /// get account list
- /// </summary>
- /// <returns></returns>
- [OperationContract]
- GetAccountListResult GetAccountList();
- /// <summary>
- /// change account password
- /// </summary>
- /// <param name="accountId"></param>
- /// <param name="newPassword"></param>
- [OperationContract]
- ChangePwdResult ChangePassword(string accountId, string newPassword);
- /// <summary>
- /// 获取当前登录的用户
- /// </summary>
- /// <returns></returns>
- [OperationContract]
- List<Account> GetLoginUsers();
- /// <summary>
- /// 强制注销用户
- /// </summary>
- /// <param name="accountId"></param>
- /// <param name="reason"></param>
- [OperationContract]
- void KickUserOut(string accountId, string reason);
- /// <summary>
- /// get all roles' permission
- /// </summary>
- /// <param name="accountid"></param>
- /// <param name="clientip"></param>
- [OperationContract]
- SerializableDictionary<string, SerializableDictionary<string, ViewPermission>> GetAllRolesPermission();
- /// <summary>
- /// save all roles' permission
- /// </summary>
- /// <param name="accountid"></param>
- /// <param name="clientip"></param>
- [OperationContract]
- bool SaveAllRolesPermission(Dictionary<string, Dictionary<string, ViewPermission>> data);
- /// <summary>
- /// get all view list
- /// </summary>
- /// <param name="accountid"></param>
- /// <param name="clientip"></param>
- [OperationContract]
- SerializableDictionary<string, string> GetAllViewList();
- /// <summary>
- /// Get all roles
- /// </summary>
- /// <returns></returns>
- [OperationContract]
- IEnumerable<string> GetAllRoles();
- /// <summary>
- /// UI 界面定期发送CheckAlive事件,用于通知AccountManager当前用户仍旧Alive
- /// 如果连续超过10秒钟没有发送Alive信息,系统自动将该用户注销
- /// </summary>
- /// <returns></returns>
- //[OperationContract]
- void CheckAlive(string accountId);
- /*
- [OperationContract]
- void RequestAuthorization(string accountId, string ip);
- [OperationContract]
- void AbortAuthorization();
- [OperationContract]
- void GrantAuthorization(bool isGranted);
- [OperationContract]
- List<int> LoadInterestedEvents(string accountEmail);
- [OperationContract]
- void SaveInterestedEvents(string accountEmail, List<int> events);
- [OperationContract]
- int GetMaxInterestedEvents();
- [OperationContract]
- void SaveWarningEvents(List<int> warningEvents);
- [OperationContract]
- List<int> LoadWarningEvents();
- */
- [OperationContract]
- string GetProcessViewPermission();
- [OperationContract]
- bool SaveProcessViewPermission(string viewXML);
- }
- }
|