@Override protected void persist() throws IOException { getMutableProperties().put(Constants.ALL_PATCHES, PatchUtils.asString(allPatches)); super.persist(); }
@Override protected void persist() throws IOException { getMutableProperties().put(Constants.ALL_PATCHES, PatchUtils.asString(allPatches)); super.persist(); }
protected void persist(final String cumulativeID, final List<String> patches, final Properties properties) throws IOException { assert cumulativeID != null; // Create the parent IoUtils.mkdir(structure.getInstallationInfo().getParentFile()); final List<String> consolidate = new ArrayList<String>(); consolidate.addAll(patches); if (!Constants.BASE.equals(cumulativeID)) { consolidate.add(cumulativeID); } if (structure.getModuleRoot() != null) { final File overlays = new File(structure.getModuleRoot(), Constants.OVERLAYS); final File refs = new File(overlays, Constants.OVERLAYS); PatchUtils.writeRefs(refs, consolidate); } // Update the properties properties.put(Constants.CUMULATIVE, cumulativeID); properties.put(Constants.PATCHES, PatchUtils.asString(patches)); if(version != null) { properties.put(Constants.CURRENT_VERSION, version); } // Write layer.conf PatchUtils.writeProperties(structure.getInstallationInfo(), properties); }
protected void persist(final String cumulativeID, final List<String> patches, final Properties properties) throws IOException { assert cumulativeID != null; // Create the parent IoUtils.mkdir(structure.getInstallationInfo().getParentFile()); final List<String> consolidate = new ArrayList<String>(); consolidate.addAll(patches); if (!Constants.BASE.equals(cumulativeID)) { consolidate.add(cumulativeID); } if (structure.getModuleRoot() != null) { final File overlays = new File(structure.getModuleRoot(), Constants.OVERLAYS); final File refs = new File(overlays, Constants.OVERLAYS); PatchUtils.writeRefs(refs, consolidate); } // Update the properties properties.put(Constants.CUMULATIVE, cumulativeID); properties.put(Constants.PATCHES, PatchUtils.asString(patches)); if(version != null) { properties.put(Constants.CURRENT_VERSION, version); } // Write layer.conf PatchUtils.writeProperties(structure.getInstallationInfo(), properties); }
static void writeTargetInfo(final XMLExtendedStreamWriter writer, final Element element, final PatchableTarget target) throws XMLStreamException { try { final PatchableTarget.TargetInfo info = target.loadTargetInfo(); // writer.writeEmptyElement(element.name); writer.writeAttribute(Attribute.NAME.name, target.getName()); writer.writeAttribute(Attribute.RELEASE_ID.name, info.getCumulativePatchID()); if (! info.getPatchIDs().isEmpty()) { writer.writeAttribute(Attribute.PATCHES.name, PatchUtils.asString(info.getPatchIDs())); } } catch (IOException e) { throw new XMLStreamException(e); } }
static void writeTargetInfo(final XMLExtendedStreamWriter writer, final Element element, final PatchableTarget target) throws XMLStreamException { try { final PatchableTarget.TargetInfo info = target.loadTargetInfo(); // writer.writeEmptyElement(element.name); writer.writeAttribute(Attribute.NAME.name, target.getName()); writer.writeAttribute(Attribute.RELEASE_ID.name, info.getCumulativePatchID()); if (! info.getPatchIDs().isEmpty()) { writer.writeAttribute(Attribute.PATCHES.name, PatchUtils.asString(info.getPatchIDs())); } } catch (IOException e) { throw new XMLStreamException(e); } }