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;
117 public SearchFields()
122 public SearchFields( String groupId, String artifactId, String version, String packaging, String className,
123 List<String> repositories )
125 this.groupId = groupId;
126 this.artifactId = artifactId;
127 this.version = version;
128 this.packaging = packaging;
129 this.className = className;
130 this.repositories = repositories;
133 public String getGroupId()
138 public void setGroupId( String groupId )
140 this.groupId = groupId;
143 public String getArtifactId()
148 public void setArtifactId( String artifactId )
150 this.artifactId = artifactId;
153 public String getVersion()
158 public void setVersion( String version )
160 this.version = version;
163 public String getPackaging()
168 public void setPackaging( String packaging )
170 this.packaging = packaging;
173 public String getClassName()
178 public void setClassName( String className )
180 this.className = className;
183 public List<String> getRepositories()
188 public void setRepositories( List<String> repositories )
190 this.repositories = repositories;
194 public String getBundleVersion()
196 return bundleVersion;
199 public void setBundleVersion( String bundleVersion )
201 this.bundleVersion = bundleVersion;
204 public String getBundleSymbolicName()
206 return bundleSymbolicName;
209 public void setBundleSymbolicName( String bundleSymbolicName )
211 this.bundleSymbolicName = bundleSymbolicName;
214 public String getBundleExportPackage()
216 return bundleExportPackage;
219 public void setBundleExportPackage( String bundleExportPackage )
221 this.bundleExportPackage = bundleExportPackage;
224 public String getBundleExportService()
226 return bundleExportService;
229 public void setBundleExportService( String bundleExportService )
231 this.bundleExportService = bundleExportService;
234 public String getClassifier()
239 public void setClassifier( String classifier )
241 this.classifier = classifier;
244 public String getBundleImportPackage()
246 return bundleImportPackage;
249 public void setBundleImportPackage( String bundleImportPackage )
251 this.bundleImportPackage = bundleImportPackage;
254 public String getBundleName()
259 public void setBundleName( String bundleName )
261 this.bundleName = bundleName;
264 public boolean isIncludePomArtifacts()
266 return includePomArtifacts;
269 public void setIncludePomArtifacts( boolean includePomArtifacts )
271 this.includePomArtifacts = includePomArtifacts;
274 public String getBundleRequireBundle()
276 return bundleRequireBundle;
279 public void setBundleRequireBundle( String bundleRequireBundle )
281 this.bundleRequireBundle = bundleRequireBundle;
285 public String toString()
287 final StringBuilder sb = new StringBuilder();
288 sb.append( "SearchFields" );
289 sb.append( "{groupId='" ).append( groupId ).append( '\'' );
290 sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
291 sb.append( ", version='" ).append( version ).append( '\'' );
292 sb.append( ", packaging='" ).append( packaging ).append( '\'' );
293 sb.append( ", className='" ).append( className ).append( '\'' );
294 sb.append( ", repositories=" ).append( repositories );
295 sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
296 sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
297 sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
298 sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
299 sb.append( ", bundleName='" ).append( bundleName ).append( '\'' );
300 sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
301 sb.append( ", bundleRequireBundle='" ).append( bundleRequireBundle ).append( '\'' );
302 sb.append( ", includePomArtifacts=" ).append( includePomArtifacts );
303 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
305 return sb.toString();