1 package org.apache.archiva.rest.api.model;
3 import javax.xml.bind.annotation.XmlRootElement;
4 import java.util.ArrayList;
8 * Licensed to the Apache Software Foundation (ASF) under one
9 * or more contributor license agreements. See the NOTICE file
10 * distributed with this work for additional information
11 * regarding copyright ownership. The ASF licenses this file
12 * to you under the Apache License, Version 2.0 (the
13 * "License"); you may not use this file except in compliance
14 * with the License. You may obtain a copy of the License at
16 * http://www.apache.org/licenses/LICENSE-2.0
18 * Unless required by applicable law or agreed to in writing,
19 * software distributed under the License is distributed on an
20 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 * KIND, either express or implied. See the License for the
22 * specific language governing permissions and limitations
25 @XmlRootElement( name = "searchRequest" )
26 public class SearchRequest
31 private String groupId;
36 private String artifactId;
41 private String version;
44 * packaging (jar, war, pom, etc.)
46 private String packaging;
49 * class name or package name
51 private String className;
56 private List<String> repositories = new ArrayList<String>();
60 * contains osgi metadata Bundle-Version if available
64 private String bundleVersion;
67 * contains osgi metadata Bundle-SymbolicName if available
71 private String bundleSymbolicName;
74 * contains osgi metadata Export-Package if available
78 private String bundleExportPackage;
81 * contains osgi metadata Export-Service if available
85 private String bundleExportService;
87 private String classifier;
90 * not return artifact with file extension pom
93 private boolean includePomArtifacts = false;
95 public SearchRequest()
100 public SearchRequest( String groupId, String artifactId, String version, String packaging, String className,
101 List<String> repositories )
103 this.groupId = groupId;
104 this.artifactId = artifactId;
105 this.version = version;
106 this.packaging = packaging;
107 this.className = className;
108 this.repositories = repositories;
111 public String getGroupId()
116 public void setGroupId( String groupId )
118 this.groupId = groupId;
121 public String getArtifactId()
126 public void setArtifactId( String artifactId )
128 this.artifactId = artifactId;
131 public String getVersion()
136 public void setVersion( String version )
138 this.version = version;
141 public String getPackaging()
146 public void setPackaging( String packaging )
148 this.packaging = packaging;
151 public String getClassName()
156 public void setClassName( String className )
158 this.className = className;
161 public List<String> getRepositories()
166 public void setRepositories( List<String> repositories )
168 this.repositories = repositories;
172 public String getBundleVersion()
174 return bundleVersion;
177 public void setBundleVersion( String bundleVersion )
179 this.bundleVersion = bundleVersion;
182 public String getBundleSymbolicName()
184 return bundleSymbolicName;
187 public void setBundleSymbolicName( String bundleSymbolicName )
189 this.bundleSymbolicName = bundleSymbolicName;
192 public String getBundleExportPackage()
194 return bundleExportPackage;
197 public void setBundleExportPackage( String bundleExportPackage )
199 this.bundleExportPackage = bundleExportPackage;
202 public String getBundleExportService()
204 return bundleExportService;
207 public void setBundleExportService( String bundleExportService )
209 this.bundleExportService = bundleExportService;
212 public String getClassifier()
217 public void setClassifier( String classifier )
219 this.classifier = classifier;
222 public boolean isIncludePomArtifacts()
224 return includePomArtifacts;
227 public void setIncludePomArtifacts( boolean includePomArtifacts )
229 this.includePomArtifacts = includePomArtifacts;
233 public String toString()
235 final StringBuilder sb = new StringBuilder();
236 sb.append( "SearchRequest" );
237 sb.append( "{groupId='" ).append( groupId ).append( '\'' );
238 sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
239 sb.append( ", version='" ).append( version ).append( '\'' );
240 sb.append( ", packaging='" ).append( packaging ).append( '\'' );
241 sb.append( ", className='" ).append( className ).append( '\'' );
242 sb.append( ", repositories=" ).append( repositories );
243 sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
244 sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
245 sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
246 sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
247 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
248 sb.append( ", includePomArtifacts=" ).append( includePomArtifacts );
250 return sb.toString();