Class StorageLocationServiceImpl
java.lang.Object
com.atlassian.bamboo.storage.location.StorageLocationServiceImpl
- All Implemented Interfaces:
StorageLocationService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetArtifactDirectoryBuilder(File rootStorageDirectory) Returns an ArtifactDirectoryBuilder which can be used to buildFileobjects 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 ArtifactDirectoryBuilderThis 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.voidrenameOldBuildLogsIfNeeded(@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:StorageLocationServiceReturns the root build data directory for all plans and deployment projects.- Specified by:
getRootBuildDataDirectoryin interfaceStorageLocationService
-
getBuildDataDirectory
Description copied from interface:StorageLocationServiceReturns 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:
getBuildDataDirectoryin interfaceStorageLocationService
-
getBuildResultsDirectory
Description copied from interface:StorageLocationServiceEg. ".../xml-data/builds/plan-12345-JOB1/results/"- Specified by:
getBuildResultsDirectoryin interfaceStorageLocationService
-
getBuildDownloadDataDirectory
Description copied from interface:StorageLocationServiceReturns the "download data" directory for a plan or deployment project. Eg. ".../xml-data/builds/plan-12345-JOB1/download-data/"- Specified by:
getBuildDownloadDataDirectoryin interfaceStorageLocationService
-
getBuildLogsDirectory
Description copied from interface:StorageLocationServiceEg. ".../xml-data/builds/plan-12345-JOB1/download-data/build_logs/"- Specified by:
getBuildLogsDirectoryin interfaceStorageLocationService
-
getLogFileName
Description copied from interface:StorageLocationServiceReturns the standard name of the log file for the specified build or deployment.- Specified by:
getLogFileNamein interfaceStorageLocationService
-
getLogFileName
Description copied from interface:StorageLocationServiceReturns the standard name of the log file for the specified build or deployment.- Specified by:
getLogFileNamein interfaceStorageLocationService
-
getLogFileName
Description copied from interface:StorageLocationServiceReturns the standard name of the log file for the specified build or deployment.- Specified by:
getLogFileNamein interfaceStorageLocationService
-
getLogFile
Description copied from interface:StorageLocationServiceReturns the location of the log file for the specified build or deployment.- Specified by:
getLogFilein interfaceStorageLocationService
-
getLogFile
Description copied from interface:StorageLocationServiceReturns the location of the log file for the specified build or deployment.- Specified by:
getLogFilein interfaceStorageLocationService
-
getLogFile
Description copied from interface:StorageLocationServiceReturns the location of the log file for the specified build or deployment.- Specified by:
getLogFilein interfaceStorageLocationService
-
getLogFile
Description copied from interface:StorageLocationServiceReturns the location of the log file for the specified build or deployment. Optional suffix parameter allows getting logs from previous runs.- Specified by:
getLogFilein interfaceStorageLocationService
-
renameOldBuildLogsIfNeeded
Description copied from interface:StorageLocationServiceMakes sure that build log file for the current result is empty, by renaming any pre-existing build logs.- Specified by:
renameOldBuildLogsIfNeededin interfaceStorageLocationService
-
getOldLogsFileNames
Description copied from interface:StorageLocationServiceIf a result has logs from previous runs, return their filenames sorted by age (newest first). See alsoStorageLocationService.renameOldBuildLogsIfNeeded(ResultKey)- Specified by:
getOldLogsFileNamesin interfaceStorageLocationService
-
getLogsFileNames
Description copied from interface:StorageLocationServiceReturn all log filenames sorted by age (newest first).- Specified by:
getLogsFileNamesin interfaceStorageLocationService
-
getDefaultArtifactDirectoryBuilder
This method will only work on the server, not on remote agents.- Specified by:
getDefaultArtifactDirectoryBuilderin interfaceStorageLocationService
-
getArtifactPathBuilder
Description copied from interface:StorageLocationServiceReturns 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:
getArtifactPathBuilderin interfaceStorageLocationService
-
getArtifactPathBuilder
Description copied from interface:StorageLocationServiceReturns 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:
getArtifactPathBuilderin interfaceStorageLocationService
-
getArtifactDirectoryBuilder
Description copied from interface:StorageLocationServiceReturns an ArtifactDirectoryBuilder which can be used to buildFileobjects pointing to artifacts stored on the local filesystem. This version of the method takes a rootArtifactDirectory parameter.- Specified by:
getArtifactDirectoryBuilderin interfaceStorageLocationService
-