@Role public interface InstalledExtensionRepository extends ExtensionRepository, Searchable
It's generally a virtual repository since the actual extension are generally stored in the local repository.
| Modifier and Type | Method and Description |
|---|---|
int |
countExtensions() |
Map<String,Collection<InstalledExtension>> |
getBackwardDependencies(ExtensionId extensionId)
Get all backward dependencies by namespace for the provided installed extension.
|
Collection<InstalledExtension> |
getBackwardDependencies(String feature,
String namespace)
Get provided installed extension backward dependencies in the provided namespace.
|
InstalledExtension |
getInstalledExtension(ExtensionId extensionId)
Return extension descriptor from the repository.
|
InstalledExtension |
getInstalledExtension(String feature,
String namespace)
Return the installed extension associated to the provided feature for the provided namespace (or root namespace
since namespaces inherit from root).
|
Collection<InstalledExtension> |
getInstalledExtensions() |
Collection<InstalledExtension> |
getInstalledExtensions(String namespace)
Return all the extensions available for the provided namespace.
|
InstalledExtension |
installExtension(LocalExtension extension,
String namespace,
boolean dependency)
Indicate that the provided extension is installed in the provided namespace.
|
InstalledExtension |
resolve(ExtensionDependency extensionDependency)
Return extension descriptor from the repository.
|
InstalledExtension |
resolve(ExtensionId extensionId)
Return extension descriptor from the repository.
|
IterableResult<Extension> |
searchInstalledExtensions(String pattern,
String namespace,
int offset,
int nb)
Search installed extensions based of the provided pattern and only in the passed namespace.
|
void |
uninstallExtension(InstalledExtension extension,
String namespace)
Indicate that the provided extension is uninstalled from provided namespace.
|
exists, getDescriptor, getId, resolveVersionssearchint countExtensions()
InstalledExtension getInstalledExtension(String feature, String namespace)
feature - the extension id or provided feature (virtual extension)namespace - the namespace where the extension is installed, null mean installed in all namespaces (root
namespace)Collection<InstalledExtension> getInstalledExtensions()
Collection<InstalledExtension> getInstalledExtensions(String namespace)
Note that getInstalledExtensions() return all the extensions installed in all namespaces while
getInstalledExtensions(String) with null return only those that are globally available.
namespace - the namespace where to search for installed extensions, null mean installed in all namespaces
(root namespace)InstalledExtension installExtension(LocalExtension extension, String namespace, boolean dependency) throws InstallException
extension - the extension to installnamespace - the namespace in which the extension is installeddependency - indicate if the extension is stored as a dependency of another oneInstalledExtensionInstallException - error when trying to install provided extensionInstalledExtension getInstalledExtension(ExtensionId extensionId)
null is returned.extensionId - the extension identifiervoid uninstallExtension(InstalledExtension extension, String namespace) throws UninstallException
Extension is never removed form the local repository. It's just namespace related informations.
extension - the extension to uninstallnamespace - the namespace from which the extension is uninstalledUninstallException - error when trying to uninstall provided extensionCollection<InstalledExtension> getBackwardDependencies(String feature, String namespace) throws ResolveException
Only look at the backward dependencies in the provided namespace. To get all the dependencies of a root extension
(namespace=null) across namespaces use getBackwardDependencies(ExtensionId) instead.
feature - the extension unique identifiernamespace - the namespace where to search for backward dependenciesResolveException - error when searching for backward dependenciesMap<String,Collection<InstalledExtension>> getBackwardDependencies(ExtensionId extensionId) throws ResolveException
extensionId - the extension identifierResolveException - error when searching for extension backward dependenciesInstalledExtension resolve(ExtensionDependency extensionDependency) throws ResolveException
ExtensionRepositoryResolveException is
thrown.resolve in interface ExtensionRepositoryextensionDependency - the target extension as a dependencyResolveException - failed to find extension in the repositoryInstalledExtension resolve(ExtensionId extensionId) throws ResolveException
ExtensionRepositoryResolveException is
thrown.resolve in interface ExtensionRepositoryextensionId - the extension identifierResolveException - failed to find extension in the repositoryIterableResult<Extension> searchInstalledExtensions(String pattern, String namespace, int offset, int nb) throws SearchException
The pattern is a simple character chain.
pattern - the pattern to searchnamespace - the namespace where to searchoffset - the offset from where to start returning search resultsnb - the maximum number of search results to returnSearchException - error when trying to search provided patternCopyright © 2004–2014 XWiki. All rights reserved.