Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.Services.Hive/3.3/ServiceContracts/IHiveService.cs @ 17578

Last change on this file since 17578 was 17180, checked in by swagner, 5 years ago

#2875: Removed years in copyrights

File size: 8.4 KB
RevLine 
[6983]1#region License Information
2/* HeuristicLab
[17180]3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
[6983]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.Hive.DataTransfer;
27
28namespace HeuristicLab.Services.Hive.ServiceContracts {
29
30  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
31  public interface IHiveService {
32    #region Task Methods
[16117]33
[6983]34    [OperationContract]
[16117]35    Guid AddTask(Task task, TaskData taskData);
[6983]36
37    [OperationContract]
38    Guid AddChildTask(Guid parentTaskId, Task task, TaskData taskData);
39
40    [OperationContract]
41    Task GetTask(Guid taskId);
42
43    [OperationContract]
44    IEnumerable<LightweightTask> GetLightweightJobTasks(Guid jobId);
45
46    [OperationContract]
[9219]47    IEnumerable<LightweightTask> GetLightweightJobTasksWithoutStateLog(Guid jobId);
48
49    [OperationContract]
[6983]50    TaskData GetTaskData(Guid taskId);
51
52    [OperationContract]
53    void UpdateTask(Task taskDto);
54
55    [OperationContract]
56    void UpdateTaskData(Task taskDto, TaskData taskDataDto);
57
58    [OperationContract]
59    Task UpdateTaskState(Guid taskId, TaskState taskState, Guid? slaveId, Guid? userId, string exception);
60    #endregion
61
62    #region Task Control Methods
63    [OperationContract]
64    void StopTask(Guid taskId);
65
66    [OperationContract]
67    void PauseTask(Guid taskId);
68
69    [OperationContract]
70    void RestartTask(Guid taskId);
71    #endregion
72
73    #region Job Methods
74    [OperationContract]
75    Job GetJob(Guid id);
76
77    [OperationContract]
78    IEnumerable<Job> GetJobs();
79
80    [OperationContract]
[16117]81    IEnumerable<Job> GetJobsByProjectId(Guid projectId);
[6983]82
83    [OperationContract]
[16117]84    IEnumerable<Job> GetJobsByProjectIds(IEnumerable<Guid> projectIds);
[6983]85
86    [OperationContract]
[16117]87    Guid AddJob(Job jobDto, IEnumerable<Guid> resourceIds);
88
89    [OperationContract]
90    void UpdateJob(Job jobDto, IEnumerable<Guid> resourceIds);
91
92    [OperationContract]
93    void UpdateJobState(Guid JobId, JobState jobState);
94
95    [OperationContract]
96    void UpdateJobStates(IEnumerable<Guid> jobIds, JobState jobState);
97
98    [OperationContract]
99    IEnumerable<AssignedJobResource> GetAssignedResourcesForJob(Guid jobId);
[6983]100    #endregion
101
102    #region JobPermission Methods
103    [OperationContract]
104    void GrantPermission(Guid jobId, Guid grantedUserId, Permission permission);
105
106    [OperationContract]
107    void RevokePermission(Guid hiveExperimentId, Guid grantedUserId);
108
109    [OperationContract]
110    IEnumerable<JobPermission> GetJobPermissions(Guid jobId);
111
[12926]112    // BackwardsCompatibility3.3
113    #region Backwards compatible code, remove with 3.4
[6983]114    [OperationContract]
115    bool IsAllowedPrivileged(); // current user may execute privileged task
116    #endregion
[12926]117    #endregion
[6983]118
119    #region Login Methods
120    [OperationContract]
121    void Hello(Slave slave);
122
123    [OperationContract]
124    void GoodBye(Guid slaveId);
125    #endregion
126
127    #region Heartbeat Methods
128    [OperationContract]
129    List<MessageContainer> Heartbeat(Heartbeat heartbeat);
130    #endregion
131
132    #region Plugin Methods
133    [OperationContract]
134    Plugin GetPlugin(Guid pluginId);
135
136    [OperationContract]
137    [FaultContract(typeof(PluginAlreadyExistsFault))]
138    Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
139
140    [OperationContract]
141    IEnumerable<Plugin> GetPlugins();
142
143    [OperationContract]
144    IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
145    #endregion
146
[16117]147    #region Project Methods
[7916]148    [OperationContract]
[16117]149    Guid AddProject(Project projectDto);
[7916]150
151    [OperationContract]
[16117]152    void UpdateProject(Project projectDto);
[7916]153
154    [OperationContract]
[16117]155    void DeleteProject(Guid projectId);
156
157    [OperationContract]
158    Project GetProject(Guid projectId);
159
160    [OperationContract]
161    IEnumerable<Project> GetProjects();
162
163    [OperationContract]
164    IEnumerable<Project> GetProjectsForAdministration();
165
166    [OperationContract]
167    IDictionary<Guid, HashSet<Guid>> GetProjectGenealogy();
168
169    [OperationContract]
170    IDictionary<Guid, string> GetProjectNames();
[7916]171    #endregion
172
[16117]173    #region ProjectPermission Methods
174    [OperationContract]
175    void SaveProjectPermissions(Guid projectId, List<Guid> grantedUserIds, bool reassign, bool cascading, bool reassignCascading);
176
177    //[OperationContract]
178    //void GrantProjectPermissions(Guid projectId, List<Guid> grantedUserIds, bool cascading);
179
180    //[OperationContract]
181    //void RevokeProjectPermissions(Guid projectId, List<Guid> grantedUserIds, bool cascading);
182
183    [OperationContract]
184    IEnumerable<ProjectPermission> GetProjectPermissions(Guid projectId);
185    #endregion
186
187    #region AssignedProjectResource Methods
188    [OperationContract]
189    void SaveProjectResourceAssignments(Guid projectId, List<Guid> resourceIds, bool reassign, bool cascading, bool reassignCascading);
190
191    //[OperationContract]
192    //void AssignProjectResources(Guid projectId, List<Guid> resourceIds, bool cascading);
193
194    //[OperationContract]
195    //void UnassignProjectResources(Guid projectId, List<Guid> resourceIds, bool cascading);
196
197    [OperationContract]
198    IEnumerable<AssignedProjectResource> GetAssignedResourcesForProject(Guid projectId);
199
200    [OperationContract]
201    IEnumerable<AssignedProjectResource> GetAssignedResourcesForProjectAdministration(Guid projectId);
202
203    [OperationContract]
204    IEnumerable<AssignedProjectResource> GetAssignedResourcesForProjectsAdministration(IEnumerable<Guid> projectIds);
205    #endregion
206
[6983]207    #region Slave Methods
208    [OperationContract]
209    Guid AddSlave(Slave slave);
210
211    [OperationContract]
212    Guid AddSlaveGroup(SlaveGroup slaveGroup);
213
214    [OperationContract]
215    Slave GetSlave(Guid slaveId);
216
217    [OperationContract]
218    IEnumerable<Slave> GetSlaves();
219
220    [OperationContract]
221    IEnumerable<SlaveGroup> GetSlaveGroups();
222
223    [OperationContract]
[16117]224    IEnumerable<Slave> GetSlavesForAdministration();
225
226    [OperationContract]
227    IEnumerable<SlaveGroup> GetSlaveGroupsForAdministration();
228
229    [OperationContract]
230    IDictionary<Guid, HashSet<Guid>> GetResourceGenealogy();
231
232    [OperationContract]
233    IDictionary<Guid, string> GetResourceNames();
234
235    [OperationContract]
[6983]236    void UpdateSlave(Slave slave);
237
238    [OperationContract]
239    void UpdateSlaveGroup(SlaveGroup slaveGroup);
240
241    [OperationContract]
242    void DeleteSlave(Guid slaveId);
243
244    [OperationContract]
245    void DeleteSlaveGroup(Guid slaveGroupId);
246
247    [OperationContract]
248    void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
249
250    [OperationContract]
251    void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
252
253    [OperationContract]
254    Guid GetResourceId(string resourceName);
255
256    [OperationContract]
257    void TriggerEventManager(bool force);
258
259    [OperationContract]
260    int GetNewHeartbeatInterval(Guid slaveId);
261    #endregion
262
263    #region Downtime Methods
264    [OperationContract]
265    Guid AddDowntime(Downtime downtime);
266
267    [OperationContract]
268    void DeleteDowntime(Guid downtimeId);
269
270    [OperationContract]
[12878]271    void UpdateDowntime(Downtime downtimeDto);
[6983]272
273    [OperationContract]
274    IEnumerable<Downtime> GetDowntimesForResource(Guid resourceId);
275    #endregion
276
277    #region User Methods
278    [OperationContract]
279    string GetUsernameByUserId(Guid userId);
280
281    [OperationContract]
282    Guid GetUserIdByUsername(string username);
[16117]283
284    [OperationContract]
285    Dictionary<Guid, HashSet<Guid>> GetUserGroupTree();
286
287    [OperationContract]
288    bool CheckAccessToAdminAreaGranted();
[6983]289    #endregion
[9123]290
291    #region UserPriorities Methods
292    [OperationContract]
293    IEnumerable<UserPriority> GetUserPriorities();
294    #endregion
[6983]295  }
296}
Note: See TracBrowser for help on using the repository browser.