Search in sources :

Example 1 with PatchDetailsRequest

use of org.jboss.fuse.patch.management.PatchDetailsRequest in project fuse-karaf by jboss-fuse.

the class ShowCommand method doExecute.

@Override
protected void doExecute(PatchService service) throws Exception {
    Patch patch = patchManagement.loadPatch(new PatchDetailsRequest(patchId, bundles, files, diff));
    if (patch == null) {
        throw new PatchException("Patch '" + patchId + "' not found");
    }
    System.out.println(String.format("Patch ID: %s", patch.getPatchData().getId()));
    if (patch.getManagedPatch() != null) {
        System.out.println(String.format("Patch Commit ID: %s", patch.getManagedPatch().getCommitId()));
    }
    if (bundles) {
        System.out.println(String.format("#### %d Bundles%s", patch.getPatchData().getBundles().size(), patch.getPatchData().getBundles().size() == 0 ? "" : ":"));
        iterate(patch.getPatchData().getBundles());
    }
    if (files) {
        ManagedPatch details = patch.getManagedPatch();
        System.out.println(String.format("#### %d Files added%s", details.getFilesAdded().size(), details.getFilesAdded().size() == 0 ? "" : ":"));
        iterate(details.getFilesAdded());
        System.out.println(String.format("#### %d Files modified%s", details.getFilesModified().size(), details.getFilesModified().size() == 0 ? "" : ":"));
        iterate(details.getFilesModified());
        System.out.println(String.format("#### %d Files removed%s", details.getFilesRemoved().size(), details.getFilesRemoved().size() == 0 ? "" : ":"));
        iterate(details.getFilesRemoved());
    }
    if (diff) {
        System.out.println("#### Patch changes:\n" + patch.getManagedPatch().getUnifiedDiff());
    }
}
Also used : ManagedPatch(org.jboss.fuse.patch.management.ManagedPatch) PatchException(org.jboss.fuse.patch.management.PatchException) Patch(org.jboss.fuse.patch.management.Patch) ManagedPatch(org.jboss.fuse.patch.management.ManagedPatch) PatchDetailsRequest(org.jboss.fuse.patch.management.PatchDetailsRequest)

Example 2 with PatchDetailsRequest

use of org.jboss.fuse.patch.management.PatchDetailsRequest in project fuse-karaf by jboss-fuse.

the class GitPatchManagementServiceImpl method checkPendingPatches.

