Class InstallHookProcessorImpl
java.lang.Object
org.apache.jackrabbit.vault.packaging.impl.InstallHookProcessorImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,InstallHookProcessor
processor for install hooks
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Cleans up any registered hooksbooleanexecute(InstallContext context) Executes the registered hooks with the currentInstallContext.Phase.booleanhasHooks()Checks if this process has any hooks registered.voidregisterHook(VaultInputSource input, ClassLoader classLoader) Register the hook provided by the given input source.voidregisterHooks(Archive archive, ClassLoader classLoader) Register all hooks found in the given archive.
-
Constructor Details
-
InstallHookProcessorImpl
public InstallHookProcessorImpl()
-
-
Method Details
-
registerHooks
Description copied from interface:InstallHookProcessorRegister all hooks found in the given archive.- Specified by:
registerHooksin interfaceInstallHookProcessor- Parameters:
archive- the archive.classLoader- the class loader- Throws:
PackageException- if an error occurs.
-
registerHook
public void registerHook(VaultInputSource input, ClassLoader classLoader) throws IOException, PackageException Description copied from interface:InstallHookProcessorRegister the hook provided by the given input source.- Specified by:
registerHookin interfaceInstallHookProcessor- Parameters:
input- a vault input source containing the jar file of the install hookclassLoader- the class loader- Throws:
IOException- if an I/O error occursPackageException- if an error occurs.
-
hasHooks
public boolean hasHooks()Description copied from interface:InstallHookProcessorChecks if this process has any hooks registered.- Specified by:
hasHooksin interfaceInstallHookProcessor- Returns:
trueif there are hooks registered.
-
execute
Description copied from interface:InstallHookProcessorExecutes the registered hooks with the currentInstallContext.Phase.- Specified by:
executein interfaceInstallHookProcessor- Parameters:
context- the context- Returns:
trueif successful.
-
close
Description copied from interface:InstallHookProcessorCleans up any registered hooks- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceInstallHookProcessor- Throws:
IOException
-