Package org.xwiki.extension
Interface ExtensionManager
-
@Role public interface ExtensionManager
Main entry point for some extensions management tasks.- Since:
- 4.0M1
- Version:
- $Id: 69c3c879d66a68672cb350e59e3d2e3987e6e8ab $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default boolean
exists(ExtensionId extensionId)
default Extension
getAccessibleExtension(String feature, Namespace namespace)
Get the accessible (i.e.ExtensionRepository
getRepository(String repositoryId)
Return a repository based on its id.Extension
resolveExtension(ExtensionDependency extensionDependency)
Deprecated.since 5.3M1, useresolveExtension(ExtensionDependency, String)
insteadExtension
resolveExtension(ExtensionDependency extensionDependency, String namespace)
Search the provided extension as a dependency of another extension among all repositories including core and local repositories.Extension
resolveExtension(ExtensionId extensionId)
Search the provided extension among all repositories including core and local repositories.default IterableResult<Extension>
searchAccessibleExtensions(Namespace namespace, ExtensionQuery query)
Search accessible (i.e.
-
-
-
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 ?
- 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.since 5.3M1, useresolveExtension(ExtensionDependency, String)
insteadSearch 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 ?
- 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 ?
- Parameters:
extensionDependency
- the extension as dependencynamespace
- 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
andcore
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 searchquery
- 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
-
-