Interface ContainerAdapter<T>

Type Parameters:
T - The type this Service adapts Containers to.

public interface ContainerAdapter<T>
Interface for a Container Adapter Service.
  • Method Details

    • adapt

      T adapt(Container root, OverlayContainer rootOverlay, ArtifactContainer artifactContainer, Container containerToAdapt) throws UnableToAdaptException
      Adapt from the Adaptable 'containerToAdapt' to type T

      Note that artifact layer paths may not be equivalent to adaptable paths.
      Use the passed 'artifactContainer' to know what the artifact layer path is for the containerToAdapt

      This allows the Adaptable Layer to have a different concept of 'isRoot' hierarchy than the artifact.

      Parameters:
      root - the container that returns isRoot=true for containerToAdapt (will be containerToAdapt if containerToAdapt.isRoot=true)
      rootOverlay - the artifact layer container that holds the data underpinning this adaptable.
      artifactContainer - the artifact container corresponding to the containerToAdapt
      containerToAdapt - the adaptable container to be adapted.
      Returns:
      Throws:
      UnableToAdaptException