This project has retired. For details please refer to its Attic page.
SearchFields xref
View Javadoc
1   package org.apache.archiva.indexer.search;
2   
3   import java.util.ArrayList;
4   import java.util.List;
5   
6   /*
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
14   *
15   *  http://www.apache.org/licenses/LICENSE-2.0
16   *
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
22   * under the License.
23   */
24  
25  public class SearchFields
26  {
27      /**
28       * groupId
29       */
30      private String groupId;
31  
32      /**
33       * artifactId
34       */
35      private String artifactId;
36  
37      /**
38       * version
39       */
40      private String version;
41  
42      /**
43       * packaging (jar, war, pom, etc.)
44       */
45      private String packaging;
46  
47      /**
48       * class name or package name
49       */
50      private String className;
51  
52      /**
53       * repositories
54       */
55      private List<String> repositories = new ArrayList<>();
56  
57  
58      /**
59       * contains osgi metadata Bundle-Version if available
60       *
61       * @since 1.4-M1
62       */
63      private String bundleVersion;
64  
65      /**
66       * contains osgi metadata Bundle-SymbolicName if available
67       *
68       * @since 1.4-M1
69       */
70      private String bundleSymbolicName;
71  
72      /**
73       * contains osgi metadata Export-Package if available
74       *
75       * @since 1.4-M1
76       */
77      private String bundleExportPackage;
78  
79      /**
80       * contains osgi metadata import package if available
81       *
82       * @since 1.4-M1
83       */
84      private String bundleImportPackage;
85  
86      /**
87       * contains osgi metadata name if available
88       *
89       * @since 1.4-M1
90       */
91      private String bundleName;
92  
93      /**
94       * contains osgi metadata Export-Service if available
95       *
96       * @since 1.4-M1
97       */
98      private String bundleExportService;
99  
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     /**
118      * we use exact String matching search
119      *
120      * @since 2.1.0
121      */
122     private boolean exactSearch = false;
123 
124     public SearchFields()
125     {
126         // no op
127     }
128 
129     public SearchFields( String groupId, String artifactId, String version, String packaging, String className,
130                          List<String> repositories )
131     {
132         this.groupId = groupId;
133         this.artifactId = artifactId;
134         this.version = version;
135         this.packaging = packaging;
136         this.className = className;
137         this.repositories = repositories;
138     }
139 
140     public String getGroupId()
141     {
142         return groupId;
143     }
144 
145     public void setGroupId( String groupId )
146     {
147         this.groupId = groupId;
148     }
149 
150     public String getArtifactId()
151     {
152         return artifactId;
153     }
154 
155     public void setArtifactId( String artifactId )
156     {
157         this.artifactId = artifactId;
158     }
159 
160     public String getVersion()
161     {
162         return version;
163     }
164 
165     public void setVersion( String version )
166     {
167         this.version = version;
168     }
169 
170     public String getPackaging()
171     {
172         return packaging;
173     }
174 
175     public void setPackaging( String packaging )
176     {
177         this.packaging = packaging;
178     }
179 
180     public String getClassName()
181     {
182         return className;
183     }
184 
185     public void setClassName( String className )
186     {
187         this.className = className;
188     }
189 
190     public List<String> getRepositories()
191     {
192         return repositories;
193     }
194 
195     public void setRepositories( List<String> repositories )
196     {
197         this.repositories = repositories;
198     }
199 
200 
201     public String getBundleVersion()
202     {
203         return bundleVersion;
204     }
205 
206     public void setBundleVersion( String bundleVersion )
207     {
208         this.bundleVersion = bundleVersion;
209     }
210 
211     public String getBundleSymbolicName()
212     {
213         return bundleSymbolicName;
214     }
215 
216     public void setBundleSymbolicName( String bundleSymbolicName )
217     {
218         this.bundleSymbolicName = bundleSymbolicName;
219     }
220 
221     public String getBundleExportPackage()
222     {
223         return bundleExportPackage;
224     }
225 
226     public void setBundleExportPackage( String bundleExportPackage )
227     {
228         this.bundleExportPackage = bundleExportPackage;
229     }
230 
231     public String getBundleExportService()
232     {
233         return bundleExportService;
234     }
235 
236     public void setBundleExportService( String bundleExportService )
237     {
238         this.bundleExportService = bundleExportService;
239     }
240 
241     public String getClassifier()
242     {
243         return classifier;
244     }
245 
246     public void setClassifier( String classifier )
247     {
248         this.classifier = classifier;
249     }
250 
251     public String getBundleImportPackage()
252     {
253         return bundleImportPackage;
254     }
255 
256     public void setBundleImportPackage( String bundleImportPackage )
257     {
258         this.bundleImportPackage = bundleImportPackage;
259     }
260 
261     public String getBundleName()
262     {
263         return bundleName;
264     }
265 
266     public void setBundleName( String bundleName )
267     {
268         this.bundleName = bundleName;
269     }
270 
271     public boolean isIncludePomArtifacts()
272     {
273         return includePomArtifacts;
274     }
275 
276     public void setIncludePomArtifacts( boolean includePomArtifacts )
277     {
278         this.includePomArtifacts = includePomArtifacts;
279     }
280 
281     public String getBundleRequireBundle()
282     {
283         return bundleRequireBundle;
284     }
285 
286     public void setBundleRequireBundle( String bundleRequireBundle )
287     {
288         this.bundleRequireBundle = bundleRequireBundle;
289     }
290 
291     public boolean isExactSearch()
292     {
293         return exactSearch;
294     }
295 
296     public void setExactSearch( boolean exactSearch )
297     {
298         this.exactSearch = exactSearch;
299     }
300 
301     @Override
302     public String toString()
303     {
304         final StringBuilder sb = new StringBuilder();
305         sb.append( "SearchFields" );
306         sb.append( "{groupId='" ).append( groupId ).append( '\'' );
307         sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
308         sb.append( ", version='" ).append( version ).append( '\'' );
309         sb.append( ", packaging='" ).append( packaging ).append( '\'' );
310         sb.append( ", className='" ).append( className ).append( '\'' );
311         sb.append( ", repositories=" ).append( repositories );
312         sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
313         sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
314         sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
315         sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
316         sb.append( ", bundleName='" ).append( bundleName ).append( '\'' );
317         sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
318         sb.append( ", bundleRequireBundle='" ).append( bundleRequireBundle ).append( '\'' );
319         sb.append( ", includePomArtifacts=" ).append( includePomArtifacts );
320         sb.append( ", classifier='" ).append( classifier ).append( '\'' );
321         sb.append( '}' );
322         return sb.toString();
323     }
324 }