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 Detail

      • getRootDirectory

        File getRootDirectory()
        Returns the root artifact storage directory that this instance is using to build absolute File objects.
      • 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.
      • getChainDirectory

        File getChainDirectory​(PlanKey planKey)
        Returns [artifact-root] / [chain-part]
      • 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.