-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pivotal-173792650: Replace base path for multiple absolute paths (#239)
* removed base path
- Loading branch information
Showing
21 changed files
with
78 additions
and
75 deletions.
There are no files selected for viewing
14 changes: 6 additions & 8 deletions
14
client/bio-commandline/src/test/kotlin/ebi/ac/uk/paths/SubmissionFolderResolverTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 7 additions & 12 deletions
19
commons/commons-bio/src/main/kotlin/ebi/ac/uk/paths/SubmissionFolderResolver.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
package ebi.ac.uk.paths | ||
|
||
import ebi.ac.uk.extended.model.ExtSubmission | ||
import java.nio.file.Path | ||
|
||
const val FILES_PATH = "Files" | ||
const val SUBMISSION_PATH = "submission" | ||
const val FTP_FOLDER = "submission/ftp" | ||
|
||
class SubmissionFolderResolver(private val basePath: Path) { | ||
class SubmissionFolderResolver( | ||
private val submissionFolder: Path, | ||
private val ftpFolder: Path | ||
) { | ||
|
||
fun getSubmissionFtpFolder(submission: ExtSubmission): Path = | ||
basePath.resolve(FTP_FOLDER).resolve(submission.relPath) | ||
fun getSubmissionFtpFolder(submissionRelPath: String): Path = ftpFolder.resolve(submissionRelPath) | ||
|
||
fun getSubmissionFolder(submission: ExtSubmission): Path = | ||
basePath.resolve(SUBMISSION_PATH).resolve(submission.relPath) | ||
|
||
fun getSubmissionFolder(submissionRelPath: String): Path = | ||
basePath.resolve(SUBMISSION_PATH).resolve(submissionRelPath) | ||
fun getSubmissionFolder(submissionRelPath: String): Path = submissionFolder.resolve(submissionRelPath) | ||
|
||
fun getSubFilePath(relPath: String, fileName: String): Path = | ||
basePath.resolve(SUBMISSION_PATH).resolve(relPath).resolve(FILES_PATH).resolve(escapeFileName(fileName)) | ||
submissionFolder.resolve(relPath).resolve(FILES_PATH).resolve(escapeFileName(fileName)) | ||
|
||
private fun escapeFileName(fileName: String) = fileName.removePrefix("/") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 2 additions & 7 deletions
9
...bmission-webapp/src/main/kotlin/ac/uk/ebi/biostd/common/property/ApplicationProperties.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.