public boolean hasNewLocation() { return !installedFpl.equals(newFpl); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FeaturePackUpdatePlan other = (FeaturePackUpdatePlan) obj; if (installedFpl == null) { if (other.installedFpl != null) return false; } else if (!installedFpl.equals(other.installedFpl)) return false; if (newFpl == null) { if (other.newFpl != null) return false; } else if (!newFpl.equals(other.newFpl)) return false; if (newPatches == null) { if (other.newPatches != null) return false; } else if (!newPatches.equals(other.newPatches)) return false; if (transitive != other.transitive) return false; return true; }
if (other.fpl != null) return false; } else if (!fpl.equals(other.fpl)) return false; if (includedPackages == null) {
@SuppressWarnings("unchecked") public B removeTransitiveDep(FPID fpid) throws ProvisioningException { final FeaturePackLocation fpl = resolveUniverseSpec(fpid.getLocation()); final ProducerSpec producer = fpl.getProducer(); final FeaturePackConfig fpDep = transitiveDeps.get(producer); if(fpDep == null) { throw new ProvisioningException(Errors.unknownFeaturePack(fpid)); } if(!fpDep.getLocation().equals(fpl)) { throw new ProvisioningException(Errors.unknownFeaturePack(fpid)); } if(transitiveDeps.size() == 1) { transitiveDeps = Collections.emptyMap(); return (B) this; } else { transitiveDeps = CollectionUtils.remove(transitiveDeps, producer); } updateOriginMappings(producer); return (B) this; }
public int getFeaturePackDepIndex(FeaturePackLocation fpl) throws ProvisioningException { fpl = resolveUniverseSpec(fpl); final ProducerSpec producer = fpl.getProducer(); final FeaturePackConfig fpDep = fpDeps.get(producer); if (fpDep == null) { throw new ProvisioningException(Errors.unknownFeaturePack(fpl.getFPID())); } if (!fpDep.getLocation().equals(fpl)) { throw new ProvisioningException(Errors.unknownFeaturePack(fpl.getFPID())); } int i = 0; for (ProducerSpec depProducer : fpDeps.keySet()) { if (depProducer.equals(producer)) { break; } i += 1; } return i; }
final FeaturePackUpdatePlan fpPlan = updates.get(producer); if(fpPlan != null && !fpPlan.isEmpty()) { if(!fpPlan.getInstalledLocation().equals(fpConfig.getLocation())) { throw new ProvisioningException("Location in the update plan " + fpPlan.getInstalledLocation() + " does not match the installed location " + fpConfig.getLocation()); final FeaturePackUpdatePlan fpPlan = updates.get(producer); if(fpPlan != null && !fpPlan.isEmpty()) { if(fpConfig.getLocation().getBuild() != null && !fpPlan.getInstalledLocation().equals(fpConfig.getLocation())) { throw new ProvisioningException("Update plan build " + fpPlan.getInstalledLocation() + " does not match the installed build " + fpConfig.getLocation());