1 package org.apache.archiva.indexer.search;
3 import java.util.ArrayList;
7 * Licensed to the Apache Software Foundation (ASF) under one
8 * or more contributor license agreements. See the NOTICE file
9 * distributed with this work for additional information
10 * regarding copyright ownership. The ASF licenses this file
11 * to you under the Apache License, Version 2.0 (the
12 * "License"); you may not use this file except in compliance
13 * with the License. You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * Unless required by applicable law or agreed to in writing,
18 * software distributed under the License is distributed on an
19 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 * KIND, either express or implied. See the License for the
21 * specific language governing permissions and limitations
25 public class SearchFields
30 private String groupId;
35 private String artifactId;
40 private String version;
43 * packaging (jar, war, pom, etc.)
45 private String packaging;
48 * class name or package name
50 private String className;
55 private List<String> repositories = new ArrayList<>();
59 * contains osgi metadata Bundle-Version if available
63 private String bundleVersion;
66 * contains osgi metadata Bundle-SymbolicName if available
70 private String bundleSymbolicName;
73 * contains osgi metadata Export-Package if available
77 private String bundleExportPackage;
80 * contains osgi metadata import package if available
84 private String bundleImportPackage;
87 * contains osgi metadata name if available
91 private String bundleName;
94 * contains osgi metadata Export-Service if available
98 private String bundleExportService;
102 * contains osgi metadata Require-Bundle if available
106 private String bundleRequireBundle;
109 * not return artifact with file extension pom
113 private boolean includePomArtifacts = false;
115 private String classifier;
118 * we use exact String matching search
122 private boolean exactSearch = false;
124 public SearchFields()
129 public SearchFields( String groupId, String artifactId, String version, String packaging, String className,
130 List<String> repositories )
132 this.groupId = groupId;
133 this.artifactId = artifactId;
134 this.version = version;
135 this.packaging = packaging;
136 this.className = className;
137 this.repositories = repositories;
140 public String getGroupId()
145 public void setGroupId( String groupId )
147 this.groupId = groupId;
150 public String getArtifactId()
155 public void setArtifactId( String artifactId )
157 this.artifactId = artifactId;
160 public String getVersion()
165 public void setVersion( String version )
167 this.version = version;
170 public String getPackaging()
175 public void setPackaging( String packaging )
177 this.packaging = packaging;
180 public String getClassName()
185 public void setClassName( String className )
187 this.className = className;
190 public List<String> getRepositories()
195 public void setRepositories( List<String> repositories )
197 this.repositories = repositories;
201 public String getBundleVersion()
203 return bundleVersion;
206 public void setBundleVersion( String bundleVersion )
208 this.bundleVersion = bundleVersion;
211 public String getBundleSymbolicName()
213 return bundleSymbolicName;
216 public void setBundleSymbolicName( String bundleSymbolicName )
218 this.bundleSymbolicName = bundleSymbolicName;
221 public String getBundleExportPackage()
223 return bundleExportPackage;
226 public void setBundleExportPackage( String bundleExportPackage )
228 this.bundleExportPackage = bundleExportPackage;
231 public String getBundleExportService()
233 return bundleExportService;
236 public void setBundleExportService( String bundleExportService )
238 this.bundleExportService = bundleExportService;
241 public String getClassifier()
246 public void setClassifier( String classifier )
248 this.classifier = classifier;
251 public String getBundleImportPackage()
253 return bundleImportPackage;
256 public void setBundleImportPackage( String bundleImportPackage )
258 this.bundleImportPackage = bundleImportPackage;
261 public String getBundleName()
266 public void setBundleName( String bundleName )
268 this.bundleName = bundleName;
271 public boolean isIncludePomArtifacts()
273 return includePomArtifacts;
276 public void setIncludePomArtifacts( boolean includePomArtifacts )
278 this.includePomArtifacts = includePomArtifacts;
281 public String getBundleRequireBundle()
283 return bundleRequireBundle;
286 public void setBundleRequireBundle( String bundleRequireBundle )
288 this.bundleRequireBundle = bundleRequireBundle;
291 public boolean isExactSearch()
296 public void setExactSearch( boolean exactSearch )
298 this.exactSearch = exactSearch;
302 public String toString()
304 final StringBuilder sb = new StringBuilder();
305 sb.append( "SearchFields" );
306 sb.append( "{groupId='" ).append( groupId ).append( '\'' );
307 sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
308 sb.append( ", version='" ).append( version ).append( '\'' );
309 sb.append( ", packaging='" ).append( packaging ).append( '\'' );
310 sb.append( ", className='" ).append( className ).append( '\'' );
311 sb.append( ", repositories=" ).append( repositories );
312 sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
313 sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
314 sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
315 sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
316 sb.append( ", bundleName='" ).append( bundleName ).append( '\'' );
317 sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
318 sb.append( ", bundleRequireBundle='" ).append( bundleRequireBundle ).append( '\'' );
319 sb.append( ", includePomArtifacts=" ).append( includePomArtifacts );
320 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
322 return sb.toString();