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, ServiceExtensionLoader is set as the default strategy to load extensions.
    Version:
    $Revision: $
    • Method Detail

      • load

        <T extends Assignable> T load​(java.lang.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 AssignableExtensionLoader addOverride​(java.lang.Class<T> extensionClass,
                                                           java.lang.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> java.lang.String getExtensionFromExtensionMapping​(java.lang.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​(java.lang.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