Package com.atlassian.bamboo.storage
Interface ArtifactDirectoryBuilder
-
- All Known Subinterfaces:
ArtifactStorage
- All Known Implementing Classes:
ArtifactDirectoryBuilderImpl
public interface ArtifactDirectoryBuilderBuildsFileobjects that point to artifact directories on the local filesystem.This is essentially the same as an
ArtifactPathBuilderconfigured to build absolute paths, except that all the methods returnFileobjects instead of string paths.Objects implementing this interface can be obtained from the
StorageLocationService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FilegetArtifactDirectory(Artifact artifact)Returns a plan-oriented or global storage directory for the supplied artifact (based on the return value of artifact.isGloballyStored().FilegetBuildDirectory(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.FilegetChainDirectory(PlanKey planKey)Returns [artifact-root] / [chain-part]FilegetEntityOrientedArtifactDirectory(ResultKey resultKey, ImmutableArtifactDefinitionBase artifactDefinition)Always returns a entity-oriented directory, never a global storage directory.FilegetJobOrSharedDirectory(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.FilegetPlanOrientedArtifactDirectory(PlanResultKey planResultKey, ImmutableArtifactDefinitionBase artifactDefinition)Always returns a plan-oriented directory, never a global storage directory.FilegetRootDirectory()Returns the root artifact storage directory that this instance is using to build absoluteFileobjects.FilegetTemporaryDirectory()Get the directory for temporary storage of artifacts.
-
-
-
Method Detail
-
getRootDirectory
File getRootDirectory()
Returns the root artifact storage directory that this instance is using to build absoluteFileobjects.
-
getTemporaryDirectory
File getTemporaryDirectory()
Get the directory for temporary storage of artifacts. By default it is "tmp" subdirectory of rootStorageDirectory.
-
getArtifactDirectory
File getArtifactDirectory(Artifact artifact)
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.
-
getJobOrSharedDirectory
File 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.
-
getBuildDirectory
File 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.
-
-