Class V5Install
java.lang.Object
net.shibboleth.idp.installer.impl.V5Install
Code to do most of the V4 Install.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classAnApplicationContextInitializerwhich knows about our idp.home and also injects properties for the backchannel certificate and hostname.private classCreate (if needs be) all the keys needed by an install. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CurrentInstallStateCurrent Install.private final org.apache.hc.client5.http.classic.HttpClientThe HttpClient to use.private final HttpClientSecurityParametersThe Injected security parameters.private final InstallerPropertiesInstaller Properties.private final V5Install.KeyManagementKey Manager.private final org.slf4j.LoggerLog. -
Constructor Summary
ConstructorsConstructorDescriptionV5Install(InstallerProperties props, CurrentInstallState installState, org.apache.hc.client5.http.classic.HttpClient client, HttpClientSecurityParameters securityParams) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCheck for any preconditions to the install.private voidcheckWebXml(Path webXml) If it exists check web.xml for deprecated content.protected voidDelete those files which were created but not needed.protected voidEnable Core modules if this is a new install.protected voidReEnable modules which were already enabled.voidexecute()Method to do the work.protected voidCreate and populate (if it does not exist) the "metadata/idp-metadata.xml" file.private PropertiesCreate the properties we need to replace when we merge idp.properties.protected voidReport the to be installed and (if there is one) current versions.protected voidModify the idp.properties and ldap.properties, then create secrets.properties.protected voidSet the protection on the files.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLog. -
installerProps
Installer Properties. -
currentState
Current Install. -
keyManager
Key Manager. -
httpClient
@Nonnull private final org.apache.hc.client5.http.classic.HttpClient httpClientThe HttpClient to use. -
httpClientSecurityParameters
The Injected security parameters.
-
-
Constructor Details
-
V5Install
public V5Install(@Nonnull InstallerProperties 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-HttpClientto use on any Plugin operationssecurityParams-HttpClientSecurityParametersto use on any Plugin operations
-
-
Method Details
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionMethod 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.BuildExceptionCheck 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.BuildExceptionReport 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
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.BuildExceptionModify the idp.properties and ldap.properties, then create secrets.properties.- Throws:
org.apache.tools.ant.BuildException- if badness occurs
-
checkWebXml
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
-
enableCoreModules
protected void enableCoreModules() throws org.apache.tools.ant.BuildExceptionEnable 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.BuildExceptionReEnable modules which were already enabled.- Throws:
org.apache.tools.ant.BuildException- if badness occurs
-
deleteSpuriousFiles
protected void deleteSpuriousFiles() throws org.apache.tools.ant.BuildExceptionDelete 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.BuildExceptionCreate 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.BuildExceptionSet the protection on the files.- Throws:
org.apache.tools.ant.BuildException- if badness occurs
-