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 | UserGroup AddNewUserGroup(UserGroup group);
|
---|
47 |
|
---|
48 | [OperationContract]
|
---|
49 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
50 | bool RemoveUserGroup(Guid userGroupId);
|
---|
51 |
|
---|
52 | [OperationContract]
|
---|
53 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
54 | UserGroup UpdateUserGroup(UserGroup group);
|
---|
55 |
|
---|
56 | [OperationContract]
|
---|
57 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
58 | ICollection<UserGroup> GetAllUserGroups();
|
---|
59 |
|
---|
60 | [OperationContract]
|
---|
61 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
62 | UserGroup GetUserGroupByName(string name);
|
---|
63 |
|
---|
64 | [OperationContract]
|
---|
65 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
66 | PermissionOwner UpdatePermissionOwner(PermissionOwner permissionOwner);
|
---|
67 |
|
---|
68 | [OperationContract]
|
---|
69 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
70 | bool AddPermissionOwnerToGroup(Guid userGroupId, Guid permissionOwnerId);
|
---|
71 |
|
---|
72 | [OperationContract]
|
---|
73 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
74 | bool RemovePermissionOwnerFromGroup(Guid userGroupId, Guid permissionOwnerId);
|
---|
75 |
|
---|
76 | [OperationContract]
|
---|
77 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
78 | bool GrantPermission(Guid permissionOwnerId, Guid permissionId, Guid entityId);
|
---|
79 |
|
---|
80 | [OperationContract]
|
---|
81 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
82 | Permission GetPermissionById(Guid permissionId);
|
---|
83 |
|
---|
84 | [OperationContract]
|
---|
85 | [FaultContractAttribute(typeof(CommunicationException))]
|
---|
86 | bool RevokePermission(Guid permissionOwnerId, Guid permissionId, Guid entityId);
|
---|
87 | }
|
---|
88 | }
|
---|