T
- The type this Service adapts Containers to.public interface ContainerAdapter<T>
Modifier and Type | Method and Description |
---|---|
T |
adapt(Container root,
OverlayContainer rootOverlay,
ArtifactContainer artifactContainer,
Container containerToAdapt)
Adapt from the Adaptable 'containerToAdapt' to type T
|
T adapt(Container root, OverlayContainer rootOverlay, ArtifactContainer artifactContainer, Container containerToAdapt) throws UnableToAdaptException
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.
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 containerToAdaptcontainerToAdapt
- the adaptable container to be adapted.UnableToAdaptException