@@ -2145,27 +2145,24 @@ protected void setContentType(HttpServletResponse response)
21452145 }
21462146
21472147 @ Override
2148- protected File getTargetFile (String filename ) throws IOException
2148+ protected FileLike getTargetFile (String filename ) throws IOException
21492149 {
21502150 if (!PipelineService .get ().hasValidPipelineRoot (getContainer ()))
21512151 throw new UploadException ("Pipeline root must be configured before uploading FASTA files" , HttpServletResponse .SC_NOT_FOUND );
21522152
21532153 PipeRoot root = PipelineService .get ().getPipelineRootSetting (getContainer ());
2154-
2155- File targetDirectory = root .getRootPath ();
2156-
2157- return FileUtil .findUniqueFileName (filename , targetDirectory );
2154+ return FileUtil .findUniqueFileName (filename , root .getRootFileLike ());
21582155 }
21592156
21602157 @ Override
2161- public String getResponse (ImportFastaSequencesForm form , Map <String , Pair <File , String >> files )
2158+ public String getResponse (ImportFastaSequencesForm form , Map <String , Pair <FileLike , String >> files )
21622159 {
21632160 JSONObject resp = new JSONObject ();
21642161 try
21652162 {
2166- for (Map .Entry <String , Pair <File , String >> entry : files .entrySet ())
2163+ for (Map .Entry <String , Pair <FileLike , String >> entry : files .entrySet ())
21672164 {
2168- File file = entry .getValue ().getKey ();
2165+ File file = entry .getValue ().getKey (). toNioPathForRead (). toFile () ;
21692166
21702167 Map <String , String > params = form .getNtParams ();
21712168 Map <String , Object > libraryParams = form .getLibraryParams ();
@@ -2444,15 +2441,15 @@ protected void setContentType(HttpServletResponse response)
24442441 }
24452442
24462443 @ Override
2447- protected File getTargetFile (String filename ) throws IOException
2444+ protected FileLike getTargetFile (String filename ) throws IOException
24482445 {
24492446 if (!PipelineService .get ().hasValidPipelineRoot (getContainer ()))
24502447 throw new UploadException ("Pipeline root must be configured before uploading files" , HttpServletResponse .SC_NOT_FOUND );
24512448
24522449 try
24532450 {
24542451 FileLike targetDirectory = AssayFileWriter .ensureUploadDirectory (getContainer (), "sequenceOutputs" );
2455- return FileUtil .findUniqueFileName (filename , targetDirectory ). toNioPathForWrite (). toFile () ;
2452+ return FileUtil .findUniqueFileName (filename , targetDirectory );
24562453 }
24572454 catch (ExperimentException e )
24582455 {
@@ -2461,14 +2458,14 @@ protected File getTargetFile(String filename) throws IOException
24612458 }
24622459
24632460 @ Override
2464- public String getResponse (ImportOutputFileForm form , Map <String , Pair <File , String >> files )
2461+ public String getResponse (ImportOutputFileForm form , Map <String , Pair <FileLike , String >> files )
24652462 {
24662463 JSONObject resp = new JSONObject ();
24672464 try
24682465 {
2469- for (Map .Entry <String , Pair <File , String >> entry : files .entrySet ())
2466+ for (Map .Entry <String , Pair <FileLike , String >> entry : files .entrySet ())
24702467 {
2471- File file = entry .getValue ().getKey ();
2468+ FileLike file = entry .getValue ().getKey ();
24722469
24732470 Map <String , Object > params = new CaseInsensitiveHashMap <>();
24742471 params .put ("name" , form .getName ());
@@ -2577,15 +2574,15 @@ protected void setContentType(HttpServletResponse response)
25772574 }
25782575
25792576 @ Override
2580- protected File getTargetFile (String filename ) throws IOException
2577+ protected FileLike getTargetFile (String filename ) throws IOException
25812578 {
25822579 if (!PipelineService .get ().hasValidPipelineRoot (getContainer ()))
25832580 throw new UploadException ("Pipeline root must be configured before uploading files" , HttpServletResponse .SC_NOT_FOUND );
25842581
25852582 try
25862583 {
25872584 FileLike targetDirectory = AssayFileWriter .ensureUploadDirectory (getContainer ());
2588- return FileUtil .findUniqueFileName (filename , targetDirectory ). toNioPathForWrite (). toFile () ;
2585+ return FileUtil .findUniqueFileName (filename , targetDirectory );
25892586 }
25902587 catch (ExperimentException e )
25912588 {
@@ -2610,7 +2607,7 @@ public void validateCommand(ImportTrackForm form, Errors errors)
26102607 }
26112608
26122609 @ Override
2613- public String getResponse (ImportTrackForm form , Map <String , Pair <File , String >> files ) throws UploadException
2610+ public String getResponse (ImportTrackForm form , Map <String , Pair <FileLike , String >> files ) throws UploadException
26142611 {
26152612 JSONObject resp = new JSONObject ();
26162613 if (form .getTrackName () == null || form .getLibraryId () == null )
@@ -2620,9 +2617,9 @@ public String getResponse(ImportTrackForm form, Map<String, Pair<File, String>>
26202617
26212618 try
26222619 {
2623- for (Map .Entry <String , Pair <File , String >> entry : files .entrySet ())
2620+ for (Map .Entry <String , Pair <FileLike , String >> entry : files .entrySet ())
26242621 {
2625- File file = entry .getValue ().getKey ();
2622+ File file = entry .getValue ().getKey (). toNioPathForRead (). toFile () ;
26262623
26272624 try
26282625 {
@@ -2742,15 +2739,15 @@ protected void setContentType(HttpServletResponse response)
27422739 }
27432740
27442741 @ Override
2745- protected File getTargetFile (String filename ) throws IOException
2742+ protected FileLike getTargetFile (String filename ) throws IOException
27462743 {
27472744 if (!PipelineService .get ().hasValidPipelineRoot (getContainer ()))
27482745 throw new UploadException ("Pipeline root must be configured before uploading files" , HttpServletResponse .SC_NOT_FOUND );
27492746
27502747 try
27512748 {
27522749 FileLike targetDirectory = AssayFileWriter .ensureUploadDirectory (getContainer ());
2753- return FileUtil .findUniqueFileName (filename , targetDirectory ). toNioPathForWrite (). toFile () ;
2750+ return FileUtil .findUniqueFileName (filename , targetDirectory );
27542751 }
27552752 catch (ExperimentException e )
27562753 {
@@ -2759,14 +2756,14 @@ protected File getTargetFile(String filename) throws IOException
27592756 }
27602757
27612758 @ Override
2762- public String getResponse (ImportChainFileForm form , Map <String , Pair <File , String >> files )
2759+ public String getResponse (ImportChainFileForm form , Map <String , Pair <FileLike , String >> files )
27632760 {
27642761 JSONObject resp = new JSONObject ();
27652762 try
27662763 {
2767- for (Map .Entry <String , Pair <File , String >> entry : files .entrySet ())
2764+ for (Map .Entry <String , Pair <FileLike , String >> entry : files .entrySet ())
27682765 {
2769- File file = entry .getValue ().getKey ();
2766+ File file = entry .getValue ().getKey (). toNioPathForRead (). toFile () ;
27702767
27712768 if (form .getGenomeId1 () == null || form .getGenomeId2 () == null )
27722769 {
0 commit comments