@Override
public void checkPendingPatches() {
    File[] pendingPatches = patchesDir.listFiles(pathname -> pathname.exists() && pathname.getName().endsWith(".pending"));
    if (pendingPatches == null || pendingPatches.length == 0) {
        return;
    }
    final String dataCache = systemContext.getProperty("org.osgi.framework.storage");
    for (File pending : pendingPatches) {
        try {
            Pending what = Pending.valueOf(FileUtils.readFileToString(pending, "UTF-8"));
            final String prefix = what == Pending.ROLLUP_INSTALLATION ? "install" : "rollback";
            String name = pending.getName().replaceFirst("\\.pending$", "");
            if (isStandaloneChild()) {
                if (name.endsWith("." + System.getProperty("karaf.name") + ".patch")) {
                    name = name.replaceFirst("\\." + System.getProperty("karaf.name"), "");
                } else {
                    continue;
                }
            }
            File patchFile = new File(pending.getParentFile(), name);
            if (!patchFile.isFile()) {
                Activator.log(LogService.LOG_INFO, "Ignoring patch result file: " + patchFile.getName());
                continue;
            }
            PatchData patchData = PatchData.load(new FileInputStream(patchFile));
            Patch patch = loadPatch(new PatchDetailsRequest(patchData.getId()));
            String dataFilesName = patchData.getId() + ".datafiles";
            if (isStandaloneChild()) {
                dataFilesName = patchData.getId() + "." + System.getProperty("karaf.name") + ".datafiles";
            }
            final File dataFilesBackupDir = new File(pending.getParentFile(), dataFilesName);
            final Properties backupProperties = new Properties();
            FileInputStream inStream = new FileInputStream(new File(dataFilesBackupDir, "backup-" + prefix + ".properties"));
            backupProperties.load(inStream);
            Utils.closeQuietly(inStream);
            // maybe one of those bundles has data directory to restore?
            for (Bundle b : systemContext.getBundles()) {
                if (b.getSymbolicName() != null) {
                    String key = String.format("%s$$%s", stripSymbolicName(b.getSymbolicName()), b.getVersion().toString());
                    if (backupProperties.containsKey(key)) {
                        String backupDirName = backupProperties.getProperty(key);
                        File backupDir = new File(dataFilesBackupDir, prefix + "/" + backupDirName + "/data");
                        restoreDataDirectory(dataCache, b, backupDir);
                        // we no longer want to restore this dir
                        backupProperties.remove(key);
                    }
                }
            }
            // 2. We can however have more bundle data backups - we'll restore them after each bundle
            // is INSTALLED and we'll use listener for this
            BundleListener bundleListener = new SynchronousBundleListener() {

                @Override
                public void bundleChanged(BundleEvent event) {
                    Bundle b = event.getBundle();
                    if (event.getType() == BundleEvent.INSTALLED && b.getSymbolicName() != null) {
                        String key = String.format("%s$$%s", stripSymbolicName(b.getSymbolicName()), b.getVersion().toString());
                        if (backupProperties.containsKey(key)) {
                            String backupDirName = backupProperties.getProperty(key);
                            File backupDir = new File(dataFilesBackupDir, prefix + "/" + backupDirName + "/data");
                            restoreDataDirectory(dataCache, b, backupDir);
                        }
                    }
                }
            };
            systemContext.addBundleListener(bundleListener);
            pendingPatchesListeners.put(patchData.getId(), bundleListener);
        } catch (Exception e) {
            Activator.log(LogService.LOG_ERROR, null, e.getMessage(), e, true);
        }
    }
}
Also used : PatchData(org.jboss.fuse.patch.management.PatchData) Bundle(org.osgi.framework.Bundle) Properties(java.util.Properties) PatchDetailsRequest(org.jboss.fuse.patch.management.PatchDetailsRequest) FileInputStream(java.io.FileInputStream) PatchException(org.jboss.fuse.patch.management.PatchException) GitAPIException(org.eclipse.jgit.api.errors.GitAPIException) IOException(java.io.IOException) BundleEvent(org.osgi.framework.BundleEvent) BundleListener(org.osgi.framework.BundleListener) SynchronousBundleListener(org.osgi.framework.SynchronousBundleListener) ZipFile(org.apache.commons.compress.archivers.zip.ZipFile) File(java.io.File) Patch(org.jboss.fuse.patch.management.Patch) ManagedPatch(org.jboss.fuse.patch.management.ManagedPatch) Pending(org.jboss.fuse.patch.management.Pending) SynchronousBundleListener(org.osgi.framework.SynchronousBundleListener)

Example 3 with PatchDetailsRequest

use of org.jboss.fuse.patch.management.PatchDetailsRequest in project fuse-karaf by jboss-fuse.

the class DeleteCommand method doExecute.

@Override
protected void doExecute(PatchService service) throws Exception {
    Patch patch = patchManagement.loadPatch(new PatchDetailsRequest(patchId));
    if (patch == null) {
        throw new PatchException("Patch '" + patchId + "' not found");
    }
    if (patch.getResult() != null && patch.getResult().getKarafBases().size() > 0) {
        throw new PatchException("Patch '" + patchId + "' can't be deleted, as it's installed in these containers: " + patch.getResult().getKarafBases().stream().map(kb -> kb.contains("|") ? kb.split("\\s*\\|\\s*")[0] : kb).collect(Collectors.joining(", ")));
    }
    patchManagement.delete(patch);
    System.out.println("Patch '" + patchId + "' was successfully deleted");
}
Also used : UninstallPatchCompleter(org.jboss.fuse.patch.commands.completers.UninstallPatchCompleter) Argument(org.apache.karaf.shell.api.action.Argument) PatchDetailsRequest(org.jboss.fuse.patch.management.PatchDetailsRequest) Collectors(java.util.stream.Collectors) PatchException(org.jboss.fuse.patch.management.PatchException) BundleContext(org.osgi.framework.BundleContext) Command(org.apache.karaf.shell.api.action.Command) Reference(org.apache.karaf.shell.api.action.lifecycle.Reference) Patch(org.jboss.fuse.patch.management.Patch) Service(org.apache.karaf.shell.api.action.lifecycle.Service) PatchService(org.jboss.fuse.patch.PatchService) PatchManagement(org.jboss.fuse.patch.management.PatchManagement) Completion(org.apache.karaf.shell.api.action.Completion) PatchException(org.jboss.fuse.patch.management.PatchException) Patch(org.jboss.fuse.patch.management.Patch) PatchDetailsRequest(org.jboss.fuse.patch.management.PatchDetailsRequest)

