1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2011 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 |
|
---|
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]
|
---|
40 | IEnumerable<Client> GetClients(IEnumerable<Guid> ids);
|
---|
41 |
|
---|
42 | [OperationContract]
|
---|
43 | IEnumerable<Client> GetAllClients();
|
---|
44 |
|
---|
45 | [OperationContract]
|
---|
46 | Guid AddClient(Client client);
|
---|
47 |
|
---|
48 | [OperationContract]
|
---|
49 | void UpdateClient(Client client);
|
---|
50 |
|
---|
51 | [OperationContract]
|
---|
52 | void DeleteClient(Client client);
|
---|
53 | #endregion
|
---|
54 |
|
---|
55 | #region Client Group
|
---|
56 | [OperationContract]
|
---|
57 | IEnumerable<ClientGroup> GetAllClientGroups();
|
---|
58 |
|
---|
59 | [OperationContract]
|
---|
60 | IEnumerable<ClientGroup> GetClientGroups(IEnumerable<Guid> ids);
|
---|
61 |
|
---|
62 | [OperationContract]
|
---|
63 | Guid AddClientGroup(ClientGroup group);
|
---|
64 |
|
---|
65 | [OperationContract]
|
---|
66 | void UpdateClientGroup(ClientGroup group);
|
---|
67 |
|
---|
68 | [OperationContract]
|
---|
69 | void DeleteClientGroup(ClientGroup group);
|
---|
70 |
|
---|
71 | [OperationContract]
|
---|
72 | void AddResourceToGroup(Resource resource, UserGroup group);
|
---|
73 |
|
---|
74 | [OperationContract]
|
---|
75 | void RemoveResourceFromGroup(Resource resource, UserGroup group);
|
---|
76 | #endregion
|
---|
77 |
|
---|
78 | #region ClientGroupMapping
|
---|
79 | [OperationContract]
|
---|
80 | IEnumerable<ClientGroupMapping> GetClientGroupMapping();
|
---|
81 | #endregion
|
---|
82 |
|
---|
83 | #region Resource
|
---|
84 | [OperationContract]
|
---|
85 | IEnumerable<Resource> GetResources();
|
---|
86 | #endregion
|
---|
87 |
|
---|
88 | #region ClientLog
|
---|
89 | [OperationContract]
|
---|
90 | ClientLog GetLastClientLog(Guid clientId);
|
---|
91 |
|
---|
92 | [OperationContract]
|
---|
93 | IEnumerable<ClientLog> GetClientLogs(Guid clientId);
|
---|
94 |
|
---|
95 | [OperationContract]
|
---|
96 | IEnumerable<ClientLog> GetClientLogsSince(DateTime startDate);
|
---|
97 |
|
---|
98 | [OperationContract]
|
---|
99 | void AddClientLog(ClientLog log);
|
---|
100 |
|
---|
101 | [OperationContract]
|
---|
102 | void DeleteClientLog(ClientLog log);
|
---|
103 | #endregion
|
---|
104 |
|
---|
105 | #region User
|
---|
106 | [OperationContract]
|
---|
107 | User Login();
|
---|
108 |
|
---|
109 | [OperationContract]
|
---|
110 | IEnumerable<User> GetAllUsers();
|
---|
111 |
|
---|
112 | [OperationContract]
|
---|
113 | IEnumerable<User> GetUsers(IEnumerable<User> ids);
|
---|
114 |
|
---|
115 | [OperationContract]
|
---|
116 | User AddUser(User user);
|
---|
117 |
|
---|
118 | [OperationContract]
|
---|
119 | void DeleteUser(User user);
|
---|
120 |
|
---|
121 | [OperationContract]
|
---|
122 | void UpdateUser(User user);
|
---|
123 |
|
---|
124 | [OperationContract]
|
---|
125 | void AddUserToRole(Role role, User user);
|
---|
126 |
|
---|
127 | [OperationContract]
|
---|
128 | void RemoveUserFromRole(Role role, User user);
|
---|
129 |
|
---|
130 | [OperationContract]
|
---|
131 | void ResetPassword(User user, string password);
|
---|
132 | #endregion
|
---|
133 |
|
---|
134 | #region UserGroup
|
---|
135 | [OperationContract]
|
---|
136 | IEnumerable<UserGroup> GetAllUserGroups();
|
---|
137 |
|
---|
138 | [OperationContract]
|
---|
139 | IEnumerable<UserGroup> GetUserGroups(IEnumerable<Guid> ids);
|
---|
140 |
|
---|
141 | [OperationContract]
|
---|
142 | UserGroup AddUserGroup(UserGroup group);
|
---|
143 |
|
---|
144 | [OperationContract]
|
---|
145 | void UpdateUserGroup(UserGroup group);
|
---|
146 |
|
---|
147 | [OperationContract]
|
---|
148 | void DeleteUserGroup(UserGroup group);
|
---|
149 |
|
---|
150 | [OperationContract]
|
---|
151 | void AddUserGroupBaseToGroup(UserGroupBase resource, UserGroup group);
|
---|
152 |
|
---|
153 | [OperationContract]
|
---|
154 | void RemoveUserGroupBaseFromGroup(UserGroupBase resource, UserGroup group);
|
---|
155 | #endregion
|
---|
156 |
|
---|
157 | #region UserGroupBase
|
---|
158 | [OperationContract]
|
---|
159 | IEnumerable<UserGroupBase> GetUsersAndGroups();
|
---|
160 | #endregion
|
---|
161 |
|
---|
162 | #region UserGroupMapping
|
---|
163 | [OperationContract]
|
---|
164 | IEnumerable<UserGroupMapping> GetUserGroupMapping();
|
---|
165 | #endregion
|
---|
166 |
|
---|
167 | #region Role
|
---|
168 | [OperationContract]
|
---|
169 | IEnumerable<Role> GetRoles();
|
---|
170 |
|
---|
171 | [OperationContract]
|
---|
172 | Role AddRole(Role role);
|
---|
173 |
|
---|
174 | [OperationContract]
|
---|
175 | void UpdateRole(Role role);
|
---|
176 |
|
---|
177 | [OperationContract]
|
---|
178 | void DeleteRole(Role role);
|
---|
179 |
|
---|
180 | [OperationContract]
|
---|
181 | IEnumerable<Role> GetUserRoles(User user);
|
---|
182 | #endregion
|
---|
183 |
|
---|
184 | #region ClientError
|
---|
185 | [OperationContract]
|
---|
186 | void ReportError(ClientError error);
|
---|
187 |
|
---|
188 | [OperationContract]
|
---|
189 | IEnumerable<ClientError> GetClientErrors();
|
---|
190 |
|
---|
191 | [OperationContract]
|
---|
192 | IEnumerable<ClientError> GetLastClientErrors(DateTime startDate);
|
---|
193 |
|
---|
194 | [OperationContract]
|
---|
195 | void DeleteError(ClientError error);
|
---|
196 | #endregion
|
---|
197 | }
|
---|
198 | }
|
---|