Interface ExtensionLoader

All Known Implementing Classes:
ServiceExtensionLoader

public interface ExtensionLoader
ExtensionLoader Describes a way for the Archive to load extensions. If an implementation is not set in the Domain's Configuration,
invalid reference
ServiceExtensionLoader
is set as the default strategy to load extensions.
Version:
$Revision: $
  • Method Details

    • load

      <T extends Assignable> T load(Class<T> extensionClass, Archive<?> baseArchive)
      Load a Extension.
      Type Parameters:
      T -
      Parameters:
      extensionClass - The Extension interface
      baseArchive - The base archive to use
      Returns:
      a
    • addOverride

      <T extends Assignable> ExtensionLoader addOverride(Class<T> extensionClass, Class<? extends T> extensionImplClass)
      Add a Override to the normal Extension loading. If a specific class is found to be overridden, the class will not be loaded using the normal strategy.
      Type Parameters:
      T - The type of Extension
      Parameters:
      extensionClass - The Extension interface class
      extensionImplClass - The Extension implementation class
      Returns:
      this ExtensionLoader
    • getExtensionFromExtensionMapping

      <T extends Assignable> String getExtensionFromExtensionMapping(Class<T> extensionClass)
      Gets the extension for the given type from the extensionMapping
      Type Parameters:
      T - The type of Extension
      Parameters:
      extensionClass - The Extension interface class
      Returns:
      the filename extension
    • getArchiveFormatFromExtensionMapping

      <T extends Archive<T>> ArchiveFormat getArchiveFormatFromExtensionMapping(Class<T> extensionClass)
      Gets the ArchiveFormat for the given type from the extensionMapping
      Type Parameters:
      T - The type of Extension
      Parameters:
      extensionClass - The Extension interface class
      Returns:
      the archive format