Package com.atlassian.bamboo.storage
Interface ArtifactDirectoryBuilder
- All Known Subinterfaces:
ArtifactStorage
- All Known Implementing Classes:
ArtifactDirectoryBuilderImpl
public interface ArtifactDirectoryBuilder
Builds
File
objects that point to artifact directories on the local filesystem.
This is essentially the same as an ArtifactPathBuilder
configured to build absolute paths, except
that all the methods return File
objects instead of string paths.
Objects implementing this interface can be obtained from the StorageLocationService
.
-
Method Summary
Modifier and TypeMethodDescriptiongetArtifactDirectory
(Artifact artifact) Returns a plan-oriented or global storage directory for the supplied artifact (based on the return value of artifact.isGloballyStored().getBuildDirectory
(PlanResultKey planResultKey) Returns [artifact-root] / [chain-part] / [job-part] / [build-part] [job-part] will be "shared" if the parameter points to a chain rather than a job.getChainDirectory
(PlanKey planKey) Returns [artifact-root] / [chain-part]getEntityOrientedArtifactDirectory
(ResultKey resultKey, ImmutableArtifactDefinitionBase artifactDefinition) Always returns a entity-oriented directory, never a global storage directory.getJobOrSharedDirectory
(PlanKey planKey) Returns [artifact-root] / [chain-part] / [job-part] [job-part] will be "shared" if the parameter points to a chain rather than a job.getPlanOrientedArtifactDirectory
(PlanResultKey planResultKey, ImmutableArtifactDefinitionBase artifactDefinition) Always returns a plan-oriented directory, never a global storage directory.Returns the root artifact storage directory that this instance is using to build absoluteFile
objects.Get the directory for temporary storage of artifacts.
-
Method Details
-
getRootDirectory
File getRootDirectory()Returns the root artifact storage directory that this instance is using to build absoluteFile
objects. -
getTemporaryDirectory
File getTemporaryDirectory()Get the directory for temporary storage of artifacts. By default it is "tmp" subdirectory of rootStorageDirectory. -
getArtifactDirectory
Returns a plan-oriented or global storage directory for the supplied artifact (based on the return value of artifact.isGloballyStored(). -
getPlanOrientedArtifactDirectory
File getPlanOrientedArtifactDirectory(PlanResultKey planResultKey, ImmutableArtifactDefinitionBase artifactDefinition) Always returns a plan-oriented directory, never a global storage directory. ie. returns [artifact-root] / [chain-part] / [job-part] / [build-part] / [label-part] [job-part] will be "shared" if the artifact is shared or if the plan result points to a chain rather than a job. [label-part] will be omitted if artifact is null. -
getEntityOrientedArtifactDirectory
File getEntityOrientedArtifactDirectory(ResultKey resultKey, ImmutableArtifactDefinitionBase artifactDefinition) Always returns a entity-oriented directory, never a global storage directory. ie. returns [artifact-root] / [chain-part] / [job-part] / [build-part] / [label-part] [job-part] will be "shared" if the artifact is shared or if the plan result points to a chain rather than a job. [label-part] will be omitted if artifact is null. -
getChainDirectory
Returns [artifact-root] / [chain-part] -
getBuildDirectory
Returns [artifact-root] / [chain-part] / [job-part] / [build-part] [job-part] will be "shared" if the parameter points to a chain rather than a job.
-