/** * Check whether the patch can be applied to a given target. * * @param condition the conditions * @param target the target * @throws PatchingException */ static void checkUpgradeConditions(final UpgradeCondition condition, final InstallationManager.MutablePatchingTarget target) throws PatchingException { // See if the prerequisites are met for (final String required : condition.getRequires()) { if (!target.isApplied(required)) { throw PatchLogger.ROOT_LOGGER.requiresPatch(required); } } // Check for incompatibilities for (final String incompatible : condition.getIncompatibleWith()) { if (target.isApplied(incompatible)) { throw PatchLogger.ROOT_LOGGER.incompatiblePatch(incompatible); } } }
/** * Check whether the patch can be applied to a given target. * * @param condition the conditions * @param target the target * @throws PatchingException */ static void checkUpgradeConditions(final UpgradeCondition condition, final InstallationManager.MutablePatchingTarget target) throws PatchingException { // See if the prerequisites are met for (final String required : condition.getRequires()) { if (!target.isApplied(required)) { throw PatchLogger.ROOT_LOGGER.requiresPatch(required); } } // Check for incompatibilities for (final String incompatible : condition.getIncompatibleWith()) { if (target.isApplied(incompatible)) { throw PatchLogger.ROOT_LOGGER.incompatiblePatch(incompatible); } } }
@Override public boolean isApplied(String patchId) { return delegate.isApplied(patchId); }
@Override public boolean isApplied(String patchId) { return delegate.isApplied(patchId); }