Class InstallHookProcessorImpl
- java.lang.Object
-
- org.apache.jackrabbit.vault.packaging.impl.InstallHookProcessorImpl
-
- All Implemented Interfaces:
Closeable,AutoCloseable,InstallHookProcessor
public class InstallHookProcessorImpl extends Object implements InstallHookProcessor
processor for install hooks
-
-
Constructor Summary
Constructors Constructor Description InstallHookProcessorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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.
-
-
-
Method Detail
-
registerHooks
public void registerHooks(Archive archive, ClassLoader classLoader) throws PackageException
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
public boolean execute(InstallContext context)
Description copied from interface:InstallHookProcessorExecutes the registered hooks with the currentInstallContext.Phase.- Specified by:
executein interfaceInstallHookProcessor- Parameters:
context- the context- Returns:
trueif successful.
-
close
public void close() throws IOExceptionDescription copied from interface:InstallHookProcessorCleans up any registered hooks- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceInstallHookProcessor- Throws:
IOException
-
-