Package land.oras

Class LayoutRef


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

    • getFolder

      public Path getFolder()
      Get the folder
      Returns:
      The folder
    • withTag

      public LayoutRef withTag(String tag)
      Return a new layout ref with the tag.
      Parameters:
      tag - The tag.
      Returns:
      The new layout ref.
    • withDigest

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

      public static LayoutRef parse(String name)
      Parse the layout ref with folder and tag.
      Parameters:
      name - The layout ref.
      Returns:
      The container object with the registry, repository and tag.
    • getAlgorithm

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

      public boolean isValidDigest()
      Return if the current layout tag is a valid digest.
      Returns:
      True if the tag is a valid digest.
    • getRepository

      public String getRepository()
      Description copied from class: Ref
      Get the repository where to find the ref
      Specified by:
      getRepository in class Ref<LayoutRef>
      Returns:
      The repository