Class StorageLocationServiceImpl
java.lang.Object
com.atlassian.bamboo.storage.location.StorageLocationServiceImpl
- All Implemented Interfaces:
StorageLocationService
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetArtifactDirectoryBuilder
(File rootStorageDirectory) Returns an ArtifactDirectoryBuilder which can be used to buildFile
objects pointing to artifacts stored on the local filesystem.getArtifactPathBuilder
(char separatorChar) Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts.getArtifactPathBuilder
(String rootStoragePath, char separatorChar) Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts.getBuildDataDirectory
(Key key) Returns the top level build data directory for a plan or deployment project.Returns the "download data" directory for a plan or deployment project.getBuildLogsDirectory
(Key key) Eg.getBuildResultsDirectory
(Key buildKey) Eg.@NotNull ArtifactDirectoryBuilder
This method will only work on the server, not on remote agents.getLogFile
(@NotNull ResultKey resultKey, @Nullable String suffix) Returns the location of the log file for the specified build or deployment.getLogFile
(Key entityKey, int resultNumber) Returns the location of the log file for the specified build or deployment.getLogFile
(Key entityKey, long resultNumber) Returns the location of the log file for the specified build or deployment.getLogFile
(ResultKey resultKey) Returns the location of the log file for the specified build or deployment.getLogFileName
(@NotNull Key entityKey, int resultNumber) Returns the standard name of the log file for the specified build or deployment.getLogFileName
(@NotNull Key entityKey, long resultNumber) Returns the standard name of the log file for the specified build or deployment.getLogFileName
(ResultKey resultKey) Returns the standard name of the log file for the specified build or deployment.getLogsFileNames
(@NotNull ResultKey resultKey) Return all log filenames sorted by age (newest first).getOldLogsFileNames
(@NotNull ResultKey resultKey) If a result has logs from previous runs, return their filenames sorted by age (newest first).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.
-
Field Details
-
BUILD_LOGS_DIRECTORY
- See Also:
-
-
Constructor Details
-
StorageLocationServiceImpl
public StorageLocationServiceImpl()
-
-
Method Details
-
getRootBuildDataDirectory
Description copied from interface:StorageLocationService
Returns the root build data directory for all plans and deployment projects.- Specified by:
getRootBuildDataDirectory
in interfaceStorageLocationService
-
getBuildDataDirectory
Description copied from interface:StorageLocationService
Returns the top level build data directory for a plan or deployment project. This is the common parent directory for storing build and deployment metadata related to the plan or project. Build results and logs are stored in subdirectories under this directory. Eg. ".../xml-data/builds/plan-12345-JOB1/"- Specified by:
getBuildDataDirectory
in interfaceStorageLocationService
-
getBuildResultsDirectory
Description copied from interface:StorageLocationService
Eg. ".../xml-data/builds/plan-12345-JOB1/results/"- Specified by:
getBuildResultsDirectory
in interfaceStorageLocationService
-
getBuildDownloadDataDirectory
Description copied from interface:StorageLocationService
Returns the "download data" directory for a plan or deployment project. Eg. ".../xml-data/builds/plan-12345-JOB1/download-data/"- Specified by:
getBuildDownloadDataDirectory
in interfaceStorageLocationService
-
getBuildLogsDirectory
Description copied from interface:StorageLocationService
Eg. ".../xml-data/builds/plan-12345-JOB1/download-data/build_logs/"- Specified by:
getBuildLogsDirectory
in interfaceStorageLocationService
-
getLogFileName
Description copied from interface:StorageLocationService
Returns the standard name of the log file for the specified build or deployment.- Specified by:
getLogFileName
in interfaceStorageLocationService
-
getLogFileName
Description copied from interface:StorageLocationService
Returns the standard name of the log file for the specified build or deployment.- Specified by:
getLogFileName
in interfaceStorageLocationService
-
getLogFileName
Description copied from interface:StorageLocationService
Returns the standard name of the log file for the specified build or deployment.- Specified by:
getLogFileName
in interfaceStorageLocationService
-
getLogFile
Description copied from interface:StorageLocationService
Returns the location of the log file for the specified build or deployment.- Specified by:
getLogFile
in interfaceStorageLocationService
-
getLogFile
Description copied from interface:StorageLocationService
Returns the location of the log file for the specified build or deployment.- Specified by:
getLogFile
in interfaceStorageLocationService
-
getLogFile
Description copied from interface:StorageLocationService
Returns the location of the log file for the specified build or deployment.- Specified by:
getLogFile
in interfaceStorageLocationService
-
getLogFile
Description copied from interface:StorageLocationService
Returns the location of the log file for the specified build or deployment. Optional suffix parameter allows getting logs from previous runs.- Specified by:
getLogFile
in interfaceStorageLocationService
-
renameOldBuildLogsIfNeeded
Description copied from interface:StorageLocationService
Makes sure that build log file for the current result is empty, by renaming any pre-existing build logs.- Specified by:
renameOldBuildLogsIfNeeded
in interfaceStorageLocationService
-
getOldLogsFileNames
Description copied from interface:StorageLocationService
If a result has logs from previous runs, return their filenames sorted by age (newest first). See alsoStorageLocationService.renameOldBuildLogsIfNeeded(ResultKey)
- Specified by:
getOldLogsFileNames
in interfaceStorageLocationService
-
getLogsFileNames
Description copied from interface:StorageLocationService
Return all log filenames sorted by age (newest first).- Specified by:
getLogsFileNames
in interfaceStorageLocationService
-
getDefaultArtifactDirectoryBuilder
This method will only work on the server, not on remote agents.- Specified by:
getDefaultArtifactDirectoryBuilder
in interfaceStorageLocationService
-
getArtifactPathBuilder
Description copied from interface:StorageLocationService
Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts. This version of the method takes a rootArtifactPath parameter, returning an instance that builds absolute paths.- Specified by:
getArtifactPathBuilder
in interfaceStorageLocationService
-
getArtifactPathBuilder
Description copied from interface:StorageLocationService
Returns an ArtifactPathBuilder which can be used to construct paths to stored artifacts. This version of the method returns an instance that builds relative paths, not absolute paths. All the paths produced by this builder must be appended to a root artifact storage location before being used to locate artifacts.- Specified by:
getArtifactPathBuilder
in interfaceStorageLocationService
-
getArtifactDirectoryBuilder
Description copied from interface:StorageLocationService
Returns an ArtifactDirectoryBuilder which can be used to buildFile
objects pointing to artifacts stored on the local filesystem. This version of the method takes a rootArtifactDirectory parameter.- Specified by:
getArtifactDirectoryBuilder
in interfaceStorageLocationService
-