Package net.shibboleth.idp.installer.impl

# Class CopyDistribution

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

public final class CopyDistribution extends Object
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

Fields
Modifier and Type
Field
Description
`private final InstallerPropertiesImpl`
`installerProps`
Properties for the job.
`private final org.slf4j.Logger`
`log`
Log.

## Constructor Summary

Constructors
Constructor
Description
`CopyDistribution(InstallerPropertiesImpl props)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`copyBinDoc()`
Populate the per distribution (but non dist) folders.
`protected void`
`copyDist()`
Populate the dist folder.
`private void`
`delete(Path what, String excludes)`
Helper for the `deleteOld()` method.
`protected void`
`deleteOld()`
Delete old copies of bin/lib (leaving bin for scripts), dist, doc and system.
`private void`
`distCopy(Path srcDist, Path dist, String to)`
Helper for the `copyDist()` and `copyBinDoc()` methods.
`private void`
`distCopy(Path srcDist, Path dist, String to, boolean overwrite)`
Helper for the `copyDist()` and `copyBinDoc()` methods.
`void`
`execute()`
Copy the distribution from the dstribution to their new locations, having first taken a backup.

### 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
Properties for the job.

## Constructor Details

### CopyDistribution

public CopyDistribution(@Nonnull InstallerPropertiesImpl props)
Constructor.

Parameters:
  `props` - The environment for the work.

## Method Details

### execute

public void execute() throws org.apache.tools.ant.BuildException
Copy the distribution from the dstribution to their new locations, having first taken a backup.

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

### delete

private void delete(Path what, String excludes)
Helper for the `deleteOld()` method.

Parameters:
  `what` - what to delete
  `excludes` - what to exclude

### deleteOld

protected void deleteOld()
Delete old copies of bin/lib (leaving bin for scripts), dist, 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(@Nonnull Path srcDist, @Nonnull Path dist, @Nonnull String to, boolean overwrite) throws org.apache.tools.ant.BuildException
Helper for the `copyDist()` and `copyBinDoc()` methods.

Parameters:
  `srcDist` - the source distribution.
  `dist` - the dist directory
  `to` - the subfolder name
  `overwrite` - whether we want to overwrite
Throws:
  `org.apache.tools.ant.BuildException` - if badness occurs

### distCopy

private void distCopy(@Nonnull Path srcDist, @Nonnull Path dist, @Nonnull String to) throws org.apache.tools.ant.BuildException
Helper for the `copyDist()` and `copyBinDoc()` methods.

Parameters:
  `srcDist` - the source distribution.
  `dist` - the dist directory
  `to` - 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

### copyBinDoc

protected void copyBinDoc()
Populate the per distribution (but non dist) folders.

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