public void DeleteJob(long submittedJobInfoId, string sessionCode) { try { using (IUnitOfWork unitOfWork = UnitOfWorkFactory.GetUnitOfWorkFactory().CreateUnitOfWork()) { AdaptorUser loggedUser = UserAndLimitationManagementService.GetValidatedUserForSessionCode(sessionCode, unitOfWork, UserRoleType.Submitter); IJobManagementLogic jobLogic = LogicFactory.GetLogicFactory().CreateJobManagementLogic(unitOfWork); jobLogic.DeleteJob(submittedJobInfoId, loggedUser); } } catch (Exception exc) { ExceptionHandler.ThrowProperExternalException(exc); } }
public SubmittedJobInfoExt SubmitJob(long createdJobInfoId, string sessionCode) { try { using (IUnitOfWork unitOfWork = UnitOfWorkFactory.GetUnitOfWorkFactory().CreateUnitOfWork()) { AdaptorUser loggedUser = UserAndLimitationManagementService.GetValidatedUserForSessionCode(sessionCode, unitOfWork, UserRoleType.Submitter); IJobManagementLogic jobLogic = LogicFactory.GetLogicFactory().CreateJobManagementLogic(unitOfWork); SubmittedJobInfo jobInfo = jobLogic.SubmitJob(createdJobInfoId, loggedUser); return(jobInfo.ConvertIntToExt()); } } catch (Exception exc) { ExceptionHandler.ThrowProperExternalException(exc); return(null); } }
public IEnumerable <string> GetAllocatedNodesIPs(long submittedTaskInfoId, string sessionCode) { try { using (IUnitOfWork unitOfWork = UnitOfWorkFactory.GetUnitOfWorkFactory().CreateUnitOfWork()) { AdaptorUser loggedUser = UserAndLimitationManagementService.GetValidatedUserForSessionCode(sessionCode, unitOfWork, UserRoleType.Submitter); IJobManagementLogic jobLogic = LogicFactory.GetLogicFactory().CreateJobManagementLogic(unitOfWork); var nodesIPs = jobLogic.GetAllocatedNodesIPs(submittedTaskInfoId, loggedUser); return(nodesIPs.ToArray()); } } catch (Exception exc) { ExceptionHandler.ThrowProperExternalException(exc); return(null); } }
public SubmittedJobInfoExt[] ListJobsForCurrentUser(string sessionCode) { try { using (IUnitOfWork unitOfWork = UnitOfWorkFactory.GetUnitOfWorkFactory().CreateUnitOfWork()) { AdaptorUser loggedUser = UserAndLimitationManagementService.GetValidatedUserForSessionCode(sessionCode, unitOfWork, UserRoleType.Submitter); IJobManagementLogic jobLogic = LogicFactory.GetLogicFactory().CreateJobManagementLogic(unitOfWork); var jobInfos = jobLogic.GetJobsForUser(loggedUser); return(jobInfos.Select(s => s.ConvertIntToExt()).ToArray()); } } catch (Exception exc) { ExceptionHandler.ThrowProperExternalException(exc); return(null); } }
public SubmittedJobInfoExt CreateJob(JobSpecificationExt specification, string sessionCode) { try { using (IUnitOfWork unitOfWork = UnitOfWorkFactory.GetUnitOfWorkFactory().CreateUnitOfWork()) { AdaptorUser loggedUser = UserAndLimitationManagementService.GetValidatedUserForSessionCode(sessionCode, unitOfWork, UserRoleType.Submitter); IJobManagementLogic jobLogic = LogicFactory.GetLogicFactory().CreateJobManagementLogic(unitOfWork); JobSpecification js = specification.ConvertExtToInt(); SubmittedJobInfo jobInfo = jobLogic.CreateJob(js, loggedUser, specification.IsExtraLong.Value); return(jobInfo.ConvertIntToExt()); } } catch (Exception exc) { ExceptionHandler.ThrowProperExternalException(exc); return(null); } }