]> source.dussan.org Git - archiva.git/commitdiff
Adding implementation of new methods for itemselector
authorMartin Stockhammer <martin_s@apache.org>
Mon, 9 Mar 2020 22:27:01 +0000 (23:27 +0100)
committerMartin Stockhammer <martin_s@apache.org>
Mon, 9 Mar 2020 22:27:01 +0000 (23:27 +0100)
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaItemSelector.java

index f50a3910b80bcc35aacc671a018606062d918cfb..37374298e3d1d43c8047ec97d5bf8d79e56bd181 100644 (file)
@@ -41,6 +41,8 @@ public class ArchivaItemSelector implements ItemSelector
     private String classifier = null;
     private String extension = null;
     private Map<String, String> attributes;
+    private boolean searchRelatedArtifacts = false;
+    private boolean searchSubNamespaces = false;
 
 
     private ArchivaItemSelector( )
@@ -118,6 +120,16 @@ public class ArchivaItemSelector implements ItemSelector
             return this;
         }
 
+        public Builder enableSearchRelatedArtifacts() {
+            selector.searchRelatedArtifacts = true;
+            return this;
+        }
+
+        public Builder enableSearchSubNamespaces() {
+            selector.searchSubNamespaces = true;
+            return this;
+        }
+
         public ArchivaItemSelector build( )
         {
             return selector;
@@ -208,6 +220,18 @@ public class ArchivaItemSelector implements ItemSelector
         }
     }
 
+    @Override
+    public boolean searchSubNamespaces( )
+    {
+        return searchSubNamespaces;
+    }
+
+    @Override
+    public boolean findRelatedArtifacts( )
+    {
+        return searchRelatedArtifacts;
+    }
+
     @Override
     public boolean hasAttributes( )
     {