@Role public interface ExtensionValidator
Mostly used for default behavior when ExtensionHandler
does not have any special check for its type. The goal
is to make easy for any environment using commons-extension module to have a default restriction on all extensions
types (for example in XWiki unless the type has special checking you need programming right to install an extension).
Modifier and Type | Method and Description |
---|---|
void |
checkInstall(Extension extension,
String namespace,
org.xwiki.job.Request request)
Check if installing the passed extension is allowed.
|
void |
checkUninstall(InstalledExtension extension,
String namespace,
org.xwiki.job.Request request)
Check if uninstalling the passed extension is allowed.
|
void checkInstall(Extension extension, String namespace, org.xwiki.job.Request request) throws InstallException
It is generally used to do some non generic checking of whether or not it is possible to install the passed extension (not the right environment, not enough rights, etc.).
extension
- the extension to installnamespace
- the namespace from where to installrequest
- extra parametersInstallException
- installing the extension will failvoid checkUninstall(InstalledExtension extension, String namespace, org.xwiki.job.Request request) throws UninstallException
It is generally used to do some non generic checking of whether or not it is possible to uninstall the passed extension (not the right environment, not enough rights, etc.).
extension
- the extension to uninstallnamespace
- the namespace from where to uninstallrequest
- extra parametersUninstallException
- uninstalling the extension will failCopyright © 2004–2021 XWiki. All rights reserved.