Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceContracts/IHiveService.cs @ 5779

Last change on this file since 5779 was 5779, checked in by cneumuel, 14 years ago

#1233

  • implemented pause, stop for single jobs
  • introduced Command property for jobs (to distinguish between state and command (abort vs. aborted))
  • improved behaviour of ItemTreeView (double click opens new window, selected item stays marked)
  • fixed bugs in StateLogGanttChartListView and HiveJobView
  • fixed cloning of client-side dtos
File size: 4.5 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Net.Security;
4using System.ServiceModel;
5using HeuristicLab.Services.Hive.Common.DataTransfer;
6
7namespace HeuristicLab.Services.Hive.Common.ServiceContracts {
8
9  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
10  public interface IHiveService {
11
12    #region Job Methods
13    [OperationContract]
14    Guid AddJob(Job job, JobData jobData, IEnumerable<Guid> resourceIds);
15
16    [OperationContract]
17    Guid AddChildJob(Guid parentJobId, Job job, JobData jobData);
18
19    [OperationContract] // formerly GetJobById
20    Job GetJob(Guid jobId);
21
22    [OperationContract] // formerly GetAllJobs
23    IEnumerable<Job> GetJobs();
24
25    [OperationContract] // formerly GetJobResults
26    IEnumerable<LightweightJob> GetLightweightJobs(IEnumerable<Guid> jobIds);
27
28    [OperationContract] // formerly GetChildJobResults
29    IEnumerable<LightweightJob> GetLightweightChildJobs(Guid? parentJobId, bool recursive, bool includeParent);
30
31    [OperationContract] // formerly GetLastSerializedResult
32    JobData GetJobData(Guid jobId);
33
34    [OperationContract]
35    void UpdateJob(Job jobDto);
36
37    [OperationContract]
38    void UpdateJobData(Job jobDto, JobData jobDataDto);
39
40    [OperationContract]
41    void DeleteJob(Guid jobId);
42
43    [OperationContract]
44    void DeleteChildJobs(Guid parentJobId);
45
46    [OperationContract]
47    Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception);
48    #endregion
49
50    #region Job Control Methods
51    [OperationContract]
52    void StopJob(Guid jobId);
53
54    [OperationContract]
55    void PauseJob(Guid jobId);
56
57    [OperationContract]
58    void RestartJob(Guid jobId);
59    #endregion
60
61    #region HiveExperiment Methods
62    [OperationContract]
63    HiveExperiment GetHiveExperiment(Guid id);
64
65    /// <summary>
66    /// Returns all experiments for the current user
67    /// </summary>
68    [OperationContract]
69    IEnumerable<HiveExperiment> GetHiveExperiments();
70
71    /// <summary>
72    /// Returns all experiments in the hive (only for admins)
73    /// </summary>
74    /// <returns></returns>
75    [OperationContract]
76    IEnumerable<HiveExperiment> GetAllHiveExperiments();
77
78    [OperationContract]
79    Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
80
81    [OperationContract]
82    void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
83
84    [OperationContract]
85    void DeleteHiveExperiment(Guid hiveExperimentId);
86    #endregion
87
88    #region Login Methods
89    [OperationContract]
90    void Hello(Slave slave);
91
92    [OperationContract]
93    void GoodBye(Guid slaveId);
94    #endregion
95
96    #region Heartbeat Methods
97    [OperationContract]
98    List<MessageContainer> Heartbeat(Heartbeat heartbeat);
99    #endregion
100
101    #region Plugin Methods
102    [OperationContract]
103    Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
104    [OperationContract]
105    IEnumerable<Plugin> GetPlugins();
106    [OperationContract]
107    IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
108    #endregion
109
110    #region Slave Methods
111    [OperationContract]
112    Guid AddSlave(Slave slave);
113
114    [OperationContract]
115    Guid AddSlaveGroup(SlaveGroup slaveGroup);
116
117    [OperationContract]
118    Slave GetSlave(Guid slaveId);
119
120    [OperationContract]
121    SlaveGroup GetSlaveGroup(Guid slaveGroupId);
122
123    [OperationContract]
124    IEnumerable<Slave> GetSlaves();
125
126    [OperationContract]
127    IEnumerable<SlaveGroup> GetSlaveGroups();
128
129    [OperationContract]
130    void UpdateSlave(Slave slave);
131
132    [OperationContract]
133    void UpdateSlaveGroup(SlaveGroup slaveGroup);
134
135    [OperationContract]
136    void DeleteSlave(Guid slaveId);
137
138    [OperationContract]
139    void DeleteSlaveGroup(Guid slaveGroupId);
140
141    [OperationContract]
142    void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
143
144    [OperationContract]
145    void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
146
147    [OperationContract]
148    Guid GetResourceId(string resourceName);
149
150    [OperationContract]
151    void TriggerLifecycle(bool force);
152    #endregion
153
154    #region Appointment Methods
155    [OperationContract]
156    Guid AddAppointment(Appointment appointment);
157
158    [OperationContract]
159    void DeleteAppointment(Guid appointmentId);
160
161    [OperationContract]
162    void UpdateAppointment(Appointment appointment);
163
164    [OperationContract]
165    IEnumerable<Appointment> GetScheduleForResource(Guid resourceId);
166    #endregion
167  }
168}
Note: See TracBrowser for help on using the repository browser.