Example 4 with PatchDetailsRequest

use of org.jboss.fuse.patch.management.PatchDetailsRequest in project fuse-karaf by jboss-fuse.

the class GitPatchManagementServiceImpl method rollback.

@Override
public void rollback(PatchData patchData) {
    Git fork = null;
    try {
        fork = gitPatchRepository.cloneRepository(gitPatchRepository.findOrCreateMainGitRepository(), true);
        Ref installationBranch = null;
        PatchKind kind = patchData.isRollupPatch() ? PatchKind.ROLLUP : PatchKind.NON_ROLLUP;
        switch(kind) {
            case ROLLUP:
                {
                    Activator.log2(LogService.LOG_INFO, String.format("Rolling back rollup patch \"%s\"", patchData.getId()));
                    // rolling back a rollup patch should rebase (cherry-pick) all user commits done after current baseline
                    // to previous baseline
                    RevTag currentBaseline = gitPatchRepository.findCurrentBaseline(fork);
                    RevCommit c1 = new RevWalk(fork.getRepository()).parseCommit(fork.getRepository().resolve(currentBaseline.getTagName() + "^{commit}"));
                    // remember the commit to discover P patch tags installed on top of rolledback baseline
                    RevCommit since = c1;
                    RevCommit c2 = new RevWalk(fork.getRepository()).parseCommit(fork.getRepository().resolve("HEAD"));
                    RevCommit to = c2;
                    Iterable<RevCommit> mainChangesSinceRollupPatch = fork.log().addRange(c1, c2).call();
                    List<RevCommit> userChanges = new LinkedList<>();
                    for (RevCommit rc : mainChangesSinceRollupPatch) {
                        if (isUserChangeCommit(rc)) {
                            userChanges.add(rc);
                        }
                    }
                    if (env == EnvType.STANDALONE) {
                        // remove the tag
                        fork.tagDelete().setTags(currentBaseline.getTagName()).call();
                    }
                    // baselines are stacked on each other
                    RevTag previousBaseline = gitPatchRepository.findNthPreviousBaseline(fork, env == EnvType.STANDALONE ? 0 : 1);
                    c1 = new RevWalk(fork.getRepository()).parseCommit(fork.getRepository().resolve(previousBaseline.getTagName() + "^{commit}"));
                    // hard reset of main patch branch - to point to other branch, originating from previous baseline
                    fork.reset().setMode(ResetCommand.ResetType.HARD).setRef(previousBaseline.getTagName() + "^{commit}").call();
                    // reapply those user changes that are not conflicting
                    ListIterator<RevCommit> it = userChanges.listIterator(userChanges.size());
                    Status status = fork.status().call();
                    if (!status.isClean()) {
                        // unstage any garbage
                        fork.reset().setMode(ResetCommand.ResetType.MIXED).call();
                        for (String p : status.getModified()) {
                            gitPatchRepository.checkout(fork).addPath(p).call();
                        }
                    }
                    while (it.hasPrevious()) {
                        RevCommit userChange = it.previous();
                        CherryPickResult cpr = fork.cherryPick().include(userChange.getId()).setNoCommit(true).call();
                        // this time prefer user change on top of previous baseline - this change shouldn't be
                        // conflicting, because when rolling back, patch change was preferred over user change
                        handleCherryPickConflict(patchData.getPatchDirectory(), fork, cpr, userChange, true, PatchKind.ROLLUP, null, false, true);
                        // restore backed up content from the reapplied user change
                        String[] commitMessage = userChange.getFullMessage().split("\n\n");
                        if (commitMessage.length > 1) {
                            // we have original commit (that had conflicts) stored in this commit's full message
                            String ref = commitMessage[commitMessage.length - 1];
                            File backupDir = new File(patchesDir, patchData.getId() + ".backup");
                            if (isStandaloneChild()) {
                                backupDir = new File(patchesDir, patchData.getId() + "." + System.getProperty("karaf.name") + ".backup");
                            }
                            backupDir = new File(backupDir, ref);
                            if (backupDir.exists() && backupDir.isDirectory()) {
                                Activator.log2(LogService.LOG_DEBUG, String.format("Restoring content of %s", backupDir.getCanonicalPath()));
                                copyManagedDirectories(backupDir, karafBase, false, false, false);
                            }
                        }
                        gitPatchRepository.prepareCommit(fork, userChange.getFullMessage()).call();
                    }
                    // rollback should not lead to restoration of old patch management features
                    String productVersion = determineVersion(fork.getRepository().getWorkTree());
                    File featuresCfg = new File(fork.getRepository().getWorkTree(), "etc/org.apache.karaf.features.cfg");
                    if (featuresCfg.isFile()) {
                        if (setCurrentPatchManagementVersion(featuresCfg, productVersion)) {
                            // artificial updates to etc/startup.properties
                            String pmNew = String.format("mvn:org.jboss.fuse.modules.patch/patch-management/%s", bundleContext.getBundle().getVersion().toString());
                            String pmOld = String.format("mvn:org.jboss.fuse.modules.patch/patch-management/%s", productVersion);
                            BundleUpdate update = new BundleUpdate(null, null, pmNew, null, pmOld);
                            List<BundleUpdate> patchManagementUpdates = Collections.singletonList(update);
                            updateReferences(fork, "etc/startup.properties", "", Utils.collectLocationUpdates(patchManagementUpdates));
                            fork.add().addFilepattern("etc/org.apache.karaf.features.cfg").addFilepattern("etc/startup.properties").call();
                            gitPatchRepository.prepareCommit(fork, String.format(MARKER_BASELINE_REPLACE_PATCH_FEATURE_PATTERN, productVersion, bundleContext.getBundle().getVersion().toString())).call();
                        }
                    }
                    gitPatchRepository.push(fork);
                    if (env == EnvType.STANDALONE) {
                        // remove remote tag
                        fork.push().setRefSpecs(new RefSpec().setSource(null).setDestination("refs/tags/" + currentBaseline.getTagName())).call();
                    }
                    // remove tags related to non-rollup patches installed between
                    // rolled back baseline and previous HEAD, because rolling back to previous rollup patch
                    // (previous baseline) equal effectively to starting from fresh baseline
                    RevWalk walk = new RevWalk(fork.getRepository());
                    Map<String, RevTag> tags = gitPatchRepository.findTagsBetween(fork, since, to);
                    for (Map.Entry<String, RevTag> entry : tags.entrySet()) {
                        if (entry.getKey().startsWith("patch-")) {
                            fork.tagDelete().setTags(entry.getKey()).call();
                            fork.push().setRefSpecs(new RefSpec().setSource(null).setDestination("refs/tags/" + entry.getKey())).call();
                            // and remove karaf base from tracked patch result, or even remove the result itself
                            String patchId = entry.getKey().substring("patch-".length());
                            Patch patch = loadPatch(new PatchDetailsRequest(patchId));
                            if (patch != null && patch.getResult() != null) {
                                boolean removed = false;
                                for (Iterator<String> iterator = patch.getResult().getKarafBases().iterator(); iterator.hasNext(); ) {
                                    String base = iterator.next();
                                    if (base.contains("|")) {
                                        String[] kb = base.split("\\s*\\|\\s*");
                                        String containerId = kb[0];
                                        if (System.getProperty("karaf.name", "").equals(containerId)) {
                                            iterator.remove();
                                            removed = true;
                                            break;
                                        }
                                    }
                                }
                                if (removed) {
                                    if (patch.getResult().getKarafBases().size() == 0) {
                                        // just remove the result entirely
                                        new File(patch.getPatchData().getPatchLocation(), patchId + ".patch.result").delete();
                                    } else {
                                        patch.getResult().store();
                                    }
                                    if (isStandaloneChild()) {
                                        File file = new File(patch.getPatchData().getPatchLocation(), patchId + "." + System.getProperty("karaf.name") + ".patch.result");
                                        if (file.isFile()) {
                                            file.delete();
                                        }
                                    }
                                }
                            }
                        }
                    }
                    // HEAD of main patch branch after reset and cherry-picks
                    c2 = new RevWalk(fork.getRepository()).parseCommit(fork.getRepository().resolve("HEAD"));
                    // applyChanges(fork, c1, c2);
                    applyChanges(fork, false);
                    break;
                }
            case NON_ROLLUP:
                {
                    Activator.log2(LogService.LOG_INFO, String.format("Rolling back non-rollup patch \"%s\"", patchData.getId()));
                    // rolling back a non-rollup patch is a revert of the patch commit and removal of patch tag
                    String patchTagName = String.format("patch-%s", env == EnvType.STANDALONE ? patchData.getId() : patchData.getId() + "-" + gitPatchRepository.getStandaloneChildkarafName());
                    ObjectId oid = fork.getRepository().resolve(patchTagName);
                    if (oid == null) {
                        throw new PatchException(String.format("Can't find installed patch (tag %s is missing)", patchTagName));
                    }
                    RevCommit commit = new RevWalk(fork.getRepository()).parseCommit(oid);
                    RevertCommand revertCommand = fork.revert().include(commit);
                    RevCommit reverted = revertCommand.call();
                    if (reverted == null) {
                        List<String> unmerged = revertCommand.getUnmergedPaths();
                        Activator.log2(LogService.LOG_WARNING, "Problem rolling back patch \"" + patchData.getId() + "\". The following files where updated later:");
                        for (String path : unmerged) {
                            Activator.log2(LogService.LOG_WARNING, " - " + path);
                        }
                        RevWalk walk = new RevWalk(fork.getRepository());
                        RevCommit head = walk.parseCommit(fork.getRepository().resolve("HEAD"));
                        Map<String, RevTag> tags = gitPatchRepository.findTagsBetween(fork, commit, head);
                        List<RevTag> laterPatches = new LinkedList<>();
                        if (tags.size() > 0) {
                            for (Map.Entry<String, RevTag> tag : tags.entrySet()) {
                                if (tag.getKey().startsWith("patch-")) {
                                    laterPatches.add(tag.getValue());
                                }
                            }
                            Activator.log2(LogService.LOG_INFO, "The following patches were installed after \"" + patchData.getId() + "\":");
                            for (RevTag t : laterPatches) {
                                String message = " - " + t.getTagName().substring("patch-".length());
                                RevObject object = walk.peel(t);
                                if (object != null) {
                                    RevCommit c = walk.parseCommit(object.getId());
                                    String date = GitPatchRepository.FULL_DATE.format(new Date(c.getCommitTime() * 1000L));
                                    message += " (" + date + ")";
                                }
                                Activator.log2(LogService.LOG_INFO, message);
                            }
                        }
                        return;
                    }
                    // TODO: should we restore the backup possibly created when instalilng P patch?
                    // remove the tag
                    fork.tagDelete().setTags(patchTagName).call();
                    gitPatchRepository.push(fork);
                    // remove remote tag
                    fork.push().setRefSpecs(new RefSpec().setSource(null).setDestination(String.format("refs/tags/%s", patchTagName))).call();
                    // HEAD of main patch branch after reset and cherry-picks
                    RevCommit c = new RevWalk(fork.getRepository()).parseCommit(fork.getRepository().resolve("HEAD"));
                    applyChanges(fork, c.getParent(0), c);
                    break;
                }
        }
    } catch (IOException | GitAPIException e) {
        throw new PatchException(e.getMessage(), e);
    } finally {
        if (fork != null) {
            gitPatchRepository.closeRepository(fork, true);
        }
    }
}
Also used : PatchKind(org.jboss.fuse.patch.management.PatchKind) PatchDetailsRequest(org.jboss.fuse.patch.management.PatchDetailsRequest) GitAPIException(org.eclipse.jgit.api.errors.GitAPIException) DirCacheEntry(org.eclipse.jgit.dircache.DirCacheEntry) ZipArchiveEntry(org.apache.commons.compress.archivers.zip.ZipArchiveEntry) DiffEntry(org.eclipse.jgit.diff.DiffEntry) CherryPickResult(org.eclipse.jgit.api.CherryPickResult) RefSpec(org.eclipse.jgit.transport.RefSpec) ListIterator(java.util.ListIterator) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) List(java.util.List) LinkedList(java.util.LinkedList) BundleUpdate(org.jboss.fuse.patch.management.BundleUpdate) RevCommit(org.eclipse.jgit.revwalk.RevCommit) Status(org.eclipse.jgit.api.Status) RevTag(org.eclipse.jgit.revwalk.RevTag) ObjectId(org.eclipse.jgit.lib.ObjectId) RevObject(org.eclipse.jgit.revwalk.RevObject) IOException(java.io.IOException) RevWalk(org.eclipse.jgit.revwalk.RevWalk) ListIterator(java.util.ListIterator) Date(java.util.Date) Ref(org.eclipse.jgit.lib.Ref) Git(org.eclipse.jgit.api.Git) RevertCommand(org.eclipse.jgit.api.RevertCommand) PatchException(org.jboss.fuse.patch.management.PatchException) ZipFile(org.apache.commons.compress.archivers.zip.ZipFile) File(java.io.File) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) Patch(org.jboss.fuse.patch.management.Patch) ManagedPatch(org.jboss.fuse.patch.management.ManagedPatch)

