Class CurrentInstallState

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.installer.impl.CurrentInstallState
All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent

public final class CurrentInstallState extends AbstractInitializableComponent
Tells the installers about the current install state.
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • targetDir

      @Nonnull private final Path targetDir
      Where we are installing to.
    • deleteAfterUpgrades

      @Nonnull private final String[][] deleteAfterUpgrades
      The files we will delete if they created on upgrade.
    • enabledModules

      @Nonnull private Set<String> enabledModules
      The module IDs which are enabled.
    • idpPropertiesPresent

      private boolean idpPropertiesPresent
      Whether the IdP properties file exists.
    • ldapPropertiesPresent

      private boolean ldapPropertiesPresent
      Whether the LDAP properties file exists.
    • oldVersion

      @Nullable private String oldVersion
      Old Version.
    • pathsToDelete

      @NonnullAfterInit private List<Path> pathsToDelete
      The files to delete after an upgrade.
    • installedPluginsLoader

      @Nullable private ClassLoader installedPluginsLoader
      The classloader for "us plus the plugins in the target".
  • Constructor Details

    • CurrentInstallState

      public CurrentInstallState(InstallerProperties installerProps)
      Constructor.
      Parameters:
      installerProps - the installer situation.
  • Method Details

    • findPreviousVersion

      private void findPreviousVersion() throws ComponentInitializationException
      Work out what the "current" install state is (before we do any more work).
      Throws:
      ComponentInitializationException - if we find a strange state
    • findEnabledModules

      private void findEnabledModules() throws IOException
      Populate {enabledModules from the current classpath and the new IdP home.
      Throws:
      IOException - if we cannot convert a path to a URL
    • doInitialize

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

      @Nullable public String getInstalledVersion()
      Get installed IdP version.
      Returns:
      installed version
    • isIdPPropertiesPresent

      public boolean isIdPPropertiesPresent()
      Get whether the idp.properties file is present.
      Returns:
      whether the idp.properties file is present
    • isLDAPPropertiesPresent

      public boolean isLDAPPropertiesPresent()
      Get whether the ldap.properties file is present.
      Returns:
      whether the ldap.properties file is present
    • getPathsToBeDeleted

      @Nonnull public List<Path> getPathsToBeDeleted()
      Get list of paths to delete.
      Returns:
      list of paths to delete
    • getEnabledModules

      @Nonnull public Collection<String> getEnabledModules()
      Get the module IDs that are enabled.
      Returns:
      enabled module IDs
    • getInstalledPluginsLoader

      @Nullable public ClassLoader getInstalledPluginsLoader()
      Get class loader for installed plugin detection.
      Returns:
      class loader