Changeset 8071
- Timestamp:
- 06/20/12 20:11:13 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ResourcesView.cs
r8051 r8071 232 232 && resource.Name != UngroupedGroupName 233 233 && resource.Id != Guid.Empty 234 && HiveServiceLocator.Instance.CallHiveService<bool>(service => { return service.AuthorizesForResourceAdministration(resource.Id); }); 234 && UserInformation.Instance.UserExists 235 && (resource.OwnerUserId == UserInformation.Instance.User.Id || HiveRoles.CheckAdminUserPermissions()); 235 236 } 236 237 -
trunk/sources/HeuristicLab.Clients.Hive.Administrator/3.3/Views/SlaveView.cs
r8051 r8071 69 69 ShowSlaveUI(true); 70 70 Slave ct = (Slave)Content; 71 bool authorized = HiveServiceLocator.Instance.CallHiveService<bool>(service => service.AuthorizesForResourceAdministration(ct.Id));71 bool authorized = UserInformation.Instance.UserExists && (ct.OwnerUserId == UserInformation.Instance.User.Id || HiveRoles.CheckAdminUserPermissions()); 72 72 txtName.Text = ct.Name; 73 73 txtHbIntervall.Text = ct.HbInterval.ToString(); -
trunk/sources/HeuristicLab.Clients.Hive/3.3/ServiceClients/HiveServiceClient.cs
r8051 r8071 11 11 namespace HeuristicLab.Clients.Hive { 12 12 13 14 [System.Diagnostics.DebuggerStepThroughAttribute()] 15 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 16 [System.Runtime.Serialization.DataContractAttribute(Name = "Slave", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")] 17 [System.SerializableAttribute()] 18 public partial class Slave : HeuristicLab.Clients.Hive.Resource { 19 20 [System.Runtime.Serialization.OptionalFieldAttribute()] 21 private System.Nullable<int> CoresField; 22 23 [System.Runtime.Serialization.OptionalFieldAttribute()] 24 private HeuristicLab.Clients.Hive.CpuArchitecture CpuArchitectureField; 25 26 [System.Runtime.Serialization.OptionalFieldAttribute()] 27 private System.Nullable<int> CpuSpeedField; 28 29 [System.Runtime.Serialization.OptionalFieldAttribute()] 30 private double CpuUtilizationField; 31 32 [System.Runtime.Serialization.OptionalFieldAttribute()] 33 private System.Nullable<int> FreeCoresField; 34 35 [System.Runtime.Serialization.OptionalFieldAttribute()] 36 private System.Nullable<int> FreeMemoryField; 37 38 [System.Runtime.Serialization.OptionalFieldAttribute()] 39 private bool IsAllowedToCalculateField; 40 41 [System.Runtime.Serialization.OptionalFieldAttribute()] 42 private System.Nullable<bool> IsDisposableField; 43 44 [System.Runtime.Serialization.OptionalFieldAttribute()] 45 private System.Nullable<System.DateTime> LastHeartbeatField; 46 47 [System.Runtime.Serialization.OptionalFieldAttribute()] 48 private System.Nullable<int> MemoryField; 49 50 [System.Runtime.Serialization.OptionalFieldAttribute()] 51 private string OperatingSystemField; 52 53 [System.Runtime.Serialization.OptionalFieldAttribute()] 54 private HeuristicLab.Clients.Hive.SlaveState SlaveStateField; 55 56 [System.Runtime.Serialization.DataMemberAttribute()] 57 public System.Nullable<int> Cores { 58 get { 59 return this.CoresField; 60 } 61 set { 62 if ((this.CoresField.Equals(value) != true)) { 63 this.CoresField = value; 64 this.RaisePropertyChanged("Cores"); 65 } 66 } 67 } 68 69 [System.Runtime.Serialization.DataMemberAttribute()] 70 public HeuristicLab.Clients.Hive.CpuArchitecture CpuArchitecture { 71 get { 72 return this.CpuArchitectureField; 73 } 74 set { 75 if ((this.CpuArchitectureField.Equals(value) != true)) { 76 this.CpuArchitectureField = value; 77 this.RaisePropertyChanged("CpuArchitecture"); 78 } 79 } 80 } 81 82 [System.Runtime.Serialization.DataMemberAttribute()] 83 public System.Nullable<int> CpuSpeed { 84 get { 85 return this.CpuSpeedField; 86 } 87 set { 88 if ((this.CpuSpeedField.Equals(value) != true)) { 89 this.CpuSpeedField = value; 90 this.RaisePropertyChanged("CpuSpeed"); 91 } 92 } 93 } 94 95 [System.Runtime.Serialization.DataMemberAttribute()] 96 public double CpuUtilization { 97 get { 98 return this.CpuUtilizationField; 99 } 100 set { 101 if ((this.CpuUtilizationField.Equals(value) != true)) { 102 this.CpuUtilizationField = value; 103 this.RaisePropertyChanged("CpuUtilization"); 104 } 105 } 106 } 107 108 [System.Runtime.Serialization.DataMemberAttribute()] 109 public System.Nullable<int> FreeCores { 110 get { 111 return this.FreeCoresField; 112 } 113 set { 114 if ((this.FreeCoresField.Equals(value) != true)) { 115 this.FreeCoresField = value; 116 this.RaisePropertyChanged("FreeCores"); 117 } 118 } 119 } 120 121 [System.Runtime.Serialization.DataMemberAttribute()] 122 public System.Nullable<int> FreeMemory { 123 get { 124 return this.FreeMemoryField; 125 } 126 set { 127 if ((this.FreeMemoryField.Equals(value) != true)) { 128 this.FreeMemoryField = value; 129 this.RaisePropertyChanged("FreeMemory"); 130 } 131 } 132 } 133 134 [System.Runtime.Serialization.DataMemberAttribute()] 135 public bool IsAllowedToCalculate { 136 get { 137 return this.IsAllowedToCalculateField; 138 } 139 set { 140 if ((this.IsAllowedToCalculateField.Equals(value) != true)) { 141 this.IsAllowedToCalculateField = value; 142 this.RaisePropertyChanged("IsAllowedToCalculate"); 143 } 144 } 145 } 146 147 [System.Runtime.Serialization.DataMemberAttribute()] 148 public System.Nullable<bool> IsDisposable { 149 get { 150 return this.IsDisposableField; 151 } 152 set { 153 if ((this.IsDisposableField.Equals(value) != true)) { 154 this.IsDisposableField = value; 155 this.RaisePropertyChanged("IsDisposable"); 156 } 157 } 158 } 159 160 [System.Runtime.Serialization.DataMemberAttribute()] 161 public System.Nullable<System.DateTime> LastHeartbeat { 162 get { 163 return this.LastHeartbeatField; 164 } 165 set { 166 if ((this.LastHeartbeatField.Equals(value) != true)) { 167 this.LastHeartbeatField = value; 168 this.RaisePropertyChanged("LastHeartbeat"); 169 } 170 } 171 } 172 173 [System.Runtime.Serialization.DataMemberAttribute()] 174 public System.Nullable<int> Memory { 175 get { 176 return this.MemoryField; 177 } 178 set { 179 if ((this.MemoryField.Equals(value) != true)) { 180 this.MemoryField = value; 181 this.RaisePropertyChanged("Memory"); 182 } 183 } 184 } 185 186 [System.Runtime.Serialization.DataMemberAttribute()] 187 public string OperatingSystem { 188 get { 189 return this.OperatingSystemField; 190 } 191 set { 192 if ((object.ReferenceEquals(this.OperatingSystemField, value) != true)) { 193 this.OperatingSystemField = value; 194 this.RaisePropertyChanged("OperatingSystem"); 195 } 196 } 197 } 198 199 [System.Runtime.Serialization.DataMemberAttribute()] 200 public HeuristicLab.Clients.Hive.SlaveState SlaveState { 201 get { 202 return this.SlaveStateField; 203 } 204 set { 205 if ((this.SlaveStateField.Equals(value) != true)) { 206 this.SlaveStateField = value; 207 this.RaisePropertyChanged("SlaveState"); 208 } 209 } 210 } 211 } 13 212 14 213 [System.Diagnostics.DebuggerStepThroughAttribute()] … … 27 226 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))] 28 227 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Resource))] 228 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))] 29 229 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))] 30 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))]31 230 public partial class HiveItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged { 32 231 … … 711 910 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))] 712 911 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Resource))] 912 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))] 713 913 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))] 714 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))]715 914 public partial class NamedHiveItem : HeuristicLab.Clients.Hive.HiveItem { 716 915 … … 958 1157 [System.Runtime.Serialization.DataContractAttribute(Name = "Resource", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")] 959 1158 [System.SerializableAttribute()] 1159 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))] 960 1160 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))] 961 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))]962 1161 public partial class Resource : HeuristicLab.Clients.Hive.NamedHiveItem { 963 1162 … … 1013 1212 [System.Diagnostics.DebuggerStepThroughAttribute()] 1014 1213 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 1015 [System.Runtime.Serialization.DataContractAttribute(Name = "Slave", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]1016 [System.SerializableAttribute()]1017 public partial class Slave : HeuristicLab.Clients.Hive.Resource {1018 1019 [System.Runtime.Serialization.OptionalFieldAttribute()]1020 private System.Nullable<int> CoresField;1021 1022 [System.Runtime.Serialization.OptionalFieldAttribute()]1023 private HeuristicLab.Clients.Hive.CpuArchitecture CpuArchitectureField;1024 1025 [System.Runtime.Serialization.OptionalFieldAttribute()]1026 private System.Nullable<int> CpuSpeedField;1027 1028 [System.Runtime.Serialization.OptionalFieldAttribute()]1029 private double CpuUtilizationField;1030 1031 [System.Runtime.Serialization.OptionalFieldAttribute()]1032 private System.Nullable<int> FreeCoresField;1033 1034 [System.Runtime.Serialization.OptionalFieldAttribute()]1035 private System.Nullable<int> FreeMemoryField;1036 1037 [System.Runtime.Serialization.OptionalFieldAttribute()]1038 private bool IsAllowedToCalculateField;1039 1040 [System.Runtime.Serialization.OptionalFieldAttribute()]1041 private System.Nullable<bool> IsDisposableField;1042 1043 [System.Runtime.Serialization.OptionalFieldAttribute()]1044 private System.Nullable<System.DateTime> LastHeartbeatField;1045 1046 [System.Runtime.Serialization.OptionalFieldAttribute()]1047 private System.Nullable<int> MemoryField;1048 1049 [System.Runtime.Serialization.OptionalFieldAttribute()]1050 private string OperatingSystemField;1051 1052 [System.Runtime.Serialization.OptionalFieldAttribute()]1053 private HeuristicLab.Clients.Hive.SlaveState SlaveStateField;1054 1055 [System.Runtime.Serialization.DataMemberAttribute()]1056 public System.Nullable<int> Cores {1057 get {1058 return this.CoresField;1059 }1060 set {1061 if ((this.CoresField.Equals(value) != true)) {1062 this.CoresField = value;1063 this.RaisePropertyChanged("Cores");1064 }1065 }1066 }1067 1068 [System.Runtime.Serialization.DataMemberAttribute()]1069 public HeuristicLab.Clients.Hive.CpuArchitecture CpuArchitecture {1070 get {1071 return this.CpuArchitectureField;1072 }1073 set {1074 if ((this.CpuArchitectureField.Equals(value) != true)) {1075 this.CpuArchitectureField = value;1076 this.RaisePropertyChanged("CpuArchitecture");1077 }1078 }1079 }1080 1081 [System.Runtime.Serialization.DataMemberAttribute()]1082 public System.Nullable<int> CpuSpeed {1083 get {1084 return this.CpuSpeedField;1085 }1086 set {1087 if ((this.CpuSpeedField.Equals(value) != true)) {1088 this.CpuSpeedField = value;1089 this.RaisePropertyChanged("CpuSpeed");1090 }1091 }1092 }1093 1094 [System.Runtime.Serialization.DataMemberAttribute()]1095 public double CpuUtilization {1096 get {1097 return this.CpuUtilizationField;1098 }1099 set {1100 if ((this.CpuUtilizationField.Equals(value) != true)) {1101 this.CpuUtilizationField = value;1102 this.RaisePropertyChanged("CpuUtilization");1103 }1104 }1105 }1106 1107 [System.Runtime.Serialization.DataMemberAttribute()]1108 public System.Nullable<int> FreeCores {1109 get {1110 return this.FreeCoresField;1111 }1112 set {1113 if ((this.FreeCoresField.Equals(value) != true)) {1114 this.FreeCoresField = value;1115 this.RaisePropertyChanged("FreeCores");1116 }1117 }1118 }1119 1120 [System.Runtime.Serialization.DataMemberAttribute()]1121 public System.Nullable<int> FreeMemory {1122 get {1123 return this.FreeMemoryField;1124 }1125 set {1126 if ((this.FreeMemoryField.Equals(value) != true)) {1127 this.FreeMemoryField = value;1128 this.RaisePropertyChanged("FreeMemory");1129 }1130 }1131 }1132 1133 [System.Runtime.Serialization.DataMemberAttribute()]1134 public bool IsAllowedToCalculate {1135 get {1136 return this.IsAllowedToCalculateField;1137 }1138 set {1139 if ((this.IsAllowedToCalculateField.Equals(value) != true)) {1140 this.IsAllowedToCalculateField = value;1141 this.RaisePropertyChanged("IsAllowedToCalculate");1142 }1143 }1144 }1145 1146 [System.Runtime.Serialization.DataMemberAttribute()]1147 public System.Nullable<bool> IsDisposable {1148 get {1149 return this.IsDisposableField;1150 }1151 set {1152 if ((this.IsDisposableField.Equals(value) != true)) {1153 this.IsDisposableField = value;1154 this.RaisePropertyChanged("IsDisposable");1155 }1156 }1157 }1158 1159 [System.Runtime.Serialization.DataMemberAttribute()]1160 public System.Nullable<System.DateTime> LastHeartbeat {1161 get {1162 return this.LastHeartbeatField;1163 }1164 set {1165 if ((this.LastHeartbeatField.Equals(value) != true)) {1166 this.LastHeartbeatField = value;1167 this.RaisePropertyChanged("LastHeartbeat");1168 }1169 }1170 }1171 1172 [System.Runtime.Serialization.DataMemberAttribute()]1173 public System.Nullable<int> Memory {1174 get {1175 return this.MemoryField;1176 }1177 set {1178 if ((this.MemoryField.Equals(value) != true)) {1179 this.MemoryField = value;1180 this.RaisePropertyChanged("Memory");1181 }1182 }1183 }1184 1185 [System.Runtime.Serialization.DataMemberAttribute()]1186 public string OperatingSystem {1187 get {1188 return this.OperatingSystemField;1189 }1190 set {1191 if ((object.ReferenceEquals(this.OperatingSystemField, value) != true)) {1192 this.OperatingSystemField = value;1193 this.RaisePropertyChanged("OperatingSystem");1194 }1195 }1196 }1197 1198 [System.Runtime.Serialization.DataMemberAttribute()]1199 public HeuristicLab.Clients.Hive.SlaveState SlaveState {1200 get {1201 return this.SlaveStateField;1202 }1203 set {1204 if ((this.SlaveStateField.Equals(value) != true)) {1205 this.SlaveStateField = value;1206 this.RaisePropertyChanged("SlaveState");1207 }1208 }1209 }1210 }1211 1212 [System.Diagnostics.DebuggerStepThroughAttribute()]1213 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]1214 1214 [System.Runtime.Serialization.DataContractAttribute(Name = "SlaveGroup", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")] 1215 1215 [System.SerializableAttribute()] … … 1218 1218 1219 1219 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 1220 [System.Runtime.Serialization.DataContractAttribute(Name = "CpuArchitecture", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")] 1221 public enum CpuArchitecture : int { 1222 1223 [System.Runtime.Serialization.EnumMemberAttribute()] 1224 x86 = 0, 1225 1226 [System.Runtime.Serialization.EnumMemberAttribute()] 1227 x64 = 1, 1228 } 1229 1230 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 1231 [System.Runtime.Serialization.DataContractAttribute(Name = "SlaveState", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")] 1232 public enum SlaveState : int { 1233 1234 [System.Runtime.Serialization.EnumMemberAttribute()] 1235 Idle = 0, 1236 1237 [System.Runtime.Serialization.EnumMemberAttribute()] 1238 Calculating = 1, 1239 1240 [System.Runtime.Serialization.EnumMemberAttribute()] 1241 Offline = 2, 1242 } 1243 1244 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 1220 1245 [System.Runtime.Serialization.DataContractAttribute(Name = "Command", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")] 1221 1246 public enum Command : int { … … 1272 1297 [System.Runtime.Serialization.EnumMemberAttribute()] 1273 1298 Full = 2, 1274 }1275 1276 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]1277 [System.Runtime.Serialization.DataContractAttribute(Name = "CpuArchitecture", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]1278 public enum CpuArchitecture : int {1279 1280 [System.Runtime.Serialization.EnumMemberAttribute()]1281 x86 = 0,1282 1283 [System.Runtime.Serialization.EnumMemberAttribute()]1284 x64 = 1,1285 }1286 1287 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]1288 [System.Runtime.Serialization.DataContractAttribute(Name = "SlaveState", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.DataTransfer")]1289 public enum SlaveState : int {1290 1291 [System.Runtime.Serialization.EnumMemberAttribute()]1292 Idle = 0,1293 1294 [System.Runtime.Serialization.EnumMemberAttribute()]1295 Calculating = 1,1296 1297 [System.Runtime.Serialization.EnumMemberAttribute()]1298 Offline = 2,1299 1299 } 1300 1300 … … 1664 1664 public interface IHiveService { 1665 1665 1666 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetSlaveGroup", ReplyAction = "http://tempuri.org/IHiveService/GetSlaveGroupResponse")]1667 HeuristicLab.Clients.Hive.SlaveGroup GetSlaveGroup(System.Guid slaveGroupId);1668 1669 1666 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetSlaves", ReplyAction = "http://tempuri.org/IHiveService/GetSlavesResponse")] 1670 1667 System.Collections.Generic.List<HeuristicLab.Clients.Hive.Slave> GetSlaves(); … … 1720 1717 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetUserIdByUsername", ReplyAction = "http://tempuri.org/IHiveService/GetUserIdByUsernameResponse")] 1721 1718 System.Guid GetUserIdByUsername(string username); 1722 1723 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/AuthorizesForResourceAdministration", ReplyAction = "http://tempuri.org/IHiveService/AuthorizesForResourceAdministrationResponse")]1724 bool AuthorizesForResourceAdministration(System.Guid resourceId);1725 1719 1726 1720 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/AddTask", ReplyAction = "http://tempuri.org/IHiveService/AddTaskResponse")] … … 1847 1841 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetSlave", ReplyAction = "http://tempuri.org/IHiveService/GetSlaveResponse")] 1848 1842 HeuristicLab.Clients.Hive.Slave GetSlave(System.Guid slaveId); 1843 1844 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetSlaveGroup", ReplyAction = "http://tempuri.org/IHiveService/GetSlaveGroupResponse")] 1845 HeuristicLab.Clients.Hive.SlaveGroup GetSlaveGroup(System.Guid slaveGroupId); 1849 1846 } 1850 1847 … … 1876 1873 } 1877 1874 1875 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Slave> GetSlaves() { 1876 return base.Channel.GetSlaves(); 1877 } 1878 1879 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.SlaveGroup> GetSlaveGroups() { 1880 return base.Channel.GetSlaveGroups(); 1881 } 1882 1883 public void UpdateSlave(HeuristicLab.Clients.Hive.Slave slave) { 1884 base.Channel.UpdateSlave(slave); 1885 } 1886 1887 public void UpdateSlaveGroup(HeuristicLab.Clients.Hive.SlaveGroup slaveGroup) { 1888 base.Channel.UpdateSlaveGroup(slaveGroup); 1889 } 1890 1891 public void DeleteSlave(System.Guid slaveId) { 1892 base.Channel.DeleteSlave(slaveId); 1893 } 1894 1895 public void DeleteSlaveGroup(System.Guid slaveGroupId) { 1896 base.Channel.DeleteSlaveGroup(slaveGroupId); 1897 } 1898 1899 public void AddResourceToGroup(System.Guid slaveGroupId, System.Guid resourceId) { 1900 base.Channel.AddResourceToGroup(slaveGroupId, resourceId); 1901 } 1902 1903 public void RemoveResourceFromGroup(System.Guid slaveGroupId, System.Guid resourceId) { 1904 base.Channel.RemoveResourceFromGroup(slaveGroupId, resourceId); 1905 } 1906 1907 public System.Guid GetResourceId(string resourceName) { 1908 return base.Channel.GetResourceId(resourceName); 1909 } 1910 1911 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Task> GetTasksByResourceId(System.Guid resourceId) { 1912 return base.Channel.GetTasksByResourceId(resourceId); 1913 } 1914 1915 public void TriggerEventManager(bool force) { 1916 base.Channel.TriggerEventManager(force); 1917 } 1918 1919 public int GetNewHeartbeatInterval(System.Guid slaveId) { 1920 return base.Channel.GetNewHeartbeatInterval(slaveId); 1921 } 1922 1923 public System.Guid AddDowntime(HeuristicLab.Clients.Hive.Downtime downtime) { 1924 return base.Channel.AddDowntime(downtime); 1925 } 1926 1927 public void DeleteDowntime(System.Guid downtimeId) { 1928 base.Channel.DeleteDowntime(downtimeId); 1929 } 1930 1931 public void UpdateDowntime(HeuristicLab.Clients.Hive.Downtime downtime) { 1932 base.Channel.UpdateDowntime(downtime); 1933 } 1934 1935 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Downtime> GetDowntimesForResource(System.Guid resourceId) { 1936 return base.Channel.GetDowntimesForResource(resourceId); 1937 } 1938 1939 public string GetUsernameByUserId(System.Guid userId) { 1940 return base.Channel.GetUsernameByUserId(userId); 1941 } 1942 1943 public System.Guid GetUserIdByUsername(string username) { 1944 return base.Channel.GetUserIdByUsername(username); 1945 } 1946 1947 public System.Guid AddTask(HeuristicLab.Clients.Hive.Task task, HeuristicLab.Clients.Hive.TaskData taskData, System.Collections.Generic.List<System.Guid> resourceIds) { 1948 return base.Channel.AddTask(task, taskData, resourceIds); 1949 } 1950 1951 public System.Guid AddChildTask(System.Guid parentTaskId, HeuristicLab.Clients.Hive.Task task, HeuristicLab.Clients.Hive.TaskData taskData) { 1952 return base.Channel.AddChildTask(parentTaskId, task, taskData); 1953 } 1954 1955 public HeuristicLab.Clients.Hive.Task GetTask(System.Guid taskId) { 1956 return base.Channel.GetTask(taskId); 1957 } 1958 1959 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Task> GetTasks() { 1960 return base.Channel.GetTasks(); 1961 } 1962 1963 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightTask> GetLightweightTasks(System.Collections.Generic.List<System.Guid> taskIds) { 1964 return base.Channel.GetLightweightTasks(taskIds); 1965 } 1966 1967 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightTask> GetLightweightChildTasks(System.Nullable<System.Guid> parentTaskId, bool recursive, bool includeParent) { 1968 return base.Channel.GetLightweightChildTasks(parentTaskId, recursive, includeParent); 1969 } 1970 1971 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightTask> GetLightweightJobTasks(System.Guid jobId) { 1972 return base.Channel.GetLightweightJobTasks(jobId); 1973 } 1974 1975 public HeuristicLab.Clients.Hive.TaskData GetTaskData(System.Guid taskId) { 1976 return base.Channel.GetTaskData(taskId); 1977 } 1978 1979 public void UpdateTask(HeuristicLab.Clients.Hive.Task taskDto) { 1980 base.Channel.UpdateTask(taskDto); 1981 } 1982 1983 public void UpdateTaskData(HeuristicLab.Clients.Hive.Task taskDto, HeuristicLab.Clients.Hive.TaskData taskDataDto) { 1984 base.Channel.UpdateTaskData(taskDto, taskDataDto); 1985 } 1986 1987 public void DeleteTask(System.Guid taskId) { 1988 base.Channel.DeleteTask(taskId); 1989 } 1990 1991 public void DeleteChildTasks(System.Guid parentTaskId) { 1992 base.Channel.DeleteChildTasks(parentTaskId); 1993 } 1994 1995 public HeuristicLab.Clients.Hive.Task UpdateTaskState(System.Guid taskId, HeuristicLab.Clients.Hive.TaskState taskState, System.Nullable<System.Guid> slaveId, System.Nullable<System.Guid> userId, string exception) { 1996 return base.Channel.UpdateTaskState(taskId, taskState, slaveId, userId, exception); 1997 } 1998 1999 public void StopTask(System.Guid taskId) { 2000 base.Channel.StopTask(taskId); 2001 } 2002 2003 public void PauseTask(System.Guid taskId) { 2004 base.Channel.PauseTask(taskId); 2005 } 2006 2007 public void RestartTask(System.Guid taskId) { 2008 base.Channel.RestartTask(taskId); 2009 } 2010 2011 public HeuristicLab.Clients.Hive.Job GetJob(System.Guid id) { 2012 return base.Channel.GetJob(id); 2013 } 2014 2015 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetJobs() { 2016 return base.Channel.GetJobs(); 2017 } 2018 2019 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetAllJobs() { 2020 return base.Channel.GetAllJobs(); 2021 } 2022 2023 public System.Guid AddJob(HeuristicLab.Clients.Hive.Job jobDto) { 2024 return base.Channel.AddJob(jobDto); 2025 } 2026 2027 public void UpdateJob(HeuristicLab.Clients.Hive.Job jobDto) { 2028 base.Channel.UpdateJob(jobDto); 2029 } 2030 2031 public void DeleteJob(System.Guid JobId) { 2032 base.Channel.DeleteJob(JobId); 2033 } 2034 2035 public void GrantPermission(System.Guid jobId, System.Guid grantedUserId, HeuristicLab.Clients.Hive.Permission permission) { 2036 base.Channel.GrantPermission(jobId, grantedUserId, permission); 2037 } 2038 2039 public void RevokePermission(System.Guid hiveExperimentId, System.Guid grantedUserId) { 2040 base.Channel.RevokePermission(hiveExperimentId, grantedUserId); 2041 } 2042 2043 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.JobPermission> GetJobPermissions(System.Guid jobId) { 2044 return base.Channel.GetJobPermissions(jobId); 2045 } 2046 2047 public bool IsAllowedPrivileged() { 2048 return base.Channel.IsAllowedPrivileged(); 2049 } 2050 2051 public void Hello(HeuristicLab.Clients.Hive.Slave slave) { 2052 base.Channel.Hello(slave); 2053 } 2054 2055 public void GoodBye(System.Guid slaveId) { 2056 base.Channel.GoodBye(slaveId); 2057 } 2058 2059 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.MessageContainer> Heartbeat(HeuristicLab.Clients.Hive.Heartbeat heartbeat1) { 2060 return base.Channel.Heartbeat(heartbeat1); 2061 } 2062 2063 public HeuristicLab.Clients.Hive.Plugin GetPlugin(System.Guid pluginId) { 2064 return base.Channel.GetPlugin(pluginId); 2065 } 2066 2067 public HeuristicLab.Clients.Hive.Plugin GetPluginByHash(byte[] hash) { 2068 return base.Channel.GetPluginByHash(hash); 2069 } 2070 2071 public System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData) { 2072 return base.Channel.AddPlugin(plugin, pluginData); 2073 } 2074 2075 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Plugin> GetPlugins() { 2076 return base.Channel.GetPlugins(); 2077 } 2078 2079 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> GetPluginDatas(System.Collections.Generic.List<System.Guid> pluginIds) { 2080 return base.Channel.GetPluginDatas(pluginIds); 2081 } 2082 2083 public void DeletePlugin(System.Guid pluginId) { 2084 base.Channel.DeletePlugin(pluginId); 2085 } 2086 2087 public void GrantResourcePermissions(System.Guid resourceId, System.Collections.Generic.List<System.Guid> grantedUserIds) { 2088 base.Channel.GrantResourcePermissions(resourceId, grantedUserIds); 2089 } 2090 2091 public void RevokeResourcePermissions(System.Guid resourceId, System.Collections.Generic.List<System.Guid> grantedUserIds) { 2092 base.Channel.RevokeResourcePermissions(resourceId, grantedUserIds); 2093 } 2094 2095 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.ResourcePermission> GetResourcePermissions(System.Guid resourceId) { 2096 return base.Channel.GetResourcePermissions(resourceId); 2097 } 2098 2099 public System.Guid AddSlave(HeuristicLab.Clients.Hive.Slave slave) { 2100 return base.Channel.AddSlave(slave); 2101 } 2102 2103 public System.Guid AddSlaveGroup(HeuristicLab.Clients.Hive.SlaveGroup slaveGroup) { 2104 return base.Channel.AddSlaveGroup(slaveGroup); 2105 } 2106 2107 public HeuristicLab.Clients.Hive.Slave GetSlave(System.Guid slaveId) { 2108 return base.Channel.GetSlave(slaveId); 2109 } 2110 1878 2111 public HeuristicLab.Clients.Hive.SlaveGroup GetSlaveGroup(System.Guid slaveGroupId) { 1879 2112 return base.Channel.GetSlaveGroup(slaveGroupId); 1880 2113 } 1881 1882 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Slave> GetSlaves() {1883 return base.Channel.GetSlaves();1884 }1885 1886 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.SlaveGroup> GetSlaveGroups() {1887 return base.Channel.GetSlaveGroups();1888 }1889 1890 public void UpdateSlave(HeuristicLab.Clients.Hive.Slave slave) {1891 base.Channel.UpdateSlave(slave);1892 }1893 1894 public void UpdateSlaveGroup(HeuristicLab.Clients.Hive.SlaveGroup slaveGroup) {1895 base.Channel.UpdateSlaveGroup(slaveGroup);1896 }1897 1898 public void DeleteSlave(System.Guid slaveId) {1899 base.Channel.DeleteSlave(slaveId);1900 }1901 1902 public void DeleteSlaveGroup(System.Guid slaveGroupId) {1903 base.Channel.DeleteSlaveGroup(slaveGroupId);1904 }1905 1906 public void AddResourceToGroup(System.Guid slaveGroupId, System.Guid resourceId) {1907 base.Channel.AddResourceToGroup(slaveGroupId, resourceId);1908 }1909 1910 public void RemoveResourceFromGroup(System.Guid slaveGroupId, System.Guid resourceId) {1911 base.Channel.RemoveResourceFromGroup(slaveGroupId, resourceId);1912 }1913 1914 public System.Guid GetResourceId(string resourceName) {1915 return base.Channel.GetResourceId(resourceName);1916 }1917 1918 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Task> GetTasksByResourceId(System.Guid resourceId) {1919 return base.Channel.GetTasksByResourceId(resourceId);1920 }1921 1922 public void TriggerEventManager(bool force) {1923 base.Channel.TriggerEventManager(force);1924 }1925 1926 public int GetNewHeartbeatInterval(System.Guid slaveId) {1927 return base.Channel.GetNewHeartbeatInterval(slaveId);1928 }1929 1930 public System.Guid AddDowntime(HeuristicLab.Clients.Hive.Downtime downtime) {1931 return base.Channel.AddDowntime(downtime);1932 }1933 1934 public void DeleteDowntime(System.Guid downtimeId) {1935 base.Channel.DeleteDowntime(downtimeId);1936 }1937 1938 public void UpdateDowntime(HeuristicLab.Clients.Hive.Downtime downtime) {1939 base.Channel.UpdateDowntime(downtime);1940 }1941 1942 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Downtime> GetDowntimesForResource(System.Guid resourceId) {1943 return base.Channel.GetDowntimesForResource(resourceId);1944 }1945 1946 public string GetUsernameByUserId(System.Guid userId) {1947 return base.Channel.GetUsernameByUserId(userId);1948 }1949 1950 public System.Guid GetUserIdByUsername(string username) {1951 return base.Channel.GetUserIdByUsername(username);1952 }1953 1954 public bool AuthorizesForResourceAdministration(System.Guid resourceId) {1955 return base.Channel.AuthorizesForResourceAdministration(resourceId);1956 }1957 1958 public System.Guid AddTask(HeuristicLab.Clients.Hive.Task task, HeuristicLab.Clients.Hive.TaskData taskData, System.Collections.Generic.List<System.Guid> resourceIds) {1959 return base.Channel.AddTask(task, taskData, resourceIds);1960 }1961 1962 public System.Guid AddChildTask(System.Guid parentTaskId, HeuristicLab.Clients.Hive.Task task, HeuristicLab.Clients.Hive.TaskData taskData) {1963 return base.Channel.AddChildTask(parentTaskId, task, taskData);1964 }1965 1966 public HeuristicLab.Clients.Hive.Task GetTask(System.Guid taskId) {1967 return base.Channel.GetTask(taskId);1968 }1969 1970 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Task> GetTasks() {1971 return base.Channel.GetTasks();1972 }1973 1974 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightTask> GetLightweightTasks(System.Collections.Generic.List<System.Guid> taskIds) {1975 return base.Channel.GetLightweightTasks(taskIds);1976 }1977 1978 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightTask> GetLightweightChildTasks(System.Nullable<System.Guid> parentTaskId, bool recursive, bool includeParent) {1979 return base.Channel.GetLightweightChildTasks(parentTaskId, recursive, includeParent);1980 }1981 1982 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightTask> GetLightweightJobTasks(System.Guid jobId) {1983 return base.Channel.GetLightweightJobTasks(jobId);1984 }1985 1986 public HeuristicLab.Clients.Hive.TaskData GetTaskData(System.Guid taskId) {1987 return base.Channel.GetTaskData(taskId);1988 }1989 1990 public void UpdateTask(HeuristicLab.Clients.Hive.Task taskDto) {1991 base.Channel.UpdateTask(taskDto);1992 }1993 1994 public void UpdateTaskData(HeuristicLab.Clients.Hive.Task taskDto, HeuristicLab.Clients.Hive.TaskData taskDataDto) {1995 base.Channel.UpdateTaskData(taskDto, taskDataDto);1996 }1997 1998 public void DeleteTask(System.Guid taskId) {1999 base.Channel.DeleteTask(taskId);2000 }2001 2002 public void DeleteChildTasks(System.Guid parentTaskId) {2003 base.Channel.DeleteChildTasks(parentTaskId);2004 }2005 2006 public HeuristicLab.Clients.Hive.Task UpdateTaskState(System.Guid taskId, HeuristicLab.Clients.Hive.TaskState taskState, System.Nullable<System.Guid> slaveId, System.Nullable<System.Guid> userId, string exception) {2007 return base.Channel.UpdateTaskState(taskId, taskState, slaveId, userId, exception);2008 }2009 2010 public void StopTask(System.Guid taskId) {2011 base.Channel.StopTask(taskId);2012 }2013 2014 public void PauseTask(System.Guid taskId) {2015 base.Channel.PauseTask(taskId);2016 }2017 2018 public void RestartTask(System.Guid taskId) {2019 base.Channel.RestartTask(taskId);2020 }2021 2022 public HeuristicLab.Clients.Hive.Job GetJob(System.Guid id) {2023 return base.Channel.GetJob(id);2024 }2025 2026 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetJobs() {2027 return base.Channel.GetJobs();2028 }2029 2030 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetAllJobs() {2031 return base.Channel.GetAllJobs();2032 }2033 2034 public System.Guid AddJob(HeuristicLab.Clients.Hive.Job jobDto) {2035 return base.Channel.AddJob(jobDto);2036 }2037 2038 public void UpdateJob(HeuristicLab.Clients.Hive.Job jobDto) {2039 base.Channel.UpdateJob(jobDto);2040 }2041 2042 public void DeleteJob(System.Guid JobId) {2043 base.Channel.DeleteJob(JobId);2044 }2045 2046 public void GrantPermission(System.Guid jobId, System.Guid grantedUserId, HeuristicLab.Clients.Hive.Permission permission) {2047 base.Channel.GrantPermission(jobId, grantedUserId, permission);2048 }2049 2050 public void RevokePermission(System.Guid hiveExperimentId, System.Guid grantedUserId) {2051 base.Channel.RevokePermission(hiveExperimentId, grantedUserId);2052 }2053 2054 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.JobPermission> GetJobPermissions(System.Guid jobId) {2055 return base.Channel.GetJobPermissions(jobId);2056 }2057 2058 public bool IsAllowedPrivileged() {2059 return base.Channel.IsAllowedPrivileged();2060 }2061 2062 public void Hello(HeuristicLab.Clients.Hive.Slave slave) {2063 base.Channel.Hello(slave);2064 }2065 2066 public void GoodBye(System.Guid slaveId) {2067 base.Channel.GoodBye(slaveId);2068 }2069 2070 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.MessageContainer> Heartbeat(HeuristicLab.Clients.Hive.Heartbeat heartbeat1) {2071 return base.Channel.Heartbeat(heartbeat1);2072 }2073 2074 public HeuristicLab.Clients.Hive.Plugin GetPlugin(System.Guid pluginId) {2075 return base.Channel.GetPlugin(pluginId);2076 }2077 2078 public HeuristicLab.Clients.Hive.Plugin GetPluginByHash(byte[] hash) {2079 return base.Channel.GetPluginByHash(hash);2080 }2081 2082 public System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData) {2083 return base.Channel.AddPlugin(plugin, pluginData);2084 }2085 2086 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Plugin> GetPlugins() {2087 return base.Channel.GetPlugins();2088 }2089 2090 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> GetPluginDatas(System.Collections.Generic.List<System.Guid> pluginIds) {2091 return base.Channel.GetPluginDatas(pluginIds);2092 }2093 2094 public void DeletePlugin(System.Guid pluginId) {2095 base.Channel.DeletePlugin(pluginId);2096 }2097 2098 public void GrantResourcePermissions(System.Guid resourceId, System.Collections.Generic.List<System.Guid> grantedUserIds) {2099 base.Channel.GrantResourcePermissions(resourceId, grantedUserIds);2100 }2101 2102 public void RevokeResourcePermissions(System.Guid resourceId, System.Collections.Generic.List<System.Guid> grantedUserIds) {2103 base.Channel.RevokeResourcePermissions(resourceId, grantedUserIds);2104 }2105 2106 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.ResourcePermission> GetResourcePermissions(System.Guid resourceId) {2107 return base.Channel.GetResourcePermissions(resourceId);2108 }2109 2110 public System.Guid AddSlave(HeuristicLab.Clients.Hive.Slave slave) {2111 return base.Channel.AddSlave(slave);2112 }2113 2114 public System.Guid AddSlaveGroup(HeuristicLab.Clients.Hive.SlaveGroup slaveGroup) {2115 return base.Channel.AddSlaveGroup(slaveGroup);2116 }2117 2118 public HeuristicLab.Clients.Hive.Slave GetSlave(System.Guid slaveId) {2119 return base.Channel.GetSlave(slaveId);2120 }2121 2114 } 2122 2115 } -
trunk/sources/HeuristicLab.Services.Hive/3.3/HiveService.cs
r8065 r8071 60 60 } 61 61 62 #region Authorization Methods63 public bool AuthorizesForResourceAdministration(Guid resourceId) {64 try {65 author.AuthorizeForResourceAdministration(resourceId);66 return true;67 }68 catch (System.Security.SecurityException) { return false; }69 }70 #endregion71 72 62 #region Task Methods 73 63 public Guid AddTask(Task task, TaskData taskData, IEnumerable<Guid> resourceIds) { -
trunk/sources/HeuristicLab.Services.Hive/3.3/ServiceContracts/IHiveService.cs
r8065 r8071 30 30 [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)] 31 31 public interface IHiveService { 32 #region Authorization Methods33 [OperationContract]34 bool AuthorizesForResourceAdministration(Guid resourceId);35 #endregion36 37 32 #region Task Methods 38 33 [OperationContract]
Note: See TracChangeset
for help on using the changeset viewer.