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 void
close()
Cleans up any registered hooksboolean
execute(InstallContext context)
Executes the registered hooks with the currentInstallContext.Phase
.boolean
hasHooks()
Checks if this process has any hooks registered.void
registerHook(VaultInputSource input, ClassLoader classLoader)
Register the hook provided by the given input source.void
registerHooks(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:InstallHookProcessor
Register all hooks found in the given archive.- Specified by:
registerHooks
in 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:InstallHookProcessor
Register the hook provided by the given input source.- Specified by:
registerHook
in 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:InstallHookProcessor
Checks if this process has any hooks registered.- Specified by:
hasHooks
in interfaceInstallHookProcessor
- Returns:
true
if there are hooks registered.
-
execute
public boolean execute(InstallContext context)
Description copied from interface:InstallHookProcessor
Executes the registered hooks with the currentInstallContext.Phase
.- Specified by:
execute
in interfaceInstallHookProcessor
- Parameters:
context
- the context- Returns:
true
if successful.
-
close
public void close() throws IOException
Description copied from interface:InstallHookProcessor
Cleans up any registered hooks- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceInstallHookProcessor
- Throws:
IOException
-
-