Interface ExtensionManager


  • @Role
    public interface ExtensionManager
    Main entry point for some extensions management tasks.
    Since:
    4.0M1
    Version:
    $Id: 69c3c879d66a68672cb350e59e3d2e3987e6e8ab $
    • Method Detail

      • exists

        default boolean exists​(ExtensionId extensionId)
        Parameters:
        extensionId - the extension identifier
        Returns:
        true if the extension exists in the repository
        Since:
        12.10
      • resolveExtension

        Extension resolveExtension​(ExtensionId extensionId)
                            throws ResolveException
        Search the provided extension among all repositories including core and local repositories.

        The search is done in the following order:

        • Is it a core extension ?
        • Is it a local extension ?
        • Is it a remote extension in one of the configured remote repositories ?
        The first one found is returned.
        Parameters:
        extensionId - the extension identifier
        Returns:
        the resolved extension
        Throws:
        ResolveException - error when trying to resolve extension
      • resolveExtension

        @Deprecated
        Extension resolveExtension​(ExtensionDependency extensionDependency)
                            throws ResolveException
        Deprecated.
        Search the provided extension as a dependency of another extension among all repositories including core and local repositories.

        The search is done in the following order:

        • Is it a core extension ?
        • Is it a local extension ?
        • Is it a remote extension in one of the configured remote repositories ?
        The first one found is returned.
        Parameters:
        extensionDependency - the extension as dependency
        Returns:
        the resolved extension
        Throws:
        ResolveException - error when trying to resolve extension
      • resolveExtension

        Extension resolveExtension​(ExtensionDependency extensionDependency,
                                   String namespace)
                            throws ResolveException
        Search the provided extension as a dependency of another extension among all repositories including core and local repositories.

        The search is done in the following order:

        • Is it a core extension ?
        • Is it a local extension ?
        • Is this feature installed in current namespace or parent ?
        • Is it a remote extension in one of the configured remote repositories ?
        The first one found is returned.
        Parameters:
        extensionDependency - the extension as dependency
        namespace - the namespace where to search for the dependency
        Returns:
        the resolved extension
        Throws:
        ResolveException - error when trying to resolve extension
        Since:
        5.3M1
      • getRepository

        ExtensionRepository getRepository​(String repositoryId)
        Return a repository based on its id.

        This method also return local, installed and core repositories.

        Parameters:
        repositoryId - the id of the repository
        Returns:
        the repository
        Since:
        4.0M2
      • getAccessibleExtension

        default Extension getAccessibleExtension​(String feature,
                                                 Namespace namespace)
        Get the accessible (i.e. core or installed) extension instance from the passed namespace and matching the passed feature/id.
        Parameters:
        feature - the extension id or provided feature (virtual extension)
        namespace - the namespace from where the extension is usable
        Returns:
        the Extension instance
        Since:
        10.0RC1
      • searchAccessibleExtensions

        default IterableResult<Extension> searchAccessibleExtensions​(Namespace namespace,
                                                                     ExtensionQuery query)
                                                              throws SearchException
        Search accessible (i.e. core or installed) extensions based of the provided query and only in the passed namespace.
        Parameters:
        namespace - the namespace where to search
        query - the extension query used to filter and order the result
        Returns:
        the found extensions descriptors, empty list if nothing could be found
        Throws:
        SearchException - error when trying to search provided pattern
        Since:
        10.0RC1