Package net.shibboleth.idp.installer
Class CopyDistribution
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.installer.CopyDistribution
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
Copy the distribution to the final location. Prior to doing so
take a backup of the old distribution. "The final location" means
the dist, doc and system subdirectories.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InstallerProperties
Properties for the job.private final CurrentInstallState
The state of the current install.private final org.slf4j.Logger
Log. -
Constructor Summary
ConstructorsConstructorDescriptionCopyDistribution
(InstallerProperties props, CurrentInstallState state) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Populate the per distribution (but non dist) folders.protected void
copyDist()
Populate the dist folder.private void
Helper for thedeleteOld()
method.protected void
Delete old copies of bin/lib (leaving bin for scripts), disty, doc and system.private void
Helper for thecopyDist()
andcopyBinDocSystem()
methods.private void
Helper for thecopyDist()
andcopyBinDocSystem()
methods.void
execute()
Copy the distribution from the dstribution to their new locations, having first taken a backup.Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
Field Details
-
log
private final org.slf4j.Logger logLog. -
installerProps
Properties for the job. -
installState
The state of the current install.
-
-
Constructor Details
-
CopyDistribution
Constructor.- Parameters:
props
- The environment for the work.state
- Where we are right now.
-
-
Method Details
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionCopy the distribution from the dstribution to their new locations, having first taken a backup.- Throws:
org.apache.tools.ant.BuildException
- if badness occurs
-
delete
Helper for thedeleteOld()
method.- Parameters:
what
- what to deleteexcludes
- what to exclude
-
deleteOld
protected void deleteOld()Delete old copies of bin/lib (leaving bin for scripts), disty, doc and system. system has to be unprotected first which also means we need to create it too.- Throws:
org.apache.tools.ant.BuildException
- if badness occurs
-
distCopy
private void distCopy(Path srcDist, Path dist, String to, boolean overwrite) throws org.apache.tools.ant.BuildException Helper for thecopyDist()
andcopyBinDocSystem()
methods.- Parameters:
srcDist
- the source distribution.dist
- the dist directoryto
- the subfolder nameoverwrite
- whether we want to overwrite- Throws:
org.apache.tools.ant.BuildException
- if badness occurs
-
distCopy
private void distCopy(Path srcDist, Path dist, String to) throws org.apache.tools.ant.BuildException Helper for thecopyDist()
andcopyBinDocSystem()
methods.- Parameters:
srcDist
- the source distribution.dist
- the dist directoryto
- the subfolder name- Throws:
org.apache.tools.ant.BuildException
- if badness occurs
-
copyDist
protected void copyDist()Populate the dist folder.- Throws:
org.apache.tools.ant.BuildException
- if badness occurs
-
copyBinDocSystem
protected void copyBinDocSystem()Populate the per distribution (but non dist) folders.- Throws:
org.apache.tools.ant.BuildException
- if badness occurs
-