@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ProducerSpec other = (ProducerSpec) obj; Object otherField = other.getName(); if (producer == null) { if (otherField != null) return false; } else if (!producer.equals(otherField)) return false; otherField = other.getUniverse(); if (universeSpec == null) { if (otherField != null) return false; } else if (!universeSpec.equals(otherField)) return false; return true; }
FeaturePackLocation loc = commandInvocation.getPmSession().getExposedLocation(installation, c.getLocation()); List<Cell> line = new ArrayList<>(); line.add(new Cell(loc.getProducer().getName())); line.add(new Cell(loc.getBuild())); if (showPatches) {
@Override public boolean hasExpired(Path fpDir, FeaturePackLocation.FPID fpid) { try { boolean devBuild = universe.getUniverse(fpid.getUniverse()). getProducer(fpid.getProducer().getName()).getChannel(fpid.getChannel().getName()). isDevBuild(fpid); return devBuild && !seen.contains(fpid); } catch (ProvisioningException ex) { CliLogging.exception(ex); return true; } }
public static String buildPatches(PmCommandInvocation invoc, ProvisioningLayout<FeaturePackLayout> layout) throws ProvisioningException { if (!layout.hasPatches()) { return null; } Table table = new Table(Headers.PATCH, Headers.PATCH_FOR, Headers.UPDATE_CHANNEL); for (FeaturePackLayout fpLayout : layout.getOrderedFeaturePacks()) { List<FeaturePackLayout> patches = layout.getPatches(fpLayout.getFPID()); for (FeaturePackLayout patch : patches) { FeaturePackLocation loc = invoc.getPmSession().getExposedLocation(null, patch.getFPID().getLocation()); FPID patchFor = patch.getSpec().getPatchFor(); table.addLine(patch.getFPID().getBuild(), patchFor.getProducer().getName() + FeaturePackLocation.BUILD_START + patchFor.getBuild(), formatChannel(loc)); } } if (!table.isEmpty()) { table.sort(Table.SortType.ASCENDANT); return table.build(); } return null; }
public static void printFeaturePack(PmCommandInvocation commandInvocation, FeaturePackLocation loc) { loc = commandInvocation.getPmSession().getExposedLocation(null, loc); Table t = new Table(Headers.PRODUCT, Headers.BUILD, Headers.UPDATE_CHANNEL); t.addLine(loc.getProducer().getName(), loc.getBuild(), formatChannel(loc)); commandInvocation.print(t.build()); }