@@ -62,7 +62,7 @@ public class SearchResourceImpl implements SearchResource {
62
62
@ Authorized (style = AuthorizedStyle .None , level = AuthorizedLevel .Read )
63
63
public ArtifactSearchResults searchArtifacts (String name , BigInteger offset , BigInteger limit ,
64
64
SortOrder order , ArtifactSortBy orderby , List <String > labels , String description , String groupId ,
65
- Long globalId , Long contentId , String artifactId ) {
65
+ Long globalId , Long contentId , String artifactId , String artifactType ) {
66
66
if (orderby == null ) {
67
67
orderby = ArtifactSortBy .name ;
68
68
}
@@ -90,6 +90,9 @@ public ArtifactSearchResults searchArtifacts(String name, BigInteger offset, Big
90
90
if (!StringUtil .isEmpty (artifactId )) {
91
91
filters .add (SearchFilter .ofArtifactId (artifactId ));
92
92
}
93
+ if (!StringUtil .isEmpty (artifactType )) {
94
+ filters .add (SearchFilter .ofArtifactType (artifactType ));
95
+ }
93
96
94
97
if (labels != null && !labels .isEmpty ()) {
95
98
labels .stream ().map (prop -> {
@@ -234,7 +237,8 @@ public GroupSearchResults searchGroups(BigInteger offset, BigInteger limit, Sort
234
237
@ Authorized (style = AuthorizedStyle .None , level = AuthorizedLevel .Read )
235
238
public VersionSearchResults searchVersions (String version , BigInteger offset , BigInteger limit ,
236
239
SortOrder order , VersionSortBy orderby , List <String > labels , String description , String groupId ,
237
- Long globalId , Long contentId , String artifactId , String name , VersionState state ) {
240
+ Long globalId , Long contentId , String artifactId , String name , VersionState state ,
241
+ String artifactType ) {
238
242
if (orderby == null ) {
239
243
orderby = VersionSortBy .globalId ;
240
244
}
@@ -265,6 +269,9 @@ public VersionSearchResults searchVersions(String version, BigInteger offset, Bi
265
269
if (!StringUtil .isEmpty (description )) {
266
270
filters .add (SearchFilter .ofDescription (description ));
267
271
}
272
+ if (!StringUtil .isEmpty (artifactType )) {
273
+ filters .add (SearchFilter .ofArtifactType (artifactType ));
274
+ }
268
275
if (labels != null && !labels .isEmpty ()) {
269
276
labels .stream ().map (prop -> {
270
277
int delimiterIndex = prop .indexOf (":" );
0 commit comments