@Override public void validatePriorToDeployment(DbEnvironment env, DeployStrategy deployStrategy, ImmutableList<Change> sourceChanges, ImmutableCollection<Change> deployedChanges, Changeset artifactsToProcess) { if (env.isChecksumDetectionEnabled() && dbChecksumManager.isInitialized()) { Predicate<? super ChecksumEntry> platformInclusionPredicate = getPlatformInclusionPredicate(env); ImmutableCollection<ChecksumBreak> checksumBreaks = this.dbChecksumManager.determineChecksumDifferences(platformInclusionPredicate) .reject(ChecksumBreak.IS_EXPECTED_BREAK); if (checksumBreaks.notEmpty()) { LOG.info("*******************************************"); LOG.info("WARNING: The following objects were modified or managed outside of {}.", PlatformConfiguration.getInstance().getToolName()); LOG.info("Please revert these changes or incorporate into your {} codebase", PlatformConfiguration.getInstance().getToolName()); for (ChecksumBreak checksumBreak : checksumBreaks) { LOG.info("\t" + checksumBreak.toDisplayString()); } LOG.info("*******************************************"); LOG.info(""); } } }
@Override public void validatePriorToDeployment(DbEnvironment env, DeployStrategy deployStrategy, ImmutableList<Change> sourceChanges, ImmutableCollection<Change> deployedChanges, Changeset artifactsToProcess) { if (env.isChecksumDetectionEnabled() && dbChecksumManager.isInitialized()) { Predicate<? super ChecksumEntry> platformInclusionPredicate = getPlatformInclusionPredicate(env); ImmutableCollection<ChecksumBreak> checksumBreaks = this.dbChecksumManager.determineChecksumDifferences(platformInclusionPredicate) .reject(ChecksumBreak.IS_EXPECTED_BREAK); if (checksumBreaks.notEmpty()) { LOG.info("*******************************************"); LOG.info("WARNING: The following objects were modified or managed outside of {}.", PlatformConfiguration.getInstance().getToolName()); LOG.info("Please revert these changes or incorporate into your {} codebase", PlatformConfiguration.getInstance().getToolName()); for (ChecksumBreak checksumBreak : checksumBreaks) { LOG.info("\t" + checksumBreak.toDisplayString()); } LOG.info("*******************************************"); LOG.info(""); } } }
@Override public void doPostDeployAction(DbEnvironment env, final ImmutableList<Change> sourceChanges) { if (env.isChecksumDetectionEnabled()) { if (!dbChecksumManager.isInitialized()) { // need this check done here to account for existing clients dbChecksumManager.initialize(); } dbChecksumManager.applyChecksumDiffs(Predicates.and(getPlatformInclusionPredicate(env), getSourceChangesInclusionPredicate(env, sourceChanges))); } }
@Override public void doPostDeployAction(DbEnvironment env, final ImmutableList<Change> sourceChanges) { if (env.isChecksumDetectionEnabled()) { if (!dbChecksumManager.isInitialized()) { // need this check done here to account for existing clients dbChecksumManager.initialize(); } dbChecksumManager.applyChecksumDiffs(Predicates.and(getPlatformInclusionPredicate(env), getSourceChangesInclusionPredicate(env, sourceChanges))); } }