Adding implementation of new methods for itemselector

This commit is contained in:
Martin Stockhammer 2020-03-09 23:27:01 +01:00
parent aec61cb525
commit 565ec52e12
1 changed files with 24 additions and 0 deletions

View 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( )
{