Interface InstallHookProcessor


  • public interface InstallHookProcessor
    The install hook processor is used for handle the install hooks, from registration to execution.
    • Method Detail

      • registerHooks

        void registerHooks​(Archive archive,
                           java.lang.ClassLoader classLoader)
                    throws PackageException
        Register all hooks found in the given archive.
        Parameters:
        archive - the archive.
        classLoader - the class loader
        Throws:
        PackageException - if an error occurs.
      • registerHook

        void registerHook​(VaultInputSource input,
                          java.lang.ClassLoader classLoader)
                   throws java.io.IOException,
                          PackageException
        Register the hook provided by the given input source.
        Parameters:
        input - a vault input source containing the jar file of the install hook
        classLoader - the class loader
        Throws:
        java.io.IOException - if an I/O error occurs
        PackageException - if an error occurs.
      • hasHooks

        boolean hasHooks()
        Checks if this process has any hooks registered.
        Returns:
        true if there are hooks registered.
      • execute

        boolean execute​(InstallContext context)
        Executes the registered hooks with the current InstallContext.Phase.
        Parameters:
        context - the context
        Returns:
        true if successful.