You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SearchFields.java 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. package org.apache.archiva.indexer.search;
  2. import java.util.ArrayList;
  3. import java.util.List;
  4. /*
  5. * Licensed to the Apache Software Foundation (ASF) under one
  6. * or more contributor license agreements. See the NOTICE file
  7. * distributed with this work for additional information
  8. * regarding copyright ownership. The ASF licenses this file
  9. * to you under the Apache License, Version 2.0 (the
  10. * "License"); you may not use this file except in compliance
  11. * with the License. You may obtain a copy of the License at
  12. *
  13. * http://www.apache.org/licenses/LICENSE-2.0
  14. *
  15. * Unless required by applicable law or agreed to in writing,
  16. * software distributed under the License is distributed on an
  17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18. * KIND, either express or implied. See the License for the
  19. * specific language governing permissions and limitations
  20. * under the License.
  21. */
  22. public class SearchFields
  23. {
  24. /**
  25. * groupId
  26. */
  27. private String groupId;
  28. /**
  29. * artifactId
  30. */
  31. private String artifactId;
  32. /**
  33. * version
  34. */
  35. private String version;
  36. /**
  37. * packaging (jar, war, pom, etc.)
  38. */
  39. private String packaging;
  40. /**
  41. * class name or package name
  42. */
  43. private String className;
  44. /**
  45. * repositories
  46. */
  47. private List<String> repositories = new ArrayList<>();
  48. /**
  49. * contains osgi metadata Bundle-Version if available
  50. *
  51. * @since 1.4-M1
  52. */
  53. private String bundleVersion;
  54. /**
  55. * contains osgi metadata Bundle-SymbolicName if available
  56. *
  57. * @since 1.4-M1
  58. */
  59. private String bundleSymbolicName;
  60. /**
  61. * contains osgi metadata Export-Package if available
  62. *
  63. * @since 1.4-M1
  64. */
  65. private String bundleExportPackage;
  66. /**
  67. * contains osgi metadata import package if available
  68. *
  69. * @since 1.4-M1
  70. */
  71. private String bundleImportPackage;
  72. /**
  73. * contains osgi metadata name if available
  74. *
  75. * @since 1.4-M1
  76. */
  77. private String bundleName;
  78. /**
  79. * contains osgi metadata Export-Service if available
  80. *
  81. * @since 1.4-M1
  82. */
  83. private String bundleExportService;
  84. /**
  85. * contains osgi metadata Require-Bundle if available
  86. *
  87. * @since 1.4-M3
  88. */
  89. private String bundleRequireBundle;
  90. /**
  91. * not return artifact with file extension pom
  92. *
  93. * @since 1.4-M2
  94. */
  95. private boolean includePomArtifacts = false;
  96. private String classifier;
  97. public SearchFields()
  98. {
  99. // no op
  100. }
  101. public SearchFields( String groupId, String artifactId, String version, String packaging, String className,
  102. List<String> repositories )
  103. {
  104. this.groupId = groupId;
  105. this.artifactId = artifactId;
  106. this.version = version;
  107. this.packaging = packaging;
  108. this.className = className;
  109. this.repositories = repositories;
  110. }
  111. public String getGroupId()
  112. {
  113. return groupId;
  114. }
  115. public void setGroupId( String groupId )
  116. {
  117. this.groupId = groupId;
  118. }
  119. public String getArtifactId()
  120. {
  121. return artifactId;
  122. }
  123. public void setArtifactId( String artifactId )
  124. {
  125. this.artifactId = artifactId;
  126. }
  127. public String getVersion()
  128. {
  129. return version;
  130. }
  131. public void setVersion( String version )
  132. {
  133. this.version = version;
  134. }
  135. public String getPackaging()
  136. {
  137. return packaging;
  138. }
  139. public void setPackaging( String packaging )
  140. {
  141. this.packaging = packaging;
  142. }
  143. public String getClassName()
  144. {
  145. return className;
  146. }
  147. public void setClassName( String className )
  148. {
  149. this.className = className;
  150. }
  151. public List<String> getRepositories()
  152. {
  153. return repositories;
  154. }
  155. public void setRepositories( List<String> repositories )
  156. {
  157. this.repositories = repositories;
  158. }
  159. public String getBundleVersion()
  160. {
  161. return bundleVersion;
  162. }
  163. public void setBundleVersion( String bundleVersion )
  164. {
  165. this.bundleVersion = bundleVersion;
  166. }
  167. public String getBundleSymbolicName()
  168. {
  169. return bundleSymbolicName;
  170. }
  171. public void setBundleSymbolicName( String bundleSymbolicName )
  172. {
  173. this.bundleSymbolicName = bundleSymbolicName;
  174. }
  175. public String getBundleExportPackage()
  176. {
  177. return bundleExportPackage;
  178. }
  179. public void setBundleExportPackage( String bundleExportPackage )
  180. {
  181. this.bundleExportPackage = bundleExportPackage;
  182. }
  183. public String getBundleExportService()
  184. {
  185. return bundleExportService;
  186. }
  187. public void setBundleExportService( String bundleExportService )
  188. {
  189. this.bundleExportService = bundleExportService;
  190. }
  191. public String getClassifier()
  192. {
  193. return classifier;
  194. }
  195. public void setClassifier( String classifier )
  196. {
  197. this.classifier = classifier;
  198. }
  199. public String getBundleImportPackage()
  200. {
  201. return bundleImportPackage;
  202. }
  203. public void setBundleImportPackage( String bundleImportPackage )
  204. {
  205. this.bundleImportPackage = bundleImportPackage;
  206. }
  207. public String getBundleName()
  208. {
  209. return bundleName;
  210. }
  211. public void setBundleName( String bundleName )
  212. {
  213. this.bundleName = bundleName;
  214. }
  215. public boolean isIncludePomArtifacts()
  216. {
  217. return includePomArtifacts;
  218. }
  219. public void setIncludePomArtifacts( boolean includePomArtifacts )
  220. {
  221. this.includePomArtifacts = includePomArtifacts;
  222. }
  223. public String getBundleRequireBundle()
  224. {
  225. return bundleRequireBundle;
  226. }
  227. public void setBundleRequireBundle( String bundleRequireBundle )
  228. {
  229. this.bundleRequireBundle = bundleRequireBundle;
  230. }
  231. @Override
  232. public String toString()
  233. {
  234. final StringBuilder sb = new StringBuilder();
  235. sb.append( "SearchFields" );
  236. sb.append( "{groupId='" ).append( groupId ).append( '\'' );
  237. sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
  238. sb.append( ", version='" ).append( version ).append( '\'' );
  239. sb.append( ", packaging='" ).append( packaging ).append( '\'' );
  240. sb.append( ", className='" ).append( className ).append( '\'' );
  241. sb.append( ", repositories=" ).append( repositories );
  242. sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
  243. sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
  244. sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
  245. sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
  246. sb.append( ", bundleName='" ).append( bundleName ).append( '\'' );
  247. sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
  248. sb.append( ", bundleRequireBundle='" ).append( bundleRequireBundle ).append( '\'' );
  249. sb.append( ", includePomArtifacts=" ).append( includePomArtifacts );
  250. sb.append( ", classifier='" ).append( classifier ).append( '\'' );
  251. sb.append( '}' );
  252. return sb.toString();
  253. }
  254. }