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 @ 5633

Last change on this file since 5633 was 5633, checked in by ascheibe, 12 years ago

#1233 added Appointment/Schedule ws and dao methods

File size: 4.3 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    #endregion
46
47    #region Job Control Methods
48    [OperationContract]
49    void StopJob(Guid jobId);
50
51    [OperationContract]
52    void PauseJob(Guid jobId);
53    #endregion
54
55    #region HiveExperiment Methods
56    [OperationContract]
57    HiveExperiment GetHiveExperiment(Guid id);
58
59    /// <summary>
60    /// Returns all experiments for the current user
61    /// </summary>
62    [OperationContract]
63    IEnumerable<HiveExperiment> GetHiveExperiments();
64
65    /// <summary>
66    /// Returns all experiments in the hive (only for admins)
67    /// </summary>
68    /// <returns></returns>
69    [OperationContract]
70    IEnumerable<HiveExperiment> GetAllHiveExperiments();
71
72    [OperationContract]
73    Guid AddHiveExperiment(HiveExperiment hiveExperimentDto);
74
75    [OperationContract]
76    void UpdateHiveExperiment(HiveExperiment hiveExperimentDto);
77
78    [OperationContract]
79    void DeleteHiveExperiment(Guid hiveExperimentId);
80    #endregion
81
82    #region Login Methods
83    [OperationContract]
84    void Hello(Slave slave);
85
86    [OperationContract]
87    void GoodBye(Guid slaveId);
88    #endregion
89
90    #region Heartbeat Methods
91    [OperationContract]
92    List<MessageContainer> Heartbeat(Heartbeat heartbeat);
93    #endregion
94
95    #region Plugin Methods
96    [OperationContract]
97    Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
98    [OperationContract]
99    IEnumerable<Plugin> GetPlugins();
100    [OperationContract]
101    IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds);
102    #endregion
103
104    #region Slave Methods
105    [OperationContract]
106    Guid AddSlave(Slave slave);
107
108    [OperationContract]
109    Guid AddSlaveGroup(SlaveGroup slaveGroup);
110
111    [OperationContract]
112    Slave GetSlave(Guid slaveId);
113
114    [OperationContract]
115    SlaveGroup GetSlaveGroup(Guid slaveGroupId);
116
117    [OperationContract]
118    IEnumerable<Slave> GetSlaves();
119
120    [OperationContract]
121    IEnumerable<SlaveGroup> GetSlaveGroups();
122
123    [OperationContract]
124    void UpdateSlave(Slave slave);
125
126    [OperationContract]
127    void UpdateSlaveGroup(SlaveGroup slaveGroup);
128
129    [OperationContract]
130    void DeleteSlave(Guid slaveId);
131
132    [OperationContract]
133    void DeleteSlaveGroup(Guid slaveGroupId);
134
135    [OperationContract]
136    void AddResourceToGroup(Guid slaveGroupId, Guid resourceId);
137
138    [OperationContract]
139    void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId);
140
141    [OperationContract]
142    Guid GetResourceId(string resourceName);
143
144    [OperationContract]
145    void TriggerLifecycle();
146    #endregion
147
148    #region Appointment Methods
149    [OperationContract]
150    Guid AddAppointment(Appointment appointment);
151
152    [OperationContract]
153    void DeleteAppointment(Guid appointmentId);
154
155    [OperationContract]
156    void UpdateAppointment(Appointment appointment);
157
158    [OperationContract]
159    IEnumerable<Appointment> GetScheduleForResource(Guid resourceId);
160    #endregion
161  }
162}
Note: See TracBrowser for help on using the repository browser.