final String patchPath = patchID + ".zip"; entries.add(new BundledPatch.BundledPatchEntry(patchID, patchPath));
final File patchOutput = new File(tempDir, path); ZipUtils.zip(step.getPatchDir(), patchOutput); entries.add(new BundledPatch.BundledPatchEntry(patchId, path));
IoUtils.copy(zippedCP, new File(patchBundleDir, zippedCP.getName())); final List<BundledPatch.BundledPatchEntry> bundledPatches = new ArrayList<BundledPatch.BundledPatchEntry>(); bundledPatches.add(new BundledPatch.BundledPatchEntry(patchID, zippedOneOff.getName())); bundledPatches.add(new BundledPatch.BundledPatchEntry(patchID2, zippedCP.getName())); TestUtils.createPatchBundleXMLFile(patchBundleDir, bundledPatches); final File zippedBundle = createZippedPatchFile(patchBundleDir, "patch-bundle.zip");
private void parseElement(XMLExtendedStreamReader reader, List<BundledPatch.BundledPatchEntry> patches) throws XMLStreamException { String id = null; String path = null; final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case ID: id = value; break; case PATH: path = value; break; default: throw unexpectedAttribute(reader, i); } } if (id == null) { throw missingRequired(reader, Attribute.ID.name); } if (path == null) { throw missingRequired(reader, Attribute.PATH.name); } // requireNoContent(reader); patches.add(new BundledPatch.BundledPatchEntry(id, path)); }
private void parseElement(XMLExtendedStreamReader reader, List<BundledPatch.BundledPatchEntry> patches) throws XMLStreamException { String id = null; String path = null; final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { case ID: id = value; break; case PATH: path = value; break; default: throw unexpectedAttribute(reader, i); } } if (id == null) { throw missingRequired(reader, Attribute.ID.name); } if (path == null) { throw missingRequired(reader, Attribute.PATH.name); } // requireNoContent(reader); patches.add(new BundledPatch.BundledPatchEntry(id, path)); }