Package net.shibboleth.idp.installer.impl

# Class V5Install

java.lang.Object
net.shibboleth.idp.installer.impl.V5Install

public class V5Install extends Object
Code to do most of the V4 Install.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private class`
`V5Install.Initializer`
An `ApplicationContextInitializer` which knows about our idp.home and also injects properties for the backchannel certificate and hostname.
`private class`
`V5Install.KeyManagement`
Create (if needs be) all the keys needed by an install.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final CurrentInstallState`
`currentState`
Current Install.
`private final org.apache.hc.client5.http.classic.HttpClient`
`httpClient`
The HttpClient to use.
`private final HttpClientSecurityParameters`
`httpClientSecurityParameters`
The Injected security parameters.
`private final InstallerPropertiesImpl`
`installerProps`
Installer Properties.
`private final V5Install.KeyManagement`
`keyManager`
Key Manager.
`private final org.slf4j.Logger`
`log`
Log.
`private ModuleContext`
`theModuleContext`
Local cache of the module Context.

## Constructor Summary

Constructors
Constructor
Description
`V5Install(InstallerPropertiesImpl props, CurrentInstallState installState, org.apache.hc.client5.http.classic.HttpClient client, HttpClientSecurityParameters securityParams)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`checkPreConditions()`
Check for any preconditions to the install.
`private void`
`checkWebXml(Path webXml)`
If it exists check web.xml for deprecated content.
`protected void`
`deleteSpuriousFiles()`
Delete those files which were created but not needed.
`protected void`
`enableCoreModules()`
Enable Core modules if this is a new install.
`protected void`
`enableModules()`
ReEnable modules which were already enabled.
`private ModuleContext`
`ensureModuleContext()`
Build an appropriate `ModuleContext` , cache it and return it.
`void`
`execute()`
Method to do the work.
`protected void`
`generateMetadata()`
Create and populate (if it does not exist) the "metadata/idp-metadata.xml" file.
`private Properties`
`getIdPReplacements()`
Create the properties we need to replace when we merge idp.properties.
`protected void`
`handleVersioning()`
Report the to be installed and (if there is one) current versions.
`protected void`
`populatePropertyFiles()`
Modify the idp.properties and ldap.properties, then create secrets.properties.
`protected void`
`reprotect()`
Set the protection on the files.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Log.

### installerProps

@Nonnull private final InstallerPropertiesImpl installerProps
Installer Properties.

### currentState

@Nonnull private final CurrentInstallState currentState
Current Install.

### keyManager

@Nonnull private final V5Install.KeyManagement keyManager
Key Manager.

### httpClient

@Nonnull private final org.apache.hc.client5.http.classic.HttpClient httpClient
The HttpClient to use.

### httpClientSecurityParameters

@Nullable private final HttpClientSecurityParameters httpClientSecurityParameters
The Injected security parameters.

### theModuleContext

@Nullable private ModuleContext theModuleContext
Local cache of the module Context.

## Constructor Details

### V5Install

public V5Install(@Nonnull InstallerPropertiesImpl props, @Nonnull CurrentInstallState installState, @Nonnull org.apache.hc.client5.http.classic.HttpClient client, @Nullable HttpClientSecurityParameters securityParams)
Constructor.

Parameters:
  `props` - The properties to drive the installs.
  `installState` - The current install.
  `client` - `HttpClient` to use on any Plugin operations
  `securityParams` - `HttpClientSecurityParameters` to use on any Plugin operations

## Method Details

### 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.

### 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

### getIdPReplacements

private Properties getIdPReplacements()
Create the properties we need to replace when we merge idp.properties.

Returns:
  what we need to replace

### populatePropertyFiles

protected void populatePropertyFiles() throws org.apache.tools.ant.BuildException
Modify the idp.properties and ldap.properties, then create secrets.properties.

Throws:
  `org.apache.tools.ant.BuildException` - if badness occurs

### checkWebXml

private void checkWebXml(Path webXml) throws org.apache.tools.ant.BuildException
If it exists check web.xml for deprecated content.

Parameters:
  `webXml` - the path of the file We do this in a very simplistic fashion at first
Throws:
  `org.apache.tools.ant.BuildException` - if we have problems handling the web.xml file

### ensureModuleContext

@Nonnull private ModuleContext ensureModuleContext()
Build an appropriate `ModuleContext` , cache it and return it.

Returns:
  a guaranteed not null context

### enableCoreModules

protected void enableCoreModules() throws org.apache.tools.ant.BuildException
Enable Core modules if this is a new install.

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