if ( StringUtils.isNotBlank( searchFields.getBundleExportService() ) )
{
- q.add( indexer.constructQuery( OSGI.SYMBOLIC_NAME,
+ q.add( indexer.constructQuery( OSGI.EXPORT_SERVICE,
new StringSearchExpression( searchFields.getBundleExportService() ) ),
Occur.MUST );
}
+ if ( StringUtils.isNotBlank( searchFields.getBundleImportPackage() ) )
+ {
+ q.add( indexer.constructQuery( OSGI.IMPORT_PACKAGE,
+ new StringSearchExpression( searchFields.getBundleImportPackage() ) ),
+ Occur.MUST );
+ }
+
+ if ( StringUtils.isNotBlank( searchFields.getBundleName() ) )
+ {
+ q.add( indexer.constructQuery( OSGI.NAME, new StringSearchExpression( searchFields.getBundleName() ) ),
+ Occur.MUST );
+ }
+
if ( StringUtils.isNotBlank( searchFields.getClassifier() ) )
{
q.add(
*/
private String bundleExportPackage;
+ /**
+ * contains osgi metadata import package if available
+ *
+ * @since 1.4
+ */
+ private String bundleImportPackage;
+
+ /**
+ * contains osgi metadata name if available
+ *
+ * @since 1.4
+ */
+ private String bundleName;
+
/**
* contains osgi metadata Export-Service if available
*
this.classifier = classifier;
}
+ public String getBundleImportPackage()
+ {
+ return bundleImportPackage;
+ }
+
+ public void setBundleImportPackage( String bundleImportPackage )
+ {
+ this.bundleImportPackage = bundleImportPackage;
+ }
+
+ public String getBundleName()
+ {
+ return bundleName;
+ }
+
+ public void setBundleImportName( String bundleName )
+ {
+ this.bundleName = bundleName;
+ }
+
@Override
public String toString()
{
sb.append( ", bundleVersion='" ).append( bundleVersion ).append( '\'' );
sb.append( ", bundleSymbolicName='" ).append( bundleSymbolicName ).append( '\'' );
sb.append( ", bundleExportPackage='" ).append( bundleExportPackage ).append( '\'' );
+ sb.append( ", bundleImportPackage='" ).append( bundleImportPackage ).append( '\'' );
+ sb.append( ", bundleName='" ).append( bundleName ).append( '\'' );
sb.append( ", bundleExportService='" ).append( bundleExportService ).append( '\'' );
sb.append( ", classifier='" ).append( classifier ).append( '\'' );
sb.append( '}' );
SearchService searchService = getSearchService( authorizationHeader );
+ // START SNIPPET: quick-search
List<Artifact> artifacts = searchService.quickSearch( "commons-logging" );
+ // return all artifacts with groupId OR artifactId
+ // START SNIPPET: quick-search
assertNotNull( artifacts );
assertTrue( " not 6 results for commons-logging search but " + artifacts.size() + ":" + artifacts,