Changeset 4263 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades
- Timestamp:
- 08/19/10 12:41:05 (14 years ago)
- Location:
- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs
r4170 r4263 28 28 using HeuristicLab.Hive.Contracts.BusinessObjects; 29 29 using HeuristicLab.Hive.Server.DataAccess; 30 using HeuristicLab.Hive.Contracts.ResponseObjects; 30 31 31 32 namespace HeuristicLab.Hive.Server.Core { … … 60 61 public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) { 61 62 using (contextFactory.GetContext(false)) { 62 return jobManager.GetLastSerialized JobResultOf(jobId, requested, snapshot);63 return jobManager.GetLastSerializedResult(jobId, requested, snapshot); 63 64 } 64 65 } … … 77 78 78 79 79 public ResponseObject<JobResultList> Get AllJobResults(IEnumerable<Guid> jobIds) {80 public ResponseObject<JobResultList> GetJobResults(IEnumerable<Guid> jobIds) { 80 81 using (contextFactory.GetContext(false)) { 81 return jobManager.Get AllJobResults(jobIds);82 return jobManager.GetJobResults(jobIds); 82 83 } 83 84 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs
r4253 r4263 31 31 using System.ServiceModel; 32 32 using HeuristicLab.Hive.Server.DataAccess; 33 using HeuristicLab.Hive.Contracts.ResponseObjects; 33 34 34 35 … … 53 54 sessionID = secMan.Login(username, password); 54 55 if (sessionID == Guid.Empty) { 55 resp.Success = false; 56 resp.StatusMessage = ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_FAILED; 57 } else { 58 resp.Success = true; 59 resp.StatusMessage = 60 ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_SUCCESS; 56 resp.StatusMessage = ResponseStatus.Login_LoginFaild; 61 57 } 62 58 return resp; … … 64 60 65 61 66 public ResponseList<ClientDto> GetAll Clients() {62 public ResponseList<ClientDto> GetAllSlaves() { 67 63 using (contextFactory.GetContext(false)) { 68 64 secMan.Authorize("AccessClients", sessionID, Guid.Empty); 69 return slaveManager.GetAll Clients();65 return slaveManager.GetAllSlaves(); 70 66 } 71 67 } … … 140 136 } 141 137 142 public ResponseObject<JobDto> GetLastJobResultOf(Guid jobId) { 138 //public ResponseObject<JobDto> GetLastJobResultOf(Guid jobId) { 139 // using (contextFactory.GetContext(false)) { 140 // secMan.Authorize("AccessJobResults", sessionID, jobId); 141 // return jobManager.GetLastJobResultOf(jobId); 142 // } 143 //} 144 145 public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) { 143 146 using (contextFactory.GetContext(false)) { 144 147 secMan.Authorize("AccessJobResults", sessionID, jobId); 145 return jobManager.GetLastJobResultOf(jobId); 146 } 147 } 148 149 public ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot) { 150 using (contextFactory.GetContext(false)) { 151 secMan.Authorize("AccessJobResults", sessionID, jobId); 152 return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot); 153 } 154 } 155 156 public ResponseObject<JobResultList> GetAllJobResults(IEnumerable<Guid> jobIds) { 148 return jobManager.GetLastSerializedResult(jobId, requested, snapshot); 149 } 150 } 151 152 public ResponseObject<JobResultList> GetJobResults(IEnumerable<Guid> jobIds) { 157 153 using (contextFactory.GetContext(false)) { 158 154 //secMan.Authorize("AccessJobResults", sessionID, jobId); skip authorization 159 return jobManager.Get AllJobResults(jobIds);160 } 161 } 162 163 public Response RemoveJob(Guid jobId) {164 using (contextFactory.GetContext()) {165 secMan.Authorize("RemoveJob", sessionID, jobId);166 return jobManager.RemoveJob(jobId);167 }168 }155 return jobManager.GetJobResults(jobIds); 156 } 157 } 158 159 //public Response RemoveJob(Guid jobId) { 160 // using (contextFactory.GetContext()) { 161 // secMan.Authorize("RemoveJob", sessionID, jobId); 162 // return jobManager.RemoveJob(jobId); 163 // } 164 //} 169 165 170 166 public Response RequestSnapshot(Guid jobId) { -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/SlaveFacade.cs
r4254 r4263 35 35 using HeuristicLab.Hive.Server.LINQDataAccess; 36 36 using HeuristicLab.Hive.Server.DataAccess; 37 using HeuristicLab.Hive.Contracts.ResponseObjects; 37 38 38 39 namespace HeuristicLab.Hive.Server.Core { … … 85 86 } 86 87 87 public ResponseList<CachedHivePluginInfoDto> SendPlugins(List<HivePluginInfoDto> pluginList) {88 return slaveCommunicator. SendPlugins(pluginList);88 public ResponseList<CachedHivePluginInfoDto> GetPlugins(List<HivePluginInfoDto> pluginList) { 89 return slaveCommunicator.GetPlugins(pluginList); 89 90 } 90 91 … … 94 95 } 95 96 } 96 97 97 98 98 public ResponseCalendar GetCalendar(Guid clientId) { … … 114 114 /// Do not use automatic transactions here 115 115 /// </summary> 116 public Stream SendStreamedJob(Guid clientId) {116 public Stream GetStreamedJob(Guid clientId) { 117 117 using (contextFactory.GetContext(false)) { 118 118 MultiStream stream = new MultiStream(); … … 125 125 stream.AddStream(new StreamedObject<ResponseObject<JobDto>>(job)); 126 126 127 IJobManager jobManager = ServiceLocator.GetJobManager(); 128 IInternalJobManager internalJobManager = (IInternalJobManager)jobManager; 127 IInternalJobManager internalJobManager = (IInternalJobManager)ServiceLocator.GetJobManager(); 129 128 130 129 //second stream the job binary data 131 130 MemoryStream memoryStream = new MemoryStream(); 132 if (job.Obj != null) 131 if (job.Obj != null) { 133 132 stream.AddStream(new MemoryStream(internalJobManager.GetSerializedJobDataById(job.Obj.Id))); 133 } 134 134 135 135 OperationContext clientContext = OperationContext.Current; … … 144 144 } 145 145 146 public Stream SendStreamedPlugins(List<HivePluginInfoDto> pluginList) {147 return new StreamedObject<ResponseList<CachedHivePluginInfoDto>>(this. SendPlugins(pluginList));146 public Stream GetStreamedPlugins(List<HivePluginInfoDto> pluginList) { 147 return new StreamedObject<ResponseList<CachedHivePluginInfoDto>>(this.GetPlugins(pluginList)); 148 148 } 149 149
Note: See TracChangeset
for help on using the changeset viewer.