Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/ServiceContracts/IHiveService.cs @ 15546

Last change on this file since 15546 was 15546, checked in by jzenisek, 6 years ago

#2839 worked on ProjectResource assignment: (cascading) assigning & unassigning

File size: 6.7 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2016 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
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
33    [OperationContract]
34    Guid AddTask(Task task, TaskData taskData, IEnumerable<Guid> resourceIds);
35
36    [OperationContract]
37    Guid AddChildTask(Guid parentTaskId, Task task, TaskData taskData);
38
39    [OperationContract]
40    Task GetTask(Guid taskId);
41
42    [OperationContract]
43    IEnumerable<LightweightTask> GetLightweightJobTasks(Guid jobId);
44
45    [OperationContract]
46    IEnumerable<LightweightTask> GetLightweightJobTasksWithoutStateLog(Guid jobId);
47
48    [OperationContract]
49    TaskData GetTaskData(Guid taskId);
50
51    [OperationContract]
52    void UpdateTask(Task taskDto);
53
54    [OperationContract]
55    void UpdateTaskData(Task taskDto, TaskData taskDataDto);
56
57    [OperationContract]
58    Task UpdateTaskState(Guid taskId, TaskState taskState, Guid? slaveId, Guid? userId, string exception);
59    #endregion
60
61    #region Task Control Methods
62    [OperationContract]
63    void StopTask(Guid taskId);
64
65    [OperationContract]
66    void PauseTask(Guid taskId);
67
68    [OperationContract]
69    void RestartTask(Guid taskId);
70    #endregion
71
72    #region Job Methods
73    [OperationContract]
74    Job GetJob(Guid id);
75
76    [OperationContract]
77    IEnumerable<Job> GetJobs();
78
79    [OperationContract]
80    Guid AddJob(Job jobDto);
81
82    [OperationContract]
83    void UpdateJob(Job jobDto);
84
85    [OperationContract]
86    void DeleteJob(Guid JobId);
87    #endregion
88
89    #region JobPermission Methods
90    [OperationContract]
91    void GrantPermission(Guid jobId, Guid grantedUserId, Permission permission);
92
93    [OperationContract]
94    void RevokePermission(Guid hiveExperimentId, Guid grantedUserId);
95
96    [OperationContract]
97    IEnumerable<JobPermission> GetJobPermissions(Guid jobId);
98
99    // BackwardsCompatibility3.3
100    #region Backwards compatible code, remove with 3.4
101    [OperationContract]
102    bool IsAllowedPrivileged(); // current user may execute privileged task
103    #endregion
104    #endregion
105
106    #region Login Methods
107    [OperationContract]
108    void Hello(Slave slave);
109
110    [OperationContract]
111    void GoodBye(Guid slaveId);
112    #endregion
113
114    #region Heartbeat Methods
115    [OperationContract]
116    List<MessageContainer> Heartbeat(Heartbeat heartbeat);
117    #endregion
118
119    #region Plugin Methods
120    [OperationContract]
121    Plugin GetPlugin(Guid pluginId);
122
123    [OperationContract]
124    [FaultContract(typeof(PluginAlreadyExistsFault))]
125    Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
126
127    [OperationContract]
128    IEnumerable<Plugin> GetPlugins();
129
130    [OperationContract]
131    IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
132    #endregion
133
134    #region Project Methods
135    [OperationContract]
136    Guid AddProject(Project projectDto);
137
138    [OperationContract]
139    void UpdateProject(Project projectDto);
140
141    [OperationContract]
142    void DeleteProject(Guid projectId);
143
144    [OperationContract]
145    Project GetProject(Guid projectId);
146
147    [OperationContract]
148    IEnumerable<Project> GetProjects();
149    #endregion
150
151    #region ProjectPermission Methods
152    [OperationContract]
153    void GrantProjectPermissions(Guid projectId, Guid[] grantedUserIds, bool cascading);
154
155    [OperationContract]
156    void RevokeProjectPermissions(Guid projectId, Guid[] grantedUserIds, bool cascading);
157
158    [OperationContract]
159    IEnumerable<ProjectPermission> GetProjectPermissions(Guid projectId);
160    #endregion
161
162    #region AssignedProjectResource Methods
163    [OperationContract]
164    void AssignProjectResources(Guid projectId, Guid[] resourceIds, bool cascading);
165
166    [OperationContract]
167    void UnassignProjectResources(Guid projectId, Guid[] resourceIds, bool cascading);
168
169    [OperationContract]
170    IEnumerable<AssignedProjectResource> GetAssignedResourcesForProject(Guid projectId);
171    #endregion
172
173    #region Slave Methods
174    [OperationContract]
175    Guid AddSlave(Slave slave);
176
177    [OperationContract]
178    Guid AddSlaveGroup(SlaveGroup slaveGroup);
179
180    [OperationContract]
181    Slave GetSlave(Guid slaveId);
182
183    [OperationContract]
184    IEnumerable<Slave> GetSlaves();
185
186    [OperationContract]
187    IEnumerable<SlaveGroup> GetSlaveGroups();
188
189    [OperationContract]
190    void UpdateSlave(Slave slave);
191
192    [OperationContract]
193    void UpdateSlaveGroup(SlaveGroup slaveGroup);
194
195    [OperationContract]
196    void DeleteSlave(Guid slaveId);
197
198    [OperationContract]
199    void DeleteSlaveGroup(Guid slaveGroupId);
200
201    [OperationContract]
202    void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
203
204    [OperationContract]
205    void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
206
207    [OperationContract]
208    Guid GetResourceId(string resourceName);
209
210    [OperationContract]
211    void TriggerEventManager(bool force);
212
213    [OperationContract]
214    int GetNewHeartbeatInterval(Guid slaveId);
215    #endregion
216
217    #region Downtime Methods
218    [OperationContract]
219    Guid AddDowntime(Downtime downtime);
220
221    [OperationContract]
222    void DeleteDowntime(Guid downtimeId);
223
224    [OperationContract]
225    void UpdateDowntime(Downtime downtimeDto);
226
227    [OperationContract]
228    IEnumerable<Downtime> GetDowntimesForResource(Guid resourceId);
229    #endregion
230
231    #region User Methods
232    [OperationContract]
233    string GetUsernameByUserId(Guid userId);
234
235    [OperationContract]
236    Guid GetUserIdByUsername(string username);
237    #endregion
238
239    #region UserPriorities Methods
240    [OperationContract]
241    IEnumerable<UserPriority> GetUserPriorities();
242    #endregion
243  }
244}
Note: See TracBrowser for help on using the repository browser.