The Installer is written in Java.  It presented to the end user via an ant script with three "targets":

The ant script combines these appropriately 

These targets prompt for user input, with it being possible to use properties to provide values - ultimately allowing for an unattended install.

However it is quite possible to write Java code  control the installation operation.

Extending the Installer Programmatically

NOTE than in V5 it will no longer be possible to programatically extend the Installer. Property driven installs will still be supported.

The main point of extension is the InstallerProperties interface and the concrete (and extendable) InstallerPropertiesImpl class. This encapsulates everything about the install and the shipped implementation consults properties or the user in the same way that the current ant based build does. It is extremely likely that InstallerProperties will be extended during the life of V4 with suitable default methods. For instance slip-streaming in a case such as  would be done this way.

Installation classes

The classes which do the work of the install are

The install-nocopy target implemented by calling V4Install  and then BuildWar. The install target is implemented by calling all three.

These are also API classes, but they are "locked down" and not suitable for extension:

The idea is that these functions may be called, but not extended. This gives us room to make more changes to their implementation during the life of V4.

Support Classes

The support classes are not intended for extension without the Shibboleth project and are all marked final. Where made possible by the rest of our code base their methods are marked protected. The classes are:

Metadata Generation

The V4Install class also has a method setMetadataGenerator(MetadataGenerator) where MetadataGenerator is a public interface with three methods

  1. setOutput(@Nonnull File where) which sets where the file is to be generated.

  2. setParameters(@Nonnull final MetadataGeneratorParameters what) which sets the parameters from which the metadata may be generated

  3. generate() to write the metadata file

The setMetadataGenerator method is defaulted suitably.

The installation process will call initialize on any injected MetadataGenerator after setting the output and the parameters.

You can implement your own metadata generation by implementing a MetadataGenerator and installing it appropriately.

Property-Driven Install

PropertyDrivenInstallation is an easier way to affect much if the installation behavior.