1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Text;
|
---|
4 | using System.ServiceModel;
|
---|
5 | using HeuristicLab.Security.Contracts.BusinessObjects;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Security.Contracts.Interfaces {
|
---|
8 |
|
---|
9 | [ServiceContract]
|
---|
10 | public interface ISecurityManager {
|
---|
11 |
|
---|
12 | [OperationContract]
|
---|
13 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
14 | Permission AddPermission(Permission permission);
|
---|
15 |
|
---|
16 | [OperationContract]
|
---|
17 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
18 | bool RemovePermission(Guid permissionId);
|
---|
19 |
|
---|
20 | [OperationContract]
|
---|
21 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
22 | Permission UpdatePermission(Permission permission);
|
---|
23 |
|
---|
24 | [OperationContract]
|
---|
25 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
26 | User AddNewUser(User user);
|
---|
27 |
|
---|
28 | [OperationContract]
|
---|
29 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
30 | bool RemoveUser(Guid userId);
|
---|
31 |
|
---|
32 | [OperationContract]
|
---|
33 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
34 | User UpdateUser(User user);
|
---|
35 |
|
---|
36 | [OperationContract]
|
---|
37 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
38 | ICollection<User> GetAllUsers();
|
---|
39 |
|
---|
40 | [OperationContract]
|
---|
41 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
42 | User GetUserByName(string name);
|
---|
43 |
|
---|
44 | [OperationContract]
|
---|
45 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
46 | User GetUserByLogin(string login);
|
---|
47 |
|
---|
48 | [OperationContract]
|
---|
49 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
50 | UserGroup AddNewUserGroup(UserGroup group);
|
---|
51 |
|
---|
52 | [OperationContract]
|
---|
53 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
54 | bool RemoveUserGroup(Guid userGroupId);
|
---|
55 |
|
---|
56 | [OperationContract]
|
---|
57 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
58 | UserGroup UpdateUserGroup(UserGroup group);
|
---|
59 |
|
---|
60 | [OperationContract]
|
---|
61 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
62 | ICollection<UserGroup> GetAllUserGroups();
|
---|
63 |
|
---|
64 | [OperationContract]
|
---|
65 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
66 | UserGroup GetUserGroupByName(string name);
|
---|
67 |
|
---|
68 | [OperationContract]
|
---|
69 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
70 | PermissionOwner UpdatePermissionOwner(PermissionOwner permissionOwner);
|
---|
71 |
|
---|
72 | [OperationContract]
|
---|
73 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
74 | bool AddPermissionOwnerToGroup(Guid userGroupId, Guid permissionOwnerId);
|
---|
75 |
|
---|
76 | [OperationContract]
|
---|
77 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
78 | bool RemovePermissionOwnerFromGroup(Guid userGroupId, Guid permissionOwnerId);
|
---|
79 |
|
---|
80 | [OperationContract]
|
---|
81 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
82 | bool GrantPermission(Guid permissionOwnerId, Guid permissionId, Guid entityId);
|
---|
83 |
|
---|
84 | [OperationContract]
|
---|
85 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
86 | Permission GetPermissionById(Guid permissionId);
|
---|
87 |
|
---|
88 | [OperationContract]
|
---|
89 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
90 | bool RevokePermission(Guid permissionOwnerId, Guid permissionId, Guid entityId);
|
---|
91 | }
|
---|
92 | }
|
---|