Package net.shibboleth.idp.installer
Class V4Install
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.installer.V4Install
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
Code to do most of the V4 Install.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
AnApplicationContextInitializer
which knows about our idp.home and also injects properties for the backchannel certificate and hostname.private class
Create (if needs be) all the keys needed by an install. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CurrentInstallState
Current Install.private final InstallerProperties
Installer Properties.private final V4Install.KeyManagement
Key Manager.private final org.slf4j.Logger
Log.private MetadataGenerator
What will generate metadata? -
Constructor Summary
ConstructorsConstructorDescriptionV4Install
(InstallerProperties props, CurrentInstallState installState) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Check for any preconditions to the install.private void
checkWebXml
(Path webXml) If it exists check web.xml for deprecated content.protected void
Create (if they do not exist) the user editable folders, suitable for later population during update or install.protected void
Delete those files which were created but not needed.protected void
protected void
ReEnable modules which were already enabled.void
execute()
Method to do the work.protected void
Create and populate (if it does not exist) the "metadata/idp-metadata.xml" file.private Properties
getIdPReplacements
(boolean sealerCreated) Create the properties we need to replace when we merge idp.properties.protected void
Create and populate (if it does not exist) edit-webapp.protected void
Report the to be installed and (if there is one) current versions.protected void
populatePropertyFiles
(boolean sealerCreated) Create (if they do not exist) propertyFiles.protected void
Create and populate (if they not exist) the "user visible" folders.protected void
Set the protection on the files.void
Set theMetadataGenerator
.Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Field Details
-
log
private final org.slf4j.Logger logLog. -
installerProps
Installer Properties. -
currentState
Current Install. -
keyManager
Key Manager. -
metadataGenerator
What will generate metadata?
-
-
Constructor Details
-
V4Install
Constructor.- Parameters:
props
- The properties to drive the installs.installState
- The current install.
-
-
Method Details
-
doInitialize
- Overrides:
doInitialize
in classAbstractInitializableComponent
- Throws:
ComponentInitializationException
-
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.
-
setMetadataGenerator
Set theMetadataGenerator
.- Parameters:
what
- what to set. This need not have been initialized yetMetadataGenerator.setOutput(File)
andMetadataGenerator.setParameters(MetadataGeneratorParameters)
are called prior to initialization.
-
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
-
createUserDirectories
protected void createUserDirectories() throws org.apache.tools.ant.BuildExceptionCreate (if they do not exist) the user editable folders, suitable for later population during update or install.- Throws:
org.apache.tools.ant.BuildException
- if badness occurs
-
getIdPReplacements
Create the properties we need to replace when we merge idp.properties.- Parameters:
sealerCreated
- have we just created a sealer- Returns:
- what we need to replace
-
populatePropertyFiles
protected void populatePropertyFiles(boolean sealerCreated) throws org.apache.tools.ant.BuildException Create (if they do not exist) propertyFiles. (idp.properties, ldap.properties). This *MUST* happen beforepopulateUserDirectories()
or it will not be effective. Note that in V3 serice.properties and nameid.properties but we do not any more.- Parameters:
sealerCreated
- have we just created a sealer- Throws:
org.apache.tools.ant.BuildException
- if badness occurs
-
handleEditWebApp
protected void handleEditWebApp() throws org.apache.tools.ant.BuildExceptionCreate and populate (if it does not exist) edit-webapp.- 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
-
populateUserDirectories
protected void populateUserDirectories() throws org.apache.tools.ant.BuildExceptionCreate and populate (if they not exist) the "user visible" folders. (conf, flows, messages, views, logs)- 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
-