Package org.xwiki.extension.handler
Interface ExtensionHandler
-
@Role public interface ExtensionHandler
Handle extension related tasks depending of the type (install, uninstall, etc...).- Since:
- 4.0M1
- Version:
- $Id: d9c3dd8352957f07c51a9b1f24eae1df42764aea $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method 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
initialize(LocalExtension localExtension, String namespace)
Initialize the provided local extension (during application startup, re-initialization...).void
install(LocalExtension localExtension, String namespace, org.xwiki.job.Request request)
Install the provided local extension.void
uninstall(InstalledExtension localExtension, String namespace, org.xwiki.job.Request request)
Uninstall the provided local extension.void
uninstall(LocalExtension localExtension, String namespace, org.xwiki.job.Request request)
Deprecated.starting with 5.ORC1 useuninstall(InstalledExtension, String, Request)
insteadvoid
upgrade(Collection<InstalledExtension> previousLocalExtensions, LocalExtension newLocalExtension, String namespace, org.xwiki.job.Request request)
Upgrade the provided local extension.void
upgrade(LocalExtension previousLocalExtension, LocalExtension newLocalExtension, String namespace, org.xwiki.job.Request request)
Deprecated.starting with 5.0RC1 useupgrade(Collection, LocalExtension, String, Request)
-
-
-
Method Detail
-
install
void install(LocalExtension localExtension, String namespace, org.xwiki.job.Request request) throws InstallException
Install the provided local extension.- Parameters:
localExtension
- the extension to installnamespace
- the namespace where to install the extensionrequest
- extra parameters- Throws:
InstallException
- error when trying to install the extension
-
uninstall
@Deprecated void uninstall(LocalExtension localExtension, String namespace, org.xwiki.job.Request request) throws UninstallException
Deprecated.starting with 5.ORC1 useuninstall(InstalledExtension, String, Request)
insteadUninstall the provided local extension.- Parameters:
localExtension
- the extension to uninstallnamespace
- the namespace from where to uninstall the extensionrequest
- extra parameters- Throws:
UninstallException
- error when trying to uninstall the extension
-
uninstall
void uninstall(InstalledExtension localExtension, String namespace, org.xwiki.job.Request request) throws UninstallException
Uninstall the provided local extension.- Parameters:
localExtension
- the extension to uninstallnamespace
- the namespace from where to uninstall the extensionrequest
- extra parameters- Throws:
UninstallException
- error when trying to uninstall the extension- Since:
- 5.0RC1
-
upgrade
@Deprecated void upgrade(LocalExtension previousLocalExtension, LocalExtension newLocalExtension, String namespace, org.xwiki.job.Request request) throws InstallException
Deprecated.starting with 5.0RC1 useupgrade(Collection, LocalExtension, String, Request)
Upgrade the provided local extension.- Parameters:
previousLocalExtension
- the previous installed version of the extensionnewLocalExtension
- the extension to installnamespace
- the namespace from where to uninstall the extensionrequest
- extra parameters- Throws:
InstallException
- error when trying to upgrade the extension
-
upgrade
void upgrade(Collection<InstalledExtension> previousLocalExtensions, LocalExtension newLocalExtension, String namespace, org.xwiki.job.Request request) throws InstallException
Upgrade the provided local extension.- Parameters:
previousLocalExtensions
- the previous installed versions of the extensionnewLocalExtension
- the extension to installnamespace
- the namespace from where to uninstall the extensionrequest
- extra parameters- Throws:
InstallException
- error when trying to upgrade the extension- Since:
- 5.0RC1
-
initialize
void initialize(LocalExtension localExtension, String namespace) throws ExtensionException
Initialize the provided local extension (during application startup, re-initialization...).- Parameters:
localExtension
- the extension to installnamespace
- the namespace where to install the extension- Throws:
ExtensionException
- error when trying to install the extension
-
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- Since:
- 4.2M2
-
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- Since:
- 4.2M2
-
-