Class ArtifactDirectoryBuilderImpl
java.lang.Object
com.atlassian.bamboo.storage.location.ArtifactDirectoryBuilderImpl
- All Implemented Interfaces:
ArtifactDirectoryBuilder
-
Constructor Summary
-
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.static boolean
isArtifactDirectory
(File directory) Returns true if the specified directory looks like it could be an artifact directory.
-
Constructor Details
-
ArtifactDirectoryBuilderImpl
-
-
Method Details
-
getRootDirectory
Description copied from interface:ArtifactDirectoryBuilder
Returns the root artifact storage directory that this instance is using to build absoluteFile
objects.- Specified by:
getRootDirectory
in interfaceArtifactDirectoryBuilder
-
getTemporaryDirectory
Description copied from interface:ArtifactDirectoryBuilder
Get the directory for temporary storage of artifacts. By default it is "tmp" subdirectory of rootStorageDirectory.- Specified by:
getTemporaryDirectory
in interfaceArtifactDirectoryBuilder
-
getArtifactDirectory
Description copied from interface:ArtifactDirectoryBuilder
Returns a plan-oriented or global storage directory for the supplied artifact (based on the return value of artifact.isGloballyStored().- Specified by:
getArtifactDirectory
in interfaceArtifactDirectoryBuilder
-
getPlanOrientedArtifactDirectory
public File getPlanOrientedArtifactDirectory(PlanResultKey planResultKey, ImmutableArtifactDefinitionBase artifactDefinition) Description copied from interface:ArtifactDirectoryBuilder
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.- Specified by:
getPlanOrientedArtifactDirectory
in interfaceArtifactDirectoryBuilder
-
getEntityOrientedArtifactDirectory
public File getEntityOrientedArtifactDirectory(ResultKey resultKey, ImmutableArtifactDefinitionBase artifactDefinition) Description copied from interface:ArtifactDirectoryBuilder
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.- Specified by:
getEntityOrientedArtifactDirectory
in interfaceArtifactDirectoryBuilder
-
getChainDirectory
Description copied from interface:ArtifactDirectoryBuilder
Returns [artifact-root] / [chain-part]- Specified by:
getChainDirectory
in interfaceArtifactDirectoryBuilder
-
getBuildDirectory
Description copied from interface:ArtifactDirectoryBuilder
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.- Specified by:
getBuildDirectory
in interfaceArtifactDirectoryBuilder
-
isArtifactDirectory
Returns true if the specified directory looks like it could be an artifact directory. Works by checking that the parent directory name matches one of the expected patterns for the parent of an artifact directory.
-