Changeset 4333 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs
- Timestamp:
- 08/27/10 08:35:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs
r4305 r4333 77 77 public ResponseResultReceived StoreFinishedJobResult(Guid slaveId, Guid jobId, byte[] result, double percentage, string exception) { 78 78 using (contextFactory.GetContext()) { 79 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 79 80 return slaveCommunicator.StoreFinishedJobResult(slaveId, jobId, result, percentage, exception); 80 81 } … … 93 94 public Response IsJobStillNeeded(Guid jobId) { 94 95 using (contextFactory.GetContext()) { 95 return slaveCommunicator.IsJobStillNeeded(jobId); 96 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 97 return slaveCommunicator.IsJobStillNeeded(jobId); 96 98 } 97 99 } … … 100 102 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 101 103 public ResponseList<CachedHivePluginInfoDto> GetPlugins(List<HivePluginInfoDto> pluginList) { 102 return slaveCommunicator.GetPlugins(pluginList); 104 return slaveCommunicator.GetPlugins(pluginList); 103 105 } 104 106 … … 107 109 public ResponseResultReceived ProcessSnapshot(Guid slaveId, Guid jobId, byte[] result, double percentage, string exception) { 108 110 using (contextFactory.GetContext()) { 109 return slaveCommunicator.ProcessSnapshot(slaveId, jobId, result, percentage, exception); 111 ServiceLocator.GetAuthorizationManager().AuthorizeForJobs(jobId); 112 return slaveCommunicator.ProcessSnapshot(slaveId, jobId, result, percentage, exception); 110 113 } 111 114 } … … 115 118 public ResponseCalendar GetCalendar(Guid slaveId) { 116 119 using (contextFactory.GetContext()) { 117 return slaveCommunicator.GetCalendar(slaveId); 120 return slaveCommunicator.GetCalendar(slaveId); 118 121 } 119 122 } … … 121 124 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)] 122 125 [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)] 123 public Response SetCalendarStatus(Guid slaveId, CalendarState state) { 126 public Response SetCalendarStatus(Guid slaveId, CalendarState state) { 124 127 using (contextFactory.GetContext()) { 125 128 return slaveCommunicator.SetCalendarStatus(slaveId, state); … … 137 140 public Stream GetStreamedJob(Guid slaveId) { 138 141 using (contextFactory.GetContext(false)) { 142 ResponseObject<JobDto> job = null; 139 143 MultiStream stream = new MultiStream(); 140 141 ResponseObject<JobDto> job = null;142 143 144 job = ServiceLocator.GetSlaveCommunicator().GetJob(slaveId); 144 145 … … 183 184 public ResponseResultReceived ProcessSnapshotStreamed(Stream stream) { 184 185 using (contextFactory.GetContext()) { 185 return ((IInternalSlaveCommunicator)slaveCommunicator).ProcessJobResult(stream, false); 186 return ((IInternalSlaveCommunicator)slaveCommunicator).ProcessJobResult(stream, false); 186 187 } 187 188 }
Note: See TracChangeset
for help on using the changeset viewer.