Interface ArtifactContainerFactoryContributor


public interface ArtifactContainerFactoryContributor
To be implemented by providers of Container/Entry abstractions.

Implementations will register services meeting this interface with the handlesType service attribute set.

  • handlesType - (required, String|String[]) representing the fully qualified class names of types this helper can convert to a Container.
  • handlesEntries - (optional, String|String[]) if present, the case insensitive list of filename extensions this helper is willing to try to convert from just an Entry . If absent, Helper will be invoked to convert Entry without filtering by file extension.
  • Method Details

    • createContainer

      ArtifactContainer createContainer(File workAreaCacheDir, Object o)
      Create a container for the passed Object.

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

      The container returned MUST return true for ArtifactContainer.isRoot()
      If a scenario requires non-root Containers to be returned, this will require a new story.

      Parameters:
      workAreaCacheDir - the directory to use as a performance cache for this Container.
      p - the object to underpin this Container instance.
      Returns:
      Container if it was possible to convert Object into one, or null if not.
    • createContainer

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

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

      The container returned MUST return true for ArtifactContainer.isRoot()
      If a scenario requires non-root Containers to be returned, this will require a new story.

      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 convert Object into one, or null if not.