Search in sources :

Example 6 with BundledPatch

use of org.jboss.as.patching.metadata.BundledPatch in project wildfly-core by wildfly.

the class PatchingTestUtil method createPatchBundleXMLFile.

public static void createPatchBundleXMLFile(File dir, final List<BundledPatch.BundledPatchEntry> patches) throws Exception {
    File bundleXMLFile = new File(dir, "patches.xml");
    FileOutputStream fos = new FileOutputStream(bundleXMLFile);
    try {
        PatchBundleXml.marshal(fos, new BundledPatch() {

            @Override
            public List<BundledPatchEntry> getPatches() {
                return patches;
            }
        });
    } finally {
        safeClose(fos);
    }
}
Also used : FileOutputStream(java.io.FileOutputStream) List(java.util.List) BundledPatch(org.jboss.as.patching.metadata.BundledPatch) IoUtils.newFile(org.jboss.as.patching.IoUtils.newFile) File(java.io.File)

Aggregations

BundledPatch (org.jboss.as.patching.metadata.BundledPatch)6 File (java.io.File)5 PatchingException (org.jboss.as.patching.PatchingException)4 FileOutputStream (java.io.FileOutputStream)3 List (java.util.List)3 Patch (org.jboss.as.patching.metadata.Patch)3 FileInputStream (java.io.FileInputStream)2 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 ArrayList (java.util.ArrayList)2 IoUtils.newFile (org.jboss.as.patching.IoUtils.newFile)2 InstalledIdentity (org.jboss.as.patching.installation.InstalledIdentity)2 OutputStream (java.io.OutputStream)1 ZipEntry (java.util.zip.ZipEntry)1 ZipException (java.util.zip.ZipException)1 ZipInputStream (java.util.zip.ZipInputStream)1 XMLStreamException (javax.xml.stream.XMLStreamException)1 CommandException (org.aesh.command.CommandException)1 CommandLineException (org.jboss.as.cli.CommandLineException)1 BundledPatchEntry (org.jboss.as.patching.metadata.BundledPatch.BundledPatchEntry)1