Package org.xwiki.extension.handler
Interface ExtensionValidator
Check if executing a given action on a passed extension is allowed.
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).
- Since:
- 4.2M2
- Version:
- $Id: dfa9ed14ccebd50bbf7305a1067f58dde656222f $
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Method Details
-
checkInstall
void checkInstall(Extension extension, String namespace, org.xwiki.job.Request request) throws InstallException Check if installing the passed extension is allowed.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.).
- Parameters:
extension
- the extension to installnamespace
- the namespace from where to installrequest
- extra parameters- Throws:
InstallException
- installing the extension will fail
-
checkUninstall
void checkUninstall(InstalledExtension extension, String namespace, org.xwiki.job.Request request) throws UninstallException Check if uninstalling the passed extension is allowed.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.).
- Parameters:
extension
- the extension to uninstallnamespace
- the namespace from where to uninstallrequest
- extra parameters- Throws:
UninstallException
- uninstalling the extension will fail
-