@Service public class DefaultPreconditionsValidatorService extends Object implements PreconditionsValidatorService
| Constructor and Description |
|---|
DefaultPreconditionsValidatorService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkBackupExistence(Path muleDistroLocation)
Checks existence of any BackUp.
|
boolean |
checkBackupIntegrity(Path muleDistroLocation) |
List<String> |
checkBackupIntegrityAndGetErrorMessage(Path muleDistroLocation) |
void |
checkRollbackReadiness(Path muleDistroLocation)
Checks that all preconditions for performing the rollback are met.
|
void |
checkUpgradeReadiness(MuleDistribution oldMule,
MuleDistribution newMule,
boolean force,
boolean isDryRun)
Checks that all preconditions for performing the upgrade are met.
|
List<String> |
getBackupIntegrityErrorMessages(Path muleDistroLocation) |
boolean |
getConsentForOverwritingBackup(Path distroLocation,
boolean force)
Asks consent for overwriting the current BackUp.
|
public DefaultPreconditionsValidatorService()
public void checkUpgradeReadiness(MuleDistribution oldMule, MuleDistribution newMule, boolean force, boolean isDryRun) throws IOException
Preconditions are:
checkUpgradeReadiness 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 void checkRollbackReadiness(Path muleDistroLocation) throws IOException
Preconditions are:
checkRollbackReadiness in interface PreconditionsValidatorServicemuleDistroLocation - location of the Mule Runtime distribution being validated for rollback process.IllegalStateException - if validations are not met.IOException - if an I/O error occurs.public boolean getConsentForOverwritingBackup(Path distroLocation, boolean force) throws IOException
getConsentForOverwritingBackup in interface PreconditionsValidatorServicedistroLocation - Mule Runtime Distribution Path.force - If force is true, will not ask to the user.IOExceptionpublic boolean checkBackupExistence(Path muleDistroLocation) throws IOException
muleDistroLocation - Mule path to looking for the BackUp.IOException - I/O Exception.public List<String> checkBackupIntegrityAndGetErrorMessage(Path muleDistroLocation) throws IOException
IOExceptionpublic List<String> getBackupIntegrityErrorMessages(Path muleDistroLocation)
public boolean checkBackupIntegrity(Path muleDistroLocation) throws IOException
IOExceptionCopyright © 2022 MuleSoft, Inc.. All rights reserved.