[6815] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
[7355] | 3 | * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
[6815] | 4 | *
|
---|
| 5 | * This file is part of HeuristicLab.
|
---|
| 6 | *
|
---|
| 7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
| 8 | * it under the terms of the GNU General Public License as published by
|
---|
| 9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
| 10 | * (at your option) any later version.
|
---|
| 11 | *
|
---|
| 12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 15 | * GNU General Public License for more details.
|
---|
| 16 | *
|
---|
| 17 | * You should have received a copy of the GNU General Public License
|
---|
| 18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 19 | */
|
---|
| 20 | #endregion
|
---|
| 21 |
|
---|
| 22 | using System;
|
---|
| 23 | using System.Collections.Generic;
|
---|
| 24 | using System.Net.Security;
|
---|
| 25 | using System.ServiceModel;
|
---|
| 26 | using HeuristicLab.Services.Access.DataTransfer;
|
---|
| 27 |
|
---|
| 28 | namespace HeuristicLab.Services.Access {
|
---|
| 29 | [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
|
---|
| 30 | public interface IAccessService {
|
---|
| 31 |
|
---|
| 32 | #region Client
|
---|
| 33 | [OperationContract]
|
---|
| 34 | bool ClientExists(Guid id);
|
---|
| 35 |
|
---|
| 36 | [OperationContract]
|
---|
| 37 | Client GetClient(Guid id);
|
---|
| 38 |
|
---|
| 39 | [OperationContract]
|
---|
[6840] | 40 | IEnumerable<Client> GetClients(IEnumerable<Guid> ids);
|
---|
[6815] | 41 |
|
---|
| 42 | [OperationContract]
|
---|
[6840] | 43 | IEnumerable<Client> GetAllClients();
|
---|
| 44 |
|
---|
| 45 | [OperationContract]
|
---|
[7536] | 46 | void AddClient(Client client);
|
---|
[6815] | 47 |
|
---|
| 48 | [OperationContract]
|
---|
| 49 | void UpdateClient(Client client);
|
---|
| 50 |
|
---|
| 51 | [OperationContract]
|
---|
| 52 | void DeleteClient(Client client);
|
---|
| 53 | #endregion
|
---|
| 54 |
|
---|
[6840] | 55 | #region Client Group
|
---|
[6815] | 56 | [OperationContract]
|
---|
[6840] | 57 | IEnumerable<ClientGroup> GetAllClientGroups();
|
---|
[6815] | 58 |
|
---|
| 59 | [OperationContract]
|
---|
[6840] | 60 | IEnumerable<ClientGroup> GetClientGroups(IEnumerable<Guid> ids);
|
---|
[6815] | 61 |
|
---|
| 62 | [OperationContract]
|
---|
[6840] | 63 | Guid AddClientGroup(ClientGroup group);
|
---|
[6815] | 64 |
|
---|
| 65 | [OperationContract]
|
---|
[6840] | 66 | void UpdateClientGroup(ClientGroup group);
|
---|
[6815] | 67 |
|
---|
| 68 | [OperationContract]
|
---|
[6840] | 69 | void DeleteClientGroup(ClientGroup group);
|
---|
| 70 |
|
---|
| 71 | [OperationContract]
|
---|
[6852] | 72 | void AddResourceToGroup(Resource resource, ClientGroup group);
|
---|
[6840] | 73 |
|
---|
| 74 | [OperationContract]
|
---|
[6852] | 75 | void RemoveResourceFromGroup(Resource resource, ClientGroup group);
|
---|
[6815] | 76 | #endregion
|
---|
| 77 |
|
---|
[6840] | 78 | #region ClientGroupMapping
|
---|
[6815] | 79 | [OperationContract]
|
---|
[6840] | 80 | IEnumerable<ClientGroupMapping> GetClientGroupMapping();
|
---|
| 81 | #endregion
|
---|
[6815] | 82 |
|
---|
[6840] | 83 | #region Resource
|
---|
[6815] | 84 | [OperationContract]
|
---|
[6840] | 85 | IEnumerable<Resource> GetResources();
|
---|
| 86 | #endregion
|
---|
[6825] | 87 |
|
---|
[6840] | 88 | #region ClientLog
|
---|
[6825] | 89 | [OperationContract]
|
---|
[6840] | 90 | ClientLog GetLastClientLog(Guid clientId);
|
---|
[6815] | 91 |
|
---|
| 92 | [OperationContract]
|
---|
[6840] | 93 | IEnumerable<ClientLog> GetClientLogs(Guid clientId);
|
---|
[6815] | 94 |
|
---|
| 95 | [OperationContract]
|
---|
[6840] | 96 | IEnumerable<ClientLog> GetClientLogsSince(DateTime startDate);
|
---|
| 97 |
|
---|
| 98 | [OperationContract]
|
---|
| 99 | void AddClientLog(ClientLog log);
|
---|
| 100 |
|
---|
| 101 | [OperationContract]
|
---|
| 102 | void DeleteClientLog(ClientLog log);
|
---|
[6815] | 103 | #endregion
|
---|
| 104 |
|
---|
| 105 | #region User
|
---|
| 106 | [OperationContract]
|
---|
[7436] | 107 | LightweightUser Login();
|
---|
[6815] | 108 |
|
---|
| 109 | [OperationContract]
|
---|
[7436] | 110 | IEnumerable<UserGroup> GetGroupsOfCurrentUser();
|
---|
| 111 |
|
---|
| 112 | [OperationContract]
|
---|
| 113 | IEnumerable<Role> GetRolesOfCurrentUser();
|
---|
| 114 |
|
---|
| 115 | [OperationContract]
|
---|
[7367] | 116 | IEnumerable<LightweightUser> GetAllLightweightUsers();
|
---|
| 117 |
|
---|
| 118 | [OperationContract]
|
---|
[7426] | 119 | IEnumerable<LightweightUser> GetLightweightUsers(IEnumerable<Guid> ids);
|
---|
| 120 |
|
---|
| 121 | [OperationContract]
|
---|
[6840] | 122 | IEnumerable<User> GetAllUsers();
|
---|
[6815] | 123 |
|
---|
| 124 | [OperationContract]
|
---|
[6852] | 125 | IEnumerable<User> GetUsers(IEnumerable<Guid> ids);
|
---|
[6840] | 126 |
|
---|
| 127 | [OperationContract]
|
---|
[6815] | 128 | User AddUser(User user);
|
---|
| 129 |
|
---|
| 130 | [OperationContract]
|
---|
| 131 | void DeleteUser(User user);
|
---|
| 132 |
|
---|
| 133 | [OperationContract]
|
---|
| 134 | void UpdateUser(User user);
|
---|
| 135 |
|
---|
| 136 | [OperationContract]
|
---|
| 137 | void AddUserToRole(Role role, User user);
|
---|
| 138 |
|
---|
| 139 | [OperationContract]
|
---|
| 140 | void RemoveUserFromRole(Role role, User user);
|
---|
| 141 |
|
---|
| 142 | [OperationContract]
|
---|
[7612] | 143 | bool ChangePassword(Guid userId, string oldPassword, string newPassword);
|
---|
| 144 |
|
---|
| 145 | [OperationContract]
|
---|
| 146 | string ResetPassword(Guid userId);
|
---|
[6815] | 147 | #endregion
|
---|
| 148 |
|
---|
[6840] | 149 | #region UserGroup
|
---|
| 150 | [OperationContract]
|
---|
| 151 | IEnumerable<UserGroup> GetAllUserGroups();
|
---|
| 152 |
|
---|
| 153 | [OperationContract]
|
---|
[7367] | 154 | IEnumerable<UserGroup> GetUserGroupsOfUser(Guid userId);
|
---|
| 155 |
|
---|
| 156 | [OperationContract]
|
---|
[6840] | 157 | IEnumerable<UserGroup> GetUserGroups(IEnumerable<Guid> ids);
|
---|
| 158 |
|
---|
| 159 | [OperationContract]
|
---|
[6852] | 160 | Guid AddUserGroup(UserGroup group);
|
---|
[6840] | 161 |
|
---|
| 162 | [OperationContract]
|
---|
| 163 | void UpdateUserGroup(UserGroup group);
|
---|
| 164 |
|
---|
| 165 | [OperationContract]
|
---|
| 166 | void DeleteUserGroup(UserGroup group);
|
---|
| 167 |
|
---|
| 168 | [OperationContract]
|
---|
| 169 | void AddUserGroupBaseToGroup(UserGroupBase resource, UserGroup group);
|
---|
| 170 |
|
---|
| 171 | [OperationContract]
|
---|
| 172 | void RemoveUserGroupBaseFromGroup(UserGroupBase resource, UserGroup group);
|
---|
| 173 | #endregion
|
---|
| 174 |
|
---|
| 175 | #region UserGroupBase
|
---|
| 176 | [OperationContract]
|
---|
| 177 | IEnumerable<UserGroupBase> GetUsersAndGroups();
|
---|
[7426] | 178 |
|
---|
| 179 | [OperationContract]
|
---|
| 180 | IEnumerable<UserGroupBase> GetAllLeightweightUsersAndGroups();
|
---|
| 181 |
|
---|
| 182 | [OperationContract]
|
---|
| 183 | IEnumerable<UserGroupBase> GetLeightweightUsersAndGroups(IEnumerable<Guid> ids);
|
---|
[6840] | 184 | #endregion
|
---|
| 185 |
|
---|
| 186 | #region UserGroupMapping
|
---|
| 187 | [OperationContract]
|
---|
| 188 | IEnumerable<UserGroupMapping> GetUserGroupMapping();
|
---|
| 189 | #endregion
|
---|
| 190 |
|
---|
[6815] | 191 | #region Role
|
---|
| 192 | [OperationContract]
|
---|
| 193 | IEnumerable<Role> GetRoles();
|
---|
| 194 |
|
---|
| 195 | [OperationContract]
|
---|
| 196 | Role AddRole(Role role);
|
---|
| 197 |
|
---|
[6858] | 198 | /*[OperationContract]
|
---|
| 199 | void UpdateRole(Role role);*/
|
---|
[6815] | 200 |
|
---|
| 201 | [OperationContract]
|
---|
| 202 | void DeleteRole(Role role);
|
---|
| 203 |
|
---|
| 204 | [OperationContract]
|
---|
| 205 | IEnumerable<Role> GetUserRoles(User user);
|
---|
[6858] | 206 |
|
---|
| 207 | [OperationContract]
|
---|
| 208 | void AddRoleToGroup(UserGroup userGroup, Role role);
|
---|
| 209 |
|
---|
| 210 | [OperationContract]
|
---|
| 211 | void RemoveRoleFromGroup(UserGroup userGroup, Role role);
|
---|
[6815] | 212 | #endregion
|
---|
| 213 |
|
---|
[6840] | 214 | #region ClientError
|
---|
[6815] | 215 | [OperationContract]
|
---|
[6840] | 216 | void ReportError(ClientError error);
|
---|
[6815] | 217 |
|
---|
| 218 | [OperationContract]
|
---|
[6840] | 219 | IEnumerable<ClientError> GetClientErrors();
|
---|
[6815] | 220 |
|
---|
| 221 | [OperationContract]
|
---|
[6840] | 222 | IEnumerable<ClientError> GetLastClientErrors(DateTime startDate);
|
---|
[6815] | 223 |
|
---|
| 224 | [OperationContract]
|
---|
[6840] | 225 | void DeleteError(ClientError error);
|
---|
[6815] | 226 | #endregion
|
---|
| 227 | }
|
---|
| 228 | }
|
---|