Interface ArtifactContainerFactory


public interface ArtifactContainerFactory
Factory for artifact API.

Uses service based implementations to return appropriate Container abstraction for given Objects.

Have DS inject the service implementing this interface to your bundle, and use the getters to have the api build a container for a given Object.

  • Method Details

    • getContainer

      ArtifactContainer getContainer(File workAreaCacheDir, Object o)
      Obtain a container for the passed Object.

      This is a root-level scenario, where the Object is not considered enclosed by any other Container.

      Parameters:
      workAreaCacheDir - the directory to use as a performance cache for this Container.
      o - the object to underpin this Container instance.
      Returns:
      Container if it was possible to obtain one representing Object, or null if not.
    • getContainer

      ArtifactContainer getContainer(File workAreaCacheDir, ArtifactContainer parent, ArtifactEntry entry, Object o)
      Obtain a container for the passed Object.

      This is an enclosed scenario, where the Object is considered enclosed by the passed Container.

      Parameters:
      workAreaCacheDir - the directory to use as a performance cache for this Container.
      parent - the Container that o is considered to be part of.
      entry - the Entry within parent that o is considered to represent.
      o - the object to underpin this Container instance.
      Returns:
      Container if it was possible to obtain one representing Object, or null if not.