Package land.oras

Class ContainerRef


@NullMarked public final class ContainerRef extends Ref<ContainerRef>
A referer of a container on a Registry.
  • Method Details

    • getRegistry

      public String getRegistry()
      Create a new container reference
      Returns:
      The new container reference
    • getApiRegistry

      public String getApiRegistry()
      Get the API registry
      Returns:
      The API registry
    • getNamespace

      public @Nullable String getNamespace()
      Get the namespace
      Returns:
      The namespace
    • getRepository

      public String getRepository()
      Get the repository
      Specified by:
      getRepository in class Ref<ContainerRef>
      Returns:
      The repository
    • getDigest

      public @Nullable String getDigest()
      Get the digest
      Returns:
      The digest
    • withDigest

      public ContainerRef withDigest(String digest)
      Description copied from class: Ref
      Return the ref with the digest
      Specified by:
      withDigest in class Ref<ContainerRef>
      Parameters:
      digest - The digest
      Returns:
      The ref
    • getAlgorithm

      public SupportedAlgorithm getAlgorithm()
      Description copied from class: Ref
      Get the algorithm
      Specified by:
      getAlgorithm in class Ref<ContainerRef>
      Returns:
      The algorithm
    • getTagsPath

      public String getTagsPath()
      Return the tag URL
      Returns:
      The tag URL
    • getReferrersPath

      public String getReferrersPath(@Nullable ArtifactType artifactType)
      Return the referrers URL for this container referrer
      Parameters:
      artifactType - The optional artifact type
      Returns:
      The referrers URL
    • getManifestsPath

      public String getManifestsPath()
      Return the manifests URL
      Returns:
      The manifests URL
    • getBlobsUploadPath

      public String getBlobsUploadPath()
      Return the blobs upload URL
      Returns:
      The blobs upload URL
    • getBlobsUploadDigestPath

      public String getBlobsUploadDigestPath()
      Return the blobs upload URL with the digest for single POST upload
      Returns:
      The blobs upload URL
    • getBlobsPath

      public String getBlobsPath()
      Return the blobs URL
      Returns:
      The blobs URL
    • parse

      public static ContainerRef parse(String name)
      Parse the container name into registry, repository and tag.
      Parameters:
      name - The full name of the container to parse with any components.
      Returns:
      The container object with the registry, repository and tag.
    • forRegistry

      public static ContainerRef forRegistry(String registry)
      Return a container reference for a registry
      Parameters:
      registry - The registry
      Returns:
      The container reference
    • fromUrl

      public static ContainerRef fromUrl(String url)
      Return a container reference from URL
      Parameters:
      url - The URL
      Returns:
      The container reference