@Service public class DefaultPreconditionsValidatorService extends Object implements PreconditionsValidatorService
| Constructor and Description |
|---|
DefaultPreconditionsValidatorService() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
checkBackupExistence(Path muleDistroLocation)
Checks existence of any BackUp.
|
List<String> |
checkRollbackPreconditions(Path muleDistroLocation)
Checks rollback pre-conditions for status command.
|
void |
checkUpgradePreconditions(MuleDistribution oldMule,
MuleDistribution newMule,
boolean force)
Checks that all preconditions for performing the upgrade are met.
|
List<String> |
checkUpgradeStatusOffline(MuleDistribution oldMule)
Checks upgrade pre-conditions for status command.
|
boolean |
getConsentForOverwritingBackup(boolean force)
Asks consent for overwriting the current BackUp.
|
public DefaultPreconditionsValidatorService()
public void checkUpgradePreconditions(MuleDistribution oldMule, MuleDistribution newMule, boolean force) throws IOException
Preconditions are:
checkUpgradePreconditions in interface PreconditionsValidatorServiceoldMule - MuleDistribution representing the old Mule Runtime distribution being upgradednewMule - MuleDistribution representing the new Mule Runtime distribution used for the upgradeforce - whether explicit consent has been provided for the override related preconditions like the ones for the backup
and applied patchesIllegalStateException - if validations are not metIOException - if an I/O error occurspublic List<String> checkUpgradeStatusOffline(MuleDistribution oldMule) throws IOException
checkUpgradeStatusOffline in interface PreconditionsValidatorServiceoldMule - MuleDistribution representing the old Mule Runtime distribution being upgraded.IOException - if an I/O error occurspublic List<String> checkRollbackPreconditions(Path muleDistroLocation) throws IOException
checkRollbackPreconditions in interface PreconditionsValidatorServicemuleDistroLocation - MuleDistribution representing the current Mule Runtime distribution location.IOException - if an I/O error occurspublic boolean getConsentForOverwritingBackup(boolean force)
throws IOException
getConsentForOverwritingBackup in interface PreconditionsValidatorServiceforce - If force is true, will not ask to the user.IOException - I/O Exception.public List<String> checkBackupExistence(Path muleDistroLocation) throws IOException
checkBackupExistence in interface PreconditionsValidatorServicemuleDistroLocation - Mule path to looking for the BackUp.IOException - I/O Exception.Copyright © 2021 MuleSoft, Inc.. All rights reserved.