You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/10/02 15:16:06 UTC

[1/2] karaf-cellar git commit: [KARAF-4722] do filtering of displayed bundles by the supplied ids

Repository: karaf-cellar
Updated Branches:
  refs/heads/master 2373eb68b -> 8eeb60202


[KARAF-4722] do filtering of displayed bundles by the supplied ids


Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/7d413fb7
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/7d413fb7
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/7d413fb7

Branch: refs/heads/master
Commit: 7d413fb76bc87d9096a7230c8fa0a8248ee6749e
Parents: 2373eb6
Author: Sergiy Shyrkov <ss...@jahia.com>
Authored: Wed Sep 21 13:50:14 2016 +0200
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Sun Oct 2 16:38:46 2016 +0200

----------------------------------------------------------------------
 .../apache/karaf/cellar/bundle/shell/ListBundleCommand.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/7d413fb7/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/ListBundleCommand.java
----------------------------------------------------------------------
diff --git a/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/ListBundleCommand.java b/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/ListBundleCommand.java
index 34a6484..1b032d8 100644
--- a/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/ListBundleCommand.java
+++ b/bundle/src/main/java/org/apache/karaf/cellar/bundle/shell/ListBundleCommand.java
@@ -81,6 +81,15 @@ public class ListBundleCommand extends BundleCommandSupport {
                     table.column("Name");
                 }
 
+                if (ids != null && !ids.isEmpty()) {
+                    // do filtering by ids
+                    Set<String> matchingBundles = new HashSet<String>(selector(allBundles));
+                    for (Iterator<String> bundles = allBundles.keySet().iterator(); bundles.hasNext();) {
+                        if (!matchingBundles.contains(bundles.next())) {
+                            bundles.remove();
+                        }
+                    }
+                }
                 List<ExtendedBundleState> bundles = new ArrayList<ExtendedBundleState>(allBundles.values());
                 Collections.sort(bundles, new BundleStateComparator());
 


[2/2] karaf-cellar git commit: [KARAF-4722] This closes #39

Posted by jb...@apache.org.
[KARAF-4722] This closes #39


Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/8eeb6020
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/8eeb6020
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/8eeb6020

Branch: refs/heads/master
Commit: 8eeb60202f46a506873b39711297b562ee89390d
Parents: 2373eb6 7d413fb
Author: Jean-Baptiste Onofr� <jb...@apache.org>
Authored: Sun Oct 2 16:54:20 2016 +0200
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Sun Oct 2 16:54:20 2016 +0200

----------------------------------------------------------------------
 .../apache/karaf/cellar/bundle/shell/ListBundleCommand.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------