Class CurrentInstallState
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.installer.impl.CurrentInstallState
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent
Tells the installers about the current install state.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String[][]The files we will delete if they created on upgrade.The module IDs which are enabled.private booleanWhether the IdP properties file exists.private ClassLoaderThe classloader for "us plus the plugins in the target".private booleanWhether the LDAP properties file exists.private final org.slf4j.LoggerClass logger.private StringOld Version.The files to delete after an upgrade.private final PathWhere we are installing to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprivate voidPopulate {enabledModulesfrom the current classpath and the new IdP home.private voidWork out what the "current" install state is (before we do any more work).Get the module IDs that are enabled.Get class loader for installed plugin detection.Get installed IdP version.Get list of paths to delete.booleanGet whether the idp.properties file is present.booleanGet whether the ldap.properties file is present.Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
targetDir
Where we are installing to. -
deleteAfterUpgrades
The files we will delete if they created on upgrade. -
enabledModules
The module IDs which are enabled. -
idpPropertiesPresent
private boolean idpPropertiesPresentWhether the IdP properties file exists. -
ldapPropertiesPresent
private boolean ldapPropertiesPresentWhether the LDAP properties file exists. -
oldVersion
Old Version. -
pathsToDelete
The files to delete after an upgrade. -
installedPluginsLoader
The classloader for "us plus the plugins in the target".
-
-
Constructor Details
-
CurrentInstallState
Constructor.- Parameters:
installerProps- the installer situation.
-
-
Method Details
-
findPreviousVersion
Work out what the "current" install state is (before we do any more work).- Throws:
ComponentInitializationException- if we find a strange state
-
findEnabledModules
Populate {enabledModulesfrom the current classpath and the new IdP home.- Throws:
IOException- if we cannot convert a path to a URL
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
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
Get list of paths to delete.- Returns:
- list of paths to delete
-
getEnabledModules
Get the module IDs that are enabled.- Returns:
- enabled module IDs
-
getInstalledPluginsLoader
Get class loader for installed plugin detection.- Returns:
- class loader
-