public class JsonToImageTranslator
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static Image<Layer> |
toImage(BuildableManifestTemplate manifestTemplate,
ContainerConfigurationTemplate containerConfigurationTemplate)
Translates
BuildableManifestTemplate to Image . |
static Image<Layer> |
toImage(V21ManifestTemplate manifestTemplate)
Translates
V21ManifestTemplate to Image . |
public static Image<Layer> toImage(V21ManifestTemplate manifestTemplate) throws LayerPropertyNotFoundException
V21ManifestTemplate
to Image
.manifestTemplate
- the template containing the image layers.Image
.LayerPropertyNotFoundException
- if adding image layers fails.public static Image<Layer> toImage(BuildableManifestTemplate manifestTemplate, ContainerConfigurationTemplate containerConfigurationTemplate) throws LayerCountMismatchException, LayerPropertyNotFoundException, BadContainerConfigurationFormatException
BuildableManifestTemplate
to Image
. Uses the corresponding ContainerConfigurationTemplate
to get the layer diff IDs.manifestTemplate
- the template containing the image layers.containerConfigurationTemplate
- the template containing the diff IDs and container
configuration properties.Image
.LayerCountMismatchException
- if the manifest and configuration contain conflicting layer
information.LayerPropertyNotFoundException
- if adding image layers fails.BadContainerConfigurationFormatException
- if the container configuration is in a bad
format