Package land.oras

Class Manifest


@NullUnmarked public final class Manifest extends Descriptor
Class for manifest
  • Method Details

    • getSchemaVersion

      public int getSchemaVersion()
      Get the schema version
      Returns:
      The schema version
    • getArtifactType

      public @NonNull ArtifactType getArtifactType()
      Description copied from class: Descriptor
      Get the artifact type
      Overrides:
      getArtifactType in class Descriptor
      Returns:
      The artifact type
    • getDescriptor

      public ManifestDescriptor getDescriptor()
      Get the descriptor
      Returns:
      The descriptor
    • getDigest

      public String getDigest()
      Description copied from class: Descriptor
      Get the digest
      Overrides:
      getDigest in class Descriptor
      Returns:
      The digest
    • getConfig

      public Config getConfig()
      Get the config
      Returns:
      The config
    • getSubject

      public Subject getSubject()
      Get the subject
      Returns:
      The subject
    • getLayers

      public List<Layer> getLayers()
      Get the layers
      Returns:
      The layers
    • withArtifactType

      public Manifest withArtifactType(ArtifactType artifactType)
      Return a new manifest with the given artifact type
      Parameters:
      artifactType - The artifact type
      Returns:
      The manifest
    • withLayers

      public Manifest withLayers(List<Layer> layers)
      Return a new manifest with the given layers
      Parameters:
      layers - The layers
      Returns:
      The manifest
    • withConfig

      public Manifest withConfig(Config config)
      Return a new manifest with the given config
      Parameters:
      config - The config
      Returns:
      The manifest
    • withSubject

      public Manifest withSubject(Subject subject)
      Return a new manifest with the given config
      Parameters:
      subject - The subject
      Returns:
      The manifest
    • withAnnotations

      public Manifest withAnnotations(Map<String,String> annotations)
      Return a new manifest with the given annotations
      Parameters:
      annotations - The annotations
      Returns:
      The manifest
    • withDescriptor

      public Manifest withDescriptor(ManifestDescriptor descriptor)
      Return a new manifest with the given descriptor
      Parameters:
      descriptor - The descriptor
      Returns:
      The manifest
    • withJson

      protected Manifest withJson(String json)
      Return same instance but with original JSON
      Overrides:
      withJson in class Descriptor
      Parameters:
      json - The original JSON
      Returns:
      The index
    • fromJson

      public static Manifest fromJson(String json)
      Create a manifest from a JSON string
      Parameters:
      json - The JSON string
      Returns:
      The manifest
    • fromPath

      public static Manifest fromPath(Path path)
      Create a manifest from a path
      Parameters:
      path - The path
      Returns:
      The manifest
    • empty

      public static Manifest empty()
      Return a copy of an empty manifest
      Returns:
      The empty manifest