Changeset 1824
- Timestamp:
- 05/15/09 12:53:21 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Contracts/3.2/ApplicationConstants.cs
r1813 r1824 55 55 public static string RESPONSE_CLIENT_CLIENTGROUP_ADDED = "Client.ClientGroupAdded"; 56 56 public static string RESPONSE_CLIENT_CLIENTGROUP_DOESNT_EXIST = "Client.ClientGroupDoesntExist"; 57 public static string RESPONSE_CLIENT_CLIENTGROUP_DELETED = "Client group sucessfully deleted"; 57 58 public static string RESPONSE_CLIENT_RESOURCE_ADDED_TO_GROUP = "Client.ResourceAddedToGroup"; 58 59 public static string RESPONSE_CLIENT_RESOURCE_REMOVED = "Client.ResourceRemoved"; -
trunk/sources/HeuristicLab.Hive.Contracts/3.2/Interfaces/IClientManager.cs
r1757 r1824 45 45 Response AddClientGroup(ClientGroup clientGroup); 46 46 [OperationContract] 47 Response DeleteClientGroup(Guid clientGroupId); 48 [OperationContract] 47 49 Response AddResourceToGroup(Guid clientGroupId, Resource resource); 48 50 [OperationContract] -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientManager.cs
r1757 r1824 91 91 } 92 92 } 93 emptyClientGroup.Id = Guid.Empty; 93 94 allClientGroups.Add(emptyClientGroup); 94 95 … … 247 248 } 248 249 250 public Response DeleteClientGroup(Guid clientGroupId) { 251 ISession session = factory.GetSessionForCurrentThread(); 252 253 try { 254 IClientGroupAdapter clientGroupAdapter = 255 session.GetDataAdapter<ClientGroup, IClientGroupAdapter>(); 256 257 Response response = new Response(); 258 259 ClientGroup clientGroup = clientGroupAdapter.GetById(clientGroupId); 260 if (clientGroup == null) { 261 response.Success = false; 262 response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_CLIENTGROUP_DOESNT_EXIST; 263 return response; 264 } 265 266 clientGroupAdapter.Delete(clientGroup); 267 268 response.Success = true; 269 response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_CLIENTGROUP_DELETED; 270 return response; 271 272 } finally { 273 if (session != null) 274 session.EndSession(); 275 } 276 } 277 249 278 #endregion 250 279 } -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs
r1805 r1824 162 162 } 163 163 164 public Response DeleteClientGroup(Guid clientGroupId) { 165 return clientManager.DeleteClientGroup(clientGroupId); 166 } 167 164 168 /* 165 169 private bool HasPermission(Guid action) { … … 188 192 189 193 } 190 191 192 194 } 193 195 }
Note: See TracChangeset
for help on using the changeset viewer.