Changeset 2005 for trunk/sources
- Timestamp:
- 06/04/09 17:13:05 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Contracts/3.2/ApplicationConstants.cs
r1948 r2005 83 83 84 84 public static string RESPONSE_JOB_ALL_JOBS = "Job.AllJobs"; 85 public static string RESPONSE_JOB_GET_JOB_BY_ID = "Job.GetJobById"; 85 86 public static string RESPONSE_JOB_ID_MUST_NOT_BE_SET = "Job.IdMustNotBeSet"; 86 87 public static string RESPONSE_JOB_JOB_ADDED = "Job.JobAdded"; -
trunk/sources/HeuristicLab.Hive.Contracts/3.2/Interfaces/IJobManager.cs
r1932 r2005 36 36 ResponseList<Job> GetAllJobs(); 37 37 [OperationContract] 38 ResponseObject<Job> GetJobById(Guid jobId); 39 [OperationContract] 38 40 ResponseObject<Job> AddNewJob(Job job); 39 41 [OperationContract] -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs
r1948 r2005 151 151 152 152 /// <summary> 153 /// returns the job with the specified id 154 /// </summary> 155 /// <returns></returns> 156 public ResponseObject<Job> GetJobById(Guid jobId) { 157 ISession session = factory.GetSessionForCurrentThread(); 158 159 try { 160 IJobAdapter jobAdapter = 161 session.GetDataAdapter<Job, IJobAdapter>(); 162 163 ResponseObject<Job> response = new ResponseObject<Job>(); 164 165 response.Obj = jobAdapter.GetById(jobId); 166 if (response.Obj != null) { 167 response.Success = true; 168 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_GET_JOB_BY_ID; 169 } else { 170 response.Success = false; 171 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST; 172 } 173 174 return response; 175 } 176 finally { 177 if (session != null) 178 session.EndSession(); 179 } 180 } 181 182 /// <summary> 153 183 /// Adds a new job into the database 154 184 /// </summary> -
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs
r1932 r2005 113 113 } 114 114 115 public ResponseObject<HeuristicLab.Hive.Contracts.BusinessObjects.Job> GetJobById(Guid jobId) { 116 return jobManager.GetJobById(jobId); 117 } 118 115 119 public ResponseObject<Job> AddNewJob(Job job) { 116 120 if (HasPermission(PermissiveSecurityAction.Add_Job))
Note: See TracChangeset
for help on using the changeset viewer.