public class StorageLocationServiceImpl extends Object implements StorageLocationService
| Modifier and Type | Field and Description |
|---|---|
static String |
BUILD_LOGS_DIRECTORY |
| Constructor and Description |
|---|
StorageLocationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
ArtifactDirectoryBuilder |
getArtifactDirectoryBuilder(File rootStorageDirectory)
Returns an ArtifactDirectoryBuilder which can be used to build
File objects
pointing to artifacts stored on the local filesystem. |
ArtifactPathBuilder |
getArtifactPathBuilder(char separatorChar)
Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts.
|
ArtifactPathBuilder |
getArtifactPathBuilder(String rootStoragePath,
char separatorChar)
Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts.
|
File |
getBuildDataDirectory(Key key)
Returns the top level build data directory for a plan or deployment project.
|
File |
getBuildDownloadDataDirectory(Key key)
Returns the "download data" directory for a plan or deployment project.
|
File |
getBuildLogsDirectory(Key key)
Eg.
|
File |
getBuildResultsDirectory(Key buildKey)
Eg.
|
@NotNull ArtifactDirectoryBuilder |
getDefaultArtifactDirectoryBuilder()
This method will only work on the server, not on remote agents.
|
File |
getLogFile(Key entityKey,
int resultNumber)
Returns the location of the log file for the specified build or deployment.
|
File |
getLogFile(Key entityKey,
long resultNumber)
Returns the location of the log file for the specified build or deployment.
|
File |
getLogFile(ResultKey resultKey)
Returns the location of the log file for the specified build or deployment.
|
File |
getLogFile(@NotNull ResultKey resultKey,
@Nullable String suffix)
Returns the location of the log file for the specified build or deployment.
|
String |
getLogFileName(@NotNull Key entityKey,
int resultNumber)
Returns the standard name of the log file for the specified build or deployment.
|
String |
getLogFileName(@NotNull Key entityKey,
long resultNumber)
Returns the standard name of the log file for the specified build or deployment.
|
String |
getLogFileName(ResultKey resultKey)
Returns the standard name of the log file for the specified build or deployment.
|
List<String> |
getLogsFileNames(@NotNull ResultKey resultKey)
Return all log filenames sorted by age (newest first).
|
List<String> |
getOldLogsFileNames(@NotNull ResultKey resultKey)
If a result has logs from previous runs, return their filenames sorted by age (newest first).
|
File |
getRootBuildDataDirectory()
Returns the root build data directory for all plans and deployment projects.
|
void |
renameOldBuildLogsIfNeeded(@NotNull ResultKey resultKey)
Makes sure that build log file for the current result is empty, by renaming any pre-existing build logs.
|
public static final String BUILD_LOGS_DIRECTORY
public File getRootBuildDataDirectory()
StorageLocationServicegetRootBuildDataDirectory in interface StorageLocationServicepublic File getBuildDataDirectory(Key key)
StorageLocationServicegetBuildDataDirectory in interface StorageLocationServicepublic File getBuildResultsDirectory(Key buildKey)
StorageLocationServicegetBuildResultsDirectory in interface StorageLocationServicepublic File getBuildDownloadDataDirectory(Key key)
StorageLocationServicegetBuildDownloadDataDirectory in interface StorageLocationServicepublic File getBuildLogsDirectory(Key key)
StorageLocationServicegetBuildLogsDirectory in interface StorageLocationServicepublic String getLogFileName(@NotNull @NotNull Key entityKey, int resultNumber)
StorageLocationServicegetLogFileName in interface StorageLocationServicepublic String getLogFileName(@NotNull @NotNull Key entityKey, long resultNumber)
StorageLocationServicegetLogFileName in interface StorageLocationServicepublic String getLogFileName(ResultKey resultKey)
StorageLocationServicegetLogFileName in interface StorageLocationServicepublic File getLogFile(Key entityKey, int resultNumber)
StorageLocationServicegetLogFile in interface StorageLocationServicepublic File getLogFile(Key entityKey, long resultNumber)
StorageLocationServicegetLogFile in interface StorageLocationServicepublic File getLogFile(ResultKey resultKey)
StorageLocationServicegetLogFile in interface StorageLocationServicepublic File getLogFile(@NotNull @NotNull ResultKey resultKey, @Nullable @Nullable String suffix)
StorageLocationServicegetLogFile in interface StorageLocationServicepublic void renameOldBuildLogsIfNeeded(@NotNull
@NotNull ResultKey resultKey)
StorageLocationServicerenameOldBuildLogsIfNeeded in interface StorageLocationServicepublic List<String> getOldLogsFileNames(@NotNull @NotNull ResultKey resultKey)
StorageLocationServiceStorageLocationService.renameOldBuildLogsIfNeeded(ResultKey)getOldLogsFileNames in interface StorageLocationServicepublic List<String> getLogsFileNames(@NotNull @NotNull ResultKey resultKey)
StorageLocationServicegetLogsFileNames in interface StorageLocationService@NotNull public @NotNull ArtifactDirectoryBuilder getDefaultArtifactDirectoryBuilder()
getDefaultArtifactDirectoryBuilder in interface StorageLocationServicepublic ArtifactPathBuilder getArtifactPathBuilder(String rootStoragePath, char separatorChar)
StorageLocationServicegetArtifactPathBuilder in interface StorageLocationServicepublic ArtifactPathBuilder getArtifactPathBuilder(char separatorChar)
StorageLocationServicegetArtifactPathBuilder in interface StorageLocationServicepublic ArtifactDirectoryBuilder getArtifactDirectoryBuilder(File rootStorageDirectory)
StorageLocationServiceFile objects
pointing to artifacts stored on the local filesystem. This version of the method takes a
rootArtifactDirectory parameter.getArtifactDirectoryBuilder in interface StorageLocationServiceCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.