From 565ec52e1239fc8cf9e3f5ed7e19b40925e62e04 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Mon, 9 Mar 2020 23:27:01 +0100 Subject: [PATCH] Adding implementation of new methods for itemselector --- .../content/base/ArchivaItemSelector.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaItemSelector.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaItemSelector.java index f50a3910b..37374298e 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaItemSelector.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaItemSelector.java @@ -41,6 +41,8 @@ public class ArchivaItemSelector implements ItemSelector private String classifier = null; private String extension = null; private Map 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( ) { -- 2.39.5