Example 5 with PatchDetailsRequest

use of org.jboss.fuse.patch.management.PatchDetailsRequest in project fuse-karaf by jboss-fuse.

the class GitPatchManagementServiceImpl method gatherOverrides.

/**
 * Returns list of bundle updates (maven coordinates) from HF/P patch that should be preserved during
 * installation of R patch
 * @param hfPatchId ID of patch that was detected to be HF patch installed previously (before R patch just being installed)
 * @param patch R patch which is currently being installed
 * @return an artificial {@link PatchData} with a list of maven URIs for bundles that are newer in previous P-patches than the ones in currently installed R-patch
 */
private PatchData gatherOverrides(String hfPatchId, Patch patch) {
    Patch hf = loadPatch(new PatchDetailsRequest(hfPatchId));
    List<String> bundles = new LinkedList<>();
    Map<String, String> ranges = new LinkedHashMap<>();
    if (hf != null && hf.getPatchData() != null) {
        for (String bundle : hf.getPatchData().getBundles()) {
            bundles.add(bundle);
            String versionRange = hf.getPatchData().getVersionRange(bundle);
            if (versionRange != null && !versionRange.trim().equals("")) {
                ranges.put(bundle, versionRange);
            }
        }
        // leave only these artifacts that are in newer version than in R patch being installed
        if (patch != null && patch.getPatchData() != null) {
            Map<String, Artifact> cache = new HashMap<>();
            for (String bu : patch.getPatchData().getBundles()) {
                Artifact rPatchArtifact = Utils.mvnurlToArtifact(bu, true);
                if (rPatchArtifact != null) {
                    cache.put(String.format("%s:%s", rPatchArtifact.getGroupId(), rPatchArtifact.getArtifactId()), rPatchArtifact);
                }
            }
            for (String bu : hf.getPatchData().getBundles()) {
                Artifact hfPatchArtifact = Utils.mvnurlToArtifact(bu, true);
                if (hfPatchArtifact != null) {
                    String key = String.format("%s:%s", hfPatchArtifact.getGroupId(), hfPatchArtifact.getArtifactId());
                    if (cache.containsKey(key)) {
                        Version hfVersion = Utils.getOsgiVersion(hfPatchArtifact.getVersion());
                        Version rVersion = Utils.getOsgiVersion(cache.get(key).getVersion());
                        if (rVersion.compareTo(hfVersion) >= 0) {
                            bundles.remove(bu);
                            ranges.remove(bu);
                        }
                    }
                }
            }
        }
    }
    return new PatchData(null, null, bundles, null, ranges, null, null);
}
Also used : PatchData(org.jboss.fuse.patch.management.PatchData) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) Version(org.osgi.framework.Version) Patch(org.jboss.fuse.patch.management.Patch) ManagedPatch(org.jboss.fuse.patch.management.ManagedPatch) PatchDetailsRequest(org.jboss.fuse.patch.management.PatchDetailsRequest) LinkedList(java.util.LinkedList) Artifact(org.jboss.fuse.patch.management.Artifact) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

Patch (org.jboss.fuse.patch.management.Patch)7 PatchDetailsRequest (org.jboss.fuse.patch.management.PatchDetailsRequest)7 PatchException (org.jboss.fuse.patch.management.PatchException)6 ManagedPatch (org.jboss.fuse.patch.management.ManagedPatch)5 IOException (java.io.IOException)4 File (java.io.File)3 GitAPIException (org.eclipse.jgit.api.errors.GitAPIException)3 PatchData (org.jboss.fuse.patch.management.PatchData)3 FileInputStream (java.io.FileInputStream)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 LinkedList (java.util.LinkedList)2 ZipFile (org.apache.commons.compress.archivers.zip.ZipFile)2 BundleUpdate (org.jboss.fuse.patch.management.BundleUpdate)2 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 Iterator (java.util.Iterator)1 LinkedHashSet (java.util.LinkedHashSet)1