@Component @Named(value="extension.installed") @Singleton public class InstalledExtensionScriptService extends AbstractExtensionScriptService
Modifier and Type | Field and Description |
---|---|
static String |
ID
The identifier of the sub extension
ScriptService . |
authorization, documentAccessBridge, execution, EXTENSIONERROR_KEY, jobExecutor, PROPERTY_CALLERREFERENCE, PROPERTY_CHECKRIGHTS, PROPERTY_CONTEXT_ACTION, PROPERTY_CONTEXT_WIKI, PROPERTY_USERREFERENCE, scriptProvider, WIKI_NAMESPACE_PREFIX, xcontextProvider
Constructor and Description |
---|
InstalledExtensionScriptService() |
Modifier and Type | Method and Description |
---|---|
Map<String,Collection<org.xwiki.extension.InstalledExtension>> |
getBackwardDependencies(org.xwiki.extension.ExtensionId extensionId)
Get all backward dependencies by namespace for the provided installed extension.
|
Map<String,Collection<org.xwiki.extension.InstalledExtension>> |
getBackwardDependencies(String feature)
Get all the installed extensions that depend on the specified root extension.
|
Collection<org.xwiki.extension.InstalledExtension> |
getBackwardDependencies(String feature,
String namespace)
Get provided installed extension backward dependencies in the provided namespace.
|
org.xwiki.extension.InstalledExtension |
getInstalledExtension(String feature,
String namespace)
Get the extension handler corresponding to the given installed extension ID or feature (virtual ID) provided by
the extension and namespace.
|
Collection<org.xwiki.extension.InstalledExtension> |
getInstalledExtensions()
Get a list of all currently installed extensions.
|
Collection<org.xwiki.extension.InstalledExtension> |
getInstalledExtensions(String namespace)
Return all the extensions available for the provide namespace.
|
org.xwiki.extension.repository.InstalledExtensionRepository |
getRepository() |
contextualize, fromWikitoNamespace, getCallerDocument, getJobStatus, getLastError, safe, safeWrapError, setError, setRightsProperties, toWikiId, wrapError
public static final String ID
ScriptService
.public org.xwiki.extension.repository.InstalledExtensionRepository getRepository()
public Collection<org.xwiki.extension.InstalledExtension> getInstalledExtensions()
public Collection<org.xwiki.extension.InstalledExtension> getInstalledExtensions(String namespace)
This doesn't include core extensions, only extension installed through the API.
namespace
- the target namespace for which to retrieve the list of installed extensionspublic org.xwiki.extension.InstalledExtension getInstalledExtension(String feature, String namespace)
The returned handler can be used to get more information about the extension, such as the authors, an extension description, its license...
feature
- the extension id or provided feature (virtual extension) of the extension to resolvenamespace
- the optional namespace where the extension should be installednull
if the extension isn't
installed in the target namespacepublic Map<String,Collection<org.xwiki.extension.InstalledExtension>> getBackwardDependencies(String feature)
feature
- the extension id or provided feature (virtual extension) of the extension to resolvenull
if any error occurs while computing
the result, in which case AbstractExtensionScriptService.getLastError()
contains the failure reasonpublic Map<String,Collection<org.xwiki.extension.InstalledExtension>> getBackwardDependencies(org.xwiki.extension.ExtensionId extensionId)
extensionId
- the extension identifiernull
if any error occurs while
computing the result, in which case AbstractExtensionScriptService.getLastError()
contains the failure reasonpublic Collection<org.xwiki.extension.InstalledExtension> getBackwardDependencies(String feature, String namespace)
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 dependenciesnull
if any error
occurs while computing the result, in which case AbstractExtensionScriptService.getLastError()
contains the failure reasonCopyright © 2004–2021 XWiki. All rights reserved.