001 package org.apache.archiva.indexer.search; 002 003 import java.util.ArrayList; 004 import java.util.List; 005 006 /* 007 * Licensed to the Apache Software Foundation (ASF) under one 008 * or more contributor license agreements. See the NOTICE file 009 * distributed with this work for additional information 010 * regarding copyright ownership. The ASF licenses this file 011 * to you under the Apache License, Version 2.0 (the 012 * "License"); you may not use this file except in compliance 013 * with the License. You may obtain a copy of the License at 014 * 015 * http://www.apache.org/licenses/LICENSE-2.0 016 * 017 * Unless required by applicable law or agreed to in writing, 018 * software distributed under the License is distributed on an 019 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 020 * KIND, either express or implied. See the License for the 021 * specific language governing permissions and limitations 022 * under the License. 023 */ 024 025 public class SearchFields 026 { 027 /** 028 * groupId 029 */ 030 private String groupId; 031 032 /** 033 * artifactId 034 */ 035 private String artifactId; 036 037 /** 038 * version 039 */ 040 private String version; 041 042 /** 043 * packaging (jar, war, pom, etc.) 044 */ 045 private String packaging; 046 047 /** 048 * class name or package name 049 */ 050 private String className; 051 052 /** 053 * repositories 054 */ 055 private List<String> repositories = new ArrayList<String>(); 056 057 058 /** 059 * contains osgi metadata Bundle-Version if available 060 * 061 * @since 1.4-M1 062 */ 063 private String bundleVersion; 064 065 /** 066 * contains osgi metadata Bundle-SymbolicName if available 067 * 068 * @since 1.4-M1 069 */ 070 private String bundleSymbolicName; 071 072 /** 073 * contains osgi metadata Export-Package if available 074 * 075 * @since 1.4-M1 076 */ 077 private String bundleExportPackage; 078 079 /** 080 * contains osgi metadata import package if available 081 * 082 * @since 1.4-M1 083 */ 084 private String bundleImportPackage; 085 086 /** 087 * contains osgi metadata name if available 088 * 089 * @since 1.4-M1 090 */ 091 private String bundleName; 092 093 /** 094 * contains osgi metadata Export-Service if available 095 * 096 * @since 1.4-M1 097 */ 098 private String bundleExportService; 099 100 101 /** 102 * contains osgi metadata Require-Bundle if available 103 * 104 * @since 1.4-M3 105 */ 106 private String bundleRequireBundle; 107 108 /** 109 * not return artifact with file extension pom 110 * 111 * @since 1.4-M2 112 */ 113 private boolean includePomArtifacts = false; 114 115 private String classifier; 116 117 public SearchFields() 118 { 119 // no op 120 } 121 122 public SearchFields( String groupId, String artifactId, String version, String packaging, String className, 123 List<String> repositories ) 124 { 125 this.groupId = groupId; 126 this.artifactId = artifactId; 127 this.version = version; 128 this.packaging = packaging; 129 this.className = className; 130 this.repositories = repositories; 131 } 132 133 public String getGroupId() 134 { 135 return groupId; 136 } 137 138 public void setGroupId( String groupId ) 139 { 140 this.groupId = groupId; 141 } 142 143 public String getArtifactId() 144 { 145 return artifactId; 146 } 147 148 public void setArtifactId( String artifactId ) 149 { 150 this.artifactId = artifactId; 151 } 152 153 public String getVersion() 154 { 155 return version; 156 } 157 158 public void setVersion( String version ) 159 { 160 this.version = version; 161 } 162 163 public String getPackaging() 164 { 165 return packaging; 166 } 167 168 public void setPackaging( String packaging ) 169 { 170 this.packaging = packaging; 171 } 172 173 public String getClassName() 174 { 175 return className; 176 } 177 178 public void setClassName( String className ) 179 { 180 this.className = className; 181 } 182 183 public List<String> getRepositories() 184 { 185 return repositories; 186 } 187 188 public void setRepositories( List<String> repositories ) 189 { 190 this.repositories = repositories; 191 } 192 193 194 public String getBundleVersion() 195 { 196 return bundleVersion; 197 } 198 199 public void setBundleVersion( String bundleVersion ) 200 { 201 this.bundleVersion = bundleVersion; 202 } 203 204 public String getBundleSymbolicName() 205 { 206 return bundleSymbolicName; 207 } 208 209 public void setBundleSymbolicName( String bundleSymbolicName ) 210 { 211 this.bundleSymbolicName = bundleSymbolicName; 212 } 213 214 public String getBundleExportPackage() 215 { 216 return bundleExportPackage; 217 } 218 219 public void setBundleExportPackage( String bundleExportPackage ) 220 { 221 this.bundleExportPackage = bundleExportPackage; 222 } 223 224 public String getBundleExportService() 225 { 226 return bundleExportService; 227 } 228 229 public void setBundleExportService( String bundleExportService ) 230 { 231 this.bundleExportService = bundleExportService; 232 } 233 234 public String getClassifier() 235 { 236 return classifier; 237 } 238 239 public void setClassifier( String classifier ) 240 { 241 this.classifier = classifier; 242 } 243 244 public String getBundleImportPackage() 245 { 246 return bundleImportPackage; 247 } 248 249 public void setBundleImportPackage( String bundleImportPackage ) 250 { 251 this.bundleImportPackage = bundleImportPackage; 252 } 253 254 public String getBundleName() 255 { 256 return bundleName; 257 } 258 259 public void setBundleName( String bundleName ) 260 { 261 this.bundleName = bundleName; 262 } 263 264 public boolean isIncludePomArtifacts() 265 { 266 return includePomArtifacts; 267 } 268 269 public void setIncludePomArtifacts( boolean includePomArtifacts ) 270 { 271 this.includePomArtifacts = includePomArtifacts; 272 } 273 274 public String getBundleRequireBundle() 275 { 276 return bundleRequireBundle; 277 } 278 279 public void setBundleRequireBundle( String bundleRequireBundle ) 280 { 281 this.bundleRequireBundle = bundleRequireBundle; 282 } 283 284 @Override 285 public String toString() 286 { 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( '\'' ); 304 sb.append( '}' ); 305 return sb.toString(); 306 } 307 }