JCRVLT-492 document install hooks (#115)

diff --git a/vault-doc/src/site/markdown/installhooks.md b/vault-doc/src/site/markdown/installhooks.md
new file mode 100644
index 0000000..a1c9f61
--- /dev/null
+++ b/vault-doc/src/site/markdown/installhooks.md
@@ -0,0 +1,47 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+Content Package Install Hooks
+================
+
+Overview
+------
+Install hooks are just Java classes which are called during package installation. One can use them to execute arbitrary operations automatically on certain stages during package import.
+
+Install hooks must implement the interface [`org.apache.jackrabbit.vault.packaging.InstallHook`][api.InstallHook].
+
+
+Internal Install Hooks
+------
+The internal install hooks have to be packaged as JARs and placed in `META-INF/vault/hooks` within the content package. The JAR needs to have a [`Main-Class` attribute in its manifest](https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#Main_Attributes) pointing to the hook class. 
+
+
+External Install Hooks
+-----
+External install hooks are loaded through the class loader by their fully qualified class name. The class name is given in the [package property](properties.html) `installhook.<name>.class` where `<name>` is an arbitrary string (must not contain a dot).
+
+The following class loaders are used by default to load the given class:
+
+1. The class loader which loaded the `InstallHookProcessorImpl` class (in an OSGi container this is the bundle class loader of the FileVault bundle)
+2. The [context class loader of the current thread](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#getContextClassLoader--).
+
+The class loader can be overridden by calling [`ImportOptions.setHookClassLoader(...)`][api.ImportOptions] and pass the import options then to the package importer.
+
+You must make sure that the external install hook class is accessible from the used class loader.
+
+[api.InstallHook]: apidocs/org/apache/jackrabbit/vault/packaging/InstallHook.html
+[api.ImportOptions]: apidocs/org/apache/jackrabbit/vault/fs/io/ImportOptions.html
\ No newline at end of file
diff --git a/vault-doc/src/site/markdown/metadata.md b/vault-doc/src/site/markdown/metadata.md
index ba916a1..418edbb 100644
--- a/vault-doc/src/site/markdown/metadata.md
+++ b/vault-doc/src/site/markdown/metadata.md
@@ -28,4 +28,5 @@
 * [Settings (settings.xml)](settings.html), optional
 * [Nodetypes (*.cnd)](nodetypes.html), optional
 * [Privileges (privileges.xml)](privileges.html), optional
+* [Install Hooks](installhooks.html), optional
 * Package Definition (definition/.content.xml), TODO, optional
\ No newline at end of file
diff --git a/vault-doc/src/site/markdown/properties.md b/vault-doc/src/site/markdown/properties.md
index fc95ece..95f2b6d 100644
--- a/vault-doc/src/site/markdown/properties.md
+++ b/vault-doc/src/site/markdown/properties.md
@@ -78,7 +78,7 @@
 | subPackageHandling | see [SubPackageHandling][api.SubPackageHandling] | no | `*;install`
 | useBinaryReferences | If set to `true` indicates that binary references should be used instead of the actual binary | no | `false`
 | packageType | Possible values: <ul><li>`application`: An application package consists purely of application content. It serializes entire subtrees with no inclusion or exclusion filters. it does not contain any subpackages nor OSGi configuration or bundles.</li><li>`content`: A content package consists only of content and user defined configuration. It usually serializes entire subtrees but can contain inclusion or exclusion filters. it does not contain any subpackages nor OSGi configuration or bundles.</li><li>`container`: A container package only contains sub packages and OSGi configuration and bundles. The container package is only used as container for deployment.</li><li>`mixed`: Catch all type for a combination of the above.</li></ul>Compare with [JCRVLT-170](https://issues.apache.org/jira/browse/JCRVLT-170) | no | ?
-| installhook.* | The FQN of the class which acts as an InstallHook (code being executed while this package is being installed) | no | n/a
+| installhook.\<name\>.class | The FQN of the class which acts as an [install hook](installhooks.html). The `<name>` can be an arbitrary string (but must not contain a dot). | no | n/a
 | packageFormatVersion | The version of this package as integer value. Versions newer than 2 are not yet supported during installation. | no | 2
 | allowIndexDefinitions | If set to `true` indicates that the package contains an [Oak Index Definition](https://jackrabbit.apache.org/oak/docs/query/indexing.html#index-defnitions). Otherwise the package is not supposed to contain an index definition. This may be important to know prior to installation as installing/updating an index definition might have a severe performance impact especially on large repositories| no | false
 | groupId | The Maven groupId of the underlying Maven module from which this package was built. Only set if built via the [FileVault Package Maven Plugin](https://jackrabbit.apache.org/filevault-package-maven-plugin/index.html) | no | n/a
diff --git a/vault-doc/src/site/site.xml b/vault-doc/src/site/site.xml
index 6f678c9..65acf97 100644
--- a/vault-doc/src/site/site.xml
+++ b/vault-doc/src/site/site.xml
@@ -42,6 +42,7 @@
         <item href="settings.html" name="Settings"/>
         <item href="nodetypes.html" name="Nodetypes"/>
         <item href="privileges.html" name="Privileges"/>
+        <item href="installhooks.html" name="Install Hooks"/>
      </item>
       <item href="rcp.html" name="Vault Remote Copy" />
     </menu>