|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwiki.extension.repository.AbstractExtensionRepository org.xwiki.extension.repository.internal.local.AbstractCachedExtensionRepository<DefaultInstalledExtension> org.xwiki.extension.repository.internal.installed.DefaultInstalledExtensionRepository
@Component @Singleton public class DefaultInstalledExtensionRepository
Default implementation of InstalledExtensionRepository
.
Field Summary |
---|
Fields inherited from class org.xwiki.extension.repository.internal.local.AbstractCachedExtensionRepository |
---|
extensions, extensionsVersions |
Constructor Summary | |
---|---|
DefaultInstalledExtensionRepository()
|
Method Summary | |
---|---|
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. |
void |
initialize()
Method called by the Component Manager when the component is created for the first time (i.e. |
InstalledExtension |
installExtension(LocalExtension extension,
String namespace,
boolean dependency)
Indicate that the provided extension is installed in the provided namespace. |
void |
uninstallExtension(InstalledExtension extension,
String namespace)
Indicate that the provided extension is uninstalled from provided namespace. |
Methods inherited from class org.xwiki.extension.repository.internal.local.AbstractCachedExtensionRepository |
---|
addCachedExtension, addCachedExtensionVersion, exists, removeCachedExtension, resolve, resolve, resolveVersions, search |
Methods inherited from class org.xwiki.extension.repository.AbstractExtensionRepository |
---|
getDescriptor, getId, setDescriptor, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xwiki.extension.repository.InstalledExtensionRepository |
---|
resolve, resolve |
Methods inherited from interface org.xwiki.extension.repository.ExtensionRepository |
---|
exists, getDescriptor, getId, resolveVersions |
Methods inherited from interface org.xwiki.extension.repository.search.Searchable |
---|
search |
Constructor Detail |
---|
public DefaultInstalledExtensionRepository()
Method Detail |
---|
public void initialize() throws InitializationException
Initializable
initialize
in interface Initializable
InitializationException
- if an error happens during a component's initializationpublic int countExtensions()
countExtensions
in interface InstalledExtensionRepository
public Collection<InstalledExtension> getInstalledExtensions(String namespace)
InstalledExtensionRepository
Note that InstalledExtensionRepository.getInstalledExtensions()
return all the extensions installed in all namespaces while
InstalledExtensionRepository.getInstalledExtensions(String)
with null
return only those that are globally available.
getInstalledExtensions
in interface InstalledExtensionRepository
namespace
- the namespace where to search for installed extensions, null mean installed in all namespaces
(root namespace)
public Collection<InstalledExtension> getInstalledExtensions()
getInstalledExtensions
in interface InstalledExtensionRepository
public InstalledExtension getInstalledExtension(ExtensionId extensionId)
InstalledExtensionRepository
null
is returned.
getInstalledExtension
in interface InstalledExtensionRepository
extensionId
- the extension identifier
public InstalledExtension getInstalledExtension(String feature, String namespace)
InstalledExtensionRepository
getInstalledExtension
in interface InstalledExtensionRepository
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)
public InstalledExtension installExtension(LocalExtension extension, String namespace, boolean dependency) throws InstallException
InstalledExtensionRepository
installExtension
in interface InstalledExtensionRepository
extension
- the extension to installnamespace
- the namespace in which the extension is installeddependency
- indicate if the extension is stored as a dependency of another one
InstalledExtension
InstallException
- error when trying to install provided extensionpublic void uninstallExtension(InstalledExtension extension, String namespace) throws UninstallException
InstalledExtensionRepository
Extension is never removed form the local repository. It's just namespace related informations.
uninstallExtension
in interface InstalledExtensionRepository
extension
- the extension to uninstallnamespace
- the namespace from which the extension is uninstalled
UninstallException
- error when trying to uninstall provided extensionpublic Collection<InstalledExtension> getBackwardDependencies(String feature, String namespace) throws ResolveException
InstalledExtensionRepository
Only look at the backward dependencies in the provided namespace. To get all the dependencies of a root extension
(namespace=null) across namespaces use InstalledExtensionRepository.getBackwardDependencies(ExtensionId)
instead.
getBackwardDependencies
in interface InstalledExtensionRepository
feature
- the extension unique identifiernamespace
- the namespace where to search for backward dependencies
ResolveException
- error when searching for backward dependenciespublic Map<String,Collection<InstalledExtension>> getBackwardDependencies(ExtensionId extensionId) throws ResolveException
InstalledExtensionRepository
getBackwardDependencies
in interface InstalledExtensionRepository
extensionId
- the extension identifier
ResolveException
- error when searching for extension backward dependencies
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |