Class V4Install

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent

public class V4Install
extends AbstractInitializableComponent
Code to do most of the V4 Install.
  • Field Details

    • log

      private final org.slf4j.Logger log
      Log.
    • installerProps

      @Nonnull private final InstallerProperties installerProps
      Installer Properties.
    • currentState

      @Nonnull private final CurrentInstallState currentState
      Current Install.
    • keyManager

      @Nonnull private final V4Install.KeyManagement keyManager
      Key Manager.
    • metadataGenerator

      private MetadataGenerator metadataGenerator
      What will generate metadata?
  • Constructor Details

    • V4Install

      public V4Install​(@Nonnull InstallerProperties props, @Nonnull CurrentInstallState installState)
      Constructor.
      Parameters:
      props - The properties to drive the installs.
      installState - The current install.
  • Method Details

    • doInitialize

      protected void doInitialize() throws ComponentInitializationException
      Overrides:
      doInitialize in class AbstractInitializableComponent
      Throws:
      ComponentInitializationException
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Method to do the work. It assumes that the distribution has been copied.
      Throws:
      org.apache.tools.ant.BuildException - if unexpected badness occurs.
    • setMetadataGenerator

      public void setMetadataGenerator​(MetadataGenerator what)
      Parameters:
      what - what to set. This need not have been initialized yet MetadataGenerator.setOutput(File) and MetadataGenerator.setParameters(MetadataGeneratorParameters) are called prior to initialization.
    • checkPreConditions

      protected void checkPreConditions() throws org.apache.tools.ant.BuildException
      Check for any preconditions to the install.
      Throws:
      org.apache.tools.ant.BuildException - if one is broken.
    • handleVersioning

      protected void handleVersioning() throws org.apache.tools.ant.BuildException
      Report the to be installed and (if there is one) current versions. Write to be installed version to the dist folder.
      Throws:
      org.apache.tools.ant.BuildException - if the write fails
    • createUserDirectories

      protected void createUserDirectories() throws org.apache.tools.ant.BuildException
      Create (if they do not exist) the user editable folders, suitable for later population during update or install.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • getIdPReplacements

      private Properties getIdPReplacements​(boolean sealerCreated)
      Create the properties we need to replace when we merge idp.properties.
      Parameters:
      sealerCreated - have we just created a sealer
      Returns:
      what we need to replace
    • populatePropertyFiles

      protected void populatePropertyFiles​(boolean sealerCreated) throws org.apache.tools.ant.BuildException
      Create (if they do not exist) propertyFiles. (idp.properties, ldap.properties). This *MUST* happen before populateUserDirectories() or it will not be effective. Note that in V3 serice.properties and nameid.properties but we do not any more.
      Parameters:
      sealerCreated - have we just created a sealer
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • handleEditWebApp

      protected void handleEditWebApp() throws org.apache.tools.ant.BuildException
      Create and populate (if it does not exist) edit-webapp.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • populateUserDirectories

      protected void populateUserDirectories() throws org.apache.tools.ant.BuildException
      Create and populate (if they not exist) the "user visible" folders. (conf, flows, messages, views, logs)
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • enableModules

      protected void enableModules() throws org.apache.tools.ant.BuildException
      ReEnable modules which were already enabled.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • deleteSpuriousFiles

      protected void deleteSpuriousFiles() throws org.apache.tools.ant.BuildException
      Delete those files which were created but not needed.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • generateMetadata

      protected void generateMetadata() throws org.apache.tools.ant.BuildException
      Create and populate (if it does not exist) the "metadata/idp-metadata.xml" file.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs
    • reprotect

      protected void reprotect() throws org.apache.tools.ant.BuildException
      Set the protection on the files.
      Throws:
      org.apache.tools.ant.BuildException - if badness occurs