public class ArtifactPathBuilderImpl extends Object implements ArtifactPathBuilder
Constructor and Description |
---|
ArtifactPathBuilderImpl(char separatorChar)
Constructor for building relative paths.
|
ArtifactPathBuilderImpl(String rootPath,
char separatorChar)
Constructor for building absolute paths.
|
Modifier and Type | Method and Description |
---|---|
String |
getArtifactPath(Artifact artifact)
Returns a plan-oriented or global storage path for the supplied artifact, based on the return value
of artifact.isGloballyStored().
|
String |
getBuildPath(PlanResultKey planResultKey)
Returns [artifact-root] / [chain-storage-tag] / [job-part] / [build-part]
[job-part] will be "shared" if the parameter points to a chain rather than a job.
|
String |
getChainPath(PlanKey planKey)
Returns [artifact-root] / [chain-storage-tag]
|
String |
getEntityOrientedArtifactPath(ResultKey resultKey,
ImmutableArtifactDefinitionBase artifactDefinition)
Always returns a entity-oriented path, never a global storage path.
|
String |
getJobOrSharedPath(PlanKey planKey)
Returns [artifact-root] / [chain-storage-tag] / [job-part]
[job-part] will be "shared" if the parameter points to a chain rather than a job.
|
String |
getPlanOrientedArtifactPath(PlanResultKey planResultKey,
ImmutableArtifactDefinitionBase artifactDefinition)
Always returns a plan-oriented path, never a global storage path.
|
String |
getRootPath()
Returns the root artifact storage path that this instance is using to build absolute paths, or null if this
instance is configured to build relative paths.
|
String |
getTemporaryPath()
Returns a path that can be used for temporary storage underneath the artifact root storage path.
|
public ArtifactPathBuilderImpl(String rootPath, char separatorChar)
public ArtifactPathBuilderImpl(char separatorChar)
public String getRootPath()
ArtifactPathBuilder
getRootPath
in interface ArtifactPathBuilder
public String getTemporaryPath()
ArtifactPathBuilder
getTemporaryPath
in interface ArtifactPathBuilder
public String getArtifactPath(Artifact artifact)
ArtifactPathBuilder
getArtifactPath
in interface ArtifactPathBuilder
public String getPlanOrientedArtifactPath(PlanResultKey planResultKey, @Nullable ImmutableArtifactDefinitionBase artifactDefinition)
ArtifactPathBuilder
getPlanOrientedArtifactPath
in interface ArtifactPathBuilder
public String getEntityOrientedArtifactPath(ResultKey resultKey, @Nullable ImmutableArtifactDefinitionBase artifactDefinition)
ArtifactPathBuilder
getEntityOrientedArtifactPath
in interface ArtifactPathBuilder
public String getChainPath(PlanKey planKey)
ArtifactPathBuilder
getChainPath
in interface ArtifactPathBuilder
public String getJobOrSharedPath(PlanKey planKey)
ArtifactPathBuilder
getJobOrSharedPath
in interface ArtifactPathBuilder
public String getBuildPath(PlanResultKey planResultKey)
ArtifactPathBuilder
getBuildPath
in interface ArtifactPathBuilder
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.