public abstract static class AbstractPackageOperation.AbstractInstaller extends AbstractPackageOperation implements Installer
AbstractPackageOperation.AbstractInstaller, AbstractPackageOperation.AbstractUninstallerPackageOperation.InstallStatus, PackageOperation.StatusChangeListener, PackageOperation.StatusChangeListenerExceptionmFop| Constructor and Description |
|---|
AbstractInstaller(RemotePackage p,
RepoManager mgr,
Downloader downloader,
FileOp fop) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
complete(ProgressIndicator progress)
Finds the prepared files using the installer metadata, calls
doComplete(File, File, ProgressIndicator), and finally writes the package xml. |
protected void |
doCleanup(FileOp fop)
Subclasses can override this if they need to do any specific cleanup.
|
protected abstract boolean |
doComplete(java.io.File installTemp,
java.io.File dest,
ProgressIndicator progress)
Subclasses should implement this to do any completion actions required.
|
protected abstract boolean |
doPrepare(java.io.File installTempPath,
ProgressIndicator progress)
Subclasses should override this to download and prepare a package for installation.
|
protected Downloader |
getDownloader() |
java.io.File |
getLocation(ProgressIndicator progress)
The filesystem path affected by this operation.
|
RemotePackage |
getPackage()
The package (local or remote) that's being affected.
|
boolean |
prepare(ProgressIndicator progress)
Writes information used to restore the install process, then calls
doPrepare(File, ProgressIndicator) |
protected java.io.File |
writeInstallerMetadata(java.io.File installPath,
ProgressIndicator progress) |
getInstallStatus, getRepoManager, registerStateChangeListener, updateStatusclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInstallStatus, getRepoManager, registerStateChangeListenerpublic AbstractInstaller(@NonNull
RemotePackage p,
@NonNull
RepoManager mgr,
@NonNull
Downloader downloader,
@NonNull
FileOp fop)
@NonNull public RemotePackage getPackage()
InstallergetPackage in interface InstallergetPackage in interface PackageOperation@NonNull
public final java.io.File getLocation(@NonNull
ProgressIndicator progress)
PackageOperationgetLocation in interface PackageOperationprotected Downloader getDownloader()
public final boolean complete(@NonNull
ProgressIndicator progress)
doComplete(File, File, ProgressIndicator), and finally writes the package xml.complete in interface PackageOperationprogress - A ProgressIndicator, to show install progress and facilitate
logging.true if the install was successful, false otherwise.protected abstract boolean doComplete(@Nullable
java.io.File installTemp,
@NonNull
java.io.File dest,
@NonNull
ProgressIndicator progress)
installTemp - The temporary dir in which we prepared the install. May be
null if for example the installer removed the installer
properties file, but should not be normally.dest - The destination into which to install the package.progress - For logging and progress indication.true if the install succeeded, false otherwise.complete(ProgressIndicator)public final boolean prepare(@NonNull
ProgressIndicator progress)
doPrepare(File, ProgressIndicator)prepare in interface PackageOperationprogress - A ProgressIndicator, to show install progress and facilitate
logging.true if the operation succeeded, false otherwise.protected void doCleanup(@NonNull
FileOp fop)
protected abstract boolean doPrepare(@NonNull
java.io.File installTempPath,
@NonNull
ProgressIndicator progress)
installTempPath - The dir that should be used for any intermediate processing.progress - For logging and progress display@Nullable
protected java.io.File writeInstallerMetadata(@NonNull
java.io.File installPath,
@NonNull
ProgressIndicator progress)
throws java.io.IOException
java.io.IOException