Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PersistenceOverhaul/HeuristicLab.Services.Access/3.3/IAccessService.cs @ 16101

Last change on this file since 16101 was 14712, checked in by gkronber, 8 years ago

#2520 added GUIDs for (almost) all interface types (probably still too many) also added newlines at end of all files

File size: 6.3 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
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
22using System;
23using System.Collections.Generic;
24using System.Net.Security;
25using System.ServiceModel;
26using HeuristicLab.Services.Access.DataTransfer;
27
28namespace HeuristicLab.Services.Access {
29  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
30  [HeuristicLab.Persistence.Default.CompositeSerializers.Storable.StorableType("01411240-7609-44D1-B204-5BF478136917")]
31  public interface IAccessService {
32
33    #region Client
34    [OperationContract]
35    bool ClientExists(Guid id);
36
37    [OperationContract]
38    Client GetClient(Guid id);
39
40    [OperationContract]
41    IEnumerable<Client> GetClients(IEnumerable<Guid> ids);
42
43    [OperationContract]
44    IEnumerable<Client> GetAllClients();
45
46    [OperationContract]
47    void AddClient(Client client);
48
49    [OperationContract]
50    void UpdateClient(Client client);
51
52    [OperationContract]
53    void DeleteClient(Client client);
54    #endregion
55
56    #region Client Group
57    [OperationContract]
58    IEnumerable<ClientGroup> GetAllClientGroups();
59
60    [OperationContract]
61    IEnumerable<ClientGroup> GetClientGroups(IEnumerable<Guid> ids);
62
63    [OperationContract]
64    Guid AddClientGroup(ClientGroup group);
65
66    [OperationContract]
67    void UpdateClientGroup(ClientGroup group);
68
69    [OperationContract]
70    void DeleteClientGroup(ClientGroup group);
71
72    [OperationContract]
73    void AddResourceToGroup(Resource resource, ClientGroup group);
74
75    [OperationContract]
76    void RemoveResourceFromGroup(Resource resource, ClientGroup group);
77    #endregion
78
79    #region ClientGroupMapping
80    [OperationContract]
81    IEnumerable<ClientGroupMapping> GetClientGroupMapping();
82    #endregion
83
84    #region Resource
85    [OperationContract]
86    IEnumerable<Resource> GetResources();
87    #endregion
88
89    #region ClientLog
90    [OperationContract]
91    ClientLog GetLastClientLog(Guid clientId);
92
93    [OperationContract]
94    IEnumerable<ClientLog> GetClientLogs(Guid clientId);
95
96    [OperationContract]
97    IEnumerable<ClientLog> GetClientLogsSince(DateTime startDate);
98
99    [OperationContract]
100    void AddClientLog(ClientLog log);
101
102    [OperationContract]
103    void DeleteClientLog(ClientLog log);
104    #endregion
105
106    #region User
107    [OperationContract]
108    LightweightUser Login();
109
110    [OperationContract]
111    IEnumerable<UserGroup> GetGroupsOfCurrentUser();
112
113    [OperationContract]
114    IEnumerable<Role> GetRolesOfCurrentUser();
115
116    [OperationContract]
117    IEnumerable<LightweightUser> GetAllLightweightUsers();
118
119    [OperationContract]
120    IEnumerable<LightweightUser> GetLightweightUsers(IEnumerable<Guid> ids);
121
122    [OperationContract]
123    void UpdateLightweightUser(LightweightUser user);
124
125    [OperationContract]
126    IEnumerable<User> GetAllUsers();
127
128    [OperationContract]
129    IEnumerable<User> GetUsers(IEnumerable<Guid> ids);
130
131    [OperationContract]
132    User AddUser(User user);
133
134    [OperationContract]
135    void DeleteUser(User user);
136
137    [OperationContract]
138    void UpdateUser(User user);
139
140    [OperationContract]
141    void AddUserToRole(Role role, User user);
142
143    [OperationContract]
144    void RemoveUserFromRole(Role role, User user);
145
146    [OperationContract]
147    bool ChangePassword(Guid userId, string oldPassword, string newPassword);
148
149    [OperationContract]
150    string ResetPassword(Guid userId);
151    #endregion
152
153    #region UserGroup
154    [OperationContract]
155    IEnumerable<UserGroup> GetAllUserGroups();
156
157    [OperationContract]
158    IEnumerable<UserGroup> GetUserGroupsOfUser(Guid userId);
159
160    [OperationContract]
161    IEnumerable<UserGroup> GetUserGroups(IEnumerable<Guid> ids);
162
163    [OperationContract]
164    Guid AddUserGroup(UserGroup group);
165
166    [OperationContract]
167    void UpdateUserGroup(UserGroup group);
168
169    [OperationContract]
170    void DeleteUserGroup(UserGroup group);
171
172    [OperationContract]
173    void AddUserGroupBaseToGroup(UserGroupBase resource, UserGroup group);
174
175    [OperationContract]
176    void RemoveUserGroupBaseFromGroup(UserGroupBase resource, UserGroup group);
177    #endregion
178
179    #region UserGroupBase
180    [OperationContract]
181    IEnumerable<UserGroupBase> GetUsersAndGroups();
182
183    [OperationContract]
184    IEnumerable<UserGroupBase> GetAllLeightweightUsersAndGroups();
185
186    [OperationContract]
187    IEnumerable<UserGroupBase> GetLeightweightUsersAndGroups(IEnumerable<Guid> ids);
188    #endregion
189
190    #region UserGroupMapping
191    [OperationContract]
192    IEnumerable<UserGroupMapping> GetUserGroupMapping();
193
194    [OperationContract]
195    IEnumerable<Guid> GetUserGroupIdsOfGroup(Guid groupId);
196    #endregion
197
198    #region Role
199    [OperationContract]
200    IEnumerable<Role> GetRoles();
201
202    [OperationContract]
203    Role AddRole(Role role);
204
205    /*[OperationContract]
206    void UpdateRole(Role role);*/
207
208    [OperationContract]
209    void DeleteRole(Role role);
210
211    [OperationContract]
212    IEnumerable<Role> GetUserRoles(User user);
213
214    [OperationContract]
215    void AddRoleToGroup(UserGroup userGroup, Role role);
216
217    [OperationContract]
218    void RemoveRoleFromGroup(UserGroup userGroup, Role role);
219    #endregion
220
221    #region ClientError
222    [OperationContract]
223    void ReportError(ClientError error);
224
225    [OperationContract]
226    IEnumerable<ClientError> GetClientErrors();
227
228    [OperationContract]
229    IEnumerable<ClientError> GetLastClientErrors(DateTime startDate);
230
231    [OperationContract]
232    void DeleteError(ClientError error);
233    #endregion
234  }
235}
Note: See TracBrowser for help on using the repository browser.