|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwiki.extension.handler.internal.AbstractExtensionHandler
public abstract class AbstractExtensionHandler
Base class for ExtensionHandler
implementations.
Field Summary | |
---|---|
protected org.slf4j.Logger |
logger
The logger to log. |
Constructor Summary | |
---|---|
AbstractExtensionHandler()
|
Method Summary | |
---|---|
void |
checkInstall(Extension extension,
String namespace,
Request request)
Check if installing the passed extension is allowed. |
void |
checkUninstall(InstalledExtension extension,
String namespace,
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 |
upgrade(LocalExtension previousLocalExtension,
LocalExtension newLocalExtension,
String namespace,
Request request)
Upgrade the provided local extension. |
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.handler.ExtensionHandler |
---|
install, uninstall |
Field Detail |
---|
@Inject protected org.slf4j.Logger logger
Constructor Detail |
---|
public AbstractExtensionHandler()
Method Detail |
---|
public void upgrade(LocalExtension previousLocalExtension, LocalExtension newLocalExtension, String namespace, Request request) throws InstallException
ExtensionHandler
upgrade
in interface ExtensionHandler
previousLocalExtension
- the previous installed version of the extensionnewLocalExtension
- the extension to installnamespace
- the namespace from where to uninstall the extensionrequest
- extra parameters
InstallException
- error when trying to upgrade the extensionpublic void initialize(LocalExtension localExtension, String namespace) throws ExtensionException
ExtensionHandler
initialize
in interface ExtensionHandler
localExtension
- the extension to installnamespace
- the namespace where to install the extension
ExtensionException
- error when trying to install the extensionpublic void checkInstall(Extension extension, String namespace, Request request) throws InstallException
ExtensionHandler
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.).
checkInstall
in interface ExtensionHandler
extension
- the extension to installnamespace
- the namespace from where to installrequest
- extra parameters
InstallException
- installing the extension will failpublic void checkUninstall(InstalledExtension extension, String namespace, Request request) throws UninstallException
ExtensionHandler
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.).
checkUninstall
in interface ExtensionHandler
extension
- the extension to uninstallnamespace
- the namespace from where to uninstallrequest
- extra parameters
UninstallException
- uninstalling the extension will fail
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |