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<String>();
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;
101 * not return artifact with file extension pom
104 private boolean includePomArtifacts = false;
106 private String classifier;
108 public SearchFields()
113 public SearchFields( String groupId, String artifactId, String version, String packaging, String className,
114 List<String> repositories )
116 this.groupId = groupId;
117 this.artifactId = artifactId;
118 this.version = version;
119 this.packaging = packaging;
120 this.className = className;
121 this.repositories = repositories;
124 public String getGroupId()
129 public void setGroupId( String groupId )
131 this.groupId = groupId;
134 public String getArtifactId()
139 public void setArtifactId( String artifactId )
141 this.artifactId = artifactId;
144 public String getVersion()
149 public void setVersion( String version )
151 this.version = version;
154 public String getPackaging()
159 public void setPackaging( String packaging )
161 this.packaging = packaging;
164 public String getClassName()
169 public void setClassName( String className )
171 this.className = className;
174 public List<String> getRepositories()
179 public void setRepositories( List<String> repositories )
181 this.repositories = repositories;
185 public String getBundleVersion()
187 return bundleVersion;
190 public void setBundleVersion( String bundleVersion )
192 this.bundleVersion = bundleVersion;
195 public String getBundleSymbolicName()
197 return bundleSymbolicName;
200 public void setBundleSymbolicName( String bundleSymbolicName )
202 this.bundleSymbolicName = bundleSymbolicName;
205 public String getBundleExportPackage()
207 return bundleExportPackage;
210 public void setBundleExportPackage( String bundleExportPackage )
212 this.bundleExportPackage = bundleExportPackage;
215 public String getBundleExportService()
217 return bundleExportService;
220 public void setBundleExportService( String bundleExportService )
222 this.bundleExportService = bundleExportService;
225 public String getClassifier()
230 public void setClassifier( String classifier )
232 this.classifier = classifier;
235 public String getBundleImportPackage()
237 return bundleImportPackage;
240 public void setBundleImportPackage( String bundleImportPackage )
242 this.bundleImportPackage = bundleImportPackage;
245 public String getBundleName()
250 public void setBundleName( String bundleName )
252 this.bundleName = bundleName;
255 public boolean isIncludePomArtifacts()
257 return includePomArtifacts;
260 public void setIncludePomArtifacts( boolean includePomArtifacts )
262 this.includePomArtifacts = includePomArtifacts;
266 public String toString()
268 final StringBuilder sb = new StringBuilder();
269 sb.append( "SearchFields" );
270 sb.append( "{groupId='" ).append( groupId ).append( '\'' );
271 sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
272 sb.append( ", version='" ).append( version ).append( '\'' );
273 sb.append( ", packaging='" ).append( packaging ).append( '\'' );
274 sb.append( ", className='" ).append( className ).append( '\'' );
275 sb.append( ", repositories=" ).append( repositories );
276 sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
277 sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
278 sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
279 sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
280 sb.append( ", bundleName='" ).append( bundleName ).append( '\'' );
281 sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
282 sb.append( ", includePomArtifacts=" ).append( includePomArtifacts );
283 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
285 return sb.toString();