Skip to content
Snippets Groups Projects
FileTransferWs.asmx.cs 1.73 KiB
Newer Older
  • Learn to ignore specific revisions
  • Vaclav Svaton's avatar
    Vaclav Svaton committed
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Services;
    using HaaSMiddleware.ServiceTier.FileTransfer;
    using org.apache.etch.EtchServiceTier.types.EtchServiceTier;
    
    namespace HaaSMiddleware.WebServices {
    	/// <summary>
    	/// Summary description for FileTransferWs
    	/// </summary>
    	[WebService(Namespace = "http://hpcaas.it4i.cz/")]
    	[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    	[System.ComponentModel.ToolboxItem(false)]
    	[System.Web.Script.Services.ScriptService]
    	public class FileTransferWs : System.Web.Services.WebService {
    		private IFileTransferService service = new FileTransferService();
    
    		[WebMethod]
    		public FileTransferMethodExt GetFileTransferMethod(long submittedJobInfoId, string sessionCode) {
    			return service.GetFileTransferMethod(submittedJobInfoId, sessionCode);
    		}
    
    		[WebMethod]
    		public void EndFileTransfer(long submittedJobInfoId, FileTransferMethodExt usedTransferMethod, string sessionCode) {
    			service.EndFileTransfer(submittedJobInfoId, usedTransferMethod, sessionCode);
    		}
    
    		[WebMethod]
    		public JobFileContentExt[] DownloadPartsOfJobFilesFromCluster(long submittedJobInfoId, TaskFileOffsetExt[] taskFileOffsets, string sessionCode) {
    			return service.DownloadPartsOfJobFilesFromCluster(submittedJobInfoId, taskFileOffsets, sessionCode);
    		}
    
    		[WebMethod]
    		public string[] ListChangedFilesForJob(long submittedJobInfoId, string sessionCode) {
    			return service.ListChangedFilesForJob(submittedJobInfoId, sessionCode);
    		}
    
    		[WebMethod]
    		public byte[] DownloadFileFromCluster(long submittedJobInfoId, string relativeFilePath, string sessionCode) {
    			return service.DownloadFileFromCluster(submittedJobInfoId, relativeFilePath, sessionCode);
    		}
    	}
    }