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
    • 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)
      props - The properties to drive the installs.
      installState - The current install.
  • Method Details

    • doInitialize

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

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

      public void setMetadataGenerator(MetadataGenerator what)
      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
      Check for any preconditions to the install.
      Throws: - if one is broken.
    • handleVersioning

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

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

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

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

      protected void handleEditWebApp() throws
      Create and populate (if it does not exist) edit-webapp.
      Throws: - if badness occurs
    • checkWebXml

      private void checkWebXml(Path webXml) throws
      If it exists check web.xml for deprecated content.
      webXml - the path of the file We do this in a very simplistic fashion at first
      Throws: - if we have problems handling the web.xml file
    • populateUserDirectories

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

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

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

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

      protected void reprotect() throws
      Set the protection on the files.
      Throws: - if badness